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
ed03a0a2
Commit
ed03a0a2
authored
Mar 14, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联调问题处理
parent
3f6987f7
Pipeline
#71610
passed with stages
in 2 minutes 7 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
IUserService.java
...ase/yanxuan/wx/store/sharer/biz/service/IUserService.java
+5
-0
UserServiceImpl.java
...uan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
+15
-0
UserController.java
...anxuan/wx/store/sharer/web/controller/UserController.java
+9
-0
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/IUserService.java
View file @
ed03a0a2
...
...
@@ -30,4 +30,9 @@ public interface IUserService {
* 查询平台默认的分佣比例
*/
UserCommissionRatioVO
getCommissionRatioDefault
();
/**
* 绑定平台默认的分佣比例
*/
void
bindCommissionRatioDefault
();
}
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
View file @
ed03a0a2
...
...
@@ -11,9 +11,11 @@ import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.SharerInfoVO;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.UserCommissionRatioVO
;
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.common.exception.NoBindSharerException
;
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.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.impl.WeChatShopSetSharerCommissionRequest
;
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.WeChatUserInfoRequest
;
...
...
@@ -48,6 +50,7 @@ public class UserServiceImpl implements IUserService {
private
final
WeChatUserInfoRequest
weChatUserRequest
;
private
final
WeChatShopSharerRegisterBindRequest
weChatShopSharerRegisterBindRequest
;
private
final
WeChatShopSharerListRequest
weChatShopSharerListRequest
;
private
final
WeChatShopSetSharerCommissionRequest
weChatShopSetSharerCommissionRequest
;
@Override
...
...
@@ -153,6 +156,18 @@ public class UserServiceImpl implements IUserService {
return
UserCommissionRatioVO
.
builder
().
commissionRatio
(
defaultCommissionRatio
).
build
();
}
@Override
public
void
bindCommissionRatioDefault
()
{
// 获取用户信息
LoginUserInfo
loginUserInfo
=
LoginUserContextHolder
.
get
();
if
(
StringUtils
.
isBlank
(
loginUserInfo
.
getSharerAppId
()))
{
throw
new
NoBindSharerException
(
"未绑定推客"
);
}
BigDecimal
defaultCommissionRatio
=
drmSharerConfig
.
getDefaultCommissionRatio
();
// 设置推客分佣比例
weChatShopSetSharerCommissionRequest
.
handle
(
loginUserInfo
.
getSharerAppId
(),
defaultCommissionRatio
.
toPlainString
());
}
private
SharerInfoVO
getSharerRegisterBindInfo
(
String
openId
)
{
// 获取推客注册与绑定信息
WeChatSharerRegisterBindVO
sharerRegisterBindVO
=
weChatShopSharerRegisterBindRequest
.
handle
(
openId
);
...
...
yanxuan-wx-store-sharer-web/src/main/java/com/netease/yanxuan/wx/store/sharer/web/controller/UserController.java
View file @
ed03a0a2
...
...
@@ -59,4 +59,13 @@ public class UserController extends BaseController {
UserCommissionRatioVO
result
=
iUserService
.
getCommissionRatioDefault
();
return
Result
.
ok
(
result
);
}
/**
* 绑定平台默认的分佣比例
*/
@PostMapping
(
"/bindCommissionRatioDefault"
)
public
Result
<
UserCommissionRatioVO
>
bindCommissionRatioDefault
()
{
iUserService
.
bindCommissionRatioDefault
();
return
Result
.
ok
();
}
}
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