提交 1b510e47 编写于 作者: rushui.chen's avatar rushui.chen

20190925 完善客服系统添加医生信息

上级 ee7cd6b9
流水线 #15185 已失败 于阶段
in 0 second
...@@ -73,8 +73,8 @@ public class DoctorController extends AccountBaseController { ...@@ -73,8 +73,8 @@ public class DoctorController extends AccountBaseController {
if (doctor != null && doctor.getMobilePhone() != null) { if (doctor != null && doctor.getMobilePhone() != null) {
AccountUtils.checkMobilePhone(doctor.getMobilePhone()); AccountUtils.checkMobilePhone(doctor.getMobilePhone());
AccountUtils.checkPassword(doctor.getPassword()); AccountUtils.checkPassword(doctor.getPassword());
doctorService.addDoctorInfo(doctor); Integer userId = doctorService.addDoctorInfo(doctor);
return PicaResponse.toResponse(); return PicaResponse.toResponse(userId);
} else { } else {
throw new AccountException(AccountExceptionEnum.PICA_PARAMS_ERROR); throw new AccountException(AccountExceptionEnum.PICA_PARAMS_ERROR);
} }
......
...@@ -29,5 +29,5 @@ public interface DoctorService { ...@@ -29,5 +29,5 @@ public interface DoctorService {
* *
* @param doctor 新的医生数据 * @param doctor 新的医生数据
*/ */
void addDoctorInfo(Doctor doctor); Integer addDoctorInfo(Doctor doctor);
} }
...@@ -36,7 +36,7 @@ public class DoctorServiceImpl implements DoctorService { ...@@ -36,7 +36,7 @@ public class DoctorServiceImpl implements DoctorService {
@Override @Override
public void modifyDoctorInfo(Doctor doctor) { public void modifyDoctorInfo(Doctor doctor) {
doctor.setModifyTime(new Date()); doctor.setModifyTime(new Date());
doctorMapper.insertSelective(doctor); doctorMapper.updateByPrimaryKeySelective(doctor);
} }
/** /**
...@@ -50,7 +50,7 @@ public class DoctorServiceImpl implements DoctorService { ...@@ -50,7 +50,7 @@ public class DoctorServiceImpl implements DoctorService {
*/ */
@Override @Override
@Transactional @Transactional
public void addDoctorInfo(Doctor doctor) { public Integer addDoctorInfo(Doctor doctor) {
String mobilePhone = doctor.getMobilePhone(); String mobilePhone = doctor.getMobilePhone();
String mobileEncrypt = AESUtil.encryptV0(mobilePhone); String mobileEncrypt = AESUtil.encryptV0(mobilePhone);
AccountInfoEntity accountInfoEntity = accountInfoDetailMapper.selectByMobile(mobileEncrypt); AccountInfoEntity accountInfoEntity = accountInfoDetailMapper.selectByMobile(mobileEncrypt);
...@@ -84,5 +84,6 @@ public class DoctorServiceImpl implements DoctorService { ...@@ -84,5 +84,6 @@ public class DoctorServiceImpl implements DoctorService {
doctor.setModifyTime(new Date()); doctor.setModifyTime(new Date());
doctor.setDeleteFlag(1); doctor.setDeleteFlag(1);
doctorMapper.insertSelective(doctor); doctorMapper.insertSelective(doctor);
return doctor.getId();
} }
} }
...@@ -364,7 +364,7 @@ ...@@ -364,7 +364,7 @@
#{birthday,jdbcType=DATE}, #{showFlag,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER} #{birthday,jdbcType=DATE}, #{showFlag,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.Doctor"> <insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.Doctor" useGeneratedKeys="true" keyProperty="id">
insert into p_doctor insert into p_doctor
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册