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

Merge branch 'dev-1114' into 'release'

根据patientid  获取unionID

See merge request !126
流水线 #51398 已失败 于阶段
......@@ -11,7 +11,7 @@
<groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-client</artifactId>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.5-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.4-SNAPSHOT</version>
<version>1.1.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
......
package com.pica.cloud.account.account.client;
import com.pica.cloud.foundation.entity.PicaResponse;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@FeignClient(name = "13201-pica-cloud-account")
public interface PatientInfoClient {
@GetMapping(value = "/account/patient/unionId/{patientId}")
PicaResponse<String> getUnionIdByPatientId(@PathVariable("patientId") Integer patientId);
}
......@@ -11,7 +11,7 @@
<groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-common</artifactId>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.5-SNAPSHOT</version>
<name>pica-cloud-account-common</name>
<packaging>jar</packaging>
......
......@@ -167,7 +167,7 @@
<dependency>
<groupId>com.pica.cloud.account</groupId>
<artifactId>pica-cloud-account-common</artifactId>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.5-SNAPSHOT</version>
</dependency>
<dependency>
......
......@@ -74,4 +74,10 @@ public class PatientInfoController extends AccountBaseController {
}
return PicaResponse.toResponse();
}
@ApiOperation("客服系统添加居民信息")
@GetMapping(value = "/unionId/{patientId}", produces = "application/json;charset=utf-8")
public PicaResponse<String> getUnionIdByPatientId(@PathVariable("patientId") Integer patientId) {
return PicaResponse.toResponse(patientInfoService.getUnionIdByPatientId(patientId));
}
}
......@@ -22,4 +22,6 @@ public interface AcctPatUnionMapper {
AcctPatUnion selectByAcctId(Integer acctId);
int initBatch(List<AcctPatUnion> list);
String selectUnionIdByPatientId(Integer patientId);
}
\ No newline at end of file
......@@ -36,4 +36,6 @@ public interface PatientInfoService {
* @param entity 居民信息
*/
void addPatientInfo(AccountPatientInfoEntity entity, Integer userId);
String getUnionIdByPatientId(Integer patientId);
}
......@@ -6,7 +6,9 @@ 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.log.AccountLogUtils;
import com.pica.cloud.account.account.server.mapper.AccountInfoDetailMapper;
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.util.AESUtil;
import org.apache.commons.beanutils.BeanUtils;
......@@ -29,6 +31,9 @@ public class PatientInfoServerImpl implements PatientInfoService {
@Autowired
private AccountInfoDetailMapper accountInfoDetailMapper;
@Autowired
private AcctPatUnionMapper acctPatUnionMapper;
@Override
public void updateUserInfo(AccountPatientInfoEntity accountPatientInfoEntity) {
accountPatientInfoEntity.setModifyTime(new Date());
......@@ -85,4 +90,9 @@ public class PatientInfoServerImpl implements PatientInfoService {
entity.setModifyTime(currentTime);
accountPatientInfoMapper.insertSelective(entity);
}
@Override
public String getUnionIdByPatientId(Integer patientId) {
return acctPatUnionMapper.selectUnionIdByPatientId(patientId);
}
}
......@@ -172,4 +172,16 @@
</foreach>
</insert>
<select id="selectUnionIdByPatientId" resultType="java.lang.String" >
select
apu.union_id
from account_pat_union apu, account_pat_family apf
where apf.patient_id = #{patientId}
and apf.delete_flag = 1
and apf.relation = 1
and apu.acct_id = apf.acct_id
and apu.delete_flag = 1
and apu.union_type = 1
limit 1
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册