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

20191219 完善modifyId信息

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