提交 86dda308 编写于 作者: shihao.bao's avatar shihao.bao

注销账号接口4

上级 ac5599ac
流水线 #40407 已失败 于阶段
...@@ -9,9 +9,6 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -9,9 +9,6 @@ import io.swagger.annotations.ApiModelProperty;
*/ */
public class CancelAccountDto { public class CancelAccountDto {
@ApiModelProperty("医生ID")
private Integer doctorId;
@ApiModelProperty("注销原因NO") @ApiModelProperty("注销原因NO")
private Integer reasonNo; private Integer reasonNo;
...@@ -23,14 +20,6 @@ public class CancelAccountDto { ...@@ -23,14 +20,6 @@ public class CancelAccountDto {
private String remarks; private String remarks;
public Integer getDoctorId() {
return doctorId;
}
public void setDoctorId(Integer doctorId) {
this.doctorId = doctorId;
}
public Integer getReasonNo() { public Integer getReasonNo() {
return reasonNo; return reasonNo;
} }
......
...@@ -280,8 +280,8 @@ public class DoctorServiceImpl implements DoctorService { ...@@ -280,8 +280,8 @@ public class DoctorServiceImpl implements DoctorService {
*/ */
@Override @Override
public void cancelAccountByDoctorId(CancelAccountDto cancelAccountDto, PicaUser picaUser) { public void cancelAccountByDoctorId(CancelAccountDto cancelAccountDto, PicaUser picaUser) {
logger.info("DoctorServiceImpl.deleteDoctorById CancelAccountDto:{}", JSON.toJSONString(cancelAccountDto)); logger.info("DoctorServiceImpl.deleteDoctorById CancelAccountDto:{}; USER: {}", JSON.toJSONString(cancelAccountDto), JSON.toJSONString(picaUser));
Doctor doctor = doctorMapper.selectByPrimaryKey(cancelAccountDto.getDoctorId()); Doctor doctor = doctorMapper.selectByPrimaryKey(picaUser.getId());
if (Objects.isNull(doctor)) { if (Objects.isNull(doctor)) {
throw new PicaException(PicaResultCode.PARAM_NOT_COMPLETE.code(), "未查询到要删除的用户"); throw new PicaException(PicaResultCode.PARAM_NOT_COMPLETE.code(), "未查询到要删除的用户");
} }
...@@ -348,6 +348,7 @@ public class DoctorServiceImpl implements DoctorService { ...@@ -348,6 +348,7 @@ public class DoctorServiceImpl implements DoctorService {
/**log*/ /**log*/
CancelAccountLog cancelAccountLog = new CancelAccountLog(); CancelAccountLog cancelAccountLog = new CancelAccountLog();
BeanUtils.copyProperties(cancelAccountDto, cancelAccountLog); BeanUtils.copyProperties(cancelAccountDto, cancelAccountLog);
cancelAccountLog.setDoctorId(picaUser.getId());
cancelAccountLog.setDeleteFlag(1); cancelAccountLog.setDeleteFlag(1);
cancelAccountLog.setCreatId(picaUser.getId()); cancelAccountLog.setCreatId(picaUser.getId());
cancelAccountLog.setCreatTime(new Date()); cancelAccountLog.setCreatTime(new Date());
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册