Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
42bc01e5
提交
42bc01e5
authored
7月 18, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
数据库删除uid字段
上级
0ca4626f
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
9 行增加
和
20 行删除
+9
-20
AuthServiceImpl.java
.../java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
+2
-7
UserServiceDao.xml
...service-user/src/main/resources/mapper/UserServiceDao.xml
+7
-13
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
浏览文件 @
42bc01e5
...
...
@@ -4,7 +4,6 @@ import com.alibaba.fastjson2.JSON;
import
com.alibaba.fastjson2.JSONObject
;
import
com.mmc.iuav.auth.JwtConstant
;
import
com.mmc.iuav.auth.JwtUtil
;
import
com.mmc.iuav.general.CodeUtil
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.auth.PwdUtil
;
...
...
@@ -94,21 +93,17 @@ public class AuthServiceImpl implements AuthService {
}
//数据库查询用户信息
UserAccountVO
userAccountVO
=
userAccountService
.
getUserAccountInfoByUnionId
(
unionId
);
String
uid
;
Integer
companyAuthStatus
=
0
;
if
(
userAccountVO
==
null
)
{
UserAccountDO
userAccountDO
=
new
UserAccountDO
();
userAccountDO
.
setUnionId
(
unionId
);
userAccountDO
.
setOpenId
(
openId
);
uid
=
CodeUtil
.
generateUserUID
();
userAccountDO
.
setUid
(
uid
);
userAccountDO
.
setPortType
(
100
);
userAccountDO
.
setSource
(
wxLoginVO
.
getSource
());
userAccountService
.
insertUserAccount
(
userAccountDO
);
userAccountVO
=
userAccountDO
.
buildUserAccountVO
();
payClient
.
createWallet
(
userAccountDO
.
getId
());
}
else
{
uid
=
userAccountVO
.
getUid
();
CompanyAuthDO
companyAuthDO
=
companyAuthDao
.
getCompanyAuth
(
userAccountVO
.
getId
());
if
(
companyAuthDO
!=
null
)
{
companyAuthStatus
=
companyAuthDO
.
getAuthStatus
();
...
...
@@ -120,7 +115,7 @@ public class AuthServiceImpl implements AuthService {
map
.
put
(
JwtConstant
.
TOKEN_TYPE
,
JwtConstant
.
IUAV_TOKEN
);
String
token
=
JwtUtil
.
createJwt
(
map
);
LoginSuccessDTO
loginSuccessDTO
=
LoginSuccessDTO
.
builder
().
token
(
token
).
userAccountId
(
userAccountVO
.
getId
()).
uid
(
u
id
)
LoginSuccessDTO
loginSuccessDTO
=
LoginSuccessDTO
.
builder
().
token
(
token
).
userAccountId
(
userAccountVO
.
getId
()).
uid
(
u
serAccountVO
.
getId
()
+
""
)
.
userName
(
userAccountVO
.
getUserName
()).
nickName
(
userAccountVO
.
getNickName
()).
phoneNum
(
userAccountVO
.
getPhoneNum
()).
portType
(
100
).
build
();
stringRedisTemplate
.
opsForValue
().
set
(
...
...
@@ -181,7 +176,7 @@ public class AuthServiceImpl implements AuthService {
companyAuthStatus
=
companyAuthDO
.
getAuthStatus
();
}
String
token
=
JwtUtil
.
createJwt
(
map
);
LoginSuccessDTO
loginSuccessDTO
=
LoginSuccessDTO
.
builder
().
token
(
token
).
userAccountId
(
userAccountVO
.
getId
()).
uid
(
userAccountVO
.
get
Uid
()
)
LoginSuccessDTO
loginSuccessDTO
=
LoginSuccessDTO
.
builder
().
token
(
token
).
userAccountId
(
userAccountVO
.
getId
()).
uid
(
userAccountVO
.
get
Id
()
+
""
)
.
userName
(
userAccountVO
.
getUserName
()).
nickName
(
userAccountVO
.
getNickName
()).
phoneNum
(
userAccountVO
.
getPhoneNum
()).
portType
(
100
).
build
();
stringRedisTemplate
.
opsForValue
().
set
(
token
,
JSONObject
.
toJSONString
(
loginSuccessDTO
),
...
...
csm-service/cms-service-user/src/main/resources/mapper/UserServiceDao.xml
浏览文件 @
42bc01e5
...
...
@@ -5,7 +5,6 @@
<mapper
namespace=
"com.mmc.iuav.user.dao.UserServiceDao"
>
<resultMap
id=
"userAccountResultMap"
type=
"com.mmc.iuav.user.entity.UserAccountDO"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"uid"
column=
"uid"
/>
<result
property=
"phoneNum"
column=
"phone_num"
/>
<result
property=
"userName"
column=
"user_name"
/>
<result
property=
"nickName"
column=
"nick_name"
/>
...
...
@@ -35,10 +34,10 @@
<insert
id=
"insertUserAccount"
parameterType=
"com.mmc.iuav.user.entity.UserAccountDO"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into user_account(
uid,
phone_num, user_name, nick_name, user_img, open_id,
insert into user_account(phone_num, user_name, nick_name, user_img, open_id,
union_id, user_sex, email, source, province_code, city_code, district_code, remark,
port_type, create_time)
values (#{
uid}, #{
phoneNum}, #{userName}, #{nickName}, #{userImg}, #{openId},
values (#{phoneNum}, #{userName}, #{nickName}, #{userImg}, #{openId},
#{unionId}, #{userSex}, #{email}, #{source}, #{provinceCode}, #{cityCode}, #{districtCode}, #{remark},
#{portType}, NOW())
</insert>
...
...
@@ -102,7 +101,6 @@
<select
id=
"getUserAccountInfoByUnionId"
resultType=
"com.mmc.iuav.user.entity.UserAccountDO"
>
select id,
uid,
phone_num,
user_name,
nick_name,
...
...
@@ -125,7 +123,6 @@
<select
id=
"getUserAccountById"
resultType=
"com.mmc.iuav.user.entity.UserAccountDO"
>
select id,
uid,
phone_num,
user_name,
nick_name,
...
...
@@ -161,7 +158,7 @@
<select
id=
"feignListUserAccount"
resultType=
"com.mmc.iuav.user.entity.UserAccountDO"
parameterType=
"com.mmc.iuav.user.model.qo.UserAccountQO"
>
select ua.id, ua.
uid, ua.
phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id,
select ua.id, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id,
ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.disable, ua.create_time, ua.update_time, ca.auth_status as companyAuthStatus
from user_account ua left join company_auth ca on ua.id = ca.user_account_id
...
...
@@ -176,7 +173,7 @@
user_name like CONCAT("%",#{keyword},"%") or
nick_name like CONCAT("%",#{keyword},"%") or
phone_num like CONCAT("%",#{keyword},"%") or
u
id like CONCAT("%",#{keyword},"%"))
id like CONCAT("%",#{keyword},"%"))
</if>
<if
test=
"provinceCode != null"
>
and ua.province_code = #{provinceCode}
...
...
@@ -190,7 +187,7 @@
</select>
<select
id=
"listUserAccountByIds"
resultType=
"com.mmc.iuav.user.entity.UserAccountDO"
>
select ua.id, ua.
uid, ua.
phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id,
select ua.id, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id,
ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.disable, ua.create_time, ua.update_time, ca.auth_status as companyAuthStatus,
ca.company_name
...
...
@@ -204,7 +201,7 @@
</select>
<select
id=
"feignListRcdUserInfo"
resultType=
"com.mmc.iuav.user.entity.UserAccountDO"
>
select ua.id, ua.
uid, ua.
phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id,
select ua.id, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id,
ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.disable, ua.create_time, ua.update_time, ca.auth_status as companyAuthStatus,
ca.company_name
...
...
@@ -220,7 +217,6 @@
<select
id=
"getUserRcdByAccountId"
resultType=
"com.mmc.iuav.user.entity.UserAccountDO"
>
select ua.id,
ua.uid,
ua.phone_num,
ua.user_name,
ua.nick_name,
...
...
@@ -285,7 +281,7 @@
<select
id=
"listAppUser"
resultMap=
"userAccountResultMap"
parameterType=
"com.mmc.iuav.user.model.qo.UserAccountQO"
>
select ua.id, ua.
uid, ua.
phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id,
select ua.id, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id,
ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.disable, ua.create_time, ua.update_time, IFNULL(ca.auth_status, 0) as
companyAuthStatus, ca.company_name, rcd.id as user_rcd_id, rcd.rcd_user_id, r_user.nick_name as rcdNickname,
...
...
@@ -339,7 +335,6 @@
ua.nick_name,
ua.user_img,
ua.user_name,
ua.uid,
ua.phone_num,
count(*) as invite_count
from user_rcd urd
...
...
@@ -354,7 +349,6 @@
ua.nick_name,
ua.user_img,
ua.user_name,
ua.uid,
ua.phone_num,
count(*) as invite_count
from user_rcd urd
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论