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
提交
8eff1c79
提交
8eff1c79
编写于
5月 27, 2020
作者:
yujiao
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/dev-laowang-20200522' into dev-laowang-20200522
上级
df323484
2b35190b
流水线
#25942
已失败 于阶段
in 0 second
变更
25
流水线
1
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
2083 行增加
和
5 行删除
+2083
-5
pom.xml
client/pom.xml
+2
-2
PatHealthPackClient.java
...ica/cloud/account/account/client/PatHealthPackClient.java
+48
-0
pom.xml
common/pom.xml
+1
-1
AcctPatFamilyDto.java
...ca/cloud/account/account/common/req/AcctPatFamilyDto.java
+34
-0
AcctPatFamilyReq.java
...ca/cloud/account/account/common/req/AcctPatFamilyReq.java
+38
-0
AcctPatInfoReq.java
...pica/cloud/account/account/common/req/AcctPatInfoReq.java
+91
-0
InitAcctReq.java
...om/pica/cloud/account/account/common/req/InitAcctReq.java
+66
-0
PatBindResp.java
...m/pica/cloud/account/account/common/resp/PatBindResp.java
+37
-0
PatFamilyResp.java
...pica/cloud/account/account/common/resp/PatFamilyResp.java
+62
-0
pom.xml
server/pom.xml
+1
-1
AccountController.java
.../account/account/server/controller/AccountController.java
+2
-1
PatHealthPackController.java
...nt/account/server/controller/PatHealthPackController.java
+91
-0
AcctPatFamily.java
...ca/cloud/account/account/server/entity/AcctPatFamily.java
+95
-0
AcctPatInfo.java
...pica/cloud/account/account/server/entity/AcctPatInfo.java
+165
-0
AcctPatUnion.java
...ica/cloud/account/account/server/entity/AcctPatUnion.java
+95
-0
AccountExceptionEnum.java
...ud/account/account/server/enums/AccountExceptionEnum.java
+8
-0
SourceTypeEnum.java
...ca/cloud/account/account/server/enums/SourceTypeEnum.java
+1
-0
AcctPatFamilyMapper.java
...ud/account/account/server/mapper/AcctPatFamilyMapper.java
+40
-0
AcctPatInfoMapper.java
...loud/account/account/server/mapper/AcctPatInfoMapper.java
+28
-0
AcctPatUnionMapper.java
...oud/account/account/server/mapper/AcctPatUnionMapper.java
+25
-0
PatHealthPackService.java
.../account/account/server/service/PatHealthPackService.java
+40
-0
PatHealthPackServiceIml.java
.../account/server/service/impl/PatHealthPackServiceIml.java
+444
-0
AcctPatFamilyMapper.xml
server/src/main/resources/mybatis/AcctPatFamilyMapper.xml
+228
-0
AcctPatInfoMapper.xml
server/src/main/resources/mybatis/AcctPatInfoMapper.xml
+266
-0
AcctPatUnionMapper.xml
server/src/main/resources/mybatis/AcctPatUnionMapper.xml
+175
-0
未找到文件。
client/pom.xml
浏览文件 @
8eff1c79
...
...
@@ -11,7 +11,7 @@
<groupId>
com.pica.cloud.account
</groupId>
<artifactId>
pica-cloud-account-client
</artifactId>
<version>
1.0.3.
1
</version>
<version>
1.0.3.
3
</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.0.1
</version>
<version>
1.0.1
.2
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
...
...
client/src/main/java/com/pica/cloud/account/account/client/PatHealthPackClient.java
0 → 100644
浏览文件 @
8eff1c79
package
com
.
pica
.
cloud
.
account
.
account
.
client
;
import
com.pica.cloud.account.account.common.req.AcctPatFamilyReq
;
import
com.pica.cloud.account.account.common.req.AcctPatInfoReq
;
import
com.pica.cloud.account.account.common.req.InitAcctReq
;
import
com.pica.cloud.account.account.common.resp.PatBindResp
;
import
com.pica.cloud.account.account.common.resp.PatFamilyResp
;
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
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
@FeignClient
(
name
=
"13201-pica-cloud-account"
)
public
interface
PatHealthPackClient
{
@GetMapping
(
value
=
"/account/pat-health/acctId/unionId/{unionId}"
)
PicaResponse
<
Integer
>
getAcctIdByUnionId
(
@PathVariable
(
"unionId"
)
String
unionId
);
@GetMapping
(
value
=
"/account/pat-health/acctId/patId/{patientId}"
)
PicaResponse
<
Integer
>
getAcctIdByPatId
(
@PathVariable
(
"patientId"
)
Integer
patientId
);
@GetMapping
(
value
=
"/account/pat-health/directPatIds/{patientId}"
)
PicaResponse
<
List
<
Integer
>>
getDirectPatIdsByPatId
(
@PathVariable
(
"patientId"
)
Integer
patientId
);
@GetMapping
(
value
=
"/account/pat-health/familyPats/{acctId}/containAcct/{containAcct}"
)
PicaResponse
<
PatFamilyResp
>
getFamilyPatsByAcctId
(
@PathVariable
(
"acctId"
)
Integer
acctId
,
@PathVariable
(
"containAcct"
)
Integer
containAcct
);
@PostMapping
(
value
=
"/account/pat-health/acct"
)
PicaResponse
<
Integer
>
saveAcct
(
@RequestBody
AcctPatInfoReq
patInfoReq
);
@PostMapping
(
value
=
"/account/pat-health/acct/bindUnion"
)
PicaResponse
<
PatBindResp
>
bindUnion
(
@RequestBody
AcctPatInfoReq
patInfoReq
);
@PostMapping
(
value
=
"/account/pat-health/family/member"
)
PicaResponse
<
PatFamilyResp
>
saveMember
(
@RequestBody
AcctPatFamilyReq
familyReqReq
);
@GetMapping
(
value
=
"/account/pat-health/familyAcct/patId/{patId}"
)
PicaResponse
<
Integer
>
getFamilyAcctPatId
(
@PathVariable
(
"patId"
)
Integer
patId
);
@PostMapping
(
value
=
"/account/pat-health/init/accts"
)
PicaResponse
initAccts
(
@RequestBody
List
<
InitAcctReq
>
initAcctReqList
);
}
common/pom.xml
浏览文件 @
8eff1c79
...
...
@@ -11,7 +11,7 @@
<groupId>
com.pica.cloud.account
</groupId>
<artifactId>
pica-cloud-account-common
</artifactId>
<version>
1.0.1
</version>
<version>
1.0.1
.2
</version>
<name>
pica-cloud-account-common
</name>
<packaging>
jar
</packaging>
...
...
common/src/main/java/com/pica/cloud/account/account/common/req/AcctPatFamilyDto.java
0 → 100644
浏览文件 @
8eff1c79
// Copyright 2016-2101 Pica.
package
com
.
pica
.
cloud
.
account
.
account
.
common
.
req
;
/**
* @ClassName AcctPatFamilyDto
* @Description TODO
* @Author peijun.zhao
* @Date 2020/5/14 13:21
* @ModifyDate 2020/5/14 13:21
* @Version 1.0
*/
public
class
AcctPatFamilyDto
{
private
Integer
patientId
;
private
Integer
relation
;
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
;
}
}
common/src/main/java/com/pica/cloud/account/account/common/req/AcctPatFamilyReq.java
0 → 100644
浏览文件 @
8eff1c79
// Copyright 2016-2101 Pica.
package
com
.
pica
.
cloud
.
account
.
account
.
common
.
req
;
import
io.swagger.annotations.ApiModel
;
import
java.util.List
;
/**
* @ClassName AcctPatFamilyReq
* @Description TODO
* @Author peijun.zhao
* @Date 2020/5/14 13:21
* @ModifyDate 2020/5/14 13:21
* @Version 1.0
*/
@ApiModel
public
class
AcctPatFamilyReq
{
private
Integer
acctId
;
private
List
<
AcctPatFamilyDto
>
memberList
;
public
Integer
getAcctId
()
{
return
acctId
;
}
public
void
setAcctId
(
Integer
acctId
)
{
this
.
acctId
=
acctId
;
}
public
List
<
AcctPatFamilyDto
>
getMemberList
()
{
return
memberList
;
}
public
void
setMemberList
(
List
<
AcctPatFamilyDto
>
memberList
)
{
this
.
memberList
=
memberList
;
}
}
common/src/main/java/com/pica/cloud/account/account/common/req/AcctPatInfoReq.java
0 → 100644
浏览文件 @
8eff1c79
// Copyright 2016-2101 Pica.
package
com
.
pica
.
cloud
.
account
.
account
.
common
.
req
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* @ClassName AcctPatInfoReq
* @Description TODO
* @Author peijun.zhao
* @Date 2020/5/12 16:16
* @ModifyDate 2020/5/12 16:16
* @Version 1.0
*/
@ApiModel
public
class
AcctPatInfoReq
{
// @NotNull
private
String
name
;
// @NotNull
private
String
mobile
;
private
String
unionId
;
private
Integer
acctId
;
@ApiModelProperty
(
"1.云鹊健康小程序"
)
private
Integer
type
;
private
Integer
patientId
;
@ApiModelProperty
(
"1:本人 2:父母 3:子女 4:配偶 5:其他"
)
private
Integer
memberType
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getMobile
()
{
return
mobile
;
}
public
void
setMobile
(
String
mobile
)
{
this
.
mobile
=
mobile
;
}
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
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
Integer
getPatientId
()
{
return
patientId
;
}
public
void
setPatientId
(
Integer
patientId
)
{
this
.
patientId
=
patientId
;
}
public
Integer
getMemberType
()
{
return
memberType
;
}
public
void
setMemberType
(
Integer
memberType
)
{
this
.
memberType
=
memberType
;
}
}
common/src/main/java/com/pica/cloud/account/account/common/req/InitAcctReq.java
0 → 100644
浏览文件 @
8eff1c79
// Copyright 2016-2101 Pica.
package
com
.
pica
.
cloud
.
account
.
account
.
common
.
req
;
import
io.swagger.annotations.ApiModel
;
/**
* @ClassName InitAcctReq
* @Description TODO
* @Author peijun.zhao
* @Date 2020/5/20 10:46
* @ModifyDate 2020/5/20 10:46
* @Version 1.0
*/
@ApiModel
public
class
InitAcctReq
{
private
Integer
patId
;
private
String
mobile
;
private
String
encryMobile
;
private
String
name
;
private
String
unionId
;
public
String
getUnionId
()
{
return
unionId
;
}
public
void
setUnionId
(
String
unionId
)
{
this
.
unionId
=
unionId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getEncryMobile
()
{
return
encryMobile
;
}
public
void
setEncryMobile
(
String
encryMobile
)
{
this
.
encryMobile
=
encryMobile
;
}
public
Integer
getPatId
()
{
return
patId
;
}
public
void
setPatId
(
Integer
patId
)
{
this
.
patId
=
patId
;
}
public
String
getMobile
()
{
return
mobile
;
}
public
void
setMobile
(
String
mobile
)
{
this
.
mobile
=
mobile
;
}
}
common/src/main/java/com/pica/cloud/account/account/common/resp/PatBindResp.java
0 → 100644
浏览文件 @
8eff1c79
// Copyright 2016-2101 Pica.
package
com
.
pica
.
cloud
.
account
.
account
.
common
.
resp
;
import
io.swagger.annotations.ApiModel
;
/**
* @ClassName PatBindResp
* @Description TODO
* @Author peijun.zhao
* @Date 2020/5/13 13:24
* @ModifyDate 2020/5/13 13:24
* @Version 1.0
*/
@ApiModel
(
description
=
"建立微信与账号关联关系-resp"
)
public
class
PatBindResp
{
private
boolean
bindStatus
;
private
String
msg
;
public
boolean
isBindStatus
()
{
return
bindStatus
;
}
public
void
setBindStatus
(
boolean
bindStatus
)
{
this
.
bindStatus
=
bindStatus
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
}
common/src/main/java/com/pica/cloud/account/account/common/resp/PatFamilyResp.java
0 → 100644
浏览文件 @
8eff1c79
// Copyright 2016-2101 Pica.
package
com
.
pica
.
cloud
.
account
.
account
.
common
.
resp
;
import
com.pica.cloud.account.account.common.req.AcctPatFamilyDto
;
import
io.swagger.annotations.ApiModel
;
import
java.util.List
;
@ApiModel
(
description
=
"建立家庭服务关系-resp"
)
public
class
PatFamilyResp
{
private
boolean
successFlag
;
private
List
<
AcctPatFamilyDto
>
failMemberList
;
private
List
<
AcctPatFamilyDto
>
memberList
;
private
List
<
Integer
>
memberPatIds
;
private
String
failMsg
;
public
List
<
AcctPatFamilyDto
>
getMemberList
()
{
return
memberList
;
}
public
void
setMemberList
(
List
<
AcctPatFamilyDto
>
memberList
)
{
this
.
memberList
=
memberList
;
}
public
String
getFailMsg
()
{
return
failMsg
;
}
public
void
setFailMsg
(
String
failMsg
)
{
this
.
failMsg
=
failMsg
;
}
public
boolean
isSuccessFlag
()
{
return
successFlag
;
}
public
void
setSuccessFlag
(
boolean
successFlag
)
{
this
.
successFlag
=
successFlag
;
}
public
List
<
AcctPatFamilyDto
>
getFailMemberList
()
{
return
failMemberList
;
}
public
void
setFailMemberList
(
List
<
AcctPatFamilyDto
>
failMemberList
)
{
this
.
failMemberList
=
failMemberList
;
}
public
List
<
Integer
>
getMemberPatIds
()
{
return
memberPatIds
;
}
public
void
setMemberPatIds
(
List
<
Integer
>
memberPatIds
)
{
this
.
memberPatIds
=
memberPatIds
;
}
}
server/pom.xml
浏览文件 @
8eff1c79
...
...
@@ -138,7 +138,7 @@
<dependency>
<groupId>
com.pica.cloud.account
</groupId>
<artifactId>
pica-cloud-account-common
</artifactId>
<version>
1.0.1
</version>
<version>
1.0.1
.2
</version>
</dependency>
<dependency>
...
...
server/src/main/java/com/pica/cloud/account/account/server/controller/AccountController.java
浏览文件 @
8eff1c79
...
...
@@ -212,7 +212,8 @@ public class AccountController extends AccountBaseController {
@ApiOperation
(
"H5端一键登录功能,无需完善信息"
)
@PostMapping
(
"/login-register/v1"
)
// @RepeatForbidden(uniqueKey = "content") 当前版本存在性能问题 luo优化后上
// @RepeatForbidden(uniqueKey = "content")
//当前版本存在性能问题 luo优化后上
public
PicaResponse
loginRegister
(
@RequestBody
EncryptEntity
entity
)
throws
Exception
{
BaseRequest
request
=
CryptoUtil
.
decrypt
(
entity
,
BaseRequest
.
class
);
this
.
checkMobilePhone
(
request
.
getMobile
());
...
...
server/src/main/java/com/pica/cloud/account/account/server/controller/PatHealthPackController.java
0 → 100644
浏览文件 @
8eff1c79
// Copyright 2016-2101 Pica.
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
controller
;
import
com.pica.cloud.account.account.common.req.AcctPatFamilyReq
;
import
com.pica.cloud.account.account.common.req.AcctPatInfoReq
;
import
com.pica.cloud.account.account.common.req.InitAcctReq
;
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.PatHealthPackService
;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @Description TODO
* @Author peijun.zhao
* @Date 2020/5/12 15:55
* @ModifyDate 2020/5/12 15:55
* @Params
* @Return
*/
@Api
(
description
=
"健康包"
)
@RestController
@RequestMapping
(
"/pat-health"
)
public
class
PatHealthPackController
{
@Autowired
private
PatHealthPackService
packService
;
@ApiOperation
(
"获取主账户ID-根据unionId"
)
@GetMapping
(
value
=
"/acctId/unionId/{unionId}"
)
public
PicaResponse
<
Integer
>
getAcctIdByUnionId
(
@PathVariable
(
"unionId"
)
String
unionId
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
getAcctIdByUnionId
(
unionId
));
}
@ApiOperation
(
"获取主账户ID-作为监护人自身patientId"
)
@GetMapping
(
value
=
"/acctId/patId/{patientId}"
)
public
PicaResponse
<
Integer
>
getAcctIdByPatId
(
@PathVariable
(
"patientId"
)
Integer
patientId
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
getAcctIdByPatId
(
patientId
));
}
@ApiOperation
(
"所在家庭组的监护人 + 同级家庭成员 + 下级所有成员 patientId list,去除自身、去重;"
)
@GetMapping
(
value
=
"/directPatIds/{patientId}"
)
public
PicaResponse
<
List
<
Integer
>>
getDirectPatIdsByPatId
(
@PathVariable
(
"patientId"
)
Integer
patientId
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
getDirectPatIdsByPatId
(
patientId
));
}
@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
));
}
@ApiOperation
(
"保存主账户"
)
@PostMapping
(
value
=
"/acct"
)
public
PicaResponse
<
Integer
>
saveAcct
(
@RequestBody
AcctPatInfoReq
patInfoReq
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
saveAcct
(
patInfoReq
));
}
@ApiOperation
(
"建立微信与账号关联关系"
)
@PostMapping
(
value
=
"/acct/bindUnion"
)
public
PicaResponse
<
PatBindResp
>
bindUnion
(
@RequestBody
AcctPatInfoReq
patInfoReq
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
bindUnion
(
patInfoReq
));
}
@ApiOperation
(
"建立家庭服务关系"
)
@PostMapping
(
value
=
"/family/member"
)
public
PicaResponse
<
PatFamilyResp
>
saveMember
(
@RequestBody
AcctPatFamilyReq
familyReqReq
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
saveMember
(
familyReqReq
));
}
@ApiOperation
(
"根据patientId获取监护人-本人监护人(自身patId),本人成员(监护人patId)"
)
@GetMapping
(
value
=
"/familyAcct/patId/{patId}"
)
public
PicaResponse
<
Integer
>
getFamilyAcctPatId
(
@PathVariable
(
"patId"
)
Integer
patId
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
getFamilyAcctPatId
(
patId
));
}
@ApiOperation
(
"初始主账户数据"
)
@PostMapping
(
value
=
"/init/accts"
)
public
PicaResponse
initAccts
(
@RequestBody
List
<
InitAcctReq
>
initAcctReqList
)
throws
Exception
{
return
PicaResponse
.
toResponse
(
packService
.
initAccts
(
initAcctReqList
));
}
}
server/src/main/java/com/pica/cloud/account/account/server/entity/AcctPatFamily.java
0 → 100644
浏览文件 @
8eff1c79
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
AcctPatFamily
{
private
Integer
id
;
private
Integer
acctId
;
private
Integer
patientId
;
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
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
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/entity/AcctPatInfo.java
0 → 100644
浏览文件 @
8eff1c79
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
AcctPatInfo
{
private
Integer
id
;
private
String
name
;
private
String
mobilePhone
;
private
String
password
;
private
Integer
registerProduct
;
private
Integer
registerSource
;
private
Date
birthday
;
private
Integer
age
;
private
Byte
sex
;
private
String
idCard
;
private
Date
regTime
;
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
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
==
null
?
null
:
name
.
trim
();
}
public
String
getMobilePhone
()
{
return
mobilePhone
;
}
public
void
setMobilePhone
(
String
mobilePhone
)
{
this
.
mobilePhone
=
mobilePhone
==
null
?
null
:
mobilePhone
.
trim
();
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
==
null
?
null
:
password
.
trim
();
}
public
Integer
getRegisterProduct
()
{
return
registerProduct
;
}
public
void
setRegisterProduct
(
Integer
registerProduct
)
{
this
.
registerProduct
=
registerProduct
;
}
public
Integer
getRegisterSource
()
{
return
registerSource
;
}
public
void
setRegisterSource
(
Integer
registerSource
)
{
this
.
registerSource
=
registerSource
;
}
public
Date
getBirthday
()
{
return
birthday
;
}
public
void
setBirthday
(
Date
birthday
)
{
this
.
birthday
=
birthday
;
}
public
Integer
getAge
()
{
return
age
;
}
public
void
setAge
(
Integer
age
)
{
this
.
age
=
age
;
}
public
Byte
getSex
()
{
return
sex
;
}
public
void
setSex
(
Byte
sex
)
{
this
.
sex
=
sex
;
}
public
String
getIdCard
()
{
return
idCard
;
}
public
void
setIdCard
(
String
idCard
)
{
this
.
idCard
=
idCard
==
null
?
null
:
idCard
.
trim
();
}
public
Date
getRegTime
()
{
return
regTime
;
}
public
void
setRegTime
(
Date
regTime
)
{
this
.
regTime
=
regTime
;
}
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/entity/AcctPatUnion.java
0 → 100644
浏览文件 @
8eff1c79
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
AcctPatUnion
{
private
Integer
id
;
private
Integer
acctId
;
private
Integer
unionType
;
private
String
unionId
;
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
getUnionType
()
{
return
unionType
;
}
public
void
setUnionType
(
Integer
unionType
)
{
this
.
unionType
=
unionType
;
}
public
String
getUnionId
()
{
return
unionId
;
}
public
void
setUnionId
(
String
unionId
)
{
this
.
unionId
=
unionId
==
null
?
null
:
unionId
.
trim
();
}
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/enums/AccountExceptionEnum.java
浏览文件 @
8eff1c79
...
...
@@ -56,6 +56,14 @@ public enum AccountExceptionEnum {
PICA_MOBILE_NOT_SETED_PASSWORD_H5
(
"216548"
,
"该手机号尚未设置密码,设置密码请前往云鹊医APP,或使用其他方式登录。"
),
PICA_PWD_MISMATCH_5_H5
(
"216549"
,
"该账号密码错误次数已达上限请24小时后再试,或请使用其他登录方式"
),
PAT_ACCT_HAS_EXIST
(
"216550"
,
"账号已存在"
),
PAT_ACCT_HAS_MORE
(
"216551"
,
"主账号存在多条"
),
PAT_MEMBER_HAS_MORE
(
"216552"
,
"该成员已被其他人添加为家庭成员"
),
PAT_SAVE_PARAM_ERROR
(
"216553"
,
"保存主账户参数错误"
),
PAT_UNIONID_BINDED_ERROR
(
"216554"
,
"该unionid已被其他手机号绑定"
),
PAT_MOBILE_BINDED_WECHAT_ERROR
(
"216555"
,
"该手机已绑定其他微信"
),
PAT_MEMBER_HAS_BINDED_SELF
(
"216556"
,
"该成员已被账户绑定为家庭成员,不需要再次绑定"
),
PAT_HAS_CREATE_ACCT
(
"216557"
,
"初始居民已存在主账户"
),
xxx_xxx
(
""
,
""
);
...
...
server/src/main/java/com/pica/cloud/account/account/server/enums/SourceTypeEnum.java
浏览文件 @
8eff1c79
...
...
@@ -14,6 +14,7 @@ public enum SourceTypeEnum {
SAAS
(
3
,
"saas"
),
H5
(
4
,
"h5"
),
ADMIN
(
5
,
"admin"
),
INIT
(
6
,
"初始生成-居民账户"
),
XXX
(
10
,
"xxxxxx"
);
...
...
server/src/main/java/com/pica/cloud/account/account/server/mapper/AcctPatFamilyMapper.java
0 → 100644
浏览文件 @
8eff1c79
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
mapper
;
import
com.pica.cloud.account.account.server.entity.AcctPatFamily
;
import
java.util.List
;
public
interface
AcctPatFamilyMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
AcctPatFamily
record
);
int
insertSelective
(
AcctPatFamily
record
);
AcctPatFamily
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
AcctPatFamily
record
);
int
updateByPrimaryKey
(
AcctPatFamily
record
);
/** 获取居民id是本人的家庭组记录- 作为家庭主账户、本人居民id,单条ok 多条异常数据 */
AcctPatFamily
getByPatIdSelf
(
Integer
patId
);
/** 查询居民id所在家庭组监护人- 作为家庭成员、非主账户本人居民id,单条ok 多条异常数据 */
AcctPatFamily
getByPatIdNotSelf
(
Integer
patId
);
/** 获取主账户下所有家庭成员 */
List
<
AcctPatFamily
>
getListByAcctId
(
Integer
acctId
);
/** 根据账户id 获取主账户居民 */
AcctPatFamily
getSelfByAcctId
(
Integer
acctId
);
List
<
AcctPatFamily
>
getListByPatIds
(
List
<
Integer
>
patIds
);
List
<
AcctPatFamily
>
getByPatIdSelfList
(
List
<
Integer
>
patIds
);
int
initBatch
(
List
<
AcctPatFamily
>
list
);
List
<
AcctPatFamily
>
getMemberListByPatIds
(
List
<
Integer
>
patIds
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/AcctPatInfoMapper.java
0 → 100644
浏览文件 @
8eff1c79
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
mapper
;
import
com.pica.cloud.account.account.common.req.InitAcctReq
;
import
com.pica.cloud.account.account.server.entity.AcctPatInfo
;
import
java.util.List
;
import
java.util.Map
;
public
interface
AcctPatInfoMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
AcctPatInfo
record
);
int
insertSelective
(
AcctPatInfo
record
);
AcctPatInfo
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
AcctPatInfo
record
);
int
updateByPrimaryKey
(
AcctPatInfo
record
);
List
<
AcctPatInfo
>
selectByCondition
(
AcctPatInfo
record
);
int
initBatch
(
List
<
AcctPatInfo
>
list
);
List
<
AcctPatInfo
>
getListByMobiles
(
List
<
String
>
mobile
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/AcctPatUnionMapper.java
0 → 100644
浏览文件 @
8eff1c79
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
mapper
;
import
com.pica.cloud.account.account.server.entity.AcctPatUnion
;
import
java.util.List
;
public
interface
AcctPatUnionMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
AcctPatUnion
record
);
int
insertSelective
(
AcctPatUnion
record
);
AcctPatUnion
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
AcctPatUnion
record
);
int
updateByPrimaryKey
(
AcctPatUnion
record
);
AcctPatUnion
selectByUnionId
(
String
unionId
);
AcctPatUnion
selectByAcctId
(
Integer
acctId
);
int
initBatch
(
List
<
AcctPatUnion
>
list
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/service/PatHealthPackService.java
0 → 100644
浏览文件 @
8eff1c79
// Copyright 2016-2101 Pica.
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
service
;
import
com.pica.cloud.account.account.common.req.AcctPatFamilyReq
;
import
com.pica.cloud.account.account.common.req.AcctPatInfoReq
;
import
com.pica.cloud.account.account.common.req.InitAcctReq
;
import
com.pica.cloud.account.account.common.resp.PatBindResp
;
import
com.pica.cloud.account.account.common.resp.PatFamilyResp
;
import
java.util.List
;
/**
* @ClassName PatHealthPackService
* @Description TODO
* @Author peijun.zhao
* @Date 2020/5/14 18:30
* @ModifyDate 2020/5/14 18:30
* @Version 1.0
*/
public
interface
PatHealthPackService
{
Integer
getAcctIdByUnionId
(
String
unionId
);
Integer
getAcctIdByPatId
(
Integer
patientId
);
List
<
Integer
>
getDirectPatIdsByPatId
(
Integer
patientId
);
PatFamilyResp
getFamilyPatsByAcctId
(
Integer
acctId
,
Integer
containAcct
);
Integer
saveAcct
(
AcctPatInfoReq
patInfoReq
);
PatBindResp
bindUnion
(
AcctPatInfoReq
patInfoReq
);
PatFamilyResp
saveMember
(
AcctPatFamilyReq
familyReqReq
);
Integer
getFamilyAcctPatId
(
Integer
patId
);
Integer
initAccts
(
List
<
InitAcctReq
>
list
);
}
server/src/main/java/com/pica/cloud/account/account/server/service/impl/PatHealthPackServiceIml.java
0 → 100644
浏览文件 @
8eff1c79
此差异已折叠。
点击以展开。
server/src/main/resources/mybatis/AcctPatFamilyMapper.xml
0 → 100644
浏览文件 @
8eff1c79
<?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.AcctPatFamilyMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.AcctPatFamily"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"acct_id"
property=
"acctId"
jdbcType=
"INTEGER"
/>
<result
column=
"patient_id"
property=
"patientId"
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, patient_id, 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
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from account_pat_family
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatFamily"
>
insert into account_pat_family (id, acct_id, patient_id,
relation, delete_flag, created_id,
created_time, modified_id, modified_time
)
values (#{id,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER}, #{patientId,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.AcctPatFamily"
>
insert into account_pat_family
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"acctId != null"
>
acct_id,
</if>
<if
test=
"patientId != null"
>
patient_id,
</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=
"patientId != null"
>
#{patientId,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>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatFamily"
>
update account_pat_family
<set
>
<if
test=
"acctId != null"
>
acct_id = #{acctId,jdbcType=INTEGER},
</if>
<if
test=
"patientId != null"
>
patient_id = #{patientId,jdbcType=INTEGER},
</if>
<if
test=
"relation != null"
>
relation = #{relation,jdbcType=INTEGER},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createdId != null"
>
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if
test=
"createdTime != null"
>
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifiedId != null"
>
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if
test=
"modifiedTime != null"
>
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatFamily"
>
update account_pat_family
set acct_id = #{acctId,jdbcType=INTEGER},
patient_id = #{patientId,jdbcType=INTEGER},
relation = #{relation,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"getListByAcctId"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_family
where acct_id = #{acctId,jdbcType=INTEGER}
and delete_flag = 1;
</select>
<select
id=
"getSelfByAcctId"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_family
where acct_id = #{acctId,jdbcType=INTEGER} and relation = 1
and delete_flag = 1;
</select>
<select
id=
"getByPatIdSelf"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_family
where patient_id = #{patientId,jdbcType=INTEGER}
and relation = 1
and delete_flag = 1;
</select>
<select
id=
"getByPatIdNotSelf"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_family
where patient_id = #{patientId,jdbcType=INTEGER}
AND relation != 1
and delete_flag = 1;
</select>
<select
id=
"getListByPatIds"
parameterType=
"java.util.List"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_family
where patient_id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
and delete_flag = 1;
</select>
<select
id=
"getMemberListByPatIds"
parameterType=
"java.util.List"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_family
where patient_id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
AND relation != 1
and delete_flag = 1;
</select>
<select
id=
"getByPatIdSelfList"
parameterType=
"java.util.List"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_family
where patient_id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
and relation = 1
and delete_flag = 1;
</select>
<insert
id=
"initBatch"
parameterType=
"java.util.List"
>
insert into account_pat_family(
acct_id, patient_id,relation,
delete_flag, created_id, created_time,
modified_id, modified_time
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.acctId},#{item.patientId},#{item.relation},
1,99999999,now(),
99999999,now()
)
</foreach>
</insert>
</mapper>
\ No newline at end of file
server/src/main/resources/mybatis/AcctPatInfoMapper.xml
0 → 100644
浏览文件 @
8eff1c79
<?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.AcctPatInfoMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.AcctPatInfo"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"mobile_phone"
property=
"mobilePhone"
jdbcType=
"VARCHAR"
/>
<result
column=
"password"
property=
"password"
jdbcType=
"VARCHAR"
/>
<result
column=
"register_product"
property=
"registerProduct"
jdbcType=
"INTEGER"
/>
<result
column=
"register_source"
property=
"registerSource"
jdbcType=
"INTEGER"
/>
<result
column=
"birthday"
property=
"birthday"
jdbcType=
"DATE"
/>
<result
column=
"age"
property=
"age"
jdbcType=
"INTEGER"
/>
<result
column=
"sex"
property=
"sex"
jdbcType=
"TINYINT"
/>
<result
column=
"id_card"
property=
"idCard"
jdbcType=
"VARCHAR"
/>
<result
column=
"reg_time"
property=
"regTime"
jdbcType=
"TIMESTAMP"
/>
<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, name, mobile_phone, password, register_product, register_source, birthday, age,
sex, id_card, reg_time, 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_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from account_pat_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatInfo"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into account_pat_info (id, name, mobile_phone,
password, register_product, register_source,
birthday, age, sex, id_card,
reg_time, delete_flag, created_id,
created_time, modified_id, modified_time
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{mobilePhone,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{registerProduct,jdbcType=INTEGER}, #{registerSource,jdbcType=INTEGER},
#{birthday,jdbcType=DATE}, #{age,jdbcType=INTEGER}, #{sex,jdbcType=TINYINT}, #{idCard,jdbcType=VARCHAR},
#{regTime,jdbcType=TIMESTAMP}, #{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.AcctPatInfo"
>
insert into account_pat_info
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"mobilePhone != null"
>
mobile_phone,
</if>
<if
test=
"password != null"
>
password,
</if>
<if
test=
"registerProduct != null"
>
register_product,
</if>
<if
test=
"registerSource != null"
>
register_source,
</if>
<if
test=
"birthday != null"
>
birthday,
</if>
<if
test=
"age != null"
>
age,
</if>
<if
test=
"sex != null"
>
sex,
</if>
<if
test=
"idCard != null"
>
id_card,
</if>
<if
test=
"regTime != null"
>
reg_time,
</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=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"mobilePhone != null"
>
#{mobilePhone,jdbcType=VARCHAR},
</if>
<if
test=
"password != null"
>
#{password,jdbcType=VARCHAR},
</if>
<if
test=
"registerProduct != null"
>
#{registerProduct,jdbcType=INTEGER},
</if>
<if
test=
"registerSource != null"
>
#{registerSource,jdbcType=INTEGER},
</if>
<if
test=
"birthday != null"
>
#{birthday,jdbcType=DATE},
</if>
<if
test=
"age != null"
>
#{age,jdbcType=INTEGER},
</if>
<if
test=
"sex != null"
>
#{sex,jdbcType=TINYINT},
</if>
<if
test=
"idCard != null"
>
#{idCard,jdbcType=VARCHAR},
</if>
<if
test=
"regTime != null"
>
#{regTime,jdbcType=TIMESTAMP},
</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>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatInfo"
>
update account_pat_info
<set
>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"mobilePhone != null"
>
mobile_phone = #{mobilePhone,jdbcType=VARCHAR},
</if>
<if
test=
"password != null"
>
password = #{password,jdbcType=VARCHAR},
</if>
<if
test=
"registerProduct != null"
>
register_product = #{registerProduct,jdbcType=INTEGER},
</if>
<if
test=
"registerSource != null"
>
register_source = #{registerSource,jdbcType=INTEGER},
</if>
<if
test=
"birthday != null"
>
birthday = #{birthday,jdbcType=DATE},
</if>
<if
test=
"age != null"
>
age = #{age,jdbcType=INTEGER},
</if>
<if
test=
"sex != null"
>
sex = #{sex,jdbcType=TINYINT},
</if>
<if
test=
"idCard != null"
>
id_card = #{idCard,jdbcType=VARCHAR},
</if>
<if
test=
"regTime != null"
>
reg_time = #{regTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createdId != null"
>
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if
test=
"createdTime != null"
>
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifiedId != null"
>
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if
test=
"modifiedTime != null"
>
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatInfo"
>
update account_pat_info
set name = #{name,jdbcType=VARCHAR},
mobile_phone = #{mobilePhone,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
register_product = #{registerProduct,jdbcType=INTEGER},
register_source = #{registerSource,jdbcType=INTEGER},
birthday = #{birthday,jdbcType=DATE},
age = #{age,jdbcType=INTEGER},
sex = #{sex,jdbcType=TINYINT},
id_card = #{idCard,jdbcType=VARCHAR},
reg_time = #{regTime,jdbcType=TIMESTAMP},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectByCondition"
resultMap=
"BaseResultMap"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatInfo"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_info
where delete_flag = 1
<if
test=
"mobilePhone != null"
>
AND mobile_phone = #{mobilePhone,jdbcType=VARCHAR}
</if>
</select>
<select
id=
"getListByMobiles"
resultMap=
"BaseResultMap"
parameterType=
"java.util.List"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_info
where delete_flag = 1
and mobile_phone IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</select>
<insert
id=
"initBatch"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into account_pat_info(
name, mobile_phone,
password, register_product,register_source,
birthday, age, sex,id_card,reg_time,
delete_flag, created_id, created_time,
modified_id, modified_time
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.name},#{item.mobilePhone},
null,2,6,
null,null,null,null,now(),
1,99999999,now(),
99999999,now()
)
</foreach>
</insert>
</mapper>
\ No newline at end of file
server/src/main/resources/mybatis/AcctPatUnionMapper.xml
0 → 100644
浏览文件 @
8eff1c79
<?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.AcctPatUnionMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.AcctPatUnion"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"acct_id"
property=
"acctId"
jdbcType=
"INTEGER"
/>
<result
column=
"union_type"
property=
"unionType"
jdbcType=
"INTEGER"
/>
<result
column=
"union_id"
property=
"unionId"
jdbcType=
"VARCHAR"
/>
<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, union_type, union_id, 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_union
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from account_pat_union
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatUnion"
>
insert into account_pat_union (id, acct_id, union_type,
union_id, delete_flag, created_id,
created_time, modified_id, modified_time
)
values (#{id,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER}, #{unionType,jdbcType=INTEGER},
#{unionId,jdbcType=VARCHAR}, #{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.AcctPatUnion"
>
insert into account_pat_union
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"acctId != null"
>
acct_id,
</if>
<if
test=
"unionType != null"
>
union_type,
</if>
<if
test=
"unionId != null"
>
union_id,
</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=
"unionType != null"
>
#{unionType,jdbcType=INTEGER},
</if>
<if
test=
"unionId != null"
>
#{unionId,jdbcType=VARCHAR},
</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>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatUnion"
>
update account_pat_union
<set
>
<if
test=
"acctId != null"
>
acct_id = #{acctId,jdbcType=INTEGER},
</if>
<if
test=
"unionType != null"
>
union_type = #{unionType,jdbcType=INTEGER},
</if>
<if
test=
"unionId != null"
>
union_id = #{unionId,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"createdId != null"
>
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if
test=
"createdTime != null"
>
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifiedId != null"
>
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if
test=
"modifiedTime != null"
>
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.AcctPatUnion"
>
update account_pat_union
set acct_id = #{acctId,jdbcType=INTEGER},
union_type = #{unionType,jdbcType=INTEGER},
union_id = #{unionId,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectByUnionId"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_union
where union_id = #{unionId,jdbcType=VARCHAR}
and delete_flag = 1;
</select>
<select
id=
"selectByAcctId"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from account_pat_union
where acct_id = #{acctId,jdbcType=INTEGER}
and delete_flag = 1;
</select>
<insert
id=
"initBatch"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into account_pat_union(
acct_id, union_type, union_id,
delete_flag, created_id, created_time,
modified_id, modified_time
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.acctId},#{item.unionType},#{item.unionId},
1,99999999,now(),
99999999,now()
)
</foreach>
</insert>
</mapper>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录