Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
4b38be29
Commit
4b38be29
authored
Jun 26, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除了分销商的角色,默认为false
parent
70c062ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
20 deletions
+10
-20
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
+8
-4
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
+2
-16
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
View file @
4b38be29
...
...
@@ -211,12 +211,16 @@ public class UserServiceImpl implements UserService {
user
.
setMobile
(
phone
);
result
.
put
(
"phone"
,
phone
);
boolean
collectorWhiteListFlag
=
collectorWhiteListDao
.
isExisted
(
dto
.
getUserId
());
int
userLevel
=
UserEnum
.
LevelEnum
.
COMMON
.
getCode
();
if
(
collectorWhiteListFlag
)
{
result
.
put
(
"isCollector"
,
true
);
userLevel
=
UserEnum
.
LevelEnum
.
COLLECTOR
.
getCode
();
}
else
{
result
.
put
(
"isCollector"
,
false
);
}
int
userLevel
=
UserEnum
.
LevelEnum
.
COMMON
.
getCode
();
result
.
put
(
"isShop"
,
false
);
/*
//判断登录用户是否是分销商
if (shopWhiteListDao.isExisted(dto.getUserId())) {
ShopWhiteList shopWhiteList = shopWhiteListDao.findByUserId(dto.getUserId());
...
...
@@ -259,7 +263,7 @@ public class UserServiceImpl implements UserService {
logger.error("根据用户id查询店铺信息失败error:{}", e);
result.put("isShop", false);
}
}
}
*/
user
.
setLastLoginTime
(
new
Date
());
user
.
setUserLevel
(
userLevel
);
//更新或插入登录的用户信息
...
...
@@ -268,14 +272,14 @@ public class UserServiceImpl implements UserService {
// 缓存用户信息
String
userKey
=
MessageFormat
.
format
(
CacheCodeConstants
.
USER_INFO_KEY
,
user
.
getId
());
redisUtil
.
set
(
userKey
,
user
,
2
*
60
*
60
);
//判断用户是否在藏家白名单
/*
//判断用户是否在藏家白名单
if (collectorWhiteListFlag ) {
result.put("isCollector", true);
} else {
if (!(Boolean) result.get("isShop")) {
result.put("isCollector", false);
}
}
}
*/
//返回用户信息
user
=
userDao
.
queryById
(
dto
.
getUserId
());
result
.
put
(
"avatar"
,
com
.
xxdxxs
.
utils
.
StringUtils
.
isEmpty
(
user
.
getAvatar
())
?
CommConsts
.
DEFAULT_AVATAR_URL
:
user
.
getAvatar
());
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
View file @
4b38be29
...
...
@@ -265,22 +265,8 @@ public class SelfPageServiceImpl implements SelfPageService {
}
else
{
map
.
put
(
"isCollector"
,
false
);
}
if
(
shopWhiteListDao
.
isExisted
(
itemUserId
))
{
map
.
put
(
"isShop"
,
true
);
}
else
{
try
{
CloudServerResponse
<
ShopDTO
>
cloudServerResponse
=
shopReadService
.
getShopByUserId
(
itemUserId
,
new
ShopQueryOption
());
if
(
cloudServerResponse
.
isSuccess
())
{
ShopDTO
shopDTO
=
cloudServerResponse
.
getResult
();
if
(
shopDTO
!=
null
&&
!
ObjectUtils
.
isEmpty
(
shopDTO
.
getShopId
())
&&
shopDTO
.
getPayStatus
()
==
1
&&
shopDTO
.
getCheckStatus
()
==
1
&&
shopDTO
.
getType
()
==
4
)
{
map
.
put
(
"isShop"
,
true
);
}
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"根据用户id查询店铺信息失败error:{}"
,
e
);
map
.
put
(
"isShop"
,
false
);
}
}
//现在没有分销商的角色,默认为false
map
.
put
(
"isShop"
,
false
);
return
Result
.
success
(
map
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"判断主客态 error : {}"
,
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment