Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-account
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.account
pica-cloud-account
提交
8d102188
提交
8d102188
编写于
12月 10, 2020
作者:
wangyongbo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加存储存在问题的家庭关系接口
上级
b91b8eb4
流水线
#33311
已失败 于阶段
in 0 second
变更
9
流水线
1
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
412 行增加
和
5 行删除
+412
-5
PatHealthPackClient.java
...ica/cloud/account/account/client/PatHealthPackClient.java
+2
-0
PatFamilyRecordReq.java
.../cloud/account/account/common/req/PatFamilyRecordReq.java
+78
-0
PatHealthPackController.java
...nt/account/server/controller/PatHealthPackController.java
+13
-2
AccountPatFamilyRecord.java
...account/account/server/entity/AccountPatFamilyRecord.java
+125
-0
AccountPatFamilyRecordMapper.java
...t/account/server/mapper/AccountPatFamilyRecordMapper.java
+13
-0
AccountPatFamilyRecordService.java
...account/server/service/AccountPatFamilyRecordService.java
+10
-0
AccountPatFamilyRecordServiceImpl.java
...erver/service/impl/AccountPatFamilyRecordServiceImpl.java
+46
-0
mybatis-generator.xml
server/src/main/resources/mybatis-generator.xml
+4
-3
AccountPatFamilyRecordMapper.xml
...c/main/resources/mybatis/AccountPatFamilyRecordMapper.xml
+121
-0
未找到文件。
client/src/main/java/com/pica/cloud/account/account/client/PatHealthPackClient.java
浏览文件 @
8d102188
...
...
@@ -51,5 +51,7 @@ public interface PatHealthPackClient {
@GetMapping
(
value
=
"/account/pat-health/mobile/{mobile}"
)
PicaResponse
<
AcctSelfPatId
>
getAcctIdByMobile
(
@PathVariable
(
"mobile"
)
String
mobile
);
@PostMapping
(
value
=
"/account/pat-health/family/unusual/record"
)
PicaResponse
saveUnusualFamilyRecord
(
@RequestBody
PatFamilyRecordReq
patFamilyRecordReq
);
}
common/src/main/java/com/pica/cloud/account/account/common/req/PatFamilyRecordReq.java
0 → 100644
浏览文件 @
8d102188
package
com
.
pica
.
cloud
.
account
.
account
.
common
.
req
;
public
class
PatFamilyRecordReq
{
private
Integer
accId
;
private
Integer
selfPatientId
;
private
Integer
patientId
;
private
Integer
relation
;
private
Integer
doctorId
;
private
Integer
businessType
;
private
Integer
createdId
;
private
Integer
modifiedId
;
public
Integer
getCreatedId
()
{
return
createdId
;
}
public
void
setCreatedId
(
Integer
createdId
)
{
this
.
createdId
=
createdId
;
}
public
Integer
getModifiedId
()
{
return
modifiedId
;
}
public
void
setModifiedId
(
Integer
modifiedId
)
{
this
.
modifiedId
=
modifiedId
;
}
public
Integer
getAccId
()
{
return
accId
;
}
public
void
setAccId
(
Integer
accId
)
{
this
.
accId
=
accId
;
}
public
Integer
getSelfPatientId
()
{
return
selfPatientId
;
}
public
void
setSelfPatientId
(
Integer
selfPatientId
)
{
this
.
selfPatientId
=
selfPatientId
;
}
public
Integer
getPatientId
()
{
return
patientId
;
}
public
void
setPatientId
(
Integer
patientId
)
{
this
.
patientId
=
patientId
;
}
public
Integer
getRelation
()
{
return
relation
;
}
public
void
setRelation
(
Integer
relation
)
{
this
.
relation
=
relation
;
}
public
Integer
getDoctorId
()
{
return
doctorId
;
}
public
void
setDoctorId
(
Integer
doctorId
)
{
this
.
doctorId
=
doctorId
;
}
public
Integer
getBusinessType
()
{
return
businessType
;
}
public
void
setBusinessType
(
Integer
businessType
)
{
this
.
businessType
=
businessType
;
}
}
server/src/main/java/com/pica/cloud/account/account/server/controller/PatHealthPackController.java
浏览文件 @
8d102188
...
...
@@ -6,6 +6,7 @@ import com.pica.cloud.account.account.common.resp.AcctPatIdResp;
import
com.pica.cloud.account.account.common.resp.AcctSelfPatId
;
import
com.pica.cloud.account.account.common.resp.PatBindResp
;
import
com.pica.cloud.account.account.common.resp.PatFamilyResp
;
import
com.pica.cloud.account.account.server.service.AccountPatFamilyRecordService
;
import
com.pica.cloud.account.account.server.service.PatHealthPackService
;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
io.swagger.annotations.Api
;
...
...
@@ -31,6 +32,9 @@ public class PatHealthPackController {
@Autowired
private
PatHealthPackService
packService
;
@Autowired
private
AccountPatFamilyRecordService
accountPatFamilyRecordService
;
@ApiOperation
(
"获取主账户ID-根据unionId"
)
@GetMapping
(
value
=
"/acctId/unionId/{unionId}"
)
public
PicaResponse
<
Integer
>
getAcctIdByUnionId
(
@PathVariable
(
"unionId"
)
String
unionId
)
throws
Exception
{
...
...
@@ -51,8 +55,8 @@ public class PatHealthPackController {
@ApiOperation
(
"根据accid获取自身家庭成员List;containAcct:0 包含自身 1 不包含自身"
)
@GetMapping
(
value
=
"/familyPats/{acctId}/containAcct/{containAcct}"
)
public
PicaResponse
<
PatFamilyResp
>
getFamilyPatsByAcctId
(
@PathVariable
(
"acctId"
)
Integer
acctId
,
@PathVariable
(
"containAcct"
)
Integer
containAcct
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
getFamilyPatsByAcctId
(
acctId
,
containAcct
));
public
PicaResponse
<
PatFamilyResp
>
getFamilyPatsByAcctId
(
@PathVariable
(
"acctId"
)
Integer
acctId
,
@PathVariable
(
"containAcct"
)
Integer
containAcct
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
getFamilyPatsByAcctId
(
acctId
,
containAcct
));
}
@ApiOperation
(
"保存主账户"
)
...
...
@@ -104,4 +108,11 @@ public class PatHealthPackController {
return
PicaResponse
.
toResponse
(
packService
.
getAcctIdByMobile
(
mobile
));
}
@ApiOperation
(
"存储存在问题的家庭关系"
)
@PostMapping
(
value
=
"/family/unusual/record"
)
public
PicaResponse
saveUnusualFamilyRecord
(
@RequestBody
PatFamilyRecordReq
patFamilyRecordReq
)
{
accountPatFamilyRecordService
.
saveRecord
(
patFamilyRecordReq
);
return
PicaResponse
.
toResponse
();
}
}
server/src/main/java/com/pica/cloud/account/account/server/entity/AccountPatFamilyRecord.java
0 → 100644
浏览文件 @
8d102188
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
AccountPatFamilyRecord
{
private
Integer
id
;
private
Integer
acctId
;
private
Integer
selfPatientId
;
private
Integer
patientId
;
private
Integer
doctorId
;
private
Integer
businessType
;
private
Integer
relation
;
private
Integer
deleteFlag
;
private
Integer
createdId
;
private
Date
createdTime
;
private
Integer
modifiedId
;
private
Date
modifiedTime
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getAcctId
()
{
return
acctId
;
}
public
void
setAcctId
(
Integer
acctId
)
{
this
.
acctId
=
acctId
;
}
public
Integer
getSelfPatientId
()
{
return
selfPatientId
;
}
public
void
setSelfPatientId
(
Integer
selfPatientId
)
{
this
.
selfPatientId
=
selfPatientId
;
}
public
Integer
getPatientId
()
{
return
patientId
;
}
public
void
setPatientId
(
Integer
patientId
)
{
this
.
patientId
=
patientId
;
}
public
Integer
getDoctorId
()
{
return
doctorId
;
}
public
void
setDoctorId
(
Integer
doctorId
)
{
this
.
doctorId
=
doctorId
;
}
public
Integer
getBusinessType
()
{
return
businessType
;
}
public
void
setBusinessType
(
Integer
businessType
)
{
this
.
businessType
=
businessType
;
}
public
Integer
getRelation
()
{
return
relation
;
}
public
void
setRelation
(
Integer
relation
)
{
this
.
relation
=
relation
;
}
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
public
Integer
getCreatedId
()
{
return
createdId
;
}
public
void
setCreatedId
(
Integer
createdId
)
{
this
.
createdId
=
createdId
;
}
public
Date
getCreatedTime
()
{
return
createdTime
;
}
public
void
setCreatedTime
(
Date
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
public
Integer
getModifiedId
()
{
return
modifiedId
;
}
public
void
setModifiedId
(
Integer
modifiedId
)
{
this
.
modifiedId
=
modifiedId
;
}
public
Date
getModifiedTime
()
{
return
modifiedTime
;
}
public
void
setModifiedTime
(
Date
modifiedTime
)
{
this
.
modifiedTime
=
modifiedTime
;
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/AccountPatFamilyRecordMapper.java
0 → 100644
浏览文件 @
8d102188
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
mapper
;
import
com.pica.cloud.account.account.server.entity.AccountPatFamilyRecord
;
public
interface
AccountPatFamilyRecordMapper
{
int
insert
(
AccountPatFamilyRecord
record
);
int
insertSelective
(
AccountPatFamilyRecord
record
);
AccountPatFamilyRecord
selectByPrimaryKey
(
Integer
id
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/service/AccountPatFamilyRecordService.java
0 → 100644
浏览文件 @
8d102188
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
service
;
import
com.pica.cloud.account.account.common.req.PatFamilyRecordReq
;
public
interface
AccountPatFamilyRecordService
{
void
saveRecord
(
PatFamilyRecordReq
patFamilyRecordReq
);
}
server/src/main/java/com/pica/cloud/account/account/server/service/impl/AccountPatFamilyRecordServiceImpl.java
0 → 100644
浏览文件 @
8d102188
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.pica.cloud.account.account.common.req.PatFamilyRecordReq
;
import
com.pica.cloud.account.account.server.entity.AccountPatFamilyRecord
;
import
com.pica.cloud.account.account.server.mapper.AccountPatFamilyRecordMapper
;
import
com.pica.cloud.account.account.server.service.AccountPatFamilyRecordService
;
import
com.pica.cloud.account.account.server.service.CaptchaService
;
import
com.pica.cloud.account.account.server.util.MemcachedClientWrapper
;
import
com.pica.cloud.account.account.server.util.captcha.CaptchaGenerator
;
import
com.pica.cloud.account.account.server.util.captcha.CaptchaToken
;
import
com.pica.cloud.foundation.utils.constants.CommonConstants
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.UUID
;
@Component
public
class
AccountPatFamilyRecordServiceImpl
implements
AccountPatFamilyRecordService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
AccountPatFamilyRecordServiceImpl
.
class
);
@Autowired
private
AccountPatFamilyRecordMapper
accountPatFamilyRecordMapper
;
@Override
public
void
saveRecord
(
PatFamilyRecordReq
recordReq
)
{
logger
.
info
(
"AccountPatFamilyRecordServiceImpl/saveRecord : "
+
JSON
.
toJSONString
(
recordReq
));
if
(
recordReq
!=
null
)
{
AccountPatFamilyRecord
record
=
new
AccountPatFamilyRecord
();
BeanUtils
.
copyProperties
(
recordReq
,
record
);
Date
now
=
new
Date
();
record
.
setDeleteFlag
(
1
);
record
.
setCreatedTime
(
now
);
record
.
setModifiedTime
(
now
);
accountPatFamilyRecordMapper
.
insert
(
record
);
}
}
}
server/src/main/resources/mybatis-generator.xml
浏览文件 @
8d102188
...
...
@@ -6,7 +6,8 @@
<generatorConfiguration>
<!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包-->
<classPathEntry
location=
"D:\programer\reponsitory\maven\mysql\mysql-connector-java\5.1.39\mysql-connector-java-5.1.39.jar"
/>
<!-- <classPathEntry location="/Users/wangyongbo/Downloads/software/mysql-connector-java-5.1.39.jar"/>-->
<!-- <classPathEntry location="D:\programer\reponsitory\maven\mysql\mysql-connector-java\5.1.39\mysql-connector-java-5.1.39.jar"/>-->
<!--<classPathEntry location="E:\mysql_jar/mysql-connector-java-5.1.39.jar"/>-->
<context
id=
"tableEntity"
targetRuntime=
"MyBatis3"
>
...
...
@@ -40,8 +41,8 @@
<property
name=
"enableSubPackages"
value=
"true"
/>
</javaClientGenerator>
<table
tableName=
"account_apple_info"
domainObjectName=
"AccountAppleInfo"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
></table
>
<!-- <table tableName="account_apple_info" domainObjectName="AccountAppleInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>-->
<!-- <table tableName="account_pat_family_record" domainObjectName="AccountPatFamilyRecord" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--
>
</context>
</generatorConfiguration>
...
...
server/src/main/resources/mybatis/AccountPatFamilyRecordMapper.xml
0 → 100644
浏览文件 @
8d102188
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.pica.cloud.account.account.server.mapper.AccountPatFamilyRecordMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.AccountPatFamilyRecord"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"acct_id"
property=
"acctId"
jdbcType=
"INTEGER"
/>
<result
column=
"self_patient_id"
property=
"selfPatientId"
jdbcType=
"INTEGER"
/>
<result
column=
"patient_id"
property=
"patientId"
jdbcType=
"INTEGER"
/>
<result
column=
"doctor_id"
property=
"doctorId"
jdbcType=
"INTEGER"
/>
<result
column=
"business_type"
property=
"businessType"
jdbcType=
"INTEGER"
/>
<result
column=
"relation"
property=
"relation"
jdbcType=
"INTEGER"
/>
<result
column=
"delete_flag"
property=
"deleteFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"created_id"
property=
"createdId"
jdbcType=
"INTEGER"
/>
<result
column=
"created_time"
property=
"createdTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"modified_id"
property=
"modifiedId"
jdbcType=
"INTEGER"
/>
<result
column=
"modified_time"
property=
"modifiedTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, acct_id, self_patient_id, patient_id, doctor_id, business_type, relation, delete_flag,
created_id, created_time, modified_id, modified_time
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_family_record
where id = #{id,jdbcType=INTEGER}
</select>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.AccountPatFamilyRecord"
>
insert into account_pat_family_record (acct_id, self_patient_id,
patient_id, doctor_id, business_type,
relation, delete_flag, created_id,
created_time, modified_id, modified_time
)
values (#{acctId,jdbcType=INTEGER}, #{selfPatientId,jdbcType=INTEGER},
#{patientId,jdbcType=INTEGER}, #{doctorId,jdbcType=INTEGER}, #{businessType,jdbcType=INTEGER},
#{relation,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createdId,jdbcType=INTEGER},
#{createdTime,jdbcType=TIMESTAMP}, #{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.AccountPatFamilyRecord"
>
insert into account_pat_family_record
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"acctId != null"
>
acct_id,
</if>
<if
test=
"selfPatientId != null"
>
self_patient_id,
</if>
<if
test=
"patientId != null"
>
patient_id,
</if>
<if
test=
"doctorId != null"
>
doctor_id,
</if>
<if
test=
"businessType != null"
>
business_type,
</if>
<if
test=
"relation != null"
>
relation,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"createdId != null"
>
created_id,
</if>
<if
test=
"createdTime != null"
>
created_time,
</if>
<if
test=
"modifiedId != null"
>
modified_id,
</if>
<if
test=
"modifiedTime != null"
>
modified_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"acctId != null"
>
#{acctId,jdbcType=INTEGER},
</if>
<if
test=
"selfPatientId != null"
>
#{selfPatientId,jdbcType=INTEGER},
</if>
<if
test=
"patientId != null"
>
#{patientId,jdbcType=INTEGER},
</if>
<if
test=
"doctorId != null"
>
#{doctorId,jdbcType=INTEGER},
</if>
<if
test=
"businessType != null"
>
#{businessType,jdbcType=INTEGER},
</if>
<if
test=
"relation != null"
>
#{relation,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createdId != null"
>
#{createdId,jdbcType=INTEGER},
</if>
<if
test=
"createdTime != null"
>
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifiedId != null"
>
#{modifiedId,jdbcType=INTEGER},
</if>
<if
test=
"modifiedTime != null"
>
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
</mapper>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录