提交 0b33b4fd 编写于 作者: wangxinxu's avatar wangxinxu

修改居民信息

上级 396943b3
流水线 #51545 已取消 于阶段
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<groupId>com.pica.cloud.account</groupId> <groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-client</artifactId> <artifactId>pica-cloud-account-client</artifactId>
<version>1.1.5-SNAPSHOT</version> <version>1.1.6-SNAPSHOT</version>
<name>pica-cloud-account-client</name> <name>pica-cloud-account-client</name>
<packaging>jar</packaging> <packaging>jar</packaging>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<dependency> <dependency>
<groupId>com.pica.cloud.account</groupId> <groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-common</artifactId> <artifactId>pica-cloud-account-common</artifactId>
<version>1.1.5-SNAPSHOT</version> <version>1.1.6-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
......
package com.pica.cloud.account.account.client; package com.pica.cloud.account.account.client;
import com.pica.cloud.account.account.common.req.AcctPatInfoReq;
import com.pica.cloud.foundation.entity.PicaResponse; import com.pica.cloud.foundation.entity.PicaResponse;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(name = "13201-pica-cloud-account") @FeignClient(name = "13201-pica-cloud-account")
public interface PatientInfoClient { public interface PatientInfoClient {
...@@ -11,4 +14,7 @@ public interface PatientInfoClient { ...@@ -11,4 +14,7 @@ public interface PatientInfoClient {
@GetMapping(value = "/account/patient/unionId/{patientId}") @GetMapping(value = "/account/patient/unionId/{patientId}")
PicaResponse<String> getUnionIdByPatientId(@PathVariable("patientId") Integer patientId); PicaResponse<String> getUnionIdByPatientId(@PathVariable("patientId") Integer patientId);
@PostMapping(value = "/account/patient/acct/info")
PicaResponse postUserInfo(@RequestBody AcctPatInfoReq infoReq);
} }
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<groupId>com.pica.cloud.account</groupId> <groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-common</artifactId> <artifactId>pica-cloud-account-common</artifactId>
<version>1.1.5-SNAPSHOT</version> <version>1.1.6-SNAPSHOT</version>
<name>pica-cloud-account-common</name> <name>pica-cloud-account-common</name>
<packaging>jar</packaging> <packaging>jar</packaging>
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
<dependency> <dependency>
<groupId>com.pica.cloud.account</groupId> <groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-common</artifactId> <artifactId>pica-cloud-account-common</artifactId>
<version>1.1.5-SNAPSHOT</version> <version>1.1.6-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
......
package com.pica.cloud.account.account.server.controller; package com.pica.cloud.account.account.server.controller;
import com.pica.cloud.account.account.common.req.AcctPatInfoReq;
import com.pica.cloud.account.account.server.entity.AccountPatientInfoEntity; import com.pica.cloud.account.account.server.entity.AccountPatientInfoEntity;
import com.pica.cloud.account.account.server.entity.AccountUser; import com.pica.cloud.account.account.server.entity.AccountUser;
import com.pica.cloud.account.account.server.entity.EncryptEntity; import com.pica.cloud.account.account.server.entity.EncryptEntity;
...@@ -62,6 +63,18 @@ public class PatientInfoController extends AccountBaseController { ...@@ -62,6 +63,18 @@ public class PatientInfoController extends AccountBaseController {
return PicaResponse.toResponse(); return PicaResponse.toResponse();
} }
/**
* 修改用户信息接口
*
* @return
*/
@ApiOperation("修改居民信息")
@PostMapping(value = "/acct/info", produces = "application/json;charset=utf-8")
public PicaResponse postUserInfo(@RequestBody AcctPatInfoReq infoReq) throws Exception {
patientInfoService.updateUserInfoV2(infoReq);
return PicaResponse.toResponse();
}
@ApiOperation("客服系统添加居民信息") @ApiOperation("客服系统添加居民信息")
@PostMapping(value = "/info", produces = "application/json;charset=utf-8") @PostMapping(value = "/info", produces = "application/json;charset=utf-8")
public PicaResponse addPatientInfo(AccountPatientInfoEntity entity) { public PicaResponse addPatientInfo(AccountPatientInfoEntity entity) {
......
...@@ -17,6 +17,8 @@ public interface AcctPatInfoMapper { ...@@ -17,6 +17,8 @@ public interface AcctPatInfoMapper {
int updateByPrimaryKeySelective(AcctPatInfo record); int updateByPrimaryKeySelective(AcctPatInfo record);
int updateByMobile(AcctPatInfo record);
int updateByPrimaryKey(AcctPatInfo record); int updateByPrimaryKey(AcctPatInfo record);
AcctPatInfo selectByCondition(AcctPatInfo record); AcctPatInfo selectByCondition(AcctPatInfo record);
......
package com.pica.cloud.account.account.server.service; package com.pica.cloud.account.account.server.service;
import com.pica.cloud.account.account.common.req.AcctPatInfoReq;
import com.pica.cloud.account.account.server.entity.AccountPatientInfoEntity; import com.pica.cloud.account.account.server.entity.AccountPatientInfoEntity;
public interface PatientInfoService { public interface PatientInfoService {
...@@ -12,6 +13,8 @@ public interface PatientInfoService { ...@@ -12,6 +13,8 @@ public interface PatientInfoService {
*/ */
void updateUserInfo(AccountPatientInfoEntity accountPatientInfoEntity); void updateUserInfo(AccountPatientInfoEntity accountPatientInfoEntity);
void updateUserInfoV2(AcctPatInfoReq infoReq);
/** /**
* 获取用户信息接口 * 获取用户信息接口
......
package com.pica.cloud.account.account.server.service.impl; package com.pica.cloud.account.account.server.service.impl;
import com.pica.cloud.account.account.common.req.AcctPatInfoReq;
import com.pica.cloud.account.account.server.entity.AccountInfoEntity; import com.pica.cloud.account.account.server.entity.AccountInfoEntity;
import com.pica.cloud.account.account.server.entity.AccountPatientInfoEntity; import com.pica.cloud.account.account.server.entity.AccountPatientInfoEntity;
import com.pica.cloud.account.account.server.entity.AcctPatInfo;
import com.pica.cloud.account.account.server.entity.LogUserInfoEntity; import com.pica.cloud.account.account.server.entity.LogUserInfoEntity;
import com.pica.cloud.account.account.server.enums.AccountTypeEnum; import com.pica.cloud.account.account.server.enums.AccountTypeEnum;
import com.pica.cloud.account.account.server.log.AccountLogUtils; import com.pica.cloud.account.account.server.log.AccountLogUtils;
import com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper; import com.pica.cloud.account.account.server.mapper.*;
import com.pica.cloud.account.account.server.mapper.AccountPatFamilyRecordMapper;
import com.pica.cloud.account.account.server.mapper.AccountPatientInfoMapper;
import com.pica.cloud.account.account.server.mapper.AcctPatUnionMapper;
import com.pica.cloud.account.account.server.service.PatientInfoService; import com.pica.cloud.account.account.server.service.PatientInfoService;
import com.pica.cloud.account.account.server.util.AESUtil; import com.pica.cloud.account.account.server.util.AESUtil;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
...@@ -25,6 +24,9 @@ public class PatientInfoServerImpl implements PatientInfoService { ...@@ -25,6 +24,9 @@ public class PatientInfoServerImpl implements PatientInfoService {
@Autowired @Autowired
private AccountPatientInfoMapper accountPatientInfoMapper; private AccountPatientInfoMapper accountPatientInfoMapper;
@Autowired
private AcctPatInfoMapper acctPatInfoMapper;
@Autowired @Autowired
private AccountLogUtils accountLogUtils; private AccountLogUtils accountLogUtils;
...@@ -59,6 +61,16 @@ public class PatientInfoServerImpl implements PatientInfoService { ...@@ -59,6 +61,16 @@ public class PatientInfoServerImpl implements PatientInfoService {
} }
} }
@Override
public void updateUserInfoV2(AcctPatInfoReq infoReq) {
AcctPatInfo acctPatInfo = new AcctPatInfo();
acctPatInfo.setModifiedId(infoReq.getPatientId());
acctPatInfo.setMobilePhone(infoReq.getMobile());
acctPatInfo.setName(infoReq.getName());
acctPatInfo.setModifiedTime(new Date());
acctPatInfoMapper.updateByMobile(acctPatInfo);
}
@Override @Override
public AccountPatientInfoEntity getUserInfo(Integer userId) { public AccountPatientInfoEntity getUserInfo(Integer userId) {
return accountPatientInfoMapper.selectByUserId(userId); return accountPatientInfoMapper.selectByUserId(userId);
......
...@@ -201,6 +201,14 @@ ...@@ -201,6 +201,14 @@
</set> </set>
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByMobile" parameterType="com.pica.cloud.account.account.server.entity.AcctPatInfo" >
update account_pat_info
set
modified_id = #{modifiedId,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where mobile_phone = #{mobilePhone,jdbcType=VARCHAR} and delete_flag = 1
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.AcctPatInfo" > <update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.AcctPatInfo" >
update account_pat_info update account_pat_info
set name = #{name,jdbcType=VARCHAR}, set name = #{name,jdbcType=VARCHAR},
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册