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 ddb7b336
authored
Jun 01, 2023
by
xiongzs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Merge all from rop-merchant-SCRM-V3.11.0-0529
1 parent
f24e5dba
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
79 additions
and
14 deletions
pom.xml
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/controller/StaffController.java
src/main/java/cn/com/glsx/merchants/request/open/StaffListUuidOpenRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffJsonRopRequest.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffListRequest.java
src/main/java/cn/com/glsx/merchants/response/withdrawal/StaffWithdrawalUrlRopResponse.java
src/main/java/cn/com/glsx/merchants/service/MerchantStaffWithdrawalService.java
src/main/java/cn/com/glsx/merchants/service/OpenService.java
pom.xml
View file @
ddb7b33
...
...
@@ -15,7 +15,7 @@
<dependency>
<groupId>
cn.com.glsx.merchants
</groupId>
<artifactId>
platform-merchants-api
</artifactId>
<version>
3.
9
.0-SNAPSHOT
</version>
<version>
3.
11
.0-SNAPSHOT
</version>
</dependency>
<!--引用GSON,用于打印-->
<dependency>
...
...
@@ -80,7 +80,7 @@
<dependency>
<groupId>
cn.com.glsx.stoassistant
</groupId>
<artifactId>
rpc-scrm-stoassistant-api
</artifactId>
<version>
3.
9
.0-SNAPSHOT
</version>
<version>
3.
11
.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/controller/MerchantStaffWithdrawalController.java
View file @
ddb7b33
...
...
@@ -11,6 +11,7 @@ import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRop
import
cn.com.glsx.merchants.request.withdrawal.StaffWithdrawalImportRopRequest
;
import
cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse
;
import
cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopResponse
;
import
cn.com.glsx.merchants.response.withdrawal.StaffWithdrawalUrlRopResponse
;
import
cn.com.glsx.merchants.service.MerchantStaffWithdrawalService
;
import
cn.com.glsx.merchants.util.WithdrawalPagination
;
import
cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest
;
...
...
@@ -122,7 +123,7 @@ public class MerchantStaffWithdrawalController {
@ServiceMethod
(
method
=
"merchants.api.staff.withdrawal.exportBankWithdrawal"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"导出提现结果"
)
public
RopResponse
<
St
ring
>
exportBankWithdrawal
(
MerchantStaffWithdrawalSearchRopRequest
request
){
public
RopResponse
<
St
affWithdrawalUrlRopResponse
>
exportBankWithdrawal
(
MerchantStaffWithdrawalSearchRopRequest
request
){
try
{
return
RopResponse
.
success
(
merchantStaffWithdrawalService
.
exportBankWithdrawal
(
request
));
}
catch
(
RpcServiceException
e
)
{
...
...
src/main/java/cn/com/glsx/merchants/controller/OpenController.java
View file @
ddb7b33
package
cn
.
com
.
glsx
.
merchants
.
controller
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
...
...
@@ -631,4 +632,19 @@ public class OpenController {
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
@ServiceMethod
(
method
=
"merchants.api.open.findStaffListByUuidList"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"根据uuid查询员工列表"
)
public
RopResponse
<
List
<
StaffResponse
>>
findStaffListByUuidList
(
StaffListUuidOpenRequest
request
)
{
try
{
List
<
StaffResponse
>
list
=
openService
.
findStaffListByUuidList
(
request
);
return
RopResponse
.
success
(
list
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"根据uuid查询员工列表异常:{}"
,
e
.
getMessage
(),
e
);
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
info
(
"根据uuid查询员工列表异常:{}"
,
e
);
return
RopResponse
.
error
(
DefaultErrorEnum
.
UNKNOW_ERROR
,
e
.
getMessage
());
}
}
}
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/controller/StaffController.java
View file @
ddb7b33
...
...
@@ -232,7 +232,7 @@ public class StaffController {
@ApiOperation
(
"批量新增员工"
)
public
RopResponse
<
Boolean
>
insertStaffBatchByPhone
(
StaffJsonRopRequest
ropRequest
)
{
try
{
staffService
.
insertStaffBatchByPhone
(
ropRequest
.
get
StaffJson
());
staffService
.
insertStaffBatchByPhone
(
ropRequest
.
get
MerchantNos
());
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======StaffController__invoke__insertStaffBatchByPhone__exception:{}"
,
e
.
getMessage
());
...
...
src/main/java/cn/com/glsx/merchants/request/open/StaffListUuidOpenRequest.java
0 → 100644
View file @
ddb7b33
package
cn
.
com
.
glsx
.
merchants
.
request
.
open
;
import
com.rop.AbstractRopRequest
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.ToString
;
import
java.util.List
;
@ToString
@Data
@ApiModel
(
"根据uuid查询员工列表param"
)
public
class
StaffListUuidOpenRequest
extends
AbstractRopRequest
{
@ApiModelProperty
(
value
=
"员工uuid"
)
private
List
<
String
>
staffUuidList
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffJsonRopRequest.java
View file @
ddb7b33
...
...
@@ -7,6 +7,6 @@ import lombok.Data;
@Data
public
class
StaffJsonRopRequest
extends
DefaultRequest
{
@ApiModelProperty
(
notes
=
"批量
新增员工
"
,
required
=
true
)
private
String
staffJson
;
@ApiModelProperty
(
notes
=
"批量
插入员工入参
"
,
required
=
true
)
private
String
merchantNos
;
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffListRequest.java
View file @
ddb7b33
...
...
@@ -17,7 +17,7 @@ public class StaffListRequest extends DefaultRequest {
/**
* 商户id
*/
@ApiModelProperty
(
notes
=
"商户id"
,
required
=
true
)
@ApiModelProperty
(
notes
=
"商户id"
)
private
Integer
merchantId
;
/**
...
...
@@ -33,6 +33,10 @@ public class StaffListRequest extends DefaultRequest {
@ApiModelProperty
(
notes
=
"员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」"
)
private
String
staffLabel
;
@ApiModelProperty
(
example
=
"角色名字"
)
private
String
roleName
;
@ApiModelProperty
(
example
=
"员工uuid"
)
private
String
staffUuid
;
}
src/main/java/cn/com/glsx/merchants/response/withdrawal/StaffWithdrawalUrlRopResponse.java
0 → 100644
View file @
ddb7b33
package
cn
.
com
.
glsx
.
merchants
.
response
.
withdrawal
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
StaffWithdrawalUrlRopResponse
implements
Serializable
{
@ApiModelProperty
(
notes
=
"全字段导出模板"
)
private
String
fullFileUrl
;
@ApiModelProperty
(
notes
=
"导出文件url:无流水号、状态和失败原因"
)
private
String
fileUrl
;
}
src/main/java/cn/com/glsx/merchants/service/MerchantStaffWithdrawalService.java
View file @
ddb7b33
...
...
@@ -11,6 +11,7 @@ import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRop
import
cn.com.glsx.merchants.request.withdrawal.StaffWithdrawalImportRopRequest
;
import
cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse
;
import
cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopResponse
;
import
cn.com.glsx.merchants.response.withdrawal.StaffWithdrawalUrlRopResponse
;
import
cn.com.glsx.merchants.util.WithdrawalPagination
;
import
cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffFailBatchRpcRequest
;
import
cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalInsertRpcRequest
;
...
...
@@ -19,6 +20,7 @@ import cn.com.glsx.stoassistant.model.request.withdrawal.StaffWithdrawalImportRp
import
cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalListRpcResponse
;
import
cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalPageRpcResponse
;
import
cn.com.glsx.stoassistant.model.response.withdrawal.StaffImportWithdrawalRpcResponse
;
import
cn.com.glsx.stoassistant.model.response.withdrawal.StaffWithdrawalUrlRpcResponse
;
import
cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -124,11 +126,11 @@ public class MerchantStaffWithdrawalService {
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
public
St
ring
exportBankWithdrawal
(
MerchantStaffWithdrawalSearchRopRequest
request
)
{
public
St
affWithdrawalUrlRopResponse
exportBankWithdrawal
(
MerchantStaffWithdrawalSearchRopRequest
request
)
{
MerchantStaffWithdrawalSearchRpcRequest
rpcRequest
=
ConvertRequest
.
convertRequest
(
request
,
new
MerchantStaffWithdrawalSearchRpcRequest
());
RpcResponse
<
St
ring
>
rpcResponse
=
merchantStaffWithdrawalRemote
.
exportBankWithdrawal
(
rpcRequest
);
RpcResponse
<
St
affWithdrawalUrlRpcResponse
>
rpcResponse
=
merchantStaffWithdrawalRemote
.
exportBankWithdrawal
(
rpcRequest
);
if
(
rpcResponse
.
isSuccess
())
{
return
rpcResponse
.
getResult
(
);
return
ConvertResponse
.
convertObject
(
rpcResponse
.
getResult
(),
StaffWithdrawalUrlRopResponse
.
class
);
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
...
...
src/main/java/cn/com/glsx/merchants/service/OpenService.java
View file @
ddb7b33
...
...
@@ -32,21 +32,18 @@ import cn.com.glsx.merchants.util.Pagination;
import
com.alibaba.fastjson.JSONObject
;
import
com.rop.RopRequestContext
;
import
com.rop.session.SimpleSession
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.compress.utils.Lists
;
import
org.apache.commons.lang.StringUtils
;
import
org.oreframework.boot.autoconfigure.rop.session.RopSessionManager
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.xml.crypto.Data
;
import
java.util.Arrays
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* @author zhouhaibao
...
...
@@ -54,6 +51,7 @@ import java.util.stream.Stream;
* @description: TODO
* @date 2021/9/17 9:52
*/
@Slf4j
@Service
public
class
OpenService
{
...
...
@@ -469,4 +467,13 @@ public class OpenService {
return
ConvertResponse
.
convertList
(
rpcResponse
.
getResult
(),
VisibleMerchantRopResponse
.
class
);
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
public
List
<
StaffResponse
>
findStaffListByUuidList
(
StaffListUuidOpenRequest
request
)
{
log
.
info
(
"入参:{}"
,
request
);
RpcResponse
<
List
<
MerchantStaffResponse
>>
response
=
merchantStaffRemote
.
selectStaffListByStaffUUID
(
request
.
getStaffUuidList
());
if
(
response
.
isSuccess
())
{
return
ConvertResponse
.
convertList
(
response
.
getResult
(),
StaffResponse
.
class
);
}
throw
new
RpcServiceException
(
response
.
getError
(),
response
.
getException
().
getErrId
(),
response
.
getMessage
());
}
}
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