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
提交
85ba2d24
提交
85ba2d24
编写于
3月 09, 2020
作者:
Chongwen.jiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微信和apple登录绑定手机号判断提示修改.
上级
b627a345
流水线
#22501
已失败 于阶段
in 0 second
变更
3
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
11 行删除
+18
-11
AccountUnionMapper.java
...oud/account/account/server/mapper/AccountUnionMapper.java
+3
-1
LoginServiceImpl.java
...account/account/server/service/impl/LoginServiceImpl.java
+11
-8
AccountUnionEntityMapper.xml
...r/src/main/resources/mybatis/AccountUnionEntityMapper.xml
+4
-2
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/mapper/AccountUnionMapper.java
浏览文件 @
85ba2d24
...
...
@@ -3,6 +3,8 @@ package com.pica.cloud.account.account.server.mapper;
import
com.pica.cloud.account.account.server.entity.AccountUnionEntity
;
import
java.util.Map
;
public
interface
AccountUnionMapper
{
/**
...
...
@@ -22,7 +24,7 @@ public interface AccountUnionMapper {
AccountUnionEntity
selectByUnionId
(
String
unionId
);
AccountUnionEntity
selectByAcctId
(
Integer
acctId
);
AccountUnionEntity
selectByAcctId
(
Map
<
String
,
Object
>
map
);
int
deleteByPrimaryKey
(
Integer
id
);
...
...
server/src/main/java/com/pica/cloud/account/account/server/service/impl/LoginServiceImpl.java
浏览文件 @
85ba2d24
...
...
@@ -32,6 +32,7 @@ import com.pica.cloud.foundation.utils.utils.ValidateUtils;
import
com.pica.cloud.patient.smartcontract.common.utils.HttpClientCloudUtils
;
import
io.jsonwebtoken.*
;
import
org.apache.commons.codec.binary.Base64
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -415,10 +416,11 @@ public class LoginServiceImpl implements LoginService {
if
(
accountUnionResult
!=
null
)
{
throw
new
PicaException
(
AccountExceptionEnum
.
PICA_WECHAT_UNBIND
.
getCode
(),
AccountExceptionEnum
.
PICA_WECHAT_UNBIND
.
getMessage
());
}
AccountUnionEntity
accountUnionEntityAccount
=
accountUnionMapper
.
selectByAcctId
(
acctId
);
if
(
accountUnionEntityAccount
!=
null
&&
StringUtils
.
isNotEmpty
(
accountUnionEntityAccount
.
getUnionId
())
&&
accountUnionEntityAccount
.
getUnionType
()
==
AccountTypeEnum
.
UNION_LOGIN_WE_CHAT
.
getCode
())
{
Map
<
String
,
Object
>
map
=
new
HashedMap
(
2
);
map
.
put
(
"acctId"
,
acctId
);
map
.
put
(
"unionType"
,
AccountTypeEnum
.
UNION_LOGIN_WE_CHAT
.
getCode
());
AccountUnionEntity
accountUnionEntityAccount
=
accountUnionMapper
.
selectByAcctId
(
map
);
if
(
accountUnionEntityAccount
!=
null
)
{
throw
new
PicaException
(
AccountExceptionEnum
.
PICA_WECHAT_BIND_OTHER
.
getCode
(),
AccountExceptionEnum
.
PICA_WECHAT_BIND_OTHER
.
getMessage
());
}
AccountUnionEntity
accountUnionEntity
=
new
AccountUnionEntity
();
...
...
@@ -800,10 +802,11 @@ public class LoginServiceImpl implements LoginService {
AccountExceptionEnum
.
PICA_APPLE_BIND_OTHER
.
getCode
(),
AccountExceptionEnum
.
PICA_APPLE_BIND_OTHER
.
getMessage
());
}
AccountUnionEntity
accountUnionEntityAccount
=
accountUnionMapper
.
selectByAcctId
(
acctId
);
if
(
accountUnionEntityAccount
!=
null
&&
StringUtils
.
isNotEmpty
(
accountUnionEntityAccount
.
getUnionId
())
&&
accountUnionEntityAccount
.
getUnionType
()
==
AccountTypeEnum
.
UNION_LOGIN_APPLE
.
getCode
())
{
Map
<
String
,
Object
>
map
=
new
HashedMap
(
2
);
map
.
put
(
"acctId"
,
acctId
);
map
.
put
(
"unionType"
,
AccountTypeEnum
.
UNION_LOGIN_APPLE
.
getCode
());
AccountUnionEntity
accountUnionEntityAccount
=
accountUnionMapper
.
selectByAcctId
(
map
);
if
(
accountUnionEntityAccount
!=
null
)
{
throw
new
PicaException
(
AccountExceptionEnum
.
PICA_MOBILE_BIND_OTHER
.
getCode
(),
AccountExceptionEnum
.
PICA_MOBILE_BIND_OTHER
.
getMessage
());
...
...
server/src/main/resources/mybatis/AccountUnionEntityMapper.xml
浏览文件 @
85ba2d24
...
...
@@ -34,11 +34,13 @@
</select>
<!--通过unionId查询用户信息-->
<select
id=
"selectByAcctId"
resultMap=
"BaseResultMap"
parameterType=
"java.
lang.Integer
"
>
<select
id=
"selectByAcctId"
resultMap=
"BaseResultMap"
parameterType=
"java.
util.Map
"
>
select
<include
refid=
"Base_Column_List"
/>
from account_union
where acct_id = #{acctId,jdbcType=INTEGER} and delete_flag = 1
where acct_id = #{acctId,jdbcType=INTEGER}
and union_type = #{unionType}
and delete_flag = 1
limit 1
</select>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录