提交 6710a085 编写于 作者: wangxinxu's avatar wangxinxu

获取成员信息

上级 49e85d7b
流水线 #52949 已取消 于阶段
......@@ -62,5 +62,7 @@ public interface PatHealthPackClient {
@GetMapping(value = "/account/pat-health/acctInfo/patId/{patientId}")
PicaResponse<AcctSelfPatInfoResp> getAcctInfoByPatId(@PathVariable("patientId") Integer patientId);
@GetMapping(value = "/account/pat-health/acctInfo/patInfo/{unionId}")
PicaResponse<AcctSelfPatInfoResp> getAcctInfoByUnionId(@PathVariable("unionId") String unionId);
}
......@@ -138,6 +138,12 @@ public class PatHealthPackController {
return PicaResponse.toResponse(packService.getAcctInfoByPatId(patientId));
}
@ApiOperation("获取主账户-作为监护人自身patientId")
@GetMapping(value = "/acctInfo/patInfo/{unionId}")
public PicaResponse<AcctSelfPatInfoResp> getAcctInfoByUnionId(@PathVariable("unionId") String unionId) throws Exception {
return PicaResponse.toResponse(packService.getAcctInfoByUnionId(unionId));
}
@ApiOperation("更新accId 对应的患者信息")
@PostMapping(value = "/acct/updateAcct")
public PicaResponse updatePat(@RequestBody UpdateAcctPatInfoReq req) {
......
......@@ -49,4 +49,5 @@ public interface AcctPatFamilyMapper {
List<Integer> queryPatIdByPage(Map map);
AcctSelfPatInfoResp getAcctInfoByPatIdSelf(Integer patId);
AcctSelfPatInfoResp getAcctInfoByUnionId(String unionId);
}
\ No newline at end of file
......@@ -50,4 +50,6 @@ public interface PatHealthPackService {
void updatePat(UpdateAcctPatInfoReq req);
AcctSelfPatInfoResp getAcctInfoByPatId(Integer patientId);
AcctSelfPatInfoResp getAcctInfoByUnionId(String unionId);
}
......@@ -639,4 +639,9 @@ public class PatHealthPackServiceIml implements PatHealthPackService {
public AcctSelfPatInfoResp getAcctInfoByPatId(Integer patientId) {
return patFamilyMapper.getAcctInfoByPatIdSelf(patientId);
}
@Override
public AcctSelfPatInfoResp getAcctInfoByUnionId(String unionId) {
return patFamilyMapper.getAcctInfoByUnionId(unionId);
}
}
......@@ -174,7 +174,7 @@
from account_pat_family
where patient_id = #{patientId,jdbcType=INTEGER}
and relation = 1
and delete_flag = 1;
and delete_flag = 1 order by created_time desc limit 1
</select>
<select id="getListByPatIdSelfs" parameterType="java.util.List" resultMap="BaseResultMap" >
......@@ -281,4 +281,17 @@
and pf.acct_id = api.id
and api.delete_flag = 1
</select>
<select id="getAcctInfoByUnionId" parameterType="java.lang.String" resultType="com.pica.cloud.account.account.common.resp.AcctSelfPatInfoResp" >
select
api.id as accId, pf.patient_id as patientId, api.name , api.mobile_phone as mobilePhone
from account_pat_family pf, account_pat_info api, account_pat_union pu
where pu.union_id = #{unionId} and pu.union_type = 1
and pu.acct_id = api.id
and pu.delete_flag = 1
AND pf.relation = 1
and pf.delete_flag = 1
and pf.acct_id = api.id
and api.delete_flag = 1
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册