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

20191101 完善客服系统添加医生逻辑

上级 0b8090f7
流水线 #16577 已失败 于阶段
in 0 second
...@@ -81,12 +81,27 @@ public class Test { ...@@ -81,12 +81,27 @@ public class Test {
System.out.println("--------------------登录接口-------------"); System.out.println("--------------------登录接口-------------");
String publicKey="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCa6j3SJwXr/pLLwb6Pq8pi9StPq+Wvm6vu+LWQB1hNqClWk0jQm5GnF6Kj0ac2gqgsMsutc3hhMaaX2QZvLX+gFQHC/ufGBdBbpPtDeGWsQItsMf/xqqlkLPkc7eVTyfsmrpQM7BG9LVvaPVXPVUcZfJNBaYuR4+Sf6Zi2ayI/hQIDAQAB"; String publicKey="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCa6j3SJwXr/pLLwb6Pq8pi9StPq+Wvm6vu+LWQB1hNqClWk0jQm5GnF6Kj0ac2gqgsMsutc3hhMaaX2QZvLX+gFQHC/ufGBdBbpPtDeGWsQItsMf/xqqlkLPkc7eVTyfsmrpQM7BG9LVvaPVXPVUcZfJNBaYuR4+Sf6Zi2ayI/hQIDAQAB";
BaseRequest login = new BaseRequest(); BaseRequest login = new BaseRequest();
login.setMobile("13024112588"); login.setMobile("13024112588");
login.setPassword("d0dcbf0d12a6b1e7fbfa2ce5848f3eff"); login.setPassword("d0dcbf0d12a6b1e7fbfa2ce5848f3eff");
String con = JSONObject.toJSONString(login); String con = JSONObject.toJSONString(login);
String contentResult = AESUtil.aesEncrypt(con, "YCPQPx4qpQjEjDea"); String contentResult = AESUtil.aesEncrypt(con, "YCPQPx4qpQjEjDea");
String keyResult = RSAUtil.encrypt("YCPQPx4qpQjEjDea",publicKey); String keyResult = RSAUtil.encrypt("YCPQPx4qpQjEjDea",publicKey);
EncryptEntity encryptTest = new EncryptEntity(); EncryptEntity encryptTest = new EncryptEntity();
encryptTest.setContent(contentResult); encryptTest.setContent(contentResult);
encryptTest.setKey(keyResult); encryptTest.setKey(keyResult);
......
...@@ -38,6 +38,7 @@ public class DoctorServiceImpl implements DoctorService { ...@@ -38,6 +38,7 @@ public class DoctorServiceImpl implements DoctorService {
return doctorMapper.selectByPrimaryKey(id); return doctorMapper.selectByPrimaryKey(id);
} }
@Transactional
@Override @Override
public void modifyDoctorInfo(Doctor doctor) { public void modifyDoctorInfo(Doctor doctor) {
Integer id = doctor.getId(); Integer id = doctor.getId();
...@@ -55,9 +56,16 @@ public class DoctorServiceImpl implements DoctorService { ...@@ -55,9 +56,16 @@ public class DoctorServiceImpl implements DoctorService {
doctor.setMobilePhone(AESUtil.encryptV0(mobilePhone)); doctor.setMobilePhone(AESUtil.encryptV0(mobilePhone));
doctor.setModifyTime(new Date()); doctor.setModifyTime(new Date());
doctorMapper.updateByPrimaryKeySelective(doctor); doctorMapper.updateByPrimaryKeySelective(doctor);
Integer acctId = entity.getAcctId();
AccountInfoEntity accountInfoEntity = new AccountInfoEntity();
accountInfoEntity.setMobilePhone(AESUtil.encryptV0(mobilePhone));
accountInfoEntity.setId(acctId);
accountInfoEntity.setModifiedId(1580052);
accountInfoEntity.setModifiedTime(new Date());
accountInfoDetailMapper.updateByPrimaryKeySelective(accountInfoEntity);
} }
@Transactional() @Transactional
@Override @Override
public void deleteDoctorInfo(Integer id) { public void deleteDoctorInfo(Integer id) {
//p_doctor表修改记录状态 //p_doctor表修改记录状态
...@@ -96,7 +104,7 @@ public class DoctorServiceImpl implements DoctorService { ...@@ -96,7 +104,7 @@ public class DoctorServiceImpl implements DoctorService {
entity.setPassword(password); entity.setPassword(password);
entity.setCreatedTime(currentTime); entity.setCreatedTime(currentTime);
entity.setModifiedTime(currentTime); entity.setModifiedTime(currentTime);
entity.setModifiedId(0); entity.setModifiedId(1580052);
entity.setRegisterProduct(1); entity.setRegisterProduct(1);
entity.setRegTime(currentTime); entity.setRegTime(currentTime);
entity.setRegisterSource(3); entity.setRegisterSource(3);
...@@ -110,7 +118,7 @@ public class DoctorServiceImpl implements DoctorService { ...@@ -110,7 +118,7 @@ public class DoctorServiceImpl implements DoctorService {
accountInfoDetailMapper.insertSelective(entity); accountInfoDetailMapper.insertSelective(entity);
doctor.setAcctId(entity.getId()); doctor.setAcctId(entity.getId());
doctor.setMobilePhone(mobileEncrypt); doctor.setMobilePhone(mobileEncrypt);
doctor.setModifyId(0); doctor.setModifyId(1580052);
doctor.setCreatId(0); doctor.setCreatId(0);
doctor.setCreatTime(currentTime); doctor.setCreatTime(currentTime);
doctor.setModifyTime(new Date()); doctor.setModifyTime(new Date());
......
...@@ -168,7 +168,7 @@ public class AESUtil { ...@@ -168,7 +168,7 @@ public class AESUtil {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
String KEY="zJJ$c5md3$yuuhWW"; String KEY="zJJ$c5md3$yuuhWW";
System.out.println("-------------加密---------"); System.out.println("-------------加密---------");
String content = "13024112588"; String content = "13024112666";
System.out.println("加密前:" + content); System.out.println("加密前:" + content);
System.out.println("加密密钥和解密密钥:" + KEY); System.out.println("加密密钥和解密密钥:" + KEY);
......
spring.profiles.active=dev spring.profiles.active=uat
\ No newline at end of file \ No newline at end of file
...@@ -760,7 +760,6 @@ ...@@ -760,7 +760,6 @@
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.Doctor"> <update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.Doctor">
update p_doctor update p_doctor
<set> <set>
...@@ -830,9 +829,6 @@ ...@@ -830,9 +829,6 @@
<if test="personalSign != null"> <if test="personalSign != null">
personal_sign = #{personalSign,jdbcType=VARCHAR}, personal_sign = #{personalSign,jdbcType=VARCHAR},
</if> </if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="creatId != null"> <if test="creatId != null">
creat_id = #{creatId,jdbcType=INTEGER}, creat_id = #{creatId,jdbcType=INTEGER},
</if> </if>
...@@ -848,9 +844,6 @@ ...@@ -848,9 +844,6 @@
<if test="praiseNum != null"> <if test="praiseNum != null">
praise_num = #{praiseNum,jdbcType=INTEGER}, praise_num = #{praiseNum,jdbcType=INTEGER},
</if> </if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="info != null"> <if test="info != null">
info = #{info,jdbcType=VARCHAR}, info = #{info,jdbcType=VARCHAR},
</if> </if>
...@@ -938,9 +931,7 @@ ...@@ -938,9 +931,7 @@
<if test="showFlag != null"> <if test="showFlag != null">
show_flag = #{showFlag,jdbcType=INTEGER}, show_flag = #{showFlag,jdbcType=INTEGER},
</if> </if>
<if test="acctId != null">
acct_id = #{acctId,jdbcType=INTEGER},
</if>
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册