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
4d1825c6
Commit
4d1825c6
authored
Mar 20, 2025
by
刘运星
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change: 日志配置
parent
28e775af
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
149 additions
and
41 deletions
+149
-41
UserServiceImpl.java
...uan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
+15
-7
logback-spring.xml
...wx-store-sharer-biz/src/main/resources/logback-spring.xml
+88
-17
WeChatShopSetSharerCommissionRequest.java
...on/handler/impl/WeChatShopSetSharerCommissionRequest.java
+9
-3
WeChatShopSetSharerProductCommissionRequest.java
...ler/impl/WeChatShopSetSharerProductCommissionRequest.java
+9
-3
WeChatShopSharerListRequest.java
...integration/handler/impl/WeChatShopSharerListRequest.java
+9
-3
WeChatShopSharerRegisterBindRequest.java
...ion/handler/impl/WeChatShopSharerRegisterBindRequest.java
+9
-3
UserController.java
...anxuan/wx/store/sharer/web/controller/UserController.java
+10
-5
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
View file @
4d1825c6
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
biz
.
service
.
impl
;
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
biz
.
service
.
impl
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.netease.yanxuan.wx.store.sharer.biz.config.DrmSharerConfig
;
import
com.netease.yanxuan.wx.store.sharer.biz.config.DrmSharerConfig
;
...
@@ -24,15 +32,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatShare
...
@@ -24,15 +32,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatShare
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerListVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerListVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerRegisterBindVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerRegisterBindVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatUserInfoVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatUserInfoVO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
/**
/**
* @Description 用户-业务实现类
* @Description 用户-业务实现类
...
@@ -83,6 +85,12 @@ public class UserServiceImpl implements IUserService {
...
@@ -83,6 +85,12 @@ public class UserServiceImpl implements IUserService {
@Override
@Override
public
SharerInfoVO
refreshUserInfo
()
{
public
SharerInfoVO
refreshUserInfo
()
{
LoginUserInfo
loginUserInfo
=
LoginUserContextHolder
.
get
();
LoginUserInfo
loginUserInfo
=
LoginUserContextHolder
.
get
();
if
(
loginUserInfo
==
null
)
{
log
.
error
(
"[op:refreshUserInfo] refreshUserInfo loginUserInfo = null"
);
return
null
;
}
log
.
info
(
"[op:refreshUserInfo] refresh user commission userOpenId={}, userUnionId={}, shareId={}"
,
loginUserInfo
.
getOpenId
(),
loginUserInfo
.
getUnionId
(),
loginUserInfo
.
getSharerAppId
());
// 获取本地用户信息
// 获取本地用户信息
LambdaQueryWrapper
<
SharerInfo
>
sharerInfoLqw
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
SharerInfo
>
sharerInfoLqw
=
Wrappers
.
lambdaQuery
();
sharerInfoLqw
.
eq
(
SharerInfo:
:
getOpenId
,
loginUserInfo
.
getOpenId
());
sharerInfoLqw
.
eq
(
SharerInfo:
:
getOpenId
,
loginUserInfo
.
getOpenId
());
...
...
yanxuan-wx-store-sharer-biz/src/main/resources/logback-spring.xml
View file @
4d1825c6
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
value=
"%d{yyyy-MM-dd HH:mm:ss.SSS} [%p] [%X{XTraceId}] %m%n"
/>
value=
"%d{yyyy-MM-dd HH:mm:ss.SSS} [%p] [%X{XTraceId}] %m%n"
/>
<!-- 控制台输出 -->
<!-- 控制台输出 -->
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<encoder>
<pattern>
${patternValue}
</pattern>
<pattern>
${patternValue}
</pattern>
...
@@ -30,36 +31,106 @@
...
@@ -30,36 +31,106 @@
</appender>
</appender>
<!--默认日志输出 -->
<!--默认日志输出 -->
<appender
name=
"default"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${log.path}/default.log
</file>
<appender
name=
"stdinfo"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/default.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<fileNamePattern>
${log.path}/stdinfo.log.%d{yyyy-MM-dd}.gz
</fileNamePattern>
<maxHistory>
${log.maxHistory}
</maxHistory>
<maxHistory>
60
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${log.maxSize}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</rollingPolicy>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"asyn-stdinfo"
class=
"ch.qos.logback.classic.AsyncAppender"
>
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
<queueSize>
256
</queueSize>
<discardingThreshold>
0
</discardingThreshold>
<appender-ref
ref=
"stdinfo"
/>
</appender>
<appender
name=
"stdwarn"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder>
<encoder>
<pattern>
${
patternValue
}
</pattern>
<pattern>
${
log.pattern
}
</pattern>
<charset>
UTF-8
</charset>
<charset>
UTF-8
</charset>
</encoder>
</encoder>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/stdwarn.log.%d{yyyy-MM-dd}.gz
</fileNamePattern>
<maxHistory>
30
</maxHistory>
</rollingPolicy>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
</appender>
<
!--默认异步日志输出 --
>
<
appender
name=
"asyn-stdwarn"
class=
"ch.qos.logback.classic.AsyncAppender"
>
<appender
name=
"default_ASYNC"
class=
"ch.qos.logback.classic.AsyncAppender"
>
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 --
>
<
!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 --
>
<
queueSize>
256
</queueSize
>
<discardingThreshold>
0
</discardingThreshold>
<discardingThreshold>
0
</discardingThreshold>
<appender-ref
ref=
"stdwarn"
/>
</appender>
<appender
name=
"stderr"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/stderr.log.%d{yyyy-MM-dd}.gz
</fileNamePattern>
<maxHistory>
60
</maxHistory>
</rollingPolicy>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"asyn-stderr"
class=
"ch.qos.logback.classic.AsyncAppender"
>
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
<queueSize>
512
</queueSize>
<queueSize>
256
</queueSize>
<!-- 提取调用者数据 -->
<discardingThreshold>
0
</discardingThreshold>
<includeCallerData>
true
</includeCallerData>
<appender-ref
ref=
"stderr"
/>
<!-- 添加附加的appender,最多只能添加一个 -->
</appender>
<appender-ref
ref=
"default"
/>
<appender
name=
"drm"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/drm.log.%d{yyyy-MM-dd}.gz
</fileNamePattern>
<maxHistory>
7
</maxHistory>
</rollingPolicy>
</appender>
<logger
name=
"com.ctrip.framework.apollo"
additivity=
"false"
level=
"info"
>
<appender-ref
ref=
"drm"
/>
</logger>
<appender
name=
"dschedule"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${log.path}/dschedule.log.%d{yyyy-MM-dd}.gz
</fileNamePattern>
<maxHistory>
7
</maxHistory>
</rollingPolicy>
</appender>
</appender>
<root
level=
"${log.level}"
>
<root
level=
"${log.level}"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"default_ASYNC"
/>
<appender-ref
ref=
"asyn-stdinfo"
/>
<appender-ref
ref=
"asyn-stdwarn"
/>
<appender-ref
ref=
"asyn-stderr"
/>
</root>
</root>
</configuration>
</configuration>
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatShopSetSharerCommissionRequest.java
View file @
4d1825c6
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
.
impl
;
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
.
impl
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
...
@@ -8,10 +12,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplat
...
@@ -8,10 +12,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplat
import
com.netease.yanxuan.wx.store.sharer.integration.meta.enums.CommissionTypeEnum
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.enums.CommissionTypeEnum
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSetSharerCommissionBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSetSharerCommissionBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatCoreVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatCoreVO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Service
;
/**
/**
* @Description 设置推客的分佣比例信息
* @Description 设置推客的分佣比例信息
...
@@ -48,6 +51,9 @@ public class WeChatShopSetSharerCommissionRequest implements IWeChatRequest {
...
@@ -48,6 +51,9 @@ public class WeChatShopSetSharerCommissionRequest implements IWeChatRequest {
.
commission_type
(
CommissionTypeEnum
.
PLATFORM
.
getCode
())
.
commission_type
(
CommissionTypeEnum
.
PLATFORM
.
getCode
())
.
commission_ratio
(
commissionRatio
)
.
commission_ratio
(
commissionRatio
)
.
build
();
.
build
();
return
weChatRestTemplateHandler
.
execute
(
getRequestUrl
(),
getRequestMethod
(),
params
,
WeChatCoreVO
.
class
);
log
.
info
(
"[op:WeChatShopSetSharerCommissionRequest.handle] requestParam={}"
,
JSONObject
.
toJSONString
(
params
));
WeChatCoreVO
res
=
weChatRestTemplateHandler
.
execute
(
getRequestUrl
(),
getRequestMethod
(),
params
,
WeChatCoreVO
.
class
);
log
.
info
(
"[op:WeChatShopSetSharerCommissionRequest.handle] res={}"
,
JSONObject
.
toJSONString
(
res
));
return
res
;
}
}
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatShopSetSharerProductCommissionRequest.java
View file @
4d1825c6
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
.
impl
;
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
.
impl
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
...
@@ -7,10 +11,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest;
...
@@ -7,10 +11,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSetSharerProductCommissionBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSetSharerProductCommissionBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatCoreVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatCoreVO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Service
;
/**
/**
* @Description 设置推客的单个商品的分佣比例信息
* @Description 设置推客的单个商品的分佣比例信息
...
@@ -47,6 +50,9 @@ public class WeChatShopSetSharerProductCommissionRequest implements IWeChatReque
...
@@ -47,6 +50,9 @@ public class WeChatShopSetSharerProductCommissionRequest implements IWeChatReque
.
product_id
(
productId
)
.
product_id
(
productId
)
.
commission_ratio
(
commissionRatio
)
.
commission_ratio
(
commissionRatio
)
.
build
();
.
build
();
return
weChatRestTemplateHandler
.
execute
(
getRequestUrl
(),
getRequestMethod
(),
params
,
WeChatCoreVO
.
class
);
log
.
info
(
"[op:WeChatShopSetSharerProductCommissionRequest.handle] requestParam={}"
,
JSONObject
.
toJSONString
(
params
));
WeChatCoreVO
res
=
weChatRestTemplateHandler
.
execute
(
getRequestUrl
(),
getRequestMethod
(),
params
,
WeChatCoreVO
.
class
);
log
.
info
(
"[op:WeChatShopSetSharerProductCommissionRequest.handle] res={}"
,
JSONObject
.
toJSONString
(
res
));
return
res
;
}
}
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatShopSharerListRequest.java
View file @
4d1825c6
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
.
impl
;
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
.
impl
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
...
@@ -7,10 +11,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest;
...
@@ -7,10 +11,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSharerListBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSharerListBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerListVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerListVO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Service
;
/**
/**
* @Description 获取机构绑定的推客信息
* @Description 获取机构绑定的推客信息
...
@@ -47,6 +50,9 @@ public class WeChatShopSharerListRequest implements IWeChatRequest {
...
@@ -47,6 +50,9 @@ public class WeChatShopSharerListRequest implements IWeChatRequest {
.
next_key
(
nextKey
)
.
next_key
(
nextKey
)
.
page_size
(
pageSize
)
.
page_size
(
pageSize
)
.
build
();
.
build
();
return
weChatRestTemplateHandler
.
execute
(
getRequestUrl
(),
getRequestMethod
(),
params
,
WeChatSharerListVO
.
class
);
log
.
info
(
"[op:WeChatShopSharerListRequest.handle] requestParam={}"
,
JSONObject
.
toJSONString
(
params
));
WeChatSharerListVO
res
=
weChatRestTemplateHandler
.
execute
(
getRequestUrl
(),
getRequestMethod
(),
params
,
WeChatSharerListVO
.
class
);
log
.
info
(
"[op:WeChatShopSharerListRequest.res] res={}"
,
JSONObject
.
toJSONString
(
res
));
return
res
;
}
}
}
}
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/handler/impl/WeChatShopSharerRegisterBindRequest.java
View file @
4d1825c6
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
.
impl
;
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
integration
.
handler
.
impl
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.config.WeChatConfig
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.constant.WeChatApi
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.integration.core.WeChatContextHolder
;
...
@@ -7,10 +11,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest;
...
@@ -7,10 +11,9 @@ import com.netease.yanxuan.wx.store.sharer.integration.handler.IWeChatRequest;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.handler.WeChatRestTemplateHandler
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSharerRegisterBindBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.bo.WeChatSharerRegisterBindBO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerRegisterBindVO
;
import
com.netease.yanxuan.wx.store.sharer.integration.meta.model.vo.WeChatSharerRegisterBindVO
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpMethod
;
import
org.springframework.stereotype.Service
;
/**
/**
* @Description 微信凭证请求
* @Description 微信凭证请求
...
@@ -46,6 +49,9 @@ public class WeChatShopSharerRegisterBindRequest implements IWeChatRequest {
...
@@ -46,6 +49,9 @@ public class WeChatShopSharerRegisterBindRequest implements IWeChatRequest {
.
is_simple_register
(
true
)
.
is_simple_register
(
true
)
.
sharer_openid
(
sharerOpenid
)
.
sharer_openid
(
sharerOpenid
)
.
build
();
.
build
();
return
weChatRestTemplateHandler
.
execute
(
getRequestUrl
(),
getRequestMethod
(),
params
,
WeChatSharerRegisterBindVO
.
class
);
log
.
info
(
"[op:WeChatShopSharerRegisterBindRequest.handle] requestParam={}"
,
JSONObject
.
toJSONString
(
params
));
WeChatSharerRegisterBindVO
res
=
weChatRestTemplateHandler
.
execute
(
getRequestUrl
(),
getRequestMethod
(),
params
,
WeChatSharerRegisterBindVO
.
class
);
log
.
info
(
"[op:WeChatShopSharerRegisterBindRequest.handle] res={}"
,
JSONObject
.
toJSONString
(
res
));
return
res
;
}
}
}
}
yanxuan-wx-store-sharer-web/src/main/java/com/netease/yanxuan/wx/store/sharer/web/controller/UserController.java
View file @
4d1825c6
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
web
.
controller
;
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
web
.
controller
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.LoginBO
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.LoginBO
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.SharerInfoVO
;
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.UserCommissionRatioVO
;
import
com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.UserTokenVO
;
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.common.core.Result
;
import
com.netease.yanxuan.wx.store.sharer.common.core.Result
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.validation.annotation.Validated
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
/**
* @Description 用户-控制器
* @Description 用户-控制器
...
@@ -21,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -21,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
@RequiredArgsConstructor
@RequiredArgsConstructor
@RestController
@RestController
@RequestMapping
(
"/sharer/user"
)
@RequestMapping
(
"/sharer/user"
)
@Slf4j
public
class
UserController
extends
BaseController
{
public
class
UserController
extends
BaseController
{
private
final
IUserService
iUserService
;
private
final
IUserService
iUserService
;
...
@@ -65,6 +69,7 @@ public class UserController extends BaseController {
...
@@ -65,6 +69,7 @@ public class UserController extends BaseController {
*/
*/
@PostMapping
(
"/bindCommissionRatioDefault"
)
@PostMapping
(
"/bindCommissionRatioDefault"
)
public
Result
<
UserCommissionRatioVO
>
bindCommissionRatioDefault
()
{
public
Result
<
UserCommissionRatioVO
>
bindCommissionRatioDefault
()
{
log
.
info
(
"[op:bindCommissionRatioDefault] bind ratioDefault bind"
);
iUserService
.
bindCommissionRatioDefault
();
iUserService
.
bindCommissionRatioDefault
();
return
Result
.
ok
();
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