提交 830255ff 编写于 作者: rushui.chen's avatar rushui.chen

20191219 完善modifyId信息

上级 a4428bc3
流水线 #19095 已失败 于阶段
in 0 second
......@@ -75,7 +75,7 @@ public class DoctorController extends AccountBaseController {
@ApiOperation("客服系统删除医生信息")
@DeleteMapping(value = "/delete/{id}")
public PicaResponse deleteDoctor(@PathVariable("id") Integer id) {
doctorService.deleteDoctorInfo(id);
doctorService.deleteDoctorInfo(id,super.getDoctorIdByToken());
return PicaResponse.toResponse();
}
}
......@@ -2,6 +2,9 @@ package com.pica.cloud.account.account.server.mapper;
import com.pica.cloud.account.account.server.entity.AccountInfoEntity;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
public interface AccountInfoDetailMapper {
/**
......@@ -58,7 +61,7 @@ public interface AccountInfoDetailMapper {
int insertSelective(AccountInfoEntity record);
void updateDeleteByPrimaryKey(Integer acctId);
void updateDeleteByPrimaryKey(@Param("map") HashMap<String, Long> map);
void processAccountRepeatData();
......
......@@ -6,6 +6,8 @@ import com.pica.cloud.account.account.server.entity.DoctorEntity;
import com.pica.cloud.account.account.server.entity.PICAPDoctor;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
public interface DoctorMapper {
/**
* 获取医生信息
......@@ -83,7 +85,7 @@ public interface DoctorMapper {
PICAPDoctor queryDoctor(long doctorId);
void updateDeleteByPrimaryKey(Integer id);
void updateDeleteByPrimaryKey(@Param("map") HashMap<String, Long> map);
/**
......
......@@ -29,7 +29,7 @@ public interface DoctorService {
*
* @param id 待修改数据
*/
void deleteDoctorInfo(Integer id);
void deleteDoctorInfo(Integer id,Long modifyId);
/**
* 客服系统新增医生用户
......
......@@ -19,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
/**
* Created on 2019/9/11 11:02
......@@ -68,13 +69,19 @@ public class DoctorServiceImpl implements DoctorService {
@Transactional
@Override
public void deleteDoctorInfo(Integer id) {
public void deleteDoctorInfo(Integer id,Long modifyId) {
//p_doctor表修改记录状态
Doctor doctor = doctorMapper.selectByPrimaryKey(id);
if (doctor != null) {
Integer acctId = doctor.getAcctId();
doctorMapper.updateDeleteByPrimaryKey(id);
accountInfoDetailMapper.updateDeleteByPrimaryKey(acctId);
HashMap<String, Long> map = new HashMap<>();
map.put("id",id.longValue());
map.put(" ",modifyId);
doctorMapper.updateDeleteByPrimaryKey(map);
HashMap<String, Long> acctMap = new HashMap<>();
acctMap.put("modifyId",modifyId);
acctMap.put("acctId",acctId.longValue());
accountInfoDetailMapper.updateDeleteByPrimaryKey(acctMap);
} else {
throw new AccountException(AccountExceptionEnum.PICA_NOT_REGISTER);
}
......
spring.profiles.active=uat
\ No newline at end of file
spring.profiles.active=dev
\ No newline at end of file
......@@ -57,8 +57,8 @@
</update>
<!--逻辑删除用户-->
<update id="updateDeleteByPrimaryKey" parameterType="java.lang.Integer">
update account_info set delete_flag=2,modified_time=now(), modified_id=#{acctId} where id=#{acctId}
<update id="updateDeleteByPrimaryKey" >
update account_info set delete_flag=2,modified_time=now(), modified_id=#{map.modifyId} where id=#{map.acctId}
</update>
<!--更新用户的手机号-->
......
......@@ -130,8 +130,8 @@
</select>
<!--删除用户-->
<update id="updateDeleteByPrimaryKey" parameterType="java.lang.Integer">
update p_doctor set delete_flag=2,modify_time=now(), modify_id=#{id} where id=#{id} limit 1
<update id="updateDeleteByPrimaryKey" parameterType="map">
update p_doctor set delete_flag=2,modify_time=now(), modify_id=#{map.modifyId} where id=#{map.id} limit 1
</update>
<!--根据手机号获取数据-->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册