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
614d6fc1
Commit
614d6fc1
authored
Mar 17, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分佣配置结构调整
parent
2235c787
Pipeline
#71713
passed with stages
in 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
DrmSharerConfig.java
...e/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
+7
-7
CommissionSharerProductListBO.java
...arer/biz/meta/model/bo/CommissionSharerProductListBO.java
+2
-2
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/config/DrmSharerConfig.java
View file @
614d6fc1
...
@@ -17,7 +17,7 @@ import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
...
@@ -17,7 +17,7 @@ import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
import
com.ctrip.framework.apollo.spring.annotation.EnableAutoUpdateApolloConfig
;
import
com.ctrip.framework.apollo.spring.annotation.EnableAutoUpdateApolloConfig
;
import
com.ctrip.framework.apollo.spring.annotation.ValueMapping
;
import
com.ctrip.framework.apollo.spring.annotation.ValueMapping
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.enums.CommissionChangeOptTypeEnum
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.enums.CommissionChangeOptTypeEnum
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerProduct
s
BO
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerProduct
List
BO
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerBO
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerBO
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerProductBO
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerProductBO
;
import
com.netease.yanxuan.wx.store.sharer.dal.mapper.SharerInfoMapper
;
import
com.netease.yanxuan.wx.store.sharer.dal.mapper.SharerInfoMapper
;
...
@@ -80,7 +80,7 @@ public class DrmSharerConfig {
...
@@ -80,7 +80,7 @@ public class DrmSharerConfig {
* 用户商品分佣比例
* 用户商品分佣比例
*/
*/
@ValueMapping
(
"${commissionratio.sharerproduct:}"
)
@ValueMapping
(
"${commissionratio.sharerproduct:}"
)
private
List
<
CommissionSharerProduct
s
BO
>
commissionSharerProductList
;
private
List
<
CommissionSharerProduct
List
BO
>
commissionSharerProductList
;
/**
/**
* 监听
* 监听
...
@@ -282,8 +282,8 @@ public class DrmSharerConfig {
...
@@ -282,8 +282,8 @@ public class DrmSharerConfig {
*/
*/
private
void
sharerProductCommissionRatioChange
(
ConfigChange
change
)
{
private
void
sharerProductCommissionRatioChange
(
ConfigChange
change
)
{
log
.
info
(
"ProductCommissionConfig:sharerProductCommissionRatioChange, change = {}"
,
JSON
.
toJSONString
(
change
));
log
.
info
(
"ProductCommissionConfig:sharerProductCommissionRatioChange, change = {}"
,
JSON
.
toJSONString
(
change
));
List
<
CommissionSharerProduct
sBO
>
oldCommissionSharerList
=
JSON
.
parseArray
(
change
.
getOldValue
(),
CommissionSharerProducts
BO
.
class
);
List
<
CommissionSharerProduct
ListBO
>
oldCommissionSharerList
=
JSON
.
parseArray
(
change
.
getOldValue
(),
CommissionSharerProductList
BO
.
class
);
List
<
CommissionSharerProduct
sBO
>
newCommissionSharerList
=
JSON
.
parseArray
(
change
.
getNewValue
(),
CommissionSharerProducts
BO
.
class
);
List
<
CommissionSharerProduct
ListBO
>
newCommissionSharerList
=
JSON
.
parseArray
(
change
.
getNewValue
(),
CommissionSharerProductList
BO
.
class
);
// 过滤禁用,转换成Map
// 过滤禁用,转换成Map
Map
<
String
,
CommissionSharerProductBO
>
oldCommissionMap
=
convertCommissionSharerProductBO
(
oldCommissionSharerList
);
Map
<
String
,
CommissionSharerProductBO
>
oldCommissionMap
=
convertCommissionSharerProductBO
(
oldCommissionSharerList
);
Map
<
String
,
CommissionSharerProductBO
>
newCommissionMap
=
convertCommissionSharerProductBO
(
newCommissionSharerList
);
Map
<
String
,
CommissionSharerProductBO
>
newCommissionMap
=
convertCommissionSharerProductBO
(
newCommissionSharerList
);
...
@@ -532,12 +532,12 @@ public class DrmSharerConfig {
...
@@ -532,12 +532,12 @@ public class DrmSharerConfig {
sharerInfoMapper
.
update
(
null
,
sharerInfoLuw
);
sharerInfoMapper
.
update
(
null
,
sharerInfoLuw
);
}
}
private
Map
<
String
,
CommissionSharerProductBO
>
convertCommissionSharerProductBO
(
List
<
CommissionSharerProduct
s
BO
>
list
)
{
private
Map
<
String
,
CommissionSharerProductBO
>
convertCommissionSharerProductBO
(
List
<
CommissionSharerProduct
List
BO
>
list
)
{
// 过滤禁用,转换成Map
// 过滤禁用,转换成Map
return
Optional
.
ofNullable
(
list
)
return
Optional
.
ofNullable
(
list
)
.
orElseGet
(
ArrayList:
:
new
).
stream
()
.
orElseGet
(
ArrayList:
:
new
).
stream
()
.
filter
(
CommissionSharerProduct
s
BO:
:
getEnable
)
.
filter
(
CommissionSharerProduct
List
BO:
:
getEnable
)
.
flatMap
(
item
->
Arrays
.
stream
(
item
.
getProductId
s
().
split
(
","
))
.
flatMap
(
item
->
Arrays
.
stream
(
item
.
getProductId
().
split
(
","
))
.
map
(
productId
->
{
.
map
(
productId
->
{
CommissionSharerProductBO
result
=
new
CommissionSharerProductBO
();
CommissionSharerProductBO
result
=
new
CommissionSharerProductBO
();
result
.
setOpenId
(
item
.
getOpenId
());
result
.
setOpenId
(
item
.
getOpenId
());
...
...
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/meta/model/bo/CommissionSharerProduct
s
BO.java
→
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/meta/model/bo/CommissionSharerProduct
List
BO.java
View file @
614d6fc1
...
@@ -11,7 +11,7 @@ import java.math.BigDecimal;
...
@@ -11,7 +11,7 @@ import java.math.BigDecimal;
* @Date 2025/3/9 13:44
* @Date 2025/3/9 13:44
*/
*/
@Data
@Data
public
class
CommissionSharerProduct
s
BO
implements
Serializable
{
public
class
CommissionSharerProduct
List
BO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
6353220469962589464L
;
private
static
final
long
serialVersionUID
=
-
6353220469962589464L
;
/**
/**
* 用户ID
* 用户ID
...
@@ -20,7 +20,7 @@ public class CommissionSharerProductsBO implements Serializable {
...
@@ -20,7 +20,7 @@ public class CommissionSharerProductsBO implements Serializable {
/**
/**
* 商品ID
* 商品ID
*/
*/
private
String
productId
s
;
private
String
productId
;
/**
/**
* 分佣比例
* 分佣比例
*/
*/
...
...
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