提交 e9ddac30 编写于 作者: xinxu.wang's avatar xinxu.wang

Merge branch 'release' into 'master'

Release

See merge request !134
流水线 #52955 已失败 于阶段
......@@ -11,7 +11,7 @@
<groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-client</artifactId>
<version>1.1.6-SNAPSHOT</version>
<version>1.1.7-SNAPSHOT</version>
<name>pica-cloud-account-client</name>
<packaging>jar</packaging>
......@@ -28,7 +28,7 @@
<dependency>
<groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-common</artifactId>
<version>1.1.6-SNAPSHOT</version>
<version>1.1.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
......
......@@ -54,4 +54,7 @@ public interface PatHealthPackClient {
@PostMapping(value = "/account/pat-health/family/unusual/record")
PicaResponse saveUnusualFamilyRecord(@RequestBody PatFamilyRecordReq patFamilyRecordReq);
@PostMapping(value = "/account/pat-health/acct/updatePatByAcctId")
PicaResponse<Boolean> updatePatByAcctId(@RequestBody UpdateAcctPatInfoReq req);
}
......@@ -11,7 +11,7 @@
<groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-common</artifactId>
<version>1.1.6-SNAPSHOT</version>
<version>1.1.7-SNAPSHOT</version>
<name>pica-cloud-account-common</name>
<packaging>jar</packaging>
......
// Copyright 2016-2101 Pica.
package com.pica.cloud.account.account.common.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class UpdateAcctPatInfoReq {
private String unionId;
private Integer acctId;
private String name;
private Integer oldPatientId;
private Integer newPatientId;
public String getUnionId() {
return unionId;
}
public void setUnionId(String unionId) {
this.unionId = unionId;
}
public Integer getAcctId() {
return acctId;
}
public void setAcctId(Integer acctId) {
this.acctId = acctId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getOldPatientId() {
return oldPatientId;
}
public void setOldPatientId(Integer oldPatientId) {
this.oldPatientId = oldPatientId;
}
public Integer getNewPatientId() {
return newPatientId;
}
public void setNewPatientId(Integer newPatientId) {
this.newPatientId = newPatientId;
}
}
......@@ -167,7 +167,7 @@
<dependency>
<groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-common</artifactId>
<version>1.1.6-SNAPSHOT</version>
<version>1.1.7-SNAPSHOT</version>
</dependency>
<dependency>
......
......@@ -115,4 +115,10 @@ public class PatHealthPackController {
return PicaResponse.toResponse();
}
@ApiOperation("更新accId 对应的患者信息")
@PostMapping(value = "/acct/updatePatByAcctId")
public PicaResponse<Boolean> updatePatByAcctId(@RequestBody UpdateAcctPatInfoReq req) {
return PicaResponse.toResponse(packService.updatePatByAcctId(req));
}
}
......@@ -47,5 +47,4 @@ public interface AcctPatFamilyMapper {
List<AcctPatFamily> getMemberListByPatIds(List<Integer> patIds);
List<Integer> queryPatIdByPage(Map map);
}
\ No newline at end of file
......@@ -43,4 +43,6 @@ public interface PatHealthPackService {
List<Integer> queryByPage(AcctPatPageReq patPageReq);
AcctSelfPatId getAcctIdByMobile(String mobile);
boolean updatePatByAcctId(UpdateAcctPatInfoReq req);
}
// Copyright 2016-2101 Pica.
package com.pica.cloud.account.account.server.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.pica.cloud.account.account.common.req.*;
import com.pica.cloud.account.account.common.resp.AcctPatIdResp;
......@@ -583,4 +584,29 @@ public class PatHealthPackServiceIml implements PatHealthPackService {
}
return selfPatId;
}
@Transactional
public boolean updatePatByAcctId(UpdateAcctPatInfoReq req)
{
logger.info("updatePatByAcctId {}", JSON.toJSONString(req));
//更新 AcctPatInfo 用户名称为 真实姓名
AcctPatInfo acctPatInfo =new AcctPatInfo();
acctPatInfo.setId(req.getAcctId());
acctPatInfo.setName(req.getName());
acctPatInfo.setModifiedId(req.getNewPatientId());
acctPatInfo.setModifiedTime(new Date());
patInfoMapper.updateByPrimaryKeySelective(acctPatInfo);
//更新 AcctPatFamily 本人的患者id
AcctPatFamily acctPatFamily = patFamilyMapper.getSelfByAcctId(req.getAcctId());
AcctPatFamily upAcctPatFamily=new AcctPatFamily();
upAcctPatFamily.setId(acctPatFamily.getId());
upAcctPatFamily.setPatientId(req.getNewPatientId());
upAcctPatFamily.setModifiedId(req.getNewPatientId());
upAcctPatFamily.setModifiedTime(new Date());
patFamilyMapper.updateByPrimaryKeySelective(upAcctPatFamily);
return true;
}
}
package com.pica.cloud.account.account.server.service;
import com.pica.cloud.account.account.common.req.CreateAccountReq;
import com.pica.cloud.account.account.common.req.UpdateAcctPatInfoReq;
import com.pica.cloud.account.account.server.App;
import com.pica.cloud.foundation.utils.entity.PicaUser;
import junit.framework.TestCase;
......@@ -16,6 +17,9 @@ public class AccountServiceTest extends TestCase {
@Autowired
private AccountService accountService;
@Autowired
PatHealthPackService packService;
@Test
public void testCreateAccountV2() {
CreateAccountReq req = new CreateAccountReq();
......@@ -28,4 +32,16 @@ public class AccountServiceTest extends TestCase {
picaUser.setId(1);
accountService.createAccountV2(req, picaUser);
}
@Test
public void test_updatePatByAcctId() {
UpdateAcctPatInfoReq updateAcctPatInfoReq =new UpdateAcctPatInfoReq();
updateAcctPatInfoReq.setAcctId(203);
updateAcctPatInfoReq.setNewPatientId(12771090);
updateAcctPatInfoReq.setOldPatientId(12771091);
updateAcctPatInfoReq.setName("陈哲浩");
updateAcctPatInfoReq.setUnionId("111");
packService.updatePatByAcctId(updateAcctPatInfoReq);
}
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册