Toggle navigation
Toggle navigation
This project
Loading...
Sign in
YOHOBUY
/
yohobuy-union
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
wangshusheng
6 years ago
Commit
da65a5f350f4541ae8d9bb4abe22f0830301639b
1 parent
17f08089
身份证
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
dal/src/main/java/com/yoho/unions/dal/UnionShareUserIdentityCardMapper.java
dal/src/main/resources/META-INF/mybatis/UnionShareUserIdentityCardMapper.xml
server/src/main/java/com/yoho/unions/server/service/impl/UnionShareServiceImpl.java
dal/src/main/java/com/yoho/unions/dal/UnionShareUserIdentityCardMapper.java
View file @
da65a5f
...
...
@@ -12,6 +12,7 @@ public interface UnionShareUserIdentityCardMapper {
UnionShareUserIdentityCard
selectByPrimaryKey
(
Integer
id
);
UnionShareUserIdentityCard
selectActiveByUid
(
@Param
(
"uid"
)
Integer
uid
);
UnionShareUserIdentityCard
selectByUid
(
@Param
(
"uid"
)
Integer
uid
);
List
<
UnionShareUserIdentityCard
>
selectByUids
(
@Param
(
"uids"
)
List
<
Integer
>
uids
);
...
...
dal/src/main/resources/META-INF/mybatis/UnionShareUserIdentityCardMapper.xml
View file @
da65a5f
...
...
@@ -20,7 +20,7 @@
where id = #{id,jdbcType=INTEGER}
</select>
<select
id=
"selectByUid"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
<select
id=
"select
Active
ByUid"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from union_share_user_identity_card
...
...
@@ -29,6 +29,14 @@
limit 1
</select>
<select
id=
"selectByUid"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Integer"
>
select
<include
refid=
"Base_Column_List"
/>
from union_share_user_identity_card
where uid = #{uid,jdbcType=INTEGER}
limit 1
</select>
<select
id=
"selectByUids"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
...
...
server/src/main/java/com/yoho/unions/server/service/impl/UnionShareServiceImpl.java
View file @
da65a5f
...
...
@@ -3725,7 +3725,13 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
identityCard
.
setUpdateTime
(
identityCard
.
getCreateTime
());
// 查询是否存在
UnionShareUserIdentityCard
identityCardDb
=
unionShareUserIdentityCardMapper
.
selectByUid
(
bo
.
getUid
());
int
result
=
unionShareUserIdentityCardMapper
.
insert
(
identityCard
);
int
result
=
0
;
if
(
identityCardDb
==
null
){
result
=
unionShareUserIdentityCardMapper
.
insert
(
identityCard
);
}
else
{
identityCard
.
setId
(
identityCardDb
.
getId
());
result
=
unionShareUserIdentityCardMapper
.
updateByPrimaryKey
(
identityCard
);
}
redisHashCache
.
delete
(
ShareOrdersKeyEnum
.
USER_SETTLEMENT
.
getPreKey
(),
bo
.
getUid
());
return
result
;
}
...
...
@@ -3741,7 +3747,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
logger
.
info
(
"getUserIdentityCard end, get redis cache ,uid is {},cacheResult is {}"
,
uid
,
cacheResult
);
return
cacheResult
;
}
UnionShareUserIdentityCard
identityCard
=
unionShareUserIdentityCardMapper
.
selectByUid
(
uid
);
UnionShareUserIdentityCard
identityCard
=
unionShareUserIdentityCardMapper
.
select
Active
ByUid
(
uid
);
if
(
identityCard
==
null
)
{
return
null
;
}
...
...
Please
register
or
login
to post a comment