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
b6048203
Commit
b6048203
authored
Mar 14, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联调问题处理
parent
570cb01d
Pipeline
#71598
passed with stages
in 1 minute 4 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
DrmSharerConfig.java
...e/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
+8
-4
UserServiceImpl.java
...uan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
+7
-1
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
View file @
b6048203
...
@@ -144,7 +144,8 @@ public class DrmSharerConfig {
...
@@ -144,7 +144,8 @@ public class DrmSharerConfig {
*/
*/
private
void
setSharerDefaultCommissionInfo
(
ConfigChange
change
,
WeChatSharerInfoVO
sharerInfoVO
)
{
private
void
setSharerDefaultCommissionInfo
(
ConfigChange
change
,
WeChatSharerInfoVO
sharerInfoVO
)
{
// 分佣比例为小数, 微信接口参数应当分佣比例*倍数 为整数
// 分佣比例为小数, 微信接口参数应当分佣比例*倍数 为整数
BigDecimal
commissionRatio
=
new
BigDecimal
(
change
.
getNewValue
()).
divide
(
BigDecimal
.
valueOf
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
BigDecimal
commissionRatio
=
new
BigDecimal
(
change
.
getNewValue
())
.
divide
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
// 设置推客分佣比例
// 设置推客分佣比例
boolean
isSuccess
=
false
;
boolean
isSuccess
=
false
;
try
{
try
{
...
@@ -207,7 +208,8 @@ public class DrmSharerConfig {
...
@@ -207,7 +208,8 @@ public class DrmSharerConfig {
return
;
return
;
}
}
// 分佣比例为小数, 微信接口参数应当分佣比例*1000 为整数
// 分佣比例为小数, 微信接口参数应当分佣比例*1000 为整数
BigDecimal
commissionRatio
=
newCommissionSharer
.
getCommissionRatio
().
divide
(
BigDecimal
.
valueOf
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
BigDecimal
commissionRatio
=
newCommissionSharer
.
getCommissionRatio
()
.
divide
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
// 设置推客分佣比例
// 设置推客分佣比例
boolean
isSuccess
=
false
;
boolean
isSuccess
=
false
;
try
{
try
{
...
@@ -235,7 +237,8 @@ public class DrmSharerConfig {
...
@@ -235,7 +237,8 @@ public class DrmSharerConfig {
}
}
// 分佣比例为小数, 微信接口参数应当分佣比例*倍数 为整数
// 分佣比例为小数, 微信接口参数应当分佣比例*倍数 为整数
BigDecimal
sharerCommissionRatio
=
getSharerCommissionRatio
(
oldCommissionSharer
.
getOpenId
(),
null
);
BigDecimal
sharerCommissionRatio
=
getSharerCommissionRatio
(
oldCommissionSharer
.
getOpenId
(),
null
);
BigDecimal
commissionRatio
=
sharerCommissionRatio
.
divide
(
BigDecimal
.
valueOf
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
BigDecimal
commissionRatio
=
sharerCommissionRatio
.
divide
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
// 设置推客分佣比例
// 设置推客分佣比例
boolean
isSuccess
=
false
;
boolean
isSuccess
=
false
;
try
{
try
{
...
@@ -360,7 +363,8 @@ public class DrmSharerConfig {
...
@@ -360,7 +363,8 @@ public class DrmSharerConfig {
return
;
return
;
}
}
// 分佣比例为小数, 微信接口参数应当分佣比例*倍数 为整数
// 分佣比例为小数, 微信接口参数应当分佣比例*倍数 为整数
BigDecimal
commissionRatio
=
newBo
.
getCommissionRatio
().
divide
(
BigDecimal
.
valueOf
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
BigDecimal
commissionRatio
=
newBo
.
getCommissionRatio
()
.
divide
(
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
));
// 设置推客分佣比例
// 设置推客分佣比例
boolean
isSuccess
=
false
;
boolean
isSuccess
=
false
;
try
{
try
{
...
...
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
View file @
b6048203
...
@@ -13,6 +13,7 @@ import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.UserTokenVO;
...
@@ -13,6 +13,7 @@ import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.UserTokenVO;
import
com.netease.yanxuan.wx.store.sharer.biz.service.IUserService
;
import
com.netease.yanxuan.wx.store.sharer.biz.service.IUserService
;
import
com.netease.yanxuan.wx.store.sharer.dal.mapper.SharerInfoMapper
;
import
com.netease.yanxuan.wx.store.sharer.dal.mapper.SharerInfoMapper
;
import
com.netease.yanxuan.wx.store.sharer.dal.meta.model.po.SharerInfo
;
import
com.netease.yanxuan.wx.store.sharer.dal.meta.model.po.SharerInfo
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatShopSharerListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatShopSharerListRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatShopSharerRegisterBindRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatShopSharerRegisterBindRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatUserInfoRequest
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatUserInfoRequest
;
...
@@ -28,6 +29,7 @@ import org.springframework.stereotype.Service;
...
@@ -28,6 +29,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
...
@@ -101,7 +103,11 @@ public class UserServiceImpl implements IUserService {
...
@@ -101,7 +103,11 @@ public class UserServiceImpl implements IUserService {
sharerInfo
.
setSharerAppid
(
sharerInfoVO
.
getSharer_appid
());
sharerInfo
.
setSharerAppid
(
sharerInfoVO
.
getSharer_appid
());
Date
bindTime
=
null
!=
sharerInfoVO
.
getBind_time
()
?
new
Date
(
sharerInfoVO
.
getBind_time
())
:
now
;
Date
bindTime
=
null
!=
sharerInfoVO
.
getBind_time
()
?
new
Date
(
sharerInfoVO
.
getBind_time
())
:
now
;
sharerInfo
.
setBindTime
(
bindTime
);
sharerInfo
.
setBindTime
(
bindTime
);
sharerInfo
.
setCommissionRatio
(
sharerInfoVO
.
getCommission_ratio
());
// 微信分佣比例倍数
BigDecimal
wechatCommissionRatioMultiplier
=
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
);
BigDecimal
commissionRatio
=
sharerInfoVO
.
getCommission_ratio
().
multiply
(
wechatCommissionRatioMultiplier
)
.
setScale
(
2
,
RoundingMode
.
HALF_UP
);
sharerInfo
.
setCommissionRatio
(
commissionRatio
);
String
commissionType
=
null
!=
sharerInfoVO
.
getCommission_type
()
?
sharerInfoVO
.
getCommission_type
().
toString
()
:
CommissionTypeEnum
.
PLATFORM
.
getCode
();
String
commissionType
=
null
!=
sharerInfoVO
.
getCommission_type
()
?
sharerInfoVO
.
getCommission_type
().
toString
()
:
CommissionTypeEnum
.
PLATFORM
.
getCode
();
sharerInfo
.
setCommissionType
(
commissionType
);
sharerInfo
.
setCommissionType
(
commissionType
);
// 刷新缓存
// 刷新缓存
...
...
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