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
9d04736e
Commit
9d04736e
authored
Jun 17, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除玩物得志商家默认是藏家的逻辑,只根据藏家白名单判断是否是藏家
parent
f65e0f7c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
20 deletions
+23
-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
+5
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
...ch/wx/impl/distribution/DistributionOrderServiceImpl.java
+2
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
+10
-3
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+6
-13
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
View file @
9d04736e
...
...
@@ -211,12 +211,16 @@ public class UserServiceImpl implements UserService {
user
.
setMobile
(
phone
);
result
.
put
(
"phone"
,
phone
);
boolean
collectorWhiteListFlag
=
collectorWhiteListDao
.
isExisted
(
dto
.
getUserId
());
if
(
collectorWhiteListFlag
)
{
result
.
put
(
"isCollector"
,
true
);
}
else
{
result
.
put
(
"isCollector"
,
false
);
}
int
userLevel
=
UserEnum
.
LevelEnum
.
COMMON
.
getCode
();
//判断登录用户是否是分销商
if
(
shopWhiteListDao
.
isExisted
(
dto
.
getUserId
()))
{
ShopWhiteList
shopWhiteList
=
shopWhiteListDao
.
findByUserId
(
dto
.
getUserId
());
result
.
put
(
"isShop"
,
true
);
result
.
put
(
"isCollector"
,
true
);
result
.
put
(
"shopId"
,
shopWhiteList
.
getShopId
()
==
null
?
dto
.
getUserId
()
:
shopWhiteList
.
getShopId
());
userLevel
=
UserEnum
.
LevelEnum
.
DISTRIBUTOR
.
getCode
();
if
(
collectorWhiteListFlag
)
{
...
...
@@ -229,7 +233,6 @@ public class UserServiceImpl implements UserService {
ShopDTO
shopDTO
=
cloudServerResponse
.
getResult
();
if
(
shopDTO
!=
null
&&
!
ObjectUtils
.
isEmpty
(
shopDTO
.
getShopId
())
&&
shopDTO
.
getPayStatus
()
==
1
&&
shopDTO
.
getCheckStatus
()
==
1
&&
shopDTO
.
getType
()
==
4
)
{
result
.
put
(
"isShop"
,
true
);
result
.
put
(
"isCollector"
,
true
);
result
.
put
(
"shopId"
,
shopDTO
.
getShopId
());
//新商家登录,在表中记录
ShopWhiteList
shopWhiteList
=
new
ShopWhiteList
();
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/DistributionOrderServiceImpl.java
View file @
9d04736e
...
...
@@ -469,8 +469,8 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
map
.
put
(
"prepayId"
,
prepayId
);
//计算分销商的利润
DistributorProfit
distributorProfit
=
new
DistributorProfit
();
//平台服务费
double
channelServiceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
0.
0
5
;
//平台服务费
,默认15%
double
channelServiceCost
=
distributionOrder
.
getAmount
().
doubleValue
()
*
0.
1
5
;
//介绍人分佣,自己推荐获得的订单无需计算介绍佣金
// double introduceCost = 0;
// if (supplierItem.getCreatorId() != introducerId) {
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
View file @
9d04736e
...
...
@@ -9,6 +9,7 @@ import com.wwdz.ch.core.util.CacheUtil;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.RedisUtils
;
import
com.wwdz.ch.db.bean.DistributionOrderNum
;
import
com.wwdz.ch.db.dao.CollectorWhiteListDao
;
import
com.wwdz.ch.db.dao.FollowFansRecordDao
;
import
com.wwdz.ch.db.dao.SwitchDao
;
import
com.wwdz.ch.db.dao.UserDao
;
...
...
@@ -89,6 +90,9 @@ public class SelfPageServiceImpl implements SelfPageService {
@Autowired
ShopWhiteListDao
shopWhiteListDao
;
@Autowired
CollectorWhiteListDao
collectorWhiteListDao
;
@Override
public
Result
getDistributorPageInfo
(
SelfPageRequestDto
dto
)
{
...
...
@@ -255,9 +259,14 @@ public class SelfPageServiceImpl implements SelfPageService {
map
.
put
(
"count"
,
count
);
//判断是否是藏家
boolean
collectorWhiteListFlag
=
collectorWhiteListDao
.
isExisted
(
itemUserId
);
if
(
collectorWhiteListFlag
)
{
map
.
put
(
"isCollector"
,
true
);
}
else
{
map
.
put
(
"isCollector"
,
false
);
}
if
(
shopWhiteListDao
.
isExisted
(
itemUserId
))
{
map
.
put
(
"isShop"
,
true
);
map
.
put
(
"isCollector"
,
true
);
}
else
{
try
{
CloudServerResponse
<
ShopDTO
>
cloudServerResponse
=
shopReadService
.
getShopByUserId
(
itemUserId
,
new
ShopQueryOption
());
...
...
@@ -265,13 +274,11 @@ public class SelfPageServiceImpl implements SelfPageService {
ShopDTO
shopDTO
=
cloudServerResponse
.
getResult
();
if
(
shopDTO
!=
null
&&
!
ObjectUtils
.
isEmpty
(
shopDTO
.
getShopId
())
&&
shopDTO
.
getPayStatus
()
==
1
&&
shopDTO
.
getCheckStatus
()
==
1
&&
shopDTO
.
getType
()
==
4
)
{
map
.
put
(
"isShop"
,
true
);
map
.
put
(
"isCollector"
,
true
);
}
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"根据用户id查询店铺信息失败error:{}"
,
e
);
map
.
put
(
"isShop"
,
false
);
map
.
put
(
"isCollector"
,
false
);
}
}
return
Result
.
success
(
map
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
9d04736e
...
...
@@ -11,6 +11,7 @@ import com.wwdz.ch.core.util.CacheUtil;
import
com.wwdz.ch.core.util.MediaUtil
;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.db.dao.CollectionBookSortDao
;
import
com.wwdz.ch.db.dao.CollectorWhiteListDao
;
import
com.wwdz.ch.db.dao.FollowFansRecordDao
;
import
com.wwdz.ch.db.dao.SwitchDao
;
import
com.wwdz.ch.db.dao.distribution.*
;
...
...
@@ -134,6 +135,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
@Autowired
ShopWhiteListDao
shopWhiteListDao
;
@Autowired
CollectorWhiteListDao
collectorWhiteListDao
;
@Override
public
Result
findList
(
SupplierItemRequestDto
dto
)
{
...
...
@@ -823,22 +827,11 @@ public class SupplierItemServiceImpl implements SupplierItemService {
supplierItemVo
.
setWechatQrCode
(
user
.
getWechatQrCode
());
}
//判断是否是藏家
if
(
shopWhiteListDao
.
isExisted
(
supplierItem
.
getCreatorId
()))
{
boolean
collectorWhiteListFlag
=
collectorWhiteListDao
.
isExisted
(
supplierItem
.
getCreatorId
());
if
(
collectorWhiteListFlag
)
{
supplierItemVo
.
setIsCollector
(
true
);
}
else
{
supplierItemVo
.
setIsCollector
(
false
);
try
{
CloudServerResponse
<
ShopDTO
>
cloudServerResponse
=
shopReadService
.
getShopByUserId
(
supplierItem
.
getCreatorId
(),
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
)
{
supplierItemVo
.
setIsCollector
(
true
);
}
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"根据用户id查询店铺信息失败error:{}"
,
e
);
supplierItemVo
.
setIsCollector
(
false
);
}
}
}
else
{
supplierItemVo
.
setIsMine
(
true
);
...
...
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