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

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

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