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
e9949df9
Commit
e9949df9
authored
Mar 18, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分佣配置结构调整
parent
9c32dc01
Pipeline
#71758
passed with stages
in 1 minute 5 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
DrmSharerConfig.java
...e/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
+7
-11
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
View file @
e9949df9
...
@@ -359,8 +359,8 @@ public class DrmSharerConfig {
...
@@ -359,8 +359,8 @@ public class DrmSharerConfig {
commissionRatio
.
longValue
());
commissionRatio
.
longValue
());
}
}
// 保存推客商品记录
// 保存推客商品记录
saveSharerProductCommissionInfo
(
sharerInfo
.
getOpenId
(),
newBo
.
getProductI
d
(),
saveSharerProductCommissionInfo
(
sharerInfo
.
getOpenId
(),
sharerInfo
.
getSharerAppi
d
(),
commissionRatio
,
SharerProductCommission
.
UnsetEnum
.
SET
);
newBo
.
getProductId
(),
commissionRatio
,
SharerProductCommission
.
UnsetEnum
.
SET
);
isSuccess
=
true
;
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
log
.
error
(
"设置推客的的分佣类型和比例信息失败"
,
e
);
...
@@ -400,7 +400,7 @@ public class DrmSharerConfig {
...
@@ -400,7 +400,7 @@ public class DrmSharerConfig {
Long
.
valueOf
(
oldBo
.
getProductId
()),
sharerCommissionRatio
.
longValue
());
Long
.
valueOf
(
oldBo
.
getProductId
()),
sharerCommissionRatio
.
longValue
());
}
}
// 保存推客商品记录
// 保存推客商品记录
saveSharerProductCommissionInfo
(
sharerInfo
.
getOpenId
(),
oldBo
.
getProductId
(),
saveSharerProductCommissionInfo
(
sharerInfo
.
getOpenId
(),
sharerInfo
.
getSharerAppid
(),
oldBo
.
getProductId
(),
sharerCommissionRatio
,
SharerProductCommission
.
UnsetEnum
.
UNSET
);
sharerCommissionRatio
,
SharerProductCommission
.
UnsetEnum
.
UNSET
);
isSuccess
=
true
;
isSuccess
=
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -441,14 +441,10 @@ public class DrmSharerConfig {
...
@@ -441,14 +441,10 @@ public class DrmSharerConfig {
* 保存推客商品分佣金表
* 保存推客商品分佣金表
*/
*/
private
void
saveSharerProductCommissionInfo
(
String
openId
,
private
void
saveSharerProductCommissionInfo
(
String
openId
,
String
sharerAppid
,
String
productId
,
String
productId
,
BigDecimal
commissionRatio
,
BigDecimal
commissionRatio
,
SharerProductCommission
.
UnsetEnum
unsetEnum
)
{
SharerProductCommission
.
UnsetEnum
unsetEnum
)
{
String
sharerAppid
=
getSharerAppidByOpenId
(
openId
);
if
(
StringUtils
.
isBlank
(
sharerAppid
))
{
log
.
error
(
"微信用户暂未绑定微信小店,openId={}"
,
openId
);
return
;
}
LambdaQueryWrapper
<
SharerProductCommission
>
lqw
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
SharerProductCommission
>
lqw
=
Wrappers
.
lambdaQuery
();
lqw
.
eq
(
SharerProductCommission:
:
getOpenId
,
openId
);
lqw
.
eq
(
SharerProductCommission:
:
getOpenId
,
openId
);
lqw
.
eq
(
SharerProductCommission:
:
getProductId
,
productId
);
lqw
.
eq
(
SharerProductCommission:
:
getProductId
,
productId
);
...
@@ -458,10 +454,8 @@ public class DrmSharerConfig {
...
@@ -458,10 +454,8 @@ public class DrmSharerConfig {
if
(
null
==
sharerProductCommission
)
{
if
(
null
==
sharerProductCommission
)
{
sharerProductCommission
=
new
SharerProductCommission
();
sharerProductCommission
=
new
SharerProductCommission
();
sharerProductCommission
.
setOpenId
(
openId
);
sharerProductCommission
.
setOpenId
(
openId
);
sharerProductCommission
.
setProductId
(
productId
);
sharerProductCommission
.
setCreateTime
(
now
);
}
sharerProductCommission
.
setSharerAppid
(
sharerAppid
);
sharerProductCommission
.
setSharerAppid
(
sharerAppid
);
sharerProductCommission
.
setProductId
(
productId
);
// 微信分佣比例倍数
// 微信分佣比例倍数
BigDecimal
wechatMultiplier
=
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
);
BigDecimal
wechatMultiplier
=
new
BigDecimal
(
WeChatApi
.
WECHAT_COMMISSION_RATIO_MULTIPLIER
);
commissionRatio
=
commissionRatio
commissionRatio
=
commissionRatio
...
@@ -469,6 +463,8 @@ public class DrmSharerConfig {
...
@@ -469,6 +463,8 @@ public class DrmSharerConfig {
.
setScale
(
2
,
RoundingMode
.
HALF_UP
);
.
setScale
(
2
,
RoundingMode
.
HALF_UP
);
sharerProductCommission
.
setCommissionRatio
(
commissionRatio
.
toPlainString
());
sharerProductCommission
.
setCommissionRatio
(
commissionRatio
.
toPlainString
());
sharerProductCommission
.
setCommissionType
(
CommissionTypeEnum
.
PLATFORM
.
getCode
().
toString
());
sharerProductCommission
.
setCommissionType
(
CommissionTypeEnum
.
PLATFORM
.
getCode
().
toString
());
sharerProductCommission
.
setCreateTime
(
now
);
}
sharerProductCommission
.
setUnset
(
unsetEnum
.
getCode
());
sharerProductCommission
.
setUnset
(
unsetEnum
.
getCode
());
sharerProductCommission
.
setUpdateTime
(
now
);
sharerProductCommission
.
setUpdateTime
(
now
);
if
(
null
==
sharerProductCommission
.
getId
())
{
if
(
null
==
sharerProductCommission
.
getId
())
{
...
...
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