新增在机构管理增加日志@LogRecord
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
This commit is contained in:
parent
ac7d9dc198
commit
f006b6076f
@ -34,7 +34,7 @@ import javax.validation.Valid;
|
|||||||
|
|
||||||
@Tag(name = "管理后台 - 医生管理")
|
@Tag(name = "管理后台 - 医生管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/mapper/doctor/")
|
@RequestMapping("/doctor/")
|
||||||
@Validated
|
@Validated
|
||||||
public class DoctorController {
|
public class DoctorController {
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.org;
|
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.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
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 cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
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.controller.admin.org.vo.*;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO;
|
||||||
@ -43,6 +47,7 @@ public class OrgUnitController {
|
|||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建机构管理")
|
@Operation(summary = "创建机构管理")
|
||||||
@PreAuthorize("@ss.hasPermission('org::create')")
|
@PreAuthorize("@ss.hasPermission('org::create')")
|
||||||
|
@LogRecord(type = "机构管理", subType = "创建", bizNo ="{{#createReqVO.getOrgID}}" , success = "创建ID为{{#createReqVO.getOrgID}}的机构")
|
||||||
public CommonResult<String> create(@Valid @RequestBody OrgUnitSaveReqVO createReqVO) {
|
public CommonResult<String> create(@Valid @RequestBody OrgUnitSaveReqVO createReqVO) {
|
||||||
|
|
||||||
String msg="";
|
String msg="";
|
||||||
@ -58,7 +63,7 @@ public class OrgUnitController {
|
|||||||
{
|
{
|
||||||
msg="机构ID已经存在";
|
msg="机构ID已经存在";
|
||||||
}
|
}
|
||||||
|
// LogRecordContext.putVariable("机构管理","进行了创建操作");
|
||||||
return success(msg);
|
return success(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,7 +80,11 @@ public class OrgUnitController {
|
|||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('org::delete')")
|
@PreAuthorize("@ss.hasPermission('org::delete')")
|
||||||
public CommonResult<Boolean> delete(@RequestParam("id") String id) {
|
public CommonResult<Boolean> 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);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,4 +48,6 @@ public class OrgUnitPageReqVO extends PageParam {
|
|||||||
@Schema(description = "机构logo的URL", example = "https://www.iocoder.cn")
|
@Schema(description = "机构logo的URL", example = "https://www.iocoder.cn")
|
||||||
private String orgLogoUrl;
|
private String orgLogoUrl;
|
||||||
|
|
||||||
|
@Schema(description = "是否删除")
|
||||||
|
private String isdelete;
|
||||||
}
|
}
|
@ -59,4 +59,6 @@ public class OrgUnitRespVO {
|
|||||||
@ExcelProperty("机构logo的URL")
|
@ExcelProperty("机构logo的URL")
|
||||||
private String orgLogoUrl;
|
private String orgLogoUrl;
|
||||||
|
|
||||||
|
@Schema(description = "是否删除")
|
||||||
|
private String isdelete;
|
||||||
}
|
}
|
@ -45,4 +45,7 @@ public class OrgUnitSaveReqVO {
|
|||||||
@Schema(description = "机构logo的URL", example = "https://www.iocoder.cn")
|
@Schema(description = "机构logo的URL", example = "https://www.iocoder.cn")
|
||||||
private String orgLogoUrl;
|
private String orgLogoUrl;
|
||||||
|
|
||||||
|
@Schema(description = "是否删除")
|
||||||
|
private String isdelete;
|
||||||
|
|
||||||
}
|
}
|
@ -62,7 +62,11 @@ public class WxController {
|
|||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('system:wx:delete')")
|
@PreAuthorize("@ss.hasPermission('system:wx:delete')")
|
||||||
public CommonResult<Boolean> deleteWx(@RequestParam("id") String id) {
|
public CommonResult<Boolean> 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);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,4 +24,6 @@ public class WxPageReqVO extends PageParam {
|
|||||||
@Schema(description = "微信号所属人的姓名,通过公众号发固定格式命令获取", example = "王五")
|
@Schema(description = "微信号所属人的姓名,通过公众号发固定格式命令获取", example = "王五")
|
||||||
private String personName;
|
private String personName;
|
||||||
|
|
||||||
|
@Schema(description = "是否删除")
|
||||||
|
private String isdelete;
|
||||||
}
|
}
|
@ -41,4 +41,6 @@ public class WxRespVO {
|
|||||||
@ExcelProperty("机构ID")
|
@ExcelProperty("机构ID")
|
||||||
private String orgId;
|
private String orgId;
|
||||||
|
|
||||||
|
@Schema(description = "是否删除")
|
||||||
|
private String isdelete;
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.system.controller.admin.wx.vo;
|
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 io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@ -31,5 +32,7 @@ public class WxSaveReqVO {
|
|||||||
|
|
||||||
@Schema(description = "机构ID", example = "4736")
|
@Schema(description = "机构ID", example = "4736")
|
||||||
private String orgId;
|
private String orgId;
|
||||||
|
@Schema(description = "是否删除")
|
||||||
|
private String isdelete;
|
||||||
|
|
||||||
}
|
}
|
@ -80,4 +80,7 @@ public class OrgUnitDO {
|
|||||||
@TableField("orgLogoUrl")
|
@TableField("orgLogoUrl")
|
||||||
private String orgLogoUrl;
|
private String orgLogoUrl;
|
||||||
|
|
||||||
|
@TableField("isdelete")
|
||||||
|
private String isdelete;
|
||||||
|
|
||||||
}
|
}
|
@ -56,4 +56,7 @@ public class WxDO {
|
|||||||
@TableField("orgId")
|
@TableField("orgId")
|
||||||
private String orgId;
|
private String orgId;
|
||||||
|
|
||||||
|
@TableField("isdelete")
|
||||||
|
private String isdelete;
|
||||||
|
|
||||||
}
|
}
|
@ -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.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
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 cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO;
|
||||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@ -31,6 +32,8 @@ public interface OrgUnitMapper extends BaseMapperX<OrgUnitDO> {
|
|||||||
.betweenIfPresent(OrgUnitDO::getCreateDate, reqVO.getCreateDate())
|
.betweenIfPresent(OrgUnitDO::getCreateDate, reqVO.getCreateDate())
|
||||||
.likeIfPresent(OrgUnitDO::getHighLevelOrgName, reqVO.getHighLevelOrgName())
|
.likeIfPresent(OrgUnitDO::getHighLevelOrgName, reqVO.getHighLevelOrgName())
|
||||||
.eqIfPresent(OrgUnitDO::getOrgLogoUrl, reqVO.getOrgLogoUrl())
|
.eqIfPresent(OrgUnitDO::getOrgLogoUrl, reqVO.getOrgLogoUrl())
|
||||||
|
.or(wrapper -> wrapper.eq(OrgUnitDO::getIsdelete, 0))
|
||||||
|
.or(wrapper -> wrapper.isNull(OrgUnitDO::getIsdelete))
|
||||||
.orderByDesc(OrgUnitDO::getOrgID));
|
.orderByDesc(OrgUnitDO::getOrgID));
|
||||||
}
|
}
|
||||||
//查询当前ID 是否存在
|
//查询当前ID 是否存在
|
||||||
|
@ -5,6 +5,7 @@ import java.util.*;
|
|||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
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 cn.iocoder.yudao.module.system.dal.dataobject.wx.WxDO;
|
||||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@ -24,6 +25,8 @@ public interface WxMapper extends BaseMapperX<WxDO> {
|
|||||||
.likeIfPresent(WxDO::getWxUserid, reqVO.getWxUserid())
|
.likeIfPresent(WxDO::getWxUserid, reqVO.getWxUserid())
|
||||||
.likeIfPresent(WxDO::getBindTel, reqVO.getBindTel())
|
.likeIfPresent(WxDO::getBindTel, reqVO.getBindTel())
|
||||||
.likeIfPresent(WxDO::getPersonName, reqVO.getPersonName())
|
.likeIfPresent(WxDO::getPersonName, reqVO.getPersonName())
|
||||||
|
.or(wrapper -> wrapper.eq(WxDO::getIsdelete, 0))
|
||||||
|
.or(wrapper -> wrapper.isNull(WxDO::getIsdelete))
|
||||||
.orderByDesc(WxDO::getId));
|
.orderByDesc(WxDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user