Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-wx-store-sharer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wx
yanxuan-wx-store-sharer
Commits
0b018a60
Commit
0b018a60
authored
Mar 14, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联调问题处理
parent
1cf8a856
Pipeline
#71617
passed with stages
in 56 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
9 deletions
+21
-9
DrmSharerConfig.java
...e/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
+10
-6
UserServiceImpl.java
...uan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
+4
-1
CoreConstant.java
...yanxuan/wx/store/sharer/common/constant/CoreConstant.java
+5
-0
WeChatShopSetSharerCommissionRequest.java
...on/handler/impl/WeChatShopSetSharerCommissionRequest.java
+1
-1
WeChatSetSharerCommissionBO.java
...ntegration/meta/model/bo/WeChatSetSharerCommissionBO.java
+1
-1
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
View file @
0b018a60
...
...
@@ -39,6 +39,7 @@ import org.springframework.stereotype.Component;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.*
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.function.Function
;
...
...
@@ -147,12 +148,13 @@ public class DrmSharerConfig {
private
void
setSharerDefaultCommissionInfo
(
ConfigChange
change
,
WeChatSharerInfoVO
sharerInfoVO
)
{
// 分佣比例为小数, 微信接口参数应当分佣比例*倍数 为整数
BigDecimal
commissionRatio
=
new
BigDecimal
(
change
.
getNewValue
())
.
multiply
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
.
multiply
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
))
.
setScale
(
0
,
RoundingMode
.
DOWN
);
// 设置推客分佣比例
boolean
isSuccess
=
false
;
try
{
// 设置推客分佣比例
weChatShopSetSharerCommissionRequest
.
handle
(
sharerInfoVO
.
getSharer_appid
(),
commissionRatio
.
toPlainString
());
weChatShopSetSharerCommissionRequest
.
handle
(
sharerInfoVO
.
getSharer_appid
(),
commissionRatio
.
intValue
());
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
...
...
@@ -212,12 +214,13 @@ public class DrmSharerConfig {
}
// 分佣比例为小数, 微信接口参数应当分佣比例*1000 为整数
BigDecimal
commissionRatio
=
newCommissionSharer
.
getCommissionRatio
()
.
multiply
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
.
multiply
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
))
.
setScale
(
0
,
RoundingMode
.
DOWN
);
// 设置推客分佣比例
boolean
isSuccess
=
false
;
try
{
// 设置推客分佣比例
weChatShopSetSharerCommissionRequest
.
handle
(
sharerAppid
,
commissionRatio
.
toPlainString
());
weChatShopSetSharerCommissionRequest
.
handle
(
sharerAppid
,
commissionRatio
.
intValue
());
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
...
...
@@ -241,12 +244,13 @@ public class DrmSharerConfig {
// 分佣比例为小数, 微信接口参数应当分佣比例*倍数 为整数
BigDecimal
sharerCommissionRatio
=
getSharerCommissionRatio
(
oldCommissionSharer
.
getOpenId
(),
null
);
BigDecimal
commissionRatio
=
sharerCommissionRatio
.
multiply
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
.
multiply
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
))
.
setScale
(
0
,
RoundingMode
.
DOWN
);
// 设置推客分佣比例
boolean
isSuccess
=
false
;
try
{
// 设置推客分佣比例
weChatShopSetSharerCommissionRequest
.
handle
(
sharerAppid
,
commissionRatio
.
toPlainString
());
weChatShopSetSharerCommissionRequest
.
handle
(
sharerAppid
,
commissionRatio
.
intValue
());
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
...
...
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
View file @
0b018a60
...
...
@@ -164,8 +164,11 @@ public class UserServiceImpl implements IUserService {
throw
new
NoBindSharerException
(
"未绑定推客"
);
}
BigDecimal
defaultCommissionRatio
=
drmSharerConfig
.
getDefaultCommissionRatio
();
BigDecimal
commissionRatio
=
defaultCommissionRatio
.
multiply
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
))
.
setScale
(
0
,
RoundingMode
.
DOWN
);
// 设置推客分佣比例
weChatShopSetSharerCommissionRequest
.
handle
(
loginUserInfo
.
getSharerAppId
(),
defaultCommissionRatio
.
toPlainString
());
weChatShopSetSharerCommissionRequest
.
handle
(
loginUserInfo
.
getSharerAppId
(),
commissionRatio
.
intValue
());
}
private
SharerInfoVO
getSharerRegisterBindInfo
(
String
openId
)
{
...
...
yanxuan-wx-store-sharer-common/src/main/java/com/netease/yanxuan/wx/store/sharer/common/constant/CoreConstant.java
View file @
0b018a60
...
...
@@ -54,4 +54,9 @@ public interface CoreConstant {
* Redis微信小店认证Token锁时间,秒
*/
int
REDIS_TOKEN_WECHAT_SHOP_LOCK_TIME
=
5
;
/**
* Redis商品详情ID缓存KEY
*/
String
REDIS_PRODUCT_DETAIL_ID_KEY
=
"PRODUCT:DETAIL:ID:KEY"
;
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatShopSetSharerCommissionRequest.java
View file @
0b018a60
...
...
@@ -42,7 +42,7 @@ public class WeChatShopSetSharerCommissionRequest implements IWeChatRequest {
/**
* 处理
*/
public
WeChatCoreVO
handle
(
String
sharerAppid
,
String
commissionRatio
)
{
public
WeChatCoreVO
handle
(
String
sharerAppid
,
Integer
commissionRatio
)
{
WeChatSetSharerCommissionBO
params
=
WeChatSetSharerCommissionBO
.
builder
()
.
sharer_appid
(
sharerAppid
)
.
commission_type
(
CommissionTypeEnum
.
PLATFORM
.
getCode
())
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/meta/model/bo/WeChatSetSharerCommissionBO.java
View file @
0b018a60
...
...
@@ -26,5 +26,5 @@ public class WeChatSetSharerCommissionBO implements Serializable {
/**
* 平台分佣时的分佣比例,范围为【100000 - 900000】,代表【10%-90%】
*/
private
String
commission_ratio
;
private
Integer
commission_ratio
;
}
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