Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
scrm
/
rop-merchant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 399219eb
authored
Nov 01, 2022
by
xiongzs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Merge all from rop-merchant2022-10-31
1 parent
b68056cd
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
1459 additions
and
5 deletions
pom.xml
src/main/java/cn/com/glsx/merchants/config/DubboConfig.java
src/main/java/cn/com/glsx/merchants/controller/MerchantMissionController.java
src/main/java/cn/com/glsx/merchants/controller/MerchantStaffScoreController.java
src/main/java/cn/com/glsx/merchants/controller/MerchantStaffWithdrawalController.java
src/main/java/cn/com/glsx/merchants/controller/OpenController.java
src/main/java/cn/com/glsx/merchants/convert/ConvertResponse.java
src/main/java/cn/com/glsx/merchants/request/DefaultRequest.java
src/main/java/cn/com/glsx/merchants/request/accounttype/MerchantListByConditionRopRequest.java
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantTreeRopRequest.java
src/main/java/cn/com/glsx/merchants/request/mission/CreatedMissionRopRequest.java
src/main/java/cn/com/glsx/merchants/request/mission/MissionDetailRopRequest.java
src/main/java/cn/com/glsx/merchants/request/mission/MissionPageRopRequest.java
src/main/java/cn/com/glsx/merchants/request/mission/MissionStaffLinkRequest.java
src/main/java/cn/com/glsx/merchants/request/mission/MissionStaffPageRopRequest.java
src/main/java/cn/com/glsx/merchants/request/mission/UpdateMissionRopRequest.java
src/main/java/cn/com/glsx/merchants/request/mission/UpdateStatusMissionRopRequest.java
src/main/java/cn/com/glsx/merchants/request/score/MerchantStaffScoreSearchRopRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffSaveRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffUpdateRequest.java
src/main/java/cn/com/glsx/merchants/request/withdrawal/MerchantStaffWithdrawalSearchRopRequest.java
src/main/java/cn/com/glsx/merchants/request/withdrawal/MerchantStaffWithdrawalUpdateRopRequest.java
src/main/java/cn/com/glsx/merchants/response/MerchantListByConditionRopResponse.java
src/main/java/cn/com/glsx/merchants/response/StaffResponse.java
src/main/java/cn/com/glsx/merchants/response/score/MerchantStaffScoreListRopResponse.java
src/main/java/cn/com/glsx/merchants/response/withdrawal/MerchantStaffWithdrawalListRopResponse.java
src/main/java/cn/com/glsx/merchants/service/MerchantMissionService.java
src/main/java/cn/com/glsx/merchants/service/MerchantStaffScoreService.java
src/main/java/cn/com/glsx/merchants/service/MerchantStaffWithdrawalService.java
src/main/java/cn/com/glsx/merchants/service/OpenService.java
src/main/java/cn/com/glsx/merchants/util/ScorePagination.java
src/main/java/cn/com/glsx/merchants/util/WithdrawalPagination.java
src/test/java/cn/com/glsx/merchants/controller/StaffControllerTest.java
pom.xml
View file @
399219e
...
...
@@ -76,6 +76,11 @@
<version>
3.15
</version>
</dependency>
<!--门店助手-->
<dependency>
<groupId>
cn.com.glsx.stoassistant
</groupId>
<artifactId>
rpc-scrm-stoassistant-api
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/config/DubboConfig.java
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
config
;
import
cn.com.glsx.merchants.remote.*
;
import
cn.com.glsx.stoassistant.remote.MerchantStaffScoreRemote
;
import
cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote
;
import
cn.com.glsx.stoassistant.remote.PlatformMerchantMissionRemote
;
import
cn.com.glsx.stoassistant.remote.PlatformMerchantStaffMissionRemote
;
import
com.glsx.biz.common.base.service.CarbrandService
;
import
org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -81,4 +85,24 @@ public class DubboConfig {
return
factory
.
builder
(
CarbrandService
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"2.2.0"
).
build
();
}
@Bean
public
MerchantStaffScoreRemote
getMerchantStaffScoreRemote
(){
return
factory
.
builder
(
MerchantStaffScoreRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"1.0.0"
).
build
();
}
@Bean
public
MerchantStaffWithdrawalRemote
getMerchantStaffWithdrawalRemote
(){
return
factory
.
builder
(
MerchantStaffWithdrawalRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"1.0.0"
).
build
();
}
@Bean
public
PlatformMerchantMissionRemote
getPlatformMerchantMissionRemote
(){
return
factory
.
builder
(
PlatformMerchantMissionRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"1.0.0"
).
build
();
}
@Bean
public
PlatformMerchantStaffMissionRemote
getPlatformMerchantStaffMissionRemote
(){
return
factory
.
builder
(
PlatformMerchantStaffMissionRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"1.0.0"
).
build
();
}
}
src/main/java/cn/com/glsx/merchants/controller/MerchantMissionController.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
controller
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.request.mission.*
;
import
cn.com.glsx.merchants.service.MerchantMissionService
;
import
cn.com.glsx.merchants.util.Pagination
;
import
cn.com.glsx.stoassistant.model.response.mission.PlatformMerchantMissionInfoResponse
;
import
cn.com.glsx.stoassistant.model.response.mission.PlatformMerchantStaffMissionDetailResponse
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.ServiceMethod
;
import
com.rop.annotation.ServiceMethodBean
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.core.env.Environment
;
/**
* @ClassName MerchantStaffScoreController
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Slf4j
@Api
(
"任务管理接口"
)
@ServiceMethodBean
(
version
=
"1.0.0"
,
needInSession
=
NeedInSessionType
.
NO
)
public
class
MerchantMissionController
{
@Autowired
private
MerchantMissionService
merchantMissionService
;
@Autowired
private
Environment
environment
;
/**
* 任务创建
*
* @param createdMissionRopRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.mission.createMission"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"任务创建"
)
public
RopResponse
<
Boolean
>
createMission
(
CreatedMissionRopRequest
createdMissionRopRequest
)
{
try
{
return
RopResponse
.
success
(
merchantMissionService
.
createMission
(
createdMissionRopRequest
));
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMissionController__invoke__createMission__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 任务更新
*
* @param updateMissionRopRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.mission.updateMission"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"任务更新"
)
public
RopResponse
<
Boolean
>
updateMission
(
UpdateMissionRopRequest
updateMissionRopRequest
)
{
try
{
return
RopResponse
.
success
(
merchantMissionService
.
updateMission
(
updateMissionRopRequest
));
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMissionController__invoke__updateMission__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 任务状态更新
*
* @param updateStatusMissionRopRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.mission.updateStatusMission"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"任务状态更新"
)
public
RopResponse
<
Boolean
>
updateMission
(
UpdateStatusMissionRopRequest
updateStatusMissionRopRequest
)
{
try
{
return
RopResponse
.
success
(
merchantMissionService
.
updateStatusMission
(
updateStatusMissionRopRequest
));
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMissionController__invoke__updateMission__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 任务详情
*
* @param missionDetailRopRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.mission.findMissionDeail"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"任务详情"
)
public
RopResponse
<
PlatformMerchantMissionInfoResponse
>
findMissionDeail
(
MissionDetailRopRequest
missionDetailRopRequest
)
{
try
{
return
RopResponse
.
success
(
merchantMissionService
.
findMissionDeail
(
missionDetailRopRequest
));
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMissionController__invoke__findMissionDeail__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 任务列表查询
*
* @param missionDetailRopRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.mission.findMissionList"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"任务列表查询"
)
public
RopResponse
<
Pagination
<
PlatformMerchantMissionInfoResponse
>>
findMissionList
(
MissionPageRopRequest
missionDetailRopRequest
)
{
try
{
Pagination
<
PlatformMerchantMissionInfoResponse
>
productResponsePagination
=
merchantMissionService
.
findMissionList
(
missionDetailRopRequest
);
return
RopResponse
.
success
(
productResponsePagination
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMissionController__invoke__findMissionList__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 员工任务列表查询
*
* @param missionStaffPageRopRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.mission.findStaffMissionPageList"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"员工任务列表查询"
)
public
RopResponse
<
Pagination
<
PlatformMerchantStaffMissionDetailResponse
>>
findStaffMissionPageList
(
MissionStaffPageRopRequest
missionStaffPageRopRequest
)
{
try
{
Pagination
<
PlatformMerchantStaffMissionDetailResponse
>
productResponsePagination
=
merchantMissionService
.
findStaffMissionPageList
(
missionStaffPageRopRequest
);
return
RopResponse
.
success
(
productResponsePagination
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMissionController__invoke__findStaffMissionPageList__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 复制员工任务链接
*
* @param missionStaffLinkRequest 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.mission.getStaffMissionLink"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"复制员工任务链接"
)
public
RopResponse
<
String
>
getStaffMissionLink
(
MissionStaffLinkRequest
missionStaffLinkRequest
)
{
try
{
String
staffMissionLink
=
merchantMissionService
.
getStaffMissionLink
(
missionStaffLinkRequest
);
String
context
=
environment
.
getProperty
(
"merchants.api.mission.context"
);
if
(!
StringUtils
.
isEmpty
(
context
)){
staffMissionLink
=
context
+
" "
+
staffMissionLink
;
}
return
RopResponse
.
success
(
staffMissionLink
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantMissionController__invoke__getStaffMissionLink__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/merchants/controller/MerchantStaffScoreController.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
controller
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.request.score.MerchantStaffScoreSearchRopRequest
;
import
cn.com.glsx.merchants.response.score.MerchantStaffScoreListRopResponse
;
import
cn.com.glsx.merchants.service.MerchantStaffScoreService
;
import
cn.com.glsx.merchants.util.ScorePagination
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.ServiceMethod
;
import
com.rop.annotation.ServiceMethodBean
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* @ClassName MerchantStaffScoreController
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Slf4j
@Api
(
"积分管理接口"
)
@ServiceMethodBean
(
version
=
"1.0.0"
,
needInSession
=
NeedInSessionType
.
NO
)
public
class
MerchantStaffScoreController
{
@Autowired
private
MerchantStaffScoreService
merchantStaffScoreService
;
/**
* 收益列表接口
*
* @param request 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.staff.score.page"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"收益列表"
)
public
RopResponse
<
ScorePagination
<
MerchantStaffScoreListRopResponse
>>
getScoreList
(
MerchantStaffScoreSearchRopRequest
request
)
{
try
{
ScorePagination
<
MerchantStaffScoreListRopResponse
>
scorePage
=
merchantStaffScoreService
.
getScorePage
(
request
);
return
RopResponse
.
success
(
scorePage
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantStaffScoreController__invoke__getScoreList__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 收益列表导出接口
*
* @param request 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.staff.score.exportList"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"收益列表导出接口"
)
public
RopResponse
<
String
>
exportList
(
MerchantStaffScoreSearchRopRequest
request
)
{
try
{
String
url
=
merchantStaffScoreService
.
exportList
(
request
);
return
RopResponse
.
success
(
url
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantStaffScoreController__invoke__exportList__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/merchants/controller/MerchantStaffWithdrawalController.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
controller
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalSearchRopRequest
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRopRequest
;
import
cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse
;
import
cn.com.glsx.merchants.service.MerchantStaffWithdrawalService
;
import
cn.com.glsx.merchants.util.WithdrawalPagination
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.ServiceMethod
;
import
com.rop.annotation.ServiceMethodBean
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* @ClassName MerchantStaffWithdrawalController
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Slf4j
@Api
(
"提现管理接口"
)
@ServiceMethodBean
(
version
=
"1.0.0"
,
needInSession
=
NeedInSessionType
.
NO
)
public
class
MerchantStaffWithdrawalController
{
@Autowired
private
MerchantStaffWithdrawalService
merchantStaffWithdrawalService
;
/**
* 提现列表
*/
/**
* 提现列表
*
* @param request 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.staff.withdrawal.page"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"提现列表"
)
public
RopResponse
<
WithdrawalPagination
<
MerchantStaffWithdrawalListRopResponse
>>
getWithdrawalPage
(
MerchantStaffWithdrawalSearchRopRequest
request
)
{
try
{
WithdrawalPagination
<
MerchantStaffWithdrawalListRopResponse
>
withdrawalPage
=
merchantStaffWithdrawalService
.
getWithdrawalPage
(
request
);
return
RopResponse
.
success
(
withdrawalPage
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantStaffWithdrawalController__invoke__getWithdrawalPage__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 提现列表导出
*
* @param request 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.staff.withdrawal.exportList"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"提现列表导出"
)
public
RopResponse
<
String
>
exportList
(
MerchantStaffWithdrawalSearchRopRequest
request
)
{
try
{
String
url
=
merchantStaffWithdrawalService
.
exportList
(
request
);
return
RopResponse
.
success
(
url
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantStaffWithdrawalController__invoke__exportList__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
/**
* 批量提现审核
*/
/**
* 批量提现审核
*
* @param request 入参
* @return
*/
@ServiceMethod
(
method
=
"merchants.api.staff.withdrawal.batchWithdrawal"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"批量提现审核"
)
public
RopResponse
<
Boolean
>
batchWithdrawal
(
MerchantStaffWithdrawalUpdateRopRequest
request
)
{
try
{
merchantStaffWithdrawalService
.
batchWithdrawal
(
request
);
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantStaffWithdrawalController__invoke__batchWithdrawal__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/merchants/controller/OpenController.java
View file @
399219e
...
...
@@ -4,6 +4,7 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.model.response.MerchantSubListResponse
;
import
cn.com.glsx.merchants.request.accounttype.MerchantListByConditionRopRequest
;
import
cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest
;
import
cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest
;
import
cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest
;
...
...
@@ -467,4 +468,16 @@ public class OpenController {
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
@ServiceMethod
(
method
=
"merchants.api.open.findMerchantNoListByMerAccTypeId"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"根据商户层级查询商户号集合"
)
public
RopResponse
<
List
<
MerchantListByConditionRopResponse
>>
findMerchantNoListByMerAccTypeId
(
MerchantListByConditionRopRequest
request
){
try
{
List
<
MerchantListByConditionRopResponse
>
responses
=
openService
.
findMerchantNoListByMerAccTypeId
(
request
);
return
RopResponse
.
success
(
responses
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======OpenController__invoke__findMerchantNoListByMerAccTypeId__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/convert/ConvertResponse.java
View file @
399219e
...
...
@@ -61,15 +61,16 @@ public class ConvertResponse {
* 转化类型
*
* @param object 原类
* @param clazz 新类
* @param clazz
新类
* @return
*/
public
static
<
T
>
T
convertObject
(
Object
object
,
Class
<
T
>
clazz
)
{
if
(
object
==
null
)
{
if
(
object
==
null
)
{
return
null
;
}
T
target
=
BeanUtils
.
instantiateClass
(
clazz
);
BeanUtils
.
copyProperties
(
object
,
target
);
return
target
;
}
}
src/main/java/cn/com/glsx/merchants/request/DefaultRequest.java
View file @
399219e
...
...
@@ -48,4 +48,5 @@ public class DefaultRequest extends AbstractRopRequest {
* 商户号
*/
private
Integer
merchantNo
;
}
src/main/java/cn/com/glsx/merchants/request/accounttype/MerchantListByConditionRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
accounttype
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @Author Hayreal
* @Description TODO
* @date 2022/10/20 19:09
* @Version 1.0
*/
@Data
public
class
MerchantListByConditionRopRequest
extends
DefaultRequest
{
@ApiModelProperty
(
value
=
"商户层级:1工厂 2省代 3市代 4门店"
,
required
=
true
)
private
Integer
merchantAccountType
;
@ApiModelProperty
(
"商户名"
)
private
String
merchantName
;
}
src/main/java/cn/com/glsx/merchants/request/merchant/MerchantTreeRopRequest.java
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
merchant
;
import
cn.com.glsx.merchants.model.request.AccountTypeTreeRequest
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @author zhouhaibao
...
...
src/main/java/cn/com/glsx/merchants/request/mission/CreatedMissionRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
mission
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionDateRequest
;
import
cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
public
class
CreatedMissionRopRequest
extends
DefaultRequest
implements
Serializable
{
/**
* 业务场景
*/
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
)
private
Integer
businessScene
;
/**
* 商户号
*/
@ApiModelProperty
(
notes
=
"商户号"
,
required
=
true
)
private
Integer
merchantId
;
/**
* 活动id
*/
@ApiModelProperty
(
notes
=
"活动id"
,
required
=
true
)
private
Integer
activityId
;
/**
* 指定人群
*/
@ApiModelProperty
(
notes
=
"指定人群"
,
required
=
true
)
private
String
crowd
;
/**
* 发放渠道
*/
@ApiModelProperty
(
notes
=
"发放渠道"
,
required
=
true
)
private
Integer
channel
;
/**
* 备注
*/
@ApiModelProperty
(
notes
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
notes
=
"开始时间"
)
private
String
startTime
;
@ApiModelProperty
(
notes
=
"结束时间"
)
private
String
endTime
;
/**
* 商户名
*/
@ApiModelProperty
(
notes
=
"商户名"
)
private
String
merchantName
;
/**
* 活动名称
*/
@ApiModelProperty
(
notes
=
"活动名称"
)
private
String
activityName
;
/**
* 活动image地址
*/
@ApiModelProperty
(
notes
=
"活动image地址"
)
private
String
activityImage
;
/**
* 子任务列表
*/
private
List
<
PlatformMerchantMissionDateRequest
>
missionDateList
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/mission/MissionDetailRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
mission
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
MissionDetailRopRequest
extends
DefaultRequest
implements
Serializable
{
@ApiModelProperty
(
notes
=
"任务id"
,
required
=
true
)
private
Integer
id
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/mission/MissionPageRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
mission
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
@Data
public
class
MissionPageRopRequest
extends
DefaultRequest
implements
Serializable
{
@NotNull
@ApiModelProperty
(
notes
=
"分页数"
,
required
=
true
)
private
Integer
pageSize
;
@NotNull
@ApiModelProperty
(
notes
=
"当前页"
,
required
=
true
)
private
Integer
pageNum
;
/**
* 商户名
*/
@ApiModelProperty
(
notes
=
"商户名"
)
private
String
merchantName
;
/**
* 业务场景
*/
@ApiModelProperty
(
notes
=
"业务场景"
)
private
Integer
businessScene
;
/**
* 活动名称
*/
@ApiModelProperty
(
notes
=
"活动名称"
)
private
String
activityName
;
/**
* 活动状态
*/
@ApiModelProperty
(
notes
=
"活动状态"
)
private
Integer
activityStatus
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/mission/MissionStaffLinkRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
mission
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
@Data
public
class
MissionStaffLinkRequest
extends
DefaultRequest
implements
Serializable
{
/**
* 任务id
*/
@ApiModelProperty
(
notes
=
"任务id"
,
required
=
true
)
@NotNull
private
Integer
missionId
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/mission/MissionStaffPageRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
mission
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
@Data
public
class
MissionStaffPageRopRequest
extends
DefaultRequest
implements
Serializable
{
@NotNull
@ApiModelProperty
(
notes
=
"分页数"
,
required
=
true
)
private
Integer
pageSize
;
@NotNull
@ApiModelProperty
(
notes
=
"当前页"
,
required
=
true
)
private
Integer
pageNum
;
/**
* 任务id
*/
@ApiModelProperty
(
notes
=
"任务id"
,
required
=
true
)
@NotNull
private
Integer
missionId
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/mission/UpdateMissionRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
mission
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionDateRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
public
class
UpdateMissionRopRequest
extends
DefaultRequest
implements
Serializable
{
private
Integer
id
;
/**
* 业务场景
*/
@ApiModelProperty
(
notes
=
"业务场景"
,
required
=
true
)
private
Integer
businessScene
;
/**
* 商户号
*/
@ApiModelProperty
(
notes
=
"商户号"
,
required
=
true
)
private
Integer
merchantId
;
/**
* 活动id
*/
@ApiModelProperty
(
notes
=
"活动id"
,
required
=
true
)
private
Integer
activityId
;
/**
* 指定人群
*/
@ApiModelProperty
(
notes
=
"指定人群"
,
required
=
true
)
private
String
crowd
;
/**
* 发放渠道
*/
@ApiModelProperty
(
notes
=
"发放渠道"
,
required
=
true
)
private
Integer
channel
;
/**
* 备注
*/
@ApiModelProperty
(
notes
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
notes
=
"开始时间"
)
private
String
startTime
;
@ApiModelProperty
(
notes
=
"结束时间"
)
private
String
endTime
;
/**
* 商户名
*/
@ApiModelProperty
(
notes
=
"商户名"
)
private
String
merchantName
;
/**
* 活动名称
*/
@ApiModelProperty
(
notes
=
"活动名称"
)
private
String
activityName
;
/**
* 活动image地址
*/
@ApiModelProperty
(
notes
=
"活动image地址"
)
private
String
activityImage
;
/**
* 子任务列表
*/
private
List
<
PlatformMerchantMissionDateRequest
>
missionDateList
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/mission/UpdateStatusMissionRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
mission
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
UpdateStatusMissionRopRequest
extends
DefaultRequest
implements
Serializable
{
@ApiModelProperty
(
notes
=
"任务id"
,
required
=
true
)
private
Integer
id
;
@ApiModelProperty
(
notes
=
"任务状态 1.发布 2.结束 3.删除"
,
required
=
true
)
private
Integer
activityStatus
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/request/score/MerchantStaffScoreSearchRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
score
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
/**
* @ClassName MerchantStaffScoreSearchRopRequest
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Data
public
class
MerchantStaffScoreSearchRopRequest
extends
DefaultRequest
{
/**
* 员工名称
*/
@ApiModelProperty
(
"员工名称"
)
private
String
staffName
;
/**
* 员工手机号
*/
@ApiModelProperty
(
"员工手机号"
)
private
String
staffPhone
;
/**
* 部门名称
*/
@ApiModelProperty
(
"部门名称"
)
private
String
department
;
/**
* 业务场景
*/
@ApiModelProperty
(
"业务场景"
)
private
Integer
businessScene
;
/**
* 所属门店名
*/
@ApiModelProperty
(
"所属门店名"
)
private
String
merchantName
;
/**
* 所属活动名
*/
@ApiModelProperty
(
"所属活动名"
)
private
String
activityName
;
/**
* 所属渠道
*/
@ApiModelProperty
(
"所属渠道 1 广联 2 服务商 3 门店"
)
private
Integer
channel
;
/**
* 所属任务名
*/
@ApiModelProperty
(
"所属任务名"
)
private
String
missionName
;
/**
* 奖励开始时间
*/
@ApiModelProperty
(
"奖励开始时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
rewardBeginTime
;
/**
* 奖励结束时间
*/
@ApiModelProperty
(
"奖励结束时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
rewardEndTime
;
@NotNull
@ApiModelProperty
(
notes
=
"分页数"
,
name
=
"pageSize"
,
required
=
true
)
private
Integer
pageSize
;
@NotNull
@ApiModelProperty
(
notes
=
"当前页"
,
name
=
"pageNum"
,
required
=
true
)
private
Integer
pageNum
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffSaveRequest.java
View file @
399219e
...
...
@@ -67,6 +67,12 @@ public class StaffSaveRequest extends DefaultRequest {
private
String
merchantFileRequest
;
@ApiModelProperty
(
notes
=
"员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」"
)
private
String
staffLabel
;
@ApiModelProperty
(
notes
=
"1-销售部、2-售后部、3-客服部、4-续保部"
)
private
Integer
department
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffUpdateRequest.java
View file @
399219e
...
...
@@ -72,4 +72,9 @@ public class StaffUpdateRequest extends DefaultRequest {
private
String
merchantFileRequest
;
@ApiModelProperty
(
notes
=
"员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」"
)
private
String
staffLabel
;
@ApiModelProperty
(
notes
=
"1-销售部、2-售后部、3-客服部、4-续保部"
)
private
Integer
department
;
}
src/main/java/cn/com/glsx/merchants/request/withdrawal/MerchantStaffWithdrawalSearchRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
withdrawal
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
/**
* @ClassName MerchantStaffWithdrawalRopRequest
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Data
public
class
MerchantStaffWithdrawalSearchRopRequest
extends
DefaultRequest
{
/**
* 员工名称
*/
@ApiModelProperty
(
"员工名称"
)
private
String
staffName
;
/**
* 员工手机号
*/
@ApiModelProperty
(
"员工手机号"
)
private
String
staffPhone
;
@ApiModelProperty
(
"状态值 1 待审核 2 到账中 3 已到账 4 提现失败 "
)
private
Integer
status
;
/**
* 审核开始时间
*/
@ApiModelProperty
(
"奖励开始时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
reviewBeginTime
;
/**
* 审核结束时间
*/
@ApiModelProperty
(
"奖励结束时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
reviewEndTime
;
/**
* 提现开始时间
*/
@ApiModelProperty
(
"奖励开始时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
withdrawalBeginTime
;
/**
* 提现结束时间
*/
@ApiModelProperty
(
"奖励结束时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
withdrawalEndTime
;
@NotNull
@ApiModelProperty
(
notes
=
"分页数"
,
name
=
"pageSize"
,
required
=
true
)
private
Integer
pageSize
;
@NotNull
@ApiModelProperty
(
notes
=
"当前页"
,
name
=
"pageNum"
,
required
=
true
)
private
Integer
pageNum
;
}
src/main/java/cn/com/glsx/merchants/request/withdrawal/MerchantStaffWithdrawalUpdateRopRequest.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
request
.
withdrawal
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
lombok.Data
;
import
java.util.List
;
/**
* @ClassName MerchantStaffWithdrawalUpdateRopRequest
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Data
public
class
MerchantStaffWithdrawalUpdateRopRequest
extends
DefaultRequest
{
private
List
<
Integer
>
idList
;
}
src/main/java/cn/com/glsx/merchants/response/MerchantListByConditionRopResponse.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
response
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author Hayreal
* @Description TODO
* @date 2022/10/20 18:54
* @Version 1.0
*/
@Data
public
class
MerchantListByConditionRopResponse
implements
Serializable
{
@ApiModelProperty
(
"商户号"
)
private
Integer
merchantId
;
@ApiModelProperty
(
"商户名"
)
private
String
merchantName
;
}
src/main/java/cn/com/glsx/merchants/response/StaffResponse.java
View file @
399219e
...
...
@@ -161,4 +161,30 @@ public class StaffResponse implements Serializable {
*/
@ApiModelProperty
(
notes
=
"员工oneid"
,
dataType
=
"String"
)
private
String
uuid
;
/**
* 微信
*/
//微信小程序openId
@ApiModelProperty
(
notes
=
"微信小程序openId"
,
dataType
=
"String"
)
private
String
weChatOpenId
;
//微信unionId
@ApiModelProperty
(
notes
=
"微信unionId"
,
dataType
=
"String"
)
private
String
weChatUnionId
;
//微信昵称
@ApiModelProperty
(
notes
=
"微信昵称"
,
dataType
=
"String"
)
private
String
weChatNickName
;
//微信头像
@ApiModelProperty
(
notes
=
"微信头像"
,
dataType
=
"String"
)
private
String
weChatAvatarUrl
;
//小程序appid
@ApiModelProperty
(
notes
=
"小程序appid"
,
dataType
=
"String"
)
private
String
weChatAppId
;
//微信手机号
@ApiModelProperty
(
notes
=
"微信手机号"
,
dataType
=
"String"
)
private
String
weChatPhone
;
@ApiModelProperty
(
notes
=
"员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」"
,
dataType
=
"String"
)
private
String
staffLabel
;
@ApiModelProperty
(
notes
=
"1-销售部、2-售后部、3-客服部、4-续保部"
,
dataType
=
"String"
)
private
Integer
department
;
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/response/score/MerchantStaffScoreListRopResponse.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
response
.
score
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @ClassName MerchantStaffScoreListRpcResponse
* @Description
* @Author lichongyuan
* @Date 2022/10/12
*/
@Data
public
class
MerchantStaffScoreListRopResponse
implements
Serializable
{
@ApiModelProperty
(
example
=
"id"
)
private
Integer
id
;
/**
* 员工名称
*/
@ApiModelProperty
(
example
=
"员工名称"
)
private
String
staffName
;
/**
* 员工手机号
*/
@ApiModelProperty
(
example
=
"员工手机号"
)
private
String
staffPhone
;
@ApiModelProperty
(
example
=
"奖励积分值"
)
private
BigDecimal
rewardScore
;
/**
* 业务场景
*/
@ApiModelProperty
(
example
=
"业务场景"
)
private
Integer
businessScene
;
/**
* 所属门店名
*/
@ApiModelProperty
(
example
=
"所属门店名"
)
private
String
merchantName
;
/**
* 所属活动名
*/
@ApiModelProperty
(
example
=
"所属活动名"
)
private
String
activityName
;
/**
* 所属渠道
*/
@ApiModelProperty
(
example
=
"所属渠道"
)
private
Integer
channel
;
/**
* 所属任务名
*/
@ApiModelProperty
(
example
=
"所属任务名"
)
private
String
missionName
;
/**
* 奖励开始时间
*/
@ApiModelProperty
(
example
=
"奖励开始时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
rewardTime
;
/**
* 积分类型 0收益 -1 提现
*/
@ApiModelProperty
(
example
=
"积分类型 0收益 -1 提现"
)
private
Integer
type
;
/**
* 明细名称
*/
@ApiModelProperty
(
example
=
"明细名称"
)
private
String
infoName
;
}
src/main/java/cn/com/glsx/merchants/response/withdrawal/MerchantStaffWithdrawalListRopResponse.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
response
.
withdrawal
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @ClassName MerchantStaffWithdrawalListRpcResponse
* @Description
* @Author lichongyuan
* @Date 2022/10/11
*/
@ApiModel
(
description
=
""
)
@Data
public
class
MerchantStaffWithdrawalListRopResponse
implements
Serializable
{
/**
* id
*/
@ApiModelProperty
(
example
=
"id"
)
private
Integer
id
;
/**
* 员工id
*/
@ApiModelProperty
(
example
=
"员工id"
)
private
Integer
staffId
;
/**
* 员工id
*/
@ApiModelProperty
(
example
=
"员工名称"
)
private
String
staffName
;
/**
* 员工id
*/
@ApiModelProperty
(
example
=
"员工电话"
)
private
String
staffPhone
;
/**
* 提现积分
*/
@ApiModelProperty
(
example
=
"提现积分"
)
private
BigDecimal
withdrawalScore
;
/**
* 提现金额
*/
@ApiModelProperty
(
example
=
"提现金额"
)
private
BigDecimal
withdrawalAmount
;
/**
* 状态
*/
@ApiModelProperty
(
example
=
"状态"
)
private
Integer
status
;
/**
* 审核人
*/
@ApiModelProperty
(
example
=
"审核人"
)
private
String
reviewer
;
/**
* 提现时间
*/
@ApiModelProperty
(
example
=
"提现时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
withdrawalTime
;
/**
* 审核时间
*/
@ApiModelProperty
(
example
=
"审核时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
reviewTime
;
/**
* 到账时间
*/
@ApiModelProperty
(
example
=
"到账时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
successTime
;
@ApiModelProperty
(
example
=
"微信头像"
)
private
String
wechatAvatarUrl
;
@ApiModelProperty
(
example
=
"微信手机号"
)
private
String
wechatPhone
;
@ApiModelProperty
(
example
=
"微信名称"
)
private
String
wechatNickName
;
@ApiModelProperty
(
example
=
"微信openid"
)
private
String
wechatOpenId
;
}
src/main/java/cn/com/glsx/merchants/service/MerchantMissionService.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
service
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.request.mission.*
;
import
cn.com.glsx.merchants.util.Pagination
;
import
cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionInfoRequest
;
import
cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionListRequest
;
import
cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantStaffMissionRequest
;
import
cn.com.glsx.stoassistant.model.response.mission.PlatformMerchantMissionInfoResponse
;
import
cn.com.glsx.stoassistant.model.response.mission.PlatformMerchantStaffMissionDetailResponse
;
import
cn.com.glsx.stoassistant.remote.PlatformMerchantMissionRemote
;
import
cn.com.glsx.stoassistant.remote.PlatformMerchantStaffMissionRemote
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
public
class
MerchantMissionService
{
@Autowired
private
PlatformMerchantMissionRemote
platformMerchantMissionRemote
;
@Autowired
private
PlatformMerchantStaffMissionRemote
platformMerchantStaffMissionRemote
;
public
Boolean
createMission
(
CreatedMissionRopRequest
createdMissionRopRequest
)
{
PlatformMerchantMissionInfoRequest
param
=
ConvertRequest
.
convertRequest
(
createdMissionRopRequest
,
new
PlatformMerchantMissionInfoRequest
());
RpcResponse
<
Boolean
>
rpcResponse
=
platformMerchantMissionRemote
.
createMission
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
return
rpcResponse
.
getResult
();
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
public
Boolean
updateMission
(
UpdateMissionRopRequest
updateMissionRopRequest
)
{
PlatformMerchantMissionInfoRequest
param
=
ConvertRequest
.
convertRequest
(
updateMissionRopRequest
,
new
PlatformMerchantMissionInfoRequest
());
RpcResponse
<
Boolean
>
rpcResponse
=
platformMerchantMissionRemote
.
updateMission
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
return
rpcResponse
.
getResult
();
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
public
Boolean
updateStatusMission
(
UpdateStatusMissionRopRequest
updateStatusMissionRopRequest
)
{
PlatformMerchantMissionInfoRequest
param
=
ConvertRequest
.
convertRequest
(
updateStatusMissionRopRequest
,
new
PlatformMerchantMissionInfoRequest
());
RpcResponse
<
Boolean
>
rpcResponse
=
platformMerchantMissionRemote
.
updateStatusMission
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
return
rpcResponse
.
getResult
();
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
public
PlatformMerchantMissionInfoResponse
findMissionDeail
(
MissionDetailRopRequest
missionDetailRopRequest
)
{
PlatformMerchantMissionInfoRequest
param
=
ConvertRequest
.
convertRequest
(
missionDetailRopRequest
,
new
PlatformMerchantMissionInfoRequest
());
RpcResponse
<
PlatformMerchantMissionInfoResponse
>
rpcResponse
=
platformMerchantMissionRemote
.
findMissionDeail
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
return
rpcResponse
.
getResult
();
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
public
Pagination
<
PlatformMerchantMissionInfoResponse
>
findMissionList
(
MissionPageRopRequest
missionDetailRopRequest
)
{
RpcPagination
<
PlatformMerchantMissionListRequest
>
param
=
ConvertRequest
.
convertPage
(
missionDetailRopRequest
,
new
PlatformMerchantMissionListRequest
());
RpcResponse
<
RpcPagination
<
PlatformMerchantMissionInfoResponse
>>
rpcResponse
=
platformMerchantMissionRemote
.
findMissionList
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
return
ConvertResponse
.
convertPage
(
rpcResponse
.
getResult
(),
PlatformMerchantMissionInfoResponse
.
class
);
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
public
Pagination
<
PlatformMerchantStaffMissionDetailResponse
>
findStaffMissionPageList
(
MissionStaffPageRopRequest
missionDetailRopRequest
)
{
RpcPagination
<
PlatformMerchantStaffMissionRequest
>
param
=
ConvertRequest
.
convertPage
(
missionDetailRopRequest
,
new
PlatformMerchantStaffMissionRequest
());
RpcResponse
<
RpcPagination
<
PlatformMerchantStaffMissionDetailResponse
>>
rpcResponse
=
platformMerchantStaffMissionRemote
.
findStaffMissionPageList
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
return
ConvertResponse
.
convertPage
(
rpcResponse
.
getResult
(),
PlatformMerchantStaffMissionDetailResponse
.
class
);
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
public
String
getStaffMissionLink
(
MissionStaffLinkRequest
missionStaffLinkRequest
)
{
PlatformMerchantStaffMissionRequest
param
=
ConvertRequest
.
convertRequest
(
missionStaffLinkRequest
,
new
PlatformMerchantStaffMissionRequest
());
RpcResponse
<
String
>
rpcResponse
=
platformMerchantStaffMissionRemote
.
getStaffMissionLink
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
return
rpcResponse
.
getResult
();
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
}
src/main/java/cn/com/glsx/merchants/service/MerchantStaffScoreService.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
service
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.request.score.MerchantStaffScoreSearchRopRequest
;
import
cn.com.glsx.merchants.response.score.MerchantStaffScoreListRopResponse
;
import
cn.com.glsx.merchants.util.ScorePagination
;
import
cn.com.glsx.stoassistant.model.request.score.MerchantStaffScoreSearchRpcRequest
;
import
cn.com.glsx.stoassistant.model.response.score.MerchantStaffScoreListRpcResponse
;
import
cn.com.glsx.stoassistant.model.response.score.MerchantStaffScorePageRpcResponse
;
import
cn.com.glsx.stoassistant.remote.MerchantStaffScoreRemote
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @ClassName MerchantStaffScoreService
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Service
public
class
MerchantStaffScoreService
{
@Autowired
private
MerchantStaffScoreRemote
merchantStaffScoreRemote
;
/**
* 获取积分收益列表
* @param request
* @return
*/
public
ScorePagination
<
MerchantStaffScoreListRopResponse
>
getScorePage
(
MerchantStaffScoreSearchRopRequest
request
)
{
RpcPagination
<
MerchantStaffScoreSearchRpcRequest
>
param
=
ConvertRequest
.
convertPage
(
request
,
new
MerchantStaffScoreSearchRpcRequest
());
param
.
getCondition
().
setMerchantId
(
request
.
getMerchantNo
());
RpcResponse
<
MerchantStaffScorePageRpcResponse
>
rpcResponse
=
merchantStaffScoreRemote
.
getPage
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
ScorePagination
<
MerchantStaffScoreListRopResponse
>
response
=
convertScorePage
(
rpcResponse
.
getResult
(),
MerchantStaffScoreListRopResponse
.
class
);
return
response
;
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
/**
* 积分列表分页转换
*
* @return 新分页参数
*/
private
static
<
E
,
T
>
ScorePagination
<
T
>
convertScorePage
(
MerchantStaffScorePageRpcResponse
response
,
Class
<
T
>
clazz
)
{
RpcPagination
<
MerchantStaffScoreListRpcResponse
>
list
=
response
.
getPagination
();
ScorePagination
pagination
=
new
ScorePagination
();
BeanUtils
.
copyProperties
(
response
,
pagination
);
pagination
.
setPageNum
(
list
.
getPageNum
());
List
<
T
>
newList
=
ConvertResponse
.
convertList
(
list
.
getList
(),
clazz
);
pagination
.
setData
(
newList
);
pagination
.
setCount
((
int
)
list
.
getTotal
());
pagination
.
setPageSize
(
list
.
getPageSize
());
pagination
.
setTotalScore
(
response
.
getTotalScore
().
toString
());
return
pagination
;
}
/**
* 导出收益列表
* @param request
* @return
*/
public
String
exportList
(
MerchantStaffScoreSearchRopRequest
request
)
{
MerchantStaffScoreSearchRpcRequest
param
=
ConvertRequest
.
convertRequest
(
request
,
new
MerchantStaffScoreSearchRpcRequest
());
param
.
setMerchantId
(
request
.
getMerchantNo
());
RpcResponse
<
String
>
rpcResponse
=
merchantStaffScoreRemote
.
exportList
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
return
rpcResponse
.
getResult
();
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
}
src/main/java/cn/com/glsx/merchants/service/MerchantStaffWithdrawalService.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
service
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalSearchRopRequest
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRopRequest
;
import
cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse
;
import
cn.com.glsx.merchants.util.WithdrawalPagination
;
import
cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalInsertRpcRequest
;
import
cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest
;
import
cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalListRpcResponse
;
import
cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalPageRpcResponse
;
import
cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @ClassName MerchantStaffWithdrawalService
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Service
public
class
MerchantStaffWithdrawalService
{
@Autowired
private
MerchantStaffWithdrawalRemote
merchantStaffWithdrawalRemote
;
/**
* 获取提现管理列表
*
* @param request
* @return
*/
public
WithdrawalPagination
<
MerchantStaffWithdrawalListRopResponse
>
getWithdrawalPage
(
MerchantStaffWithdrawalSearchRopRequest
request
)
{
RpcPagination
<
MerchantStaffWithdrawalSearchRpcRequest
>
param
=
ConvertRequest
.
convertPage
(
request
,
new
MerchantStaffWithdrawalSearchRpcRequest
());
param
.
getCondition
().
setMerchantId
(
request
.
getMerchantNo
());
RpcResponse
<
MerchantStaffWithdrawalPageRpcResponse
>
rpcResponse
=
merchantStaffWithdrawalRemote
.
getPage
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
WithdrawalPagination
<
MerchantStaffWithdrawalListRopResponse
>
pagination
=
convertWithdrawalPage
(
rpcResponse
.
getResult
(),
MerchantStaffWithdrawalListRopResponse
.
class
);
return
pagination
;
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
/**
* 提现列表分页转换
*
* @return 新分页参数
*/
private
static
<
E
,
T
>
WithdrawalPagination
<
T
>
convertWithdrawalPage
(
MerchantStaffWithdrawalPageRpcResponse
response
,
Class
<
T
>
clazz
)
{
RpcPagination
<
MerchantStaffWithdrawalListRpcResponse
>
list
=
response
.
getPagination
();
WithdrawalPagination
pagination
=
new
WithdrawalPagination
();
BeanUtils
.
copyProperties
(
response
,
pagination
);
pagination
.
setReceivedAmount
(
response
.
getReceivedAmount
());
pagination
.
setReceivingAmount
(
response
.
getReceivingAmount
());
pagination
.
setReviewingAmount
(
response
.
getReviewingAmount
());
pagination
.
setFailureAmount
(
response
.
getFailureAmount
());
pagination
.
setTotalAmount
(
response
.
getTotalAmount
());
pagination
.
setPageNum
(
list
.
getPageNum
());
List
<
T
>
newList
=
ConvertResponse
.
convertList
(
list
.
getList
(),
clazz
);
pagination
.
setData
(
newList
);
pagination
.
setCount
((
int
)
list
.
getTotal
());
pagination
.
setPageSize
(
list
.
getPageSize
());
return
pagination
;
}
/**
* 批量提现审核
*/
public
void
batchWithdrawal
(
MerchantStaffWithdrawalUpdateRopRequest
request
)
{
MerchantStaffWithdrawalInsertRpcRequest
param
=
ConvertRequest
.
convertRequest
(
request
,
new
MerchantStaffWithdrawalInsertRpcRequest
());
param
.
setMerchantId
(
request
.
getMerchantNo
());
param
.
setIdList
(
request
.
getIdList
());
RpcResponse
<
Boolean
>
rpcResponse
=
merchantStaffWithdrawalRemote
.
batchWithdrawal
(
param
);
if
(
rpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
}
/**
* 导出提现列表
* @param request
* @return
*/
public
String
exportList
(
MerchantStaffWithdrawalSearchRopRequest
request
)
{
MerchantStaffWithdrawalSearchRpcRequest
param
=
ConvertRequest
.
convertRequest
(
request
,
new
MerchantStaffWithdrawalSearchRpcRequest
());
param
.
setMerchantId
(
request
.
getMerchantNo
());
RpcResponse
<
String
>
rpcResponse
=
merchantStaffWithdrawalRemote
.
exportList
(
param
);
if
(
rpcResponse
.
isSuccess
())
{
return
rpcResponse
.
getResult
();
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
}
src/main/java/cn/com/glsx/merchants/service/OpenService.java
View file @
399219e
...
...
@@ -7,10 +7,12 @@ import cn.com.glsx.merchants.contants.Contants;
import
cn.com.glsx.merchants.convert.ConvertRequest
;
import
cn.com.glsx.merchants.convert.ConvertResponse
;
import
cn.com.glsx.merchants.model.request.*
;
import
cn.com.glsx.merchants.model.request.merchant.MerchantListByConditionRpcRequest
;
import
cn.com.glsx.merchants.model.response.*
;
import
cn.com.glsx.merchants.remote.MerchantRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantUserRemote
;
import
cn.com.glsx.merchants.request.accounttype.MerchantListByConditionRopRequest
;
import
cn.com.glsx.merchants.request.file.FileSaveRequest
;
import
cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest
;
import
cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest
;
...
...
@@ -363,4 +365,12 @@ public class OpenService {
return
rpcResponse
.
getResult
();
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
public
List
<
MerchantListByConditionRopResponse
>
findMerchantNoListByMerAccTypeId
(
MerchantListByConditionRopRequest
request
)
{
MerchantListByConditionRpcRequest
remoteRequest
=
ConvertRequest
.
convertRequest
(
request
,
new
MerchantListByConditionRpcRequest
());
RpcResponse
<
List
<
MerchantListByConditionRpcResponse
>>
rpcResponse
=
merchantRemote
.
MerchantListByMerAccountType
(
remoteRequest
);
if
(
rpcResponse
.
isSuccess
())
return
ConvertResponse
.
convertList
(
rpcResponse
.
getResult
(),
MerchantListByConditionRopResponse
.
class
);
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
}
src/main/java/cn/com/glsx/merchants/util/ScorePagination.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
util
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @ClassName ScorePagination
* @Description 积分分页对象
* @Author lichongyuan
* @Date 2022/10/12
*/
@Data
public
class
ScorePagination
<
T
>
extends
Pagination
<
T
>
{
@ApiModelProperty
(
example
=
"累计发放奖励"
)
private
String
totalScore
;
}
src/main/java/cn/com/glsx/merchants/util/WithdrawalPagination.java
0 → 100644
View file @
399219e
package
cn
.
com
.
glsx
.
merchants
.
util
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* @ClassName WithdrawalPagination
* @Description 提现分页对象
* @Author lichongyuan
* @Date 2022/10/12
*/
@Data
public
class
WithdrawalPagination
<
T
>
extends
Pagination
<
T
>
{
@ApiModelProperty
(
example
=
"累计金额"
)
private
String
totalAmount
;
@ApiModelProperty
(
example
=
"待审核"
)
private
String
reviewingAmount
;
@ApiModelProperty
(
example
=
"到账中"
)
private
String
receivingAmount
;
@ApiModelProperty
(
example
=
"已到账"
)
private
String
receivedAmount
;
@ApiModelProperty
(
example
=
"到账失败"
)
private
String
failureAmount
;
}
src/test/java/cn/com/glsx/merchants/controller/StaffControllerTest.java
View file @
399219e
...
...
@@ -3,6 +3,7 @@ package cn.com.glsx.merchants.controller;/**
* @date 2021/7/28
*/
import
cn.com.glsx.merchants.enums.StaffDepartmentEnum
;
import
com.alibaba.fastjson.JSONObject
;
import
org.junit.Test
;
import
org.springframework.util.LinkedMultiValueMap
;
...
...
@@ -17,6 +18,11 @@ import javax.xml.crypto.Data;
* @date 2021/7/28 15:59
*/
public
class
StaffControllerTest
extends
BaseControllerTest
{
@Test
public
void
Test01
()
throws
Exception
{
System
.
out
.
println
(
StaffDepartmentEnum
.
getDepartmentName
(
2
));
}
@Test
public
void
testGetExample
()
throws
Exception
{
MultiValueMap
<
String
,
String
>
params
=
new
LinkedMultiValueMap
<
String
,
String
>(
4
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment