From f006b6076fd79980ffc924cb006375e2c586dd9d Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Fri, 26 Jul 2024 18:28:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9C=A8=E6=9C=BA=E6=9E=84?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97@LogRecor?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/doctor/DoctorController.java | 2 +- .../controller/admin/org/OrgUnitController.java | 13 +++++++++++-- .../controller/admin/org/vo/OrgUnitPageReqVO.java | 2 ++ .../controller/admin/org/vo/OrgUnitRespVO.java | 2 ++ .../controller/admin/org/vo/OrgUnitSaveReqVO.java | 3 +++ .../system/controller/admin/wx/WxController.java | 6 +++++- .../system/controller/admin/wx/vo/WxPageReqVO.java | 2 ++ .../system/controller/admin/wx/vo/WxRespVO.java | 2 ++ .../system/controller/admin/wx/vo/WxSaveReqVO.java | 3 +++ .../module/system/dal/dataobject/org/OrgUnitDO.java | 3 +++ .../yudao/module/system/dal/dataobject/wx/WxDO.java | 3 +++ .../module/system/dal/mysql/org/OrgUnitMapper.java | 3 +++ .../yudao/module/system/dal/mysql/wx/WxMapper.java | 3 +++ 13 files changed, 43 insertions(+), 4 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/doctor/DoctorController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/doctor/DoctorController.java index 88244bc32..6d5bf9956 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/doctor/DoctorController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/doctor/DoctorController.java @@ -34,7 +34,7 @@ import javax.validation.Valid; @Tag(name = "管理后台 - 医生管理") @RestController -@RequestMapping("/mapper/doctor/") +@RequestMapping("/doctor/") @Validated public class DoctorController { diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/OrgUnitController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/OrgUnitController.java index 25c72ed3e..4dc6f77a3 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/OrgUnitController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/OrgUnitController.java @@ -1,5 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.org; +import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import com.mzt.logapi.context.LogRecordContext; +import com.mzt.logapi.starter.annotation.LogRecord; import org.springframework.web.bind.annotation.*; import org.springframework.validation.annotation.Validated; import org.springframework.security.access.prepost.PreAuthorize; @@ -22,6 +25,7 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; +import static cn.iocoder.yudao.module.system.enums.LogRecordConstants.*; import cn.iocoder.yudao.module.system.controller.admin.org.vo.*; import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO; @@ -43,6 +47,7 @@ public class OrgUnitController { @PostMapping("/create") @Operation(summary = "创建机构管理") @PreAuthorize("@ss.hasPermission('org::create')") + @LogRecord(type = "机构管理", subType = "创建", bizNo ="{{#createReqVO.getOrgID}}" , success = "创建ID为{{#createReqVO.getOrgID}}的机构") public CommonResult create(@Valid @RequestBody OrgUnitSaveReqVO createReqVO) { String msg=""; @@ -58,7 +63,7 @@ public class OrgUnitController { { msg="机构ID已经存在"; } - + // LogRecordContext.putVariable("机构管理","进行了创建操作"); return success(msg); } @@ -75,7 +80,11 @@ public class OrgUnitController { @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('org::delete')") public CommonResult delete(@RequestParam("id") String id) { - Service.delete(id); + OrgUnitSaveReqVO updateReqVO=new OrgUnitSaveReqVO(); + updateReqVO.setOrgID(id); + updateReqVO.setIsdelete("1"); + Service.update(updateReqVO); + // Service.delete(id); return success(true); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitPageReqVO.java index 9bbf38100..d25a75ed9 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitPageReqVO.java @@ -48,4 +48,6 @@ public class OrgUnitPageReqVO extends PageParam { @Schema(description = "机构logo的URL", example = "https://www.iocoder.cn") private String orgLogoUrl; + @Schema(description = "是否删除") + private String isdelete; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitRespVO.java index 49144e1e9..35c03f750 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitRespVO.java @@ -59,4 +59,6 @@ public class OrgUnitRespVO { @ExcelProperty("机构logo的URL") private String orgLogoUrl; + @Schema(description = "是否删除") + private String isdelete; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitSaveReqVO.java index 44ecccc49..08ed3b11c 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/org/vo/OrgUnitSaveReqVO.java @@ -45,4 +45,7 @@ public class OrgUnitSaveReqVO { @Schema(description = "机构logo的URL", example = "https://www.iocoder.cn") private String orgLogoUrl; + @Schema(description = "是否删除") + private String isdelete; + } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/WxController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/WxController.java index 59a405030..819b68109 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/WxController.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/WxController.java @@ -62,7 +62,11 @@ public class WxController { @Parameter(name = "id", description = "编号", required = true) @PreAuthorize("@ss.hasPermission('system:wx:delete')") public CommonResult deleteWx(@RequestParam("id") String id) { - wxService.deleteWx(id); + WxSaveReqVO updateReqVO=new WxSaveReqVO(); + updateReqVO.setId(id); + updateReqVO.setIsdelete("1"); + wxService.updateWx(updateReqVO); + // wxService.deleteWx(id); return success(true); } diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxPageReqVO.java index c4c11cd16..87f7e6cfd 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxPageReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxPageReqVO.java @@ -24,4 +24,6 @@ public class WxPageReqVO extends PageParam { @Schema(description = "微信号所属人的姓名,通过公众号发固定格式命令获取", example = "王五") private String personName; + @Schema(description = "是否删除") + private String isdelete; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxRespVO.java index 6724b06d0..48dc095cf 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxRespVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxRespVO.java @@ -41,4 +41,6 @@ public class WxRespVO { @ExcelProperty("机构ID") private String orgId; + @Schema(description = "是否删除") + private String isdelete; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxSaveReqVO.java index 8bc24c01c..c7a2242d5 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxSaveReqVO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/wx/vo/WxSaveReqVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.wx.vo; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; @@ -31,5 +32,7 @@ public class WxSaveReqVO { @Schema(description = "机构ID", example = "4736") private String orgId; + @Schema(description = "是否删除") + private String isdelete; } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/org/OrgUnitDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/org/OrgUnitDO.java index a3a1a7ec4..0af8d0898 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/org/OrgUnitDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/org/OrgUnitDO.java @@ -80,4 +80,7 @@ public class OrgUnitDO { @TableField("orgLogoUrl") private String orgLogoUrl; + @TableField("isdelete") + private String isdelete; + } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/wx/WxDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/wx/WxDO.java index 8c1e67157..ad3bbed45 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/wx/WxDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/wx/WxDO.java @@ -56,4 +56,7 @@ public class WxDO { @TableField("orgId") private String orgId; + @TableField("isdelete") + private String isdelete; + } \ No newline at end of file diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/org/OrgUnitMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/org/OrgUnitMapper.java index 053337052..168a2887e 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/org/OrgUnitMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/org/OrgUnitMapper.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.system.dal.mysql.org; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.system.dal.dataobject.doctor.DoctorDO; import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO; import com.baomidou.mybatisplus.annotation.InterceptorIgnore; import org.apache.ibatis.annotations.Mapper; @@ -31,6 +32,8 @@ public interface OrgUnitMapper extends BaseMapperX { .betweenIfPresent(OrgUnitDO::getCreateDate, reqVO.getCreateDate()) .likeIfPresent(OrgUnitDO::getHighLevelOrgName, reqVO.getHighLevelOrgName()) .eqIfPresent(OrgUnitDO::getOrgLogoUrl, reqVO.getOrgLogoUrl()) + .or(wrapper -> wrapper.eq(OrgUnitDO::getIsdelete, 0)) + .or(wrapper -> wrapper.isNull(OrgUnitDO::getIsdelete)) .orderByDesc(OrgUnitDO::getOrgID)); } //查询当前ID 是否存在 diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/wx/WxMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/wx/WxMapper.java index f38e63e1b..651a687f8 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/wx/WxMapper.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/wx/WxMapper.java @@ -5,6 +5,7 @@ import java.util.*; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO; import cn.iocoder.yudao.module.system.dal.dataobject.wx.WxDO; import com.baomidou.mybatisplus.annotation.InterceptorIgnore; import org.apache.ibatis.annotations.Mapper; @@ -24,6 +25,8 @@ public interface WxMapper extends BaseMapperX { .likeIfPresent(WxDO::getWxUserid, reqVO.getWxUserid()) .likeIfPresent(WxDO::getBindTel, reqVO.getBindTel()) .likeIfPresent(WxDO::getPersonName, reqVO.getPersonName()) + .or(wrapper -> wrapper.eq(WxDO::getIsdelete, 0)) + .or(wrapper -> wrapper.isNull(WxDO::getIsdelete)) .orderByDesc(WxDO::getId)); }