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
提交
f2b5b34f
提交
f2b5b34f
编写于
3月 09, 2022
作者:
minghao.wu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'release' into 'master'
Release See merge request
!91
上级
8af5288d
788524eb
流水线
#43216
已失败 于阶段
变更
30
流水线
1
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
992 行增加
和
95 行删除
+992
-95
pom.xml
client/pom.xml
+2
-2
AccountDoctorClient.java
...ica/cloud/account/account/client/AccountDoctorClient.java
+19
-0
CaptchaClient.java
.../com/pica/cloud/account/account/client/CaptchaClient.java
+6
-1
pom.xml
common/pom.xml
+1
-1
CancelAccountDto.java
...ca/cloud/account/account/common/dto/CancelAccountDto.java
+54
-0
pom.xml
server/pom.xml
+16
-1
BeanConfiguration.java
...count/account/server/configuration/BeanConfiguration.java
+32
-0
PropertiesConfiguration.java
...account/server/configuration/PropertiesConfiguration.java
+1
-1
Constants.java
...ica/cloud/account/account/server/constants/Constants.java
+5
-0
AccountController.java
.../account/account/server/controller/AccountController.java
+85
-49
AutoCodeController.java
...account/account/server/controller/AutoCodeController.java
+18
-14
DoctorController.java
...d/account/account/server/controller/DoctorController.java
+9
-2
CancelAccountLog.java
...cloud/account/account/server/entity/CancelAccountLog.java
+115
-0
CancelAccountLogMapper.java
...account/account/server/mapper/CancelAccountLogMapper.java
+17
-0
DoctorEducationMapper.java
.../account/account/server/mapper/DoctorEducationMapper.java
+2
-0
DoctorHospitalMapper.java
...d/account/account/server/mapper/DoctorHospitalMapper.java
+3
-0
PICAPDoctorKafkaModel.java
...d/account/account/server/model/PICAPDoctorKafkaModel.java
+150
-0
DoctorService.java
...a/cloud/account/account/server/service/DoctorService.java
+4
-0
DoctorServiceImpl.java
...ccount/account/server/service/impl/DoctorServiceImpl.java
+142
-4
RegisterServiceImpl.java
...ount/account/server/service/impl/RegisterServiceImpl.java
+8
-0
HttpUtil.java
.../com/pica/cloud/account/account/server/util/HttpUtil.java
+50
-0
bootstrap-dev.properties
server/src/main/resources/bootstrap-dev.properties
+5
-1
bootstrap-prod.properties
server/src/main/resources/bootstrap-prod.properties
+8
-6
bootstrap-test1.properties
server/src/main/resources/bootstrap-test1.properties
+7
-5
bootstrap-test2.properties
server/src/main/resources/bootstrap-test2.properties
+3
-0
bootstrap-uat.properties
server/src/main/resources/bootstrap-uat.properties
+7
-5
mybatis-generator.xml
server/src/main/resources/mybatis-generator.xml
+2
-2
CancelAccountLogMapper.xml
server/src/main/resources/mybatis/CancelAccountLogMapper.xml
+164
-0
DoctorEducationMapper.xml
server/src/main/resources/mybatis/DoctorEducationMapper.xml
+47
-0
DoctorHospitalMapper.xml
server/src/main/resources/mybatis/DoctorHospitalMapper.xml
+10
-1
未找到文件。
client/pom.xml
浏览文件 @
f2b5b34f
...
...
@@ -11,7 +11,7 @@
<groupId>
com.pica.cloud.account
</groupId>
<artifactId>
pica-cloud-account-client
</artifactId>
<version>
1.0.
6
</version>
<version>
1.0.
8
</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.
2.1
</version>
<version>
1.0.
8
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
...
...
client/src/main/java/com/pica/cloud/account/account/client/AccountDoctorClient.java
0 → 100644
浏览文件 @
f2b5b34f
package
com
.
pica
.
cloud
.
account
.
account
.
client
;
import
com.pica.cloud.account.account.common.dto.CancelAccountDto
;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
/**
* @author andong
* @create 2019/7/19
*/
@FeignClient
(
name
=
"13201-pica-cloud-account"
)
public
interface
AccountDoctorClient
{
@PostMapping
(
"/account/doctor/cancel/account"
)
PicaResponse
<
Void
>
cancelAccountByDoctorId
(
@RequestBody
CancelAccountDto
cancelAccountDto
,
@RequestHeader
(
value
=
"token"
)
String
token
);
}
client/src/main/java/com/pica/cloud/account/account/client/CaptchaClient.java
浏览文件 @
f2b5b34f
...
...
@@ -14,11 +14,16 @@ public interface CaptchaClient {
@GetMapping
(
"/account/account/acknowledge"
)
PicaResponse
<
Boolean
>
acknowledge
(
@RequestParam
(
"captchaToken"
)
String
captchaToken
,
@RequestParam
(
"captchaAnswer"
)
String
captchaAnswer
);
@RequestParam
(
"captchaAnswer"
)
String
captchaAnswer
);
@GetMapping
(
"/account/account/check/authCode"
)
PicaResponse
checkAuthCode
(
@RequestParam
(
"mobilePhone"
)
String
mobilePhone
,
@RequestParam
(
"flag"
)
String
flag
,
@RequestParam
(
"authCode"
)
String
authCode
);
@GetMapping
(
"/account/account/checkMobile/authCode"
)
PicaResponse
checkDetectionCode
(
@RequestParam
(
"mobilePhone"
)
String
mobilePhone
,
@RequestParam
(
"flag"
)
String
flag
,
@RequestParam
(
"authCode"
)
String
authCode
);
}
common/pom.xml
浏览文件 @
f2b5b34f
...
...
@@ -11,7 +11,7 @@
<groupId>
com.pica.cloud.account
</groupId>
<artifactId>
pica-cloud-account-common
</artifactId>
<version>
1.0.
2.1
</version>
<version>
1.0.
8
</version>
<name>
pica-cloud-account-common
</name>
<packaging>
jar
</packaging>
...
...
common/src/main/java/com/pica/cloud/account/account/common/dto/CancelAccountDto.java
0 → 100644
浏览文件 @
f2b5b34f
package
com
.
pica
.
cloud
.
account
.
account
.
common
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* @Description
* @Author bsh
* @Date 2021/12/07 13:51
*/
public
class
CancelAccountDto
{
@ApiModelProperty
(
"注销原因NO"
)
private
Integer
reasonNo
;
@ApiModelProperty
(
"注销原因"
)
private
String
reasonValue
;
@ApiModelProperty
(
"其他注销原因"
)
private
String
reasonDesc
;
private
String
remarks
;
public
Integer
getReasonNo
()
{
return
reasonNo
;
}
public
void
setReasonNo
(
Integer
reasonNo
)
{
this
.
reasonNo
=
reasonNo
;
}
public
String
getReasonValue
()
{
return
reasonValue
;
}
public
void
setReasonValue
(
String
reasonValue
)
{
this
.
reasonValue
=
reasonValue
;
}
public
String
getReasonDesc
()
{
return
reasonDesc
;
}
public
void
setReasonDesc
(
String
reasonDesc
)
{
this
.
reasonDesc
=
reasonDesc
;
}
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
}
server/pom.xml
浏览文件 @
f2b5b34f
...
...
@@ -86,8 +86,18 @@
<groupId>
com.pica.cloud.foundation
</groupId>
<artifactId>
pica-cloud-service-starter
</artifactId>
</exclusion>
<exclusion>
<artifactId>
pica-cloud-kafka
</artifactId>
<groupId>
com.pica.cloud.foundation
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.pica.cloud.foundation
</groupId>
<artifactId>
pica-cloud-kafka
</artifactId>
<version>
1.3.6
</version>
</dependency>
<!--<dependency>-->
<!--<groupId>io.springfox</groupId>-->
<!--<artifactId>springfox-swagger2</artifactId>-->
...
...
@@ -151,7 +161,7 @@
<dependency>
<groupId>
com.pica.cloud.account
</groupId>
<artifactId>
pica-cloud-account-common
</artifactId>
<version>
1.0.
2.1
</version>
<version>
1.0.
8
</version>
</dependency>
<dependency>
...
...
@@ -203,6 +213,11 @@
<artifactId>
pica-cloud-riskcontrol-client
</artifactId>
<version>
1.0.3.1
</version>
</dependency>
<dependency>
<groupId>
com.pica.cloud.tag
</groupId>
<artifactId>
pica-cloud-transport-client
</artifactId>
<version>
1.0.5
</version>
</dependency>
<!-- apple identifyToken校验 -->
<dependency>
...
...
server/src/main/java/com/pica/cloud/account/account/server/configuration/BeanConfiguration.java
0 → 100644
浏览文件 @
f2b5b34f
//
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
configuration
;
import
com.pica.cloud.foundation.kafka.producer.ISimpleProducer
;
import
com.pica.cloud.foundation.kafka.producer.SimpleProducer
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
* @ClassName BeanConfiguration
* @Description TODO
* @Author wangxinxu
* @Date 2019/9/17 上午10:59
* @ModifyDate 2019/9/17 上午10:59
* @Version 1.0
*/
@Configuration
public
class
BeanConfiguration
{
@Autowired
private
PropertiesConfiguration
propertiesConfiguration
;
// 定义 ISimplerProducer bean 默认投递模式为 Delivery.AT_LEAST_ONCE
// Key:类型为String
// Value:类型为PicaUser
@Bean
public
ISimpleProducer
<
String
,
Object
>
simpleProducer
()
{
return
new
SimpleProducer
<>(
propertiesConfiguration
.
getEnvironment
());
}
}
server/src/main/java/com/pica/cloud/account/account/server/configuration/PropertiesConfiguration.java
浏览文件 @
f2b5b34f
...
...
@@ -14,7 +14,7 @@ public class PropertiesConfiguration {
private
String
messageUrl
;
@Value
(
"${environment.name}"
)
private
String
environment
;
private
String
environment
=
"dev"
;
public
String
getMessageUrl
()
{
...
...
server/src/main/java/com/pica/cloud/account/account/server/constants/Constants.java
浏览文件 @
f2b5b34f
...
...
@@ -78,4 +78,9 @@ public class Constants {
/** 内部机构医生ids数据 */
public
static
final
String
INNER_ORG_IDS
=
"inner-org-ids"
;
// 1:新增,2:修改、变更,3:删除
public
static
final
Integer
CHANGE_FLAG_1
=
1
;
public
static
final
Integer
CHANGE_FLAG_2
=
2
;
public
static
final
Integer
CHANGE_FLAG_3
=
3
;
}
server/src/main/java/com/pica/cloud/account/account/server/controller/AccountController.java
浏览文件 @
f2b5b34f
此差异已折叠。
点击以展开。
server/src/main/java/com/pica/cloud/account/account/server/controller/AutoCodeController.java
浏览文件 @
f2b5b34f
...
...
@@ -32,6 +32,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Objects
;
@Api
(
description
=
"短信验证码资源"
)
@RestController
public
class
AutoCodeController
extends
AccountBaseController
{
...
...
@@ -107,10 +109,10 @@ public class AutoCodeController extends AccountBaseController {
@PostMapping
(
value
=
"/authCode"
)
public
PicaResponse
getAuthCode
(
@RequestBody
AesAuthCodeReq
authCodeReq
,
HttpServletRequest
req
)
throws
Exception
{
// 验证码类型 0默认 1注册 2微信登录绑定手机 3修改手机
// 4重置密码 5忘记密码 7患者招募提交问卷(效验) 8Appe登录绑定手机
// 4重置密码 5忘记密码 7患者招募提交问卷(效验) 8Appe登录绑定手机
9患者查询检测报告列表
EncryptEntity
entity
=
new
EncryptEntity
();
if
(
StringUtils
.
isEmpty
(
authCodeReq
.
getKey
())
&&
StringUtils
.
isEmpty
(
authCodeReq
.
getContent
()))
{
if
(
StringUtils
.
isEmpty
(
authCodeReq
.
getKey
())
&&
StringUtils
.
isEmpty
(
authCodeReq
.
getContent
()))
{
//明文时处理
entity
=
RSAUtil
.
getAuthCodeEncrypt
(
authCodeReq
);
logger
.
info
(
"AesAuthCodeReq getAuthCode:"
+
JSONObject
.
toJSONString
(
authCodeReq
));
...
...
@@ -123,7 +125,7 @@ public class AutoCodeController extends AccountBaseController {
loginAes
.
setMobile
(
authCodeReq
.
getMobile
());
loginAes
.
setDeviceInfo
(
super
.
getDeviceInfoLow
(
"deviceinfo"
));
loginService
.
insertLoginAesLog
(
loginAes
);
}
else
{
}
else
{
//执行原逻辑
entity
.
setKey
(
authCodeReq
.
getKey
());
entity
.
setContent
(
authCodeReq
.
getContent
());
...
...
@@ -131,12 +133,15 @@ public class AutoCodeController extends AccountBaseController {
BaseRequest
request
=
CryptoUtil
.
decrypt
(
entity
,
BaseRequest
.
class
);
request
.
setSourceType
(
super
.
getSourceType
());
logger
.
info
(
"authCode/getAuthCode:{}"
,
JSONObject
.
toJSONString
(
request
));
logger
.
info
(
"authCode/getAuthCode:{}"
,
JSONObject
.
toJSONString
(
request
));
AccountUtils
.
checkMobilePhone
(
request
.
getMobile
());
if
(
request
.
getBizType
()
!=
null
&&
request
.
getBizType
().
equals
(
1
))
{
logger
.
info
(
"app-rcValidate-start"
);
if
(
Objects
.
equals
(
9
,
request
.
getFlag
()))
{
logger
.
info
(
"input select patient record "
);
}
// 调用风控接口
authCodeService
.
rcValidate
(
req
,
request
,
super
.
getDeviceInfo
(),
super
.
getSourceType
());
// 发送短信验证码
...
...
@@ -209,7 +214,7 @@ public class AutoCodeController extends AccountBaseController {
//验证码保存到redis,失效时间10分钟
cacheClient
.
set
(
this
.
getAuthCodeKey
(
mobilePhone
,
flag
),
authCode
,
600
);
//处理验证码原子性的问题
cacheClient
.
set
(
RegisterCodeKeyUtils
.
getRegisterKey
(
mobilePhone
,
authCode
),
100
,
600
);
cacheClient
.
set
(
RegisterCodeKeyUtils
.
getRegisterKey
(
mobilePhone
,
authCode
),
100
,
600
);
logger
.
info
(
this
.
getAuthCodeKey
(
mobilePhone
,
flag
));
//发送短信
super
.
sendMobileMessage
(
mobilePhone
,
message
,
senderId
);
...
...
@@ -285,7 +290,7 @@ public class AutoCodeController extends AccountBaseController {
private
void
processSendAuthCode
(
String
mobilePhone
,
Integer
flag
,
String
authCodeKeySecure
)
{
//接入新旭事务一致性
String
batchNo
=
IntactUtils
.
getUUID
();
intactUtil
.
sendIntact
(
batchNo
,
"processSendAuthCode"
,
com
.
pica
.
cloud
.
foundation
.
completeness
.
contract
.
constants
.
CommonConstants
.
INTACT_CONTENT_LOG_STATUS_1
,
"mobilePhone:"
+
mobilePhone
+
",flag:"
+
flag
+
",authCodeKeySecure:"
+
authCodeKeySecure
);
intactUtil
.
sendIntact
(
batchNo
,
"processSendAuthCode"
,
com
.
pica
.
cloud
.
foundation
.
completeness
.
contract
.
constants
.
CommonConstants
.
INTACT_CONTENT_LOG_STATUS_1
,
"mobilePhone:"
+
mobilePhone
+
",flag:"
+
flag
+
",authCodeKeySecure:"
+
authCodeKeySecure
);
long
start
=
System
.
currentTimeMillis
();
String
authCode
=
CommonUtil
.
createValidateCode
();
String
message
=
"您的验证码是"
+
authCode
+
",在10分钟内有效。如非本人操作,请忽略本短信!"
;
...
...
@@ -294,17 +299,17 @@ public class AutoCodeController extends AccountBaseController {
String
authCodeKey
=
getAuthCodeKey
(
mobilePhone
,
flag
.
toString
());
boolean
set
=
cacheClient
.
set
(
authCodeKey
,
authCode
,
600
);
logger
.
info
(
cacheClient
.
get
(
authCodeKey
));
logger
.
info
(
"验证码缓存是否成功----->:"
+
set
);
logger
.
info
(
"验证码缓存信息----->:"
+
authCodeKey
);
logger
.
info
(
"验证码缓存是否成功----->:"
+
set
);
logger
.
info
(
"验证码缓存信息----->:"
+
authCodeKey
);
cacheClient
.
set
(
authCodeKeySecure
,
System
.
currentTimeMillis
(),
60
);
//处理验证码原子性的问题
cacheClient
.
set
(
RegisterCodeKeyUtils
.
getRegisterKey
(
mobilePhone
,
authCode
),
100
,
600
);
cacheClient
.
set
(
RegisterCodeKeyUtils
.
getRegisterKey
(
mobilePhone
,
authCode
),
100
,
600
);
long
end1
=
System
.
currentTimeMillis
();
logger
.
info
(
"processSendAuthCode-1 used {} million seconds"
,
end1
-
start
);
logger
.
info
(
"processSendAuthCode-1 used {} million seconds"
,
end1
-
start
);
super
.
sendMobileMessage
(
mobilePhone
,
message
,
senderId
);
long
end2
=
System
.
currentTimeMillis
();
logger
.
info
(
"processSendAuthCode-2 used {} million seconds"
,
end2
-
start
);
intactUtil
.
sendIntact
(
batchNo
,
"processSendAuthCode"
,
com
.
pica
.
cloud
.
foundation
.
completeness
.
contract
.
constants
.
CommonConstants
.
INTACT_CONTENT_LOG_STATUS_3
,
"mobilePhone:"
+
mobilePhone
+
",flag:"
+
flag
+
",authCodeKeySecure:"
+
authCodeKeySecure
);
logger
.
info
(
"processSendAuthCode-2 used {} million seconds"
,
end2
-
start
);
intactUtil
.
sendIntact
(
batchNo
,
"processSendAuthCode"
,
com
.
pica
.
cloud
.
foundation
.
completeness
.
contract
.
constants
.
CommonConstants
.
INTACT_CONTENT_LOG_STATUS_3
,
"mobilePhone:"
+
mobilePhone
+
",flag:"
+
flag
+
",authCodeKeySecure:"
+
authCodeKeySecure
);
}
...
...
@@ -322,11 +327,10 @@ public class AutoCodeController extends AccountBaseController {
@ApiOperation
(
"微信获取验证码"
)
@PostMapping
(
value
=
"/authCode/get"
)
public
PicaResponse
getAuthCode
(){
public
PicaResponse
getAuthCode
()
{
String
cacheCode
=
cacheClient
.
get
(
"authCode-j1VrU5MSc1uuZaEa82ZKfQ=="
);
return
PicaResponse
.
toResponse
(
cacheCode
);
}
}
server/src/main/java/com/pica/cloud/account/account/server/controller/DoctorController.java
浏览文件 @
f2b5b34f
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
controller
;
import
com.pica.cloud.account.account.common.dto.CancelAccountDto
;
import
com.pica.cloud.account.account.server.entity.AccountUser
;
import
com.pica.cloud.account.account.server.entity.Doctor
;
import
com.pica.cloud.account.account.server.enums.AccountExceptionEnum
;
...
...
@@ -18,8 +19,6 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* Created on 2019/9/10 18:51
* author:crs
...
...
@@ -113,4 +112,12 @@ public class DoctorController extends AccountBaseController {
}
return
PicaResponse
.
toResponse
();
}
@ApiOperation
(
value
=
"注销账号"
)
@PostMapping
(
"/cancel/account"
)
@EnabledLoginValidate
public
PicaResponse
<
Void
>
cancelAccountByDoctorId
(
@RequestBody
CancelAccountDto
cancelAccountDto
)
{
doctorService
.
cancelAccountByDoctorId
(
cancelAccountDto
,
super
.
fetchPicaUser
());
return
PicaResponse
.
toResponse
();
}
}
server/src/main/java/com/pica/cloud/account/account/server/entity/CancelAccountLog.java
0 → 100644
浏览文件 @
f2b5b34f
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
public
class
CancelAccountLog
{
private
Integer
id
;
private
Integer
doctorId
;
private
Integer
reasonNo
;
private
String
reasonValue
;
private
String
reasonDesc
;
private
String
remarks
;
private
Integer
deleteFlag
;
private
Integer
creatId
;
private
Date
creatTime
;
private
Integer
modifyId
;
private
Date
modifyTime
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getDoctorId
()
{
return
doctorId
;
}
public
void
setDoctorId
(
Integer
doctorId
)
{
this
.
doctorId
=
doctorId
;
}
public
Integer
getReasonNo
()
{
return
reasonNo
;
}
public
void
setReasonNo
(
Integer
reasonNo
)
{
this
.
reasonNo
=
reasonNo
;
}
public
String
getReasonValue
()
{
return
reasonValue
;
}
public
void
setReasonValue
(
String
reasonValue
)
{
this
.
reasonValue
=
reasonValue
==
null
?
null
:
reasonValue
.
trim
();
}
public
String
getReasonDesc
()
{
return
reasonDesc
;
}
public
void
setReasonDesc
(
String
reasonDesc
)
{
this
.
reasonDesc
=
reasonDesc
==
null
?
null
:
reasonDesc
.
trim
();
}
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
==
null
?
null
:
remarks
.
trim
();
}
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
public
Integer
getCreatId
()
{
return
creatId
;
}
public
void
setCreatId
(
Integer
creatId
)
{
this
.
creatId
=
creatId
;
}
public
Date
getCreatTime
()
{
return
creatTime
;
}
public
void
setCreatTime
(
Date
creatTime
)
{
this
.
creatTime
=
creatTime
;
}
public
Integer
getModifyId
()
{
return
modifyId
;
}
public
void
setModifyId
(
Integer
modifyId
)
{
this
.
modifyId
=
modifyId
;
}
public
Date
getModifyTime
()
{
return
modifyTime
;
}
public
void
setModifyTime
(
Date
modifyTime
)
{
this
.
modifyTime
=
modifyTime
;
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/CancelAccountLogMapper.java
0 → 100644
浏览文件 @
f2b5b34f
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
mapper
;
import
com.pica.cloud.account.account.server.entity.CancelAccountLog
;
public
interface
CancelAccountLogMapper
{
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
CancelAccountLog
record
);
int
insertSelective
(
CancelAccountLog
record
);
CancelAccountLog
selectByPrimaryKey
(
Integer
id
);
int
updateByPrimaryKeySelective
(
CancelAccountLog
record
);
int
updateByPrimaryKey
(
CancelAccountLog
record
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/DoctorEducationMapper.java
浏览文件 @
f2b5b34f
...
...
@@ -18,4 +18,6 @@ public interface DoctorEducationMapper {
int
updateByPrimaryKey
(
DoctorEducation
record
);
int
updateRevertByDocIds
(
List
<
Integer
>
list
);
void
updateByDoctorIdSelective
(
DoctorEducation
doctorEducation
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/mapper/DoctorHospitalMapper.java
浏览文件 @
f2b5b34f
...
...
@@ -3,6 +3,7 @@ package com.pica.cloud.account.account.server.mapper;
import
com.pica.cloud.account.account.server.entity.DoctorHospital
;
import
java.util.List
;
import
java.util.Map
;
public
interface
DoctorHospitalMapper
{
int
deleteByPrimaryKey
(
Long
id
);
...
...
@@ -18,4 +19,6 @@ public interface DoctorHospitalMapper {
int
updateByPrimaryKey
(
DoctorHospital
record
);
int
updateRevertByDocIds
(
List
<
Integer
>
list
);
void
deleteDoctorHospitalById
(
Map
<
String
,
Object
>
hospitalMap
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/model/PICAPDoctorKafkaModel.java
0 → 100644
浏览文件 @
f2b5b34f
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
model
;
public
class
PICAPDoctorKafkaModel
{
private
Integer
doctorId
;
private
Integer
hospitalId
;
private
String
hospitalName
;
private
Integer
departmentId
;
private
String
department
;
private
Integer
titleId
;
private
String
title
;
private
Integer
provinceId
;
private
Long
countyId
;
private
Long
cityId
;
private
Long
townId
;
private
String
provinceName
;
private
String
cityName
;
private
String
countyName
;
private
String
townName
;
private
Integer
changeFlag
;
public
Integer
getDoctorId
()
{
return
doctorId
;
}
public
void
setDoctorId
(
Integer
doctorId
)
{
this
.
doctorId
=
doctorId
;
}
public
Integer
getHospitalId
()
{
return
hospitalId
;
}
public
void
setHospitalId
(
Integer
hospitalId
)
{
this
.
hospitalId
=
hospitalId
;
}
public
String
getHospitalName
()
{
return
hospitalName
;
}
public
void
setHospitalName
(
String
hospitalName
)
{
this
.
hospitalName
=
hospitalName
;
}
public
Integer
getDepartmentId
()
{
return
departmentId
;
}
public
void
setDepartmentId
(
Integer
departmentId
)
{
this
.
departmentId
=
departmentId
;
}
public
Integer
getTitleId
()
{
return
titleId
;
}
public
void
setTitleId
(
Integer
titleId
)
{
this
.
titleId
=
titleId
;
}
public
String
getDepartment
()
{
return
department
;
}
public
void
setDepartment
(
String
department
)
{
this
.
department
=
department
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
Integer
getProvinceId
()
{
return
provinceId
;
}
public
void
setProvinceId
(
Integer
provinceId
)
{
this
.
provinceId
=
provinceId
;
}
public
Long
getCountyId
()
{
return
countyId
;
}
public
void
setCountyId
(
Long
countyId
)
{
this
.
countyId
=
countyId
;
}
public
Long
getCityId
()
{
return
cityId
;
}
public
void
setCityId
(
Long
cityId
)
{
this
.
cityId
=
cityId
;
}
public
Long
getTownId
()
{
return
townId
;
}
public
void
setTownId
(
Long
townId
)
{
this
.
townId
=
townId
;
}
public
String
getProvinceName
()
{
return
provinceName
;
}
public
void
setProvinceName
(
String
provinceName
)
{
this
.
provinceName
=
provinceName
;
}
public
String
getCityName
()
{
return
cityName
;
}
public
void
setCityName
(
String
cityName
)
{
this
.
cityName
=
cityName
;
}
public
String
getCountyName
()
{
return
countyName
;
}
public
void
setCountyName
(
String
countyName
)
{
this
.
countyName
=
countyName
;
}
public
String
getTownName
()
{
return
townName
;
}
public
void
setTownName
(
String
townName
)
{
this
.
townName
=
townName
;
}
public
Integer
getChangeFlag
()
{
return
changeFlag
;
}
public
void
setChangeFlag
(
Integer
changeFlag
)
{
this
.
changeFlag
=
changeFlag
;
}
}
server/src/main/java/com/pica/cloud/account/account/server/service/DoctorService.java
浏览文件 @
f2b5b34f
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
service
;
import
com.pica.cloud.account.account.common.dto.CancelAccountDto
;
import
com.pica.cloud.account.account.server.entity.Doctor
;
import
com.pica.cloud.account.account.server.req.DoctorReq
;
import
com.pica.cloud.foundation.utils.entity.PicaUser
;
import
java.util.List
;
...
...
@@ -59,4 +61,6 @@ public interface DoctorService {
void
revertAccts
(
List
<
Integer
>
doctorIds
);
List
<
Integer
>
getDoctorsByInnerOrg
();
void
cancelAccountByDoctorId
(
CancelAccountDto
cancelAccountDto
,
PicaUser
fetchPicaUser
);
}
server/src/main/java/com/pica/cloud/account/account/server/service/impl/DoctorServiceImpl.java
浏览文件 @
f2b5b34f
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Maps
;
import
com.pica.cloud.account.account.common.dto.CancelAccountDto
;
import
com.pica.cloud.account.account.server.constants.Constants
;
import
com.pica.cloud.account.account.server.entity.AccountInfoEntity
;
import
com.pica.cloud.account.account.server.entity.CancelAccountLog
;
import
com.pica.cloud.account.account.server.entity.Doctor
;
import
com.pica.cloud.account.account.server.entity.DoctorEducation
;
import
com.pica.cloud.account.account.server.enums.AccountExceptionEnum
;
import
com.pica.cloud.account.account.server.enums.AccountTypeEnum
;
import
com.pica.cloud.account.account.server.exception.AccountException
;
import
com.pica.cloud.account.account.server.mapper.*
;
import
com.pica.cloud.account.account.server.model.PICAPDoctorKafkaModel
;
import
com.pica.cloud.account.account.server.req.DoctorReq
;
import
com.pica.cloud.account.account.server.service.DoctorService
;
import
com.pica.cloud.account.account.server.util.AESUtil
;
import
com.pica.cloud.account.account.server.util.AccountUtils
;
import
com.pica.cloud.account.account.server.util.HttpUtil
;
import
com.pica.cloud.foundation.encryption.common.constants.EncryptConstants
;
import
com.pica.cloud.foundation.encryption.util.EncryptUtils
;
import
com.pica.cloud.foundation.entity.PicaException
;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
com.pica.cloud.foundation.entity.PicaResultCode
;
import
com.pica.cloud.foundation.entity.PicaWarnException
;
import
com.pica.cloud.foundation.kafka.producer.ISimpleProducer
;
import
com.pica.cloud.foundation.redis.ICacheClient
;
import
com.pica.cloud.foundation.utils.entity.PicaUser
;
import
com.pica.cloud.foundation.utils.utils.StringUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.kafka.clients.producer.RecordMetadata
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.*
;
import
java.util.concurrent.Future
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -52,9 +65,18 @@ public class DoctorServiceImpl implements DoctorService {
@Autowired
private
AccountUnionMapper
accountUnionMapper
;
@Autowired
private
CancelAccountLogMapper
cancelAccountLogMapper
;
@Autowired
private
ICacheClient
cacheClient
;
@Autowired
private
ISimpleProducer
<
String
,
Object
>
simpleProducer
;
@Value
(
"${pica.cloud.url}"
)
private
String
picaCloudUrl
;
@Value
(
"${kafka.doctor.change.result.topic}"
)
private
String
kafkaSendTopic
;
@Override
public
Doctor
getDoctorInfo
(
Integer
id
)
{
...
...
@@ -251,6 +273,122 @@ public class DoctorServiceImpl implements DoctorService {
}
}
/**
*注销账号
* @param cancelAccountDto
* @param picaUser
*/
@Override
public
void
cancelAccountByDoctorId
(
CancelAccountDto
cancelAccountDto
,
PicaUser
picaUser
)
{
logger
.
info
(
"DoctorServiceImpl.deleteDoctorById CancelAccountDto:{}; USER: {}"
,
JSON
.
toJSONString
(
cancelAccountDto
),
JSON
.
toJSONString
(
picaUser
));
Doctor
doctor
=
doctorMapper
.
selectByPrimaryKey
(
picaUser
.
getId
());
if
(
Objects
.
isNull
(
doctor
))
{
throw
new
PicaException
(
PicaResultCode
.
PARAM_NOT_COMPLETE
.
code
(),
"未查询到要删除的用户"
);
}
Map
<
String
,
String
>
headerMap
=
Maps
.
newHashMap
();
headerMap
.
put
(
"token"
,
picaUser
.
getToken
());
/**删除账户前 查询账户是否已无资金*/
String
checkExecute
=
HttpUtil
.
getHttpExecute
(
picaCloudUrl
+
"/trade/account/amount/balance/"
+
doctor
.
getId
(),
headerMap
);
this
.
checkResponse
(
checkExecute
);
boolean
data
=
JSON
.
parseObject
(
checkExecute
).
getBoolean
(
"data"
);
if
(!
data
)
{
throw
new
PicaException
(
PicaResultCode
.
DATA_EXCEPTION
.
code
(),
"要删除的账户资金未完成清算,不可删除"
);
}
/**删除医生信息*/
Integer
acctId
=
doctor
.
getAcctId
();
HashMap
<
String
,
Long
>
map
=
new
HashMap
<>();
map
.
put
(
"id"
,
doctor
.
getId
().
longValue
());
map
.
put
(
"modifyId"
,
picaUser
.
getId
().
longValue
());
doctorMapper
.
updateDeleteByPrimaryKey
(
map
);
HashMap
<
String
,
Long
>
acctMap
=
new
HashMap
<>();
acctMap
.
put
(
"modifyId"
,
picaUser
.
getId
().
longValue
());
acctMap
.
put
(
"acctId"
,
acctId
.
longValue
());
accountInfoDetailMapper
.
updateDeleteByPrimaryKey
(
acctMap
);
logger
.
info
(
"deleteDoctorInfo acctId:{}"
,
acctId
);
accountUnionMapper
.
deleteByAcctId
(
acctId
);
/**解绑支付账号*/
String
unbindPayExecute
=
HttpUtil
.
getHttpExecute
(
picaCloudUrl
+
"/trade/account/cancelAccount?doctorId="
+
doctor
.
getId
(),
headerMap
);
this
.
checkResponse
(
unbindPayExecute
);
/**删除教育信息*/
DoctorEducation
doctorEducation
=
new
DoctorEducation
();
doctorEducation
.
setDoctorId
(
doctor
.
getId
());
doctorEducation
.
setDeleteFlag
(
2
);
doctorEducation
.
setModifyId
(
doctor
.
getId
());
doctorEducation
.
setModifyTime
(
new
Date
());
doctorEducationMapper
.
updateByDoctorIdSelective
(
doctorEducation
);
/**删除 医生机构关联*/
Map
<
String
,
Object
>
hospitalMap
=
Maps
.
newHashMap
();
hospitalMap
.
put
(
"modifiedId"
,
picaUser
.
getId
());
hospitalMap
.
put
(
"doctorId"
,
doctor
.
getId
());
doctorHospitalMapper
.
deleteDoctorHospitalById
(
hospitalMap
);
/**删除 cache*/
String
token
=
cacheClient
.
getTokenByUserId
(
doctor
.
getId
().
toString
(),
"app"
);
if
(
StringUtil
.
isNotNull
(
token
))
{
cacheClient
.
del
(
token
);
cacheClient
.
del
(
"token-doctor-"
+
doctor
.
getId
());
cacheClient
.
del
(
"token-doctor-"
+
doctor
.
getId
()
+
"-app"
);
cacheClient
.
del
(
"token-doctor-"
+
doctor
.
getId
()
+
"-saas"
);
cacheClient
.
del
(
"token-doctor-"
+
token
.
replace
(
"token-"
,
""
));
}
token
=
cacheClient
.
getTokenByUserId
(
doctor
.
getId
().
toString
(),
"saas"
);
if
(
StringUtil
.
isNotNull
(
token
))
{
cacheClient
.
del
(
token
);
cacheClient
.
del
(
"token-doctor-"
+
doctor
.
getId
());
cacheClient
.
del
(
"token-doctor-"
+
doctor
.
getId
()
+
"-app"
);
cacheClient
.
del
(
"token-doctor-"
+
doctor
.
getId
()
+
"-saas"
);
cacheClient
.
del
(
"token-doctor-"
+
token
.
replace
(
"token-"
,
""
));
}
/**log*/
CancelAccountLog
cancelAccountLog
=
new
CancelAccountLog
();
BeanUtils
.
copyProperties
(
cancelAccountDto
,
cancelAccountLog
);
cancelAccountLog
.
setDoctorId
(
picaUser
.
getId
());
cancelAccountLog
.
setDeleteFlag
(
1
);
cancelAccountLog
.
setCreatId
(
picaUser
.
getId
());
cancelAccountLog
.
setCreatTime
(
new
Date
());
cancelAccountLog
.
setModifyId
(
picaUser
.
getId
());
cancelAccountLog
.
setModifyTime
(
new
Date
());
cancelAccountLogMapper
.
insert
(
cancelAccountLog
);
/**kafka*/
PICAPDoctorKafkaModel
kafkaModel
=
new
PICAPDoctorKafkaModel
();
kafkaModel
.
setChangeFlag
(
Constants
.
CHANGE_FLAG_3
);
kafkaModel
=
buildKafkaModel
(
kafkaModel
,
doctor
);
simpleProducer
.
send
(
kafkaSendTopic
,
kafkaModel
);
}
private
void
checkResponse
(
String
checkExecute
)
{
PicaResponse
checkResponse
=
JSON
.
parseObject
(
checkExecute
,
PicaResponse
.
class
);
if
(!
checkResponse
.
getCode
().
equals
(
PicaResultCode
.
SUCCESS
.
code
()))
{
throw
new
PicaException
(
checkResponse
.
getCode
(),
checkResponse
.
getMessage
());
}
}
private
PICAPDoctorKafkaModel
buildKafkaModel
(
PICAPDoctorKafkaModel
kafkaModel
,
Doctor
doctor
){
kafkaModel
.
setDoctorId
(
doctor
.
getId
());
kafkaModel
.
setHospitalId
(
doctor
.
getHospitalId
());
kafkaModel
.
setHospitalName
(
doctor
.
getHospital
());
kafkaModel
.
setDepartmentId
(
doctor
.
getDepartmentId
());
kafkaModel
.
setDepartment
(
doctor
.
getDepartment
());
kafkaModel
.
setTitleId
(
doctor
.
getTitleId
());
kafkaModel
.
setTitle
(
doctor
.
getTitle
());
kafkaModel
.
setProvinceId
(
doctor
.
getProvince
().
intValue
());
kafkaModel
.
setProvinceName
(
doctor
.
getProvinceName
());
kafkaModel
.
setCityId
(
doctor
.
getCity
());
kafkaModel
.
setCityName
(
doctor
.
getCityName
());
kafkaModel
.
setCountyId
(
doctor
.
getCounty
());
kafkaModel
.
setCountyName
(
doctor
.
getCountyName
());
kafkaModel
.
setTownId
(
doctor
.
getTown
());
kafkaModel
.
setTownName
(
doctor
.
getTownName
());
return
kafkaModel
;
}
}
server/src/main/java/com/pica/cloud/account/account/server/service/impl/RegisterServiceImpl.java
浏览文件 @
f2b5b34f
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.alibaba.fastjson.JSONObject
;
import
com.pica.cloud.account.account.common.req.OCINRequest
;
import
com.pica.cloud.account.account.server.constants.Constants
;
...
...
@@ -20,17 +21,23 @@ import com.pica.cloud.account.account.server.util.*;
import
com.pica.cloud.foundation.completeness.client.utils.IntactUtils
;
import
com.pica.cloud.foundation.encryption.common.constants.EncryptConstants
;
import
com.pica.cloud.foundation.encryption.util.EncryptUtils
;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
com.pica.cloud.foundation.redis.ICacheClient
;
import
com.pica.cloud.foundation.utils.utils.RequestUtils
;
import
com.pica.cloud.foundation.utils.utils.StringUtil
;
import
com.pica.cloud.tag.transport.client.ITransportDoctorClient
;
import
com.pica.cloud.tag.transport.contract.req.StickerProfileDto
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.UUID
;
import
java.util.concurrent.ExecutorService
;
@Service
...
...
@@ -81,6 +88,7 @@ public class RegisterServiceImpl implements RegisterService {
@Override
public
LoginResult
register
(
BaseRequest
baseRequest
,
QueryMobileEntity
queryMobileEntity
)
{
String
requestId
=
UUID
.
randomUUID
().
toString
();
//接入新旭事务一致性
String
batchNo
=
IntactUtils
.
getUUID
();
intactUtil
.
sendIntact
(
batchNo
,
"register"
,
com
.
pica
.
cloud
.
foundation
.
completeness
.
contract
.
constants
.
CommonConstants
.
INTACT_CONTENT_LOG_STATUS_1
,
"baseRequest:"
+
JSON
.
toJSONString
(
baseRequest
)+
",queryMobileEntity:"
+
JSON
.
toJSONString
(
queryMobileEntity
));
...
...
server/src/main/java/com/pica/cloud/account/account/server/util/HttpUtil.java
浏览文件 @
f2b5b34f
...
...
@@ -6,6 +6,7 @@ import com.pica.cloud.foundation.utils.utils.StringUtil;
import
org.apache.commons.io.IOUtils
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.utils.URIBuilder
;
import
org.apache.http.impl.client.CloseableHttpClient
;
...
...
@@ -14,7 +15,10 @@ import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.net.MalformedURLException
;
import
java.net.URISyntaxException
;
import
java.util.Iterator
;
import
java.util.Map
;
...
...
@@ -61,4 +65,50 @@ public class HttpUtil {
}
return
data
;
}
public
static
String
getHttpExecute
(
String
url
,
Map
<
String
,
String
>
headerParams
)
{
String
result
=
""
;
BufferedReader
br
=
null
;
CloseableHttpResponse
response
=
null
;
try
{
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
HttpGet
httpGet
=
new
HttpGet
(
url
);
httpGet
.
setHeader
(
"Content-Type"
,
"application/json;charset=utf-8"
);
if
(
null
!=
headerParams
){
headerParams
.
forEach
(
httpGet:
:
setHeader
);
}
response
=
httpClient
.
execute
(
httpGet
);
br
=
new
BufferedReader
(
new
InputStreamReader
(
response
.
getEntity
().
getContent
(),
"UTF-8"
));
for
(
String
output
=
null
;
(
output
=
br
.
readLine
())
!=
null
;
result
=
output
)
{
;
}
}
catch
(
MalformedURLException
var22
)
{
logger
.
error
(
"获取session出错:"
+
var22
);
}
catch
(
IOException
var23
)
{
logger
.
error
(
"获取session出错:"
+
var23
);
}
finally
{
try
{
if
(
br
!=
null
)
{
br
.
close
();
}
}
catch
(
Exception
var21
)
{
logger
.
warn
(
"IOException关闭异常"
);
}
try
{
if
(
response
!=
null
)
{
response
.
close
();
}
}
catch
(
Exception
var20
)
{
logger
.
warn
(
"CloseableHttpResponse关闭异常"
);
}
}
return
result
;
}
}
server/src/main/resources/bootstrap-dev.properties
浏览文件 @
f2b5b34f
...
...
@@ -73,4 +73,8 @@ xxl.job.executor.logpath=/opt/xxl-job-logs/jobhandler
xxl.job.executor.logretentiondays
=
-1
pica.cloud.message.url
=
https://dev-sc.yunqueyi.com/message
\ No newline at end of file
pica.cloud.message.url
=
https://dev-sc.yunqueyi.com/message
pica.cloud.url
=
https://dev-sc.yunqueyi.com
kafka.doctor.change.result.topic
=
8090-11907-doctor-change-result-topic-dev
\ No newline at end of file
server/src/main/resources/bootstrap-prod.properties
浏览文件 @
f2b5b34f
...
...
@@ -37,24 +37,24 @@ spring.jackson.time-zone=GMT+8
memcached.url
=
172.19.137.65:11211
#
微信登陆
#
\u5FAE\u4FE1\u767B\u9646
weChatAppID
=
wx5103ed453ef2dbe8
weChatAppSecret
=
6faa9bef3302786c08b2baf278613f38
weChatAppIDH5
=
wx2c577552a2d28550
weChatAppSecretH5
=
397a92bda46180efa2c2a235b74a409a
weChatURL
=
https://api.weixin.qq.com/sns/userinfo?
#
是否开启双写模式,是否需要向p_doctor表写数据
#
\u662F\u5426\u5F00\u542F\u53CC\u5199\u6A21\u5F0F\uFF0C\u662F\u5426\u9700\u8981\u5411p_doctor\u8868\u5199\u6570\u636E
doubleWritingMode
=
true
management.security.enabled
=
false
management.endpoint.health.show-details
=
always
# Job config begin
#
控制器地址:服务启动自动注册到控制器中
#
\u63A7\u5236\u5668\u5730\u5740\uFF1A\u670D\u52A1\u542F\u52A8\u81EA\u52A8\u6CE8\u518C\u5230\u63A7\u5236\u5668\u4E2D
xxl.job.admin.addresses
=
http://172.19.137.74:7899/job,http://172.19.137.75:7899/job
#
执行器命名规则job-exec-<申请
Port>
#
\u6267\u884C\u5668\u547D\u540D\u89C4\u5219job-exec-<\u7533\u8BF7
Port>
xxl.job.executor.appname
=
job-exec-7906
xxl.job.executor.ip
=
xxl.job.executor.port
=
7906
...
...
@@ -62,11 +62,13 @@ xxl.job.executor.port=7906
### xxl-job, access token
xxl.job.accessToken
=
###
确保改目录可写
/opt/xxl-job-logs/jobhandler
###
\u786E\u4FDD\u6539\u76EE\u5F55\u53EF\u5199
/opt/xxl-job-logs/jobhandler
xxl.job.executor.logpath
=
/opt/xxl-job-logs/jobhandler
### xxl-job log retention days
xxl.job.executor.logretentiondays
=
-1
pica.cloud.message.url
=
https://sc.yunqueyi.com/message
pica.cloud.message.url
=
https://sc.yunqueyi.com/message
pica.cloud.url
=
https://sc.yunqueyi.com
kafka.doctor.change.result.topic
=
8090-11907-doctor-change-result-topic
\ No newline at end of file
server/src/main/resources/bootstrap-test1.properties
浏览文件 @
f2b5b34f
...
...
@@ -36,14 +36,14 @@ spring.jackson.time-zone=GMT+8
memcached.url
=
192.168.130.230:11211
#
微信登陆
#
\u5FAE\u4FE1\u767B\u9646
weChatAppID
=
wx5103ed453ef2dbe8
weChatAppSecret
=
6faa9bef3302786c08b2baf278613f38
weChatAppIDH5
=
wxcaad75b7fff5659c
weChatAppSecretH5
=
3d6eea715bc34489b49925b3dbde9c8b
weChatURL
=
https://api.weixin.qq.com/sns/userinfo?
#
是否开启双写模式,是否需要向p_doctor表写数据
#
\u662F\u5426\u5F00\u542F\u53CC\u5199\u6A21\u5F0F\uFF0C\u662F\u5426\u9700\u8981\u5411p_doctor\u8868\u5199\u6570\u636E
doubleWritingMode
=
true
#rabbitmq settings
...
...
@@ -54,10 +54,10 @@ spring.rabbitmq.password=AqLfvyWOvLQEUzdI
spring.rabbitmq.virtual-host
=
account-register-vhost
# Job config begin
#
控制器地址:服务启动自动注册到控制器中
#
\u63A7\u5236\u5668\u5730\u5740\uFF1A\u670D\u52A1\u542F\u52A8\u81EA\u52A8\u6CE8\u518C\u5230\u63A7\u5236\u5668\u4E2D
xxl.job.admin.addresses
=
http://192.168.110.133:7899/job
#
执行器命名规则job-exec-<申请
Port>
#
\u6267\u884C\u5668\u547D\u540D\u89C4\u5219job-exec-<\u7533\u8BF7
Port>
xxl.job.executor.appname
=
job-exec-7906
xxl.job.executor.ip
=
xxl.job.executor.port
=
7906
...
...
@@ -65,7 +65,7 @@ xxl.job.executor.port=7906
### xxl-job, access token
xxl.job.accessToken
=
###
确保改目录可写
/opt/xxl-job-logs/jobhandler
###
\u786E\u4FDD\u6539\u76EE\u5F55\u53EF\u5199
/opt/xxl-job-logs/jobhandler
xxl.job.executor.logpath
=
/opt/xxl-job-logs/jobhandler
### xxl-job log retention days
xxl.job.executor.logretentiondays
=
-1
...
...
@@ -73,3 +73,5 @@ xxl.job.executor.logretentiondays=-1
pica.cloud.message.url
=
https://test1-sc.yunqueyi.com/message
pica.cloud.url
=
https://test1-sc.yunqueyi.com
kafka.doctor.change.result.topic
=
8090-11907-doctor-change-result-topic
server/src/main/resources/bootstrap-test2.properties
浏览文件 @
f2b5b34f
...
...
@@ -67,3 +67,6 @@ xxl.job.accessToken=
xxl.job.executor.logpath
=
/opt/xxl-job-logs/jobhandler
### xxl-job log retention days
xxl.job.executor.logretentiondays
=
-1
pica.cloud.url
=
https://test2-sc.yunqueyi.com
kafka.doctor.change.result.topic
=
8090-11907-doctor-change-result-topic
\ No newline at end of file
server/src/main/resources/bootstrap-uat.properties
浏览文件 @
f2b5b34f
...
...
@@ -36,14 +36,14 @@ spring.jackson.time-zone=GMT+8
memcached.url
=
192.168.130.230:11211
#
微信登陆
#
\u5FAE\u4FE1\u767B\u9646
weChatAppID
=
wx5103ed453ef2dbe8
weChatAppSecret
=
6faa9bef3302786c08b2baf278613f38
weChatAppIDH5
=
wx342ef0e5afee54a7
weChatAppSecretH5
=
3859052f07d3f87cda644bf073927ef1
weChatURL
=
https://api.weixin.qq.com/sns/userinfo?
#
是否开启双写模式,是否需要向p_doctor表写数据
#
\u662F\u5426\u5F00\u542F\u53CC\u5199\u6A21\u5F0F\uFF0C\u662F\u5426\u9700\u8981\u5411p_doctor\u8868\u5199\u6570\u636E
doubleWritingMode
=
true
#rabbitmq settings
...
...
@@ -54,10 +54,10 @@ spring.rabbitmq.password=AqLfvyWOvLQEUzdI
spring.rabbitmq.virtual-host
=
account-register-vhost
# Job config begin
#
控制器地址:服务启动自动注册到控制器中
#
\u63A7\u5236\u5668\u5730\u5740\uFF1A\u670D\u52A1\u542F\u52A8\u81EA\u52A8\u6CE8\u518C\u5230\u63A7\u5236\u5668\u4E2D
xxl.job.admin.addresses
=
http://192.168.110.141:7899/job
#
执行器命名规则job-exec-<申请
Port>
#
\u6267\u884C\u5668\u547D\u540D\u89C4\u5219job-exec-<\u7533\u8BF7
Port>
xxl.job.executor.appname
=
job-exec-7906
xxl.job.executor.ip
=
xxl.job.executor.port
=
7906
...
...
@@ -65,7 +65,7 @@ xxl.job.executor.port=7906
### xxl-job, access token
xxl.job.accessToken
=
###
确保改目录可写
/opt/xxl-job-logs/jobhandler
###
\u786E\u4FDD\u6539\u76EE\u5F55\u53EF\u5199
/opt/xxl-job-logs/jobhandler
xxl.job.executor.logpath
=
/opt/xxl-job-logs/jobhandler
### xxl-job log retention days
xxl.job.executor.logretentiondays
=
-1
...
...
@@ -73,3 +73,5 @@ xxl.job.executor.logretentiondays=-1
pica.cloud.message.url
=
https://uat-sc.yunqueyi.com/message
pica.cloud.url
=
https://uat-sc.yunqueyi.com
kafka.doctor.change.result.topic
=
8090-11907-doctor-change-result-topic
\ No newline at end of file
server/src/main/resources/mybatis-generator.xml
浏览文件 @
f2b5b34f
...
...
@@ -9,7 +9,7 @@
<!-- <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"/>-->
<classPathEntry
location=
"
/Users/zhoupengcheng/mysql_jar/mysql-connector-java-5.1.49
.jar"
/>
<classPathEntry
location=
"
C:\\soft\\apache-maven-3.6.1\\resp\\mysql\\mysql-connector-java\\5.1.47\\mysql-connector-java-5.1.47
.jar"
/>
<context
id=
"tableEntity"
targetRuntime=
"MyBatis3"
>
<commentGenerator>
...
...
@@ -44,7 +44,7 @@
<!-- <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>-->
<table
tableName=
"
log_one_chlick_check"
domainObjectName=
"LogOneChlickCheck
"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
></table>
<table
tableName=
"
cancel_account_log"
domainObjectName=
"CancelAccountLog
"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
></table>
</context>
</generatorConfiguration>
...
...
server/src/main/resources/mybatis/CancelAccountLogMapper.xml
0 → 100644
浏览文件 @
f2b5b34f
<?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.CancelAccountLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pica.cloud.account.account.server.entity.CancelAccountLog"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"doctor_id"
property=
"doctorId"
jdbcType=
"INTEGER"
/>
<result
column=
"reason_no"
property=
"reasonNo"
jdbcType=
"INTEGER"
/>
<result
column=
"reason_value"
property=
"reasonValue"
jdbcType=
"VARCHAR"
/>
<result
column=
"reason_desc"
property=
"reasonDesc"
jdbcType=
"VARCHAR"
/>
<result
column=
"remarks"
property=
"remarks"
jdbcType=
"VARCHAR"
/>
<result
column=
"delete_flag"
property=
"deleteFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"creat_id"
property=
"creatId"
jdbcType=
"INTEGER"
/>
<result
column=
"creat_time"
property=
"creatTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"modify_id"
property=
"modifyId"
jdbcType=
"INTEGER"
/>
<result
column=
"modify_time"
property=
"modifyTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, doctor_id, reason_no, reason_value, reason_desc, remarks, delete_flag, creat_id,
creat_time, modify_id, modify_time
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from cancel_account_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from cancel_account_log
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.CancelAccountLog"
>
insert into cancel_account_log (id, doctor_id, reason_no,
reason_value, reason_desc, remarks,
delete_flag, creat_id, creat_time,
modify_id, modify_time)
values (#{id,jdbcType=INTEGER}, #{doctorId,jdbcType=INTEGER}, #{reasonNo,jdbcType=INTEGER},
#{reasonValue,jdbcType=VARCHAR}, #{reasonDesc,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
#{deleteFlag,jdbcType=INTEGER}, #{creatId,jdbcType=INTEGER}, #{creatTime,jdbcType=TIMESTAMP},
#{modifyId,jdbcType=INTEGER}, #{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.CancelAccountLog"
>
insert into cancel_account_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"doctorId != null"
>
doctor_id,
</if>
<if
test=
"reasonNo != null"
>
reason_no,
</if>
<if
test=
"reasonValue != null"
>
reason_value,
</if>
<if
test=
"reasonDesc != null"
>
reason_desc,
</if>
<if
test=
"remarks != null"
>
remarks,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"creatId != null"
>
creat_id,
</if>
<if
test=
"creatTime != null"
>
creat_time,
</if>
<if
test=
"modifyId != null"
>
modify_id,
</if>
<if
test=
"modifyTime != null"
>
modify_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"doctorId != null"
>
#{doctorId,jdbcType=INTEGER},
</if>
<if
test=
"reasonNo != null"
>
#{reasonNo,jdbcType=INTEGER},
</if>
<if
test=
"reasonValue != null"
>
#{reasonValue,jdbcType=VARCHAR},
</if>
<if
test=
"reasonDesc != null"
>
#{reasonDesc,jdbcType=VARCHAR},
</if>
<if
test=
"remarks != null"
>
#{remarks,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"creatId != null"
>
#{creatId,jdbcType=INTEGER},
</if>
<if
test=
"creatTime != null"
>
#{creatTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifyId != null"
>
#{modifyId,jdbcType=INTEGER},
</if>
<if
test=
"modifyTime != null"
>
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.pica.cloud.account.account.server.entity.CancelAccountLog"
>
update cancel_account_log
<set
>
<if
test=
"doctorId != null"
>
doctor_id = #{doctorId,jdbcType=INTEGER},
</if>
<if
test=
"reasonNo != null"
>
reason_no = #{reasonNo,jdbcType=INTEGER},
</if>
<if
test=
"reasonValue != null"
>
reason_value = #{reasonValue,jdbcType=VARCHAR},
</if>
<if
test=
"reasonDesc != null"
>
reason_desc = #{reasonDesc,jdbcType=VARCHAR},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"creatId != null"
>
creat_id = #{creatId,jdbcType=INTEGER},
</if>
<if
test=
"creatTime != null"
>
creat_time = #{creatTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifyId != null"
>
modify_id = #{modifyId,jdbcType=INTEGER},
</if>
<if
test=
"modifyTime != null"
>
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.pica.cloud.account.account.server.entity.CancelAccountLog"
>
update cancel_account_log
set doctor_id = #{doctorId,jdbcType=INTEGER},
reason_no = #{reasonNo,jdbcType=INTEGER},
reason_value = #{reasonValue,jdbcType=VARCHAR},
reason_desc = #{reasonDesc,jdbcType=VARCHAR},
remarks = #{remarks,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
creat_id = #{creatId,jdbcType=INTEGER},
creat_time = #{creatTime,jdbcType=TIMESTAMP},
modify_id = #{modifyId,jdbcType=INTEGER},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
server/src/main/resources/mybatis/DoctorEducationMapper.xml
浏览文件 @
f2b5b34f
...
...
@@ -208,4 +208,51 @@
#{item}
</foreach>
</update>
<update
id=
"updateByDoctorIdSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorEducation"
>
update p_doctor_education
<set>
<if
test=
"doctorId != null"
>
doctor_id = #{doctorId,jdbcType=INTEGER},
</if>
<if
test=
"schoolName != null"
>
school_name = #{schoolName,jdbcType=VARCHAR},
</if>
<if
test=
"majorId != null"
>
major_id = #{majorId,jdbcType=INTEGER},
</if>
<if
test=
"majorName != null"
>
major_name = #{majorName,jdbcType=VARCHAR},
</if>
<if
test=
"educationId != null"
>
education_id = #{educationId,jdbcType=VARCHAR},
</if>
<if
test=
"educationName != null"
>
education_name = #{educationName,jdbcType=VARCHAR},
</if>
<if
test=
"year != null"
>
year = #{year,jdbcType=VARCHAR},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"creatId != null"
>
creat_id = #{creatId,jdbcType=INTEGER},
</if>
<if
test=
"creatTime != null"
>
creat_time = #{creatTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"modifyId != null"
>
modify_id = #{modifyId,jdbcType=INTEGER},
</if>
<if
test=
"modifyTime != null"
>
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"graduatedYear != null"
>
graduated_year = #{graduatedYear,jdbcType=VARCHAR},
</if>
</set>
where doctor_id = #{doctorId,jdbcType=INTEGER} and delete_flag = 1
</update>
</mapper>
\ No newline at end of file
server/src/main/resources/mybatis/DoctorHospitalMapper.xml
浏览文件 @
f2b5b34f
...
...
@@ -28,7 +28,8 @@
delete from doctor_hospital
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorHospital"
>
<insert
id=
"insert"
parameterType=
"com.pica.cloud.account.account.server.entity.DoctorHospital"
>
insert into doctor_hospital (id, doctor_id, hospital_id,
status, sys_code, memo,
delete_flag, created_id, created_time,
...
...
@@ -173,4 +174,12 @@
#{item}
</foreach>
</update>
<update
id=
"deleteDoctorHospitalById"
parameterType=
"map"
>
update pica.doctor_hospital set
delete_flag = 2,
modified_id = #{modifiedId},
modified_time = now()
where delete_flag = 1 and doctor_id=#{doctorId}
</update>
</mapper>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录