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
提交
71e31bc8
提交
71e31bc8
编写于
3月 04, 2022
作者:
wenhao.qin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
联调修改
上级
2fbfce0c
流水线
#42928
已取消 于阶段
变更
6
流水线
1
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
13 行增加
和
172 行删除
+13
-172
AccountMapper.java
...ca/cloud/account/account/server/mapper/AccountMapper.java
+0
-1
HospitalSaasUserListReq.java
...d/account/account/server/req/HospitalSaasUserListReq.java
+2
-2
HospitalSaasUserReq.java
...cloud/account/account/server/req/HospitalSaasUserReq.java
+3
-3
HospitalSaasUserServiceImpl.java
...ount/server/service/impl/HospitalSaasUserServiceImpl.java
+5
-2
AccountMapper.xml
server/src/main/resources/mybatis/AccountMapper.xml
+0
-163
PermissionDoctorRoleMapper.xml
...src/main/resources/mybatis/PermissionDoctorRoleMapper.xml
+3
-1
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/mapper/AccountMapper.java
浏览文件 @
71e31bc8
...
...
@@ -24,7 +24,6 @@ public interface AccountMapper {
//新增账号
void
insertSelective
(
Account
account
);
Long
insertByOption
(
Account
account
);
//更新账号
Integer
updateByIdSelective
(
Account
account
);
...
...
server/src/main/java/com/pica/cloud/account/account/server/req/HospitalSaasUserListReq.java
浏览文件 @
71e31bc8
...
...
@@ -26,8 +26,8 @@ public class HospitalSaasUserListReq {
private
Integer
roleId
;
@ApiModelProperty
(
"每页显示记录数"
)
private
Integer
pageSize
;
private
Integer
pageSize
=
10
;
@ApiModelProperty
(
"页码"
)
private
Integer
pageNo
;
private
Integer
pageNo
=
1
;
}
server/src/main/java/com/pica/cloud/account/account/server/req/HospitalSaasUserReq.java
浏览文件 @
71e31bc8
...
...
@@ -70,9 +70,9 @@ public class HospitalSaasUserReq {
if
(
null
==
this
.
sourceType
)
{
throw
new
PicaWarnException
(
AccountExceptionEnum
.
PICA_NOT_EMPTY
.
getCode
(),
"资源类型不能为空!"
);
}
if
(!
Pattern
.
matches
(
"^[A-Za-z0-9]{5,10}$"
,
this
.
password
))
{
throw
new
PicaWarnException
(
AccountExceptionEnum
.
PICA_NOT_EMPTY
.
getCode
(),
"密码需由6-10位字母或数字组成!"
);
}
//
if (!Pattern.matches("^[A-Za-z0-9]{5,10}$", this.password)) {
//
throw new PicaWarnException(AccountExceptionEnum.PICA_NOT_EMPTY.getCode(), "密码需由6-10位字母或数字组成!");
//
}
if
(
Objects
.
nonNull
(
this
.
comment
)
&&
this
.
comment
.
length
()
>
100
)
{
throw
new
PicaWarnException
(
AccountExceptionEnum
.
PICA_NOT_EMPTY
.
getCode
(),
"备注长度须≤100字符"
);
}
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/HospitalSaasUserServiceImpl.java
浏览文件 @
71e31bc8
...
...
@@ -79,16 +79,19 @@ public class HospitalSaasUserServiceImpl implements HospitalSaasUserService {
//幂等校验
String
nxKey
=
Constants
.
REPEAT_REGISTER_PREFIX
+
mobile
;
Long
resultNx
=
redisClient
.
setnx
(
nxKey
,
mobile
);
if
(
resultNx
==
0
)
{
throw
new
PicaException
(
PicaResultCode
.
PARAM_IS_INVALID
.
code
(),
"请勿重复提交"
);
}
redisClient
.
expire
(
nxKey
,
2
);
if
(
resultNx
==
1
)
{
//手机号加密
String
mobileEncrypt
=
AESUtil
.
encryptV0
(
mobile
);
AccountInfoEntity
accountInfoEntity
=
accountInfoDetailMapper
.
selectByMobile
(
mobileEncrypt
);
Account
byMobilePhone
=
accountMapper
.
getByMobilePhone
(
mobileEncrypt
);
//密码已经存在的处理逻辑
if
(
Objects
.
nonNull
(
accountInfoEntity
)
&&
StringUtils
.
isNotBlank
(
accountInfoEntity
.
getPassword
()))
{
throw
new
PicaException
(
PicaResultCode
.
PARAM_IS_INVALID
.
code
(),
"密码已经存在,不可进行编辑"
);
}
Account
byMobilePhone
=
accountMapper
.
getByMobilePhone
(
mobileEncrypt
);
//用户不存在的处理逻辑
if
(
accountInfoEntity
==
null
)
{
redisClient
.
expire
(
nxKey
,
30
);
...
...
@@ -100,7 +103,7 @@ public class HospitalSaasUserServiceImpl implements HospitalSaasUserService {
Integer
acctId
=
accountInfo
.
getId
();
accountInfoDetailMapper
.
updateCreateInfo
(
acctId
);
Account
account
=
buildDoctorMsg
(
req
,
mobileEncrypt
,
currentTime
,
req
.
getSourceType
(),
password
,
acctId
);
accountMapper
.
insert
ByOption
(
account
);
accountMapper
.
insert
Selective
(
account
);
Long
userId
=
account
.
getId
();
processAgreement
(
userId
);
insertAppRole
(
userId
);
...
...
server/src/main/resources/mybatis/AccountMapper.xml
浏览文件 @
71e31bc8
...
...
@@ -51,169 +51,6 @@
</select>
<insert
id=
"insertSelective"
parameterType=
"com.pica.cloud.account.account.server.entity.Account"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into p_doctor
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"sex != null"
>
sex,
</if>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"mobilePhone != null"
>
mobile_phone,
</if>
<if
test=
"avatarImageUrl != null"
>
avatar_image_url,
</if>
<if
test=
"acctId != null"
>
acct_id,
</if>
<if
test=
"email != null"
>
email,
</if>
<if
test=
"qrcode != null"
>
qrcode,
</if>
<if
test=
"nickname != null"
>
nickname,
</if>
<if
test=
"personalSign != null"
>
personal_sign,
</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>
<if
test=
"password != null"
>
password,
</if>
<if
test=
"info != null"
>
info,
</if>
<if
test=
"entireFlag != null"
>
entire_flag,
</if>
<if
test=
"regTime != null"
>
reg_time,
</if>
<if
test=
"lastLoginTime != null"
>
last_login_time,
</if>
<if
test=
"unionid != null"
>
unionid,
</if>
<if
test=
"registerSource != null"
>
register_source,
</if>
<if
test=
"comment != null"
>
comment,
</if>
<if
test=
"registerType != null"
>
register_type,
</if>
<if
test=
"firstLoginTime != null"
>
first_login_time,
</if>
<if
test=
"card != null"
>
card,
</if>
<if
test=
"birthday != null"
>
birthday,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"sex != null"
>
#{sex,jdbcType=INTEGER},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"mobilePhone != null"
>
#{mobilePhone,jdbcType=VARCHAR},
</if>
<if
test=
"avatarImageUrl != null"
>
#{avatarImageUrl,jdbcType=VARCHAR},
</if>
<if
test=
"acctId != null"
>
#{acctId,jdbcType=INTEGER},
</if>
<if
test=
"email != null"
>
#{email,jdbcType=VARCHAR},
</if>
<if
test=
"qrcode != null"
>
#{qrcode,jdbcType=VARCHAR},
</if>
<if
test=
"nickname != null"
>
#{nickname,jdbcType=VARCHAR},
</if>
<if
test=
"personalSign != null"
>
#{personalSign,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>
<if
test=
"password != null"
>
#{password,jdbcType=VARCHAR},
</if>
<if
test=
"info != null"
>
#{info,jdbcType=VARCHAR},
</if>
<if
test=
"entireFlag != null"
>
#{entireFlag,jdbcType=INTEGER},
</if>
<if
test=
"regTime != null"
>
#{regTime,jdbcType=DATE},
</if>
<if
test=
"lastLoginTime != null"
>
#{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"unionid != null"
>
#{unionid,jdbcType=VARCHAR},
</if>
<if
test=
"registerSource != null"
>
#{registerSource,jdbcType=INTEGER},
</if>
<if
test=
"comment != null"
>
#{comment,jdbcType=VARCHAR},
</if>
<if
test=
"registerType != null"
>
#{registerType,jdbcType=INTEGER},
</if>
<if
test=
"firstLoginTime != null"
>
#{firstLoginTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"card != null"
>
#{card,jdbcType=VARCHAR},
</if>
<if
test=
"birthday != null"
>
#{birthday,jdbcType=DATE},
</if>
</trim>
</insert>
<insert
id=
"insertByOption"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into p_doctor
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"sex != null"
>
...
...
server/src/main/resources/mybatis/PermissionDoctorRoleMapper.xml
浏览文件 @
71e31bc8
...
...
@@ -164,7 +164,9 @@
<update
id=
"deleteByDoctorId"
parameterType=
"java.lang.Integer"
>
update permission_doctor_role
set delete_flag = 2
set delete_flag = 2 ,
modified_id = #{modifiedId,jdbcType=BIGINT},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where doctor_id = #{id,jdbcType=BIGINT}
</update>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录