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 6ca7fcda
authored
Apr 19, 2023
by
xiongzs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Merge from rop-merchant SCRM_v3.8.0
1 parent
17786971
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
63 additions
and
2 deletions
pom.xml
src/main/java/cn/com/glsx/merchants/controller/MerchantStaffWithdrawalController.java
src/main/java/cn/com/glsx/merchants/controller/StaffController.java
src/main/java/cn/com/glsx/merchants/request/staff/StaffJsonRopRequest.java
src/main/java/cn/com/glsx/merchants/response/withdrawal/MerchantStaffWithdrawalListRopResponse.java
src/main/java/cn/com/glsx/merchants/service/MerchantStaffWithdrawalService.java
src/main/java/cn/com/glsx/merchants/service/StaffService.java
pom.xml
View file @
6ca7fcd
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<dependency>
<dependency>
<groupId>
cn.com.glsx.merchants
</groupId>
<groupId>
cn.com.glsx.merchants
</groupId>
<artifactId>
platform-merchants-api
</artifactId>
<artifactId>
platform-merchants-api
</artifactId>
<version>
3.
7
.0-SNAPSHOT
</version>
<version>
3.
8
.0-SNAPSHOT
</version>
</dependency>
</dependency>
<!--引用GSON,用于打印-->
<!--引用GSON,用于打印-->
<dependency>
<dependency>
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
<dependency>
<dependency>
<groupId>
cn.com.glsx.stoassistant
</groupId>
<groupId>
cn.com.glsx.stoassistant
</groupId>
<artifactId>
rpc-scrm-stoassistant-api
</artifactId>
<artifactId>
rpc-scrm-stoassistant-api
</artifactId>
<version>
3.
6
.0-SNAPSHOT
</version>
<version>
3.
8
.0-SNAPSHOT
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
\ No newline at end of file
\ No newline at end of file
src/main/java/cn/com/glsx/merchants/controller/MerchantStaffWithdrawalController.java
View file @
6ca7fcd
...
@@ -3,6 +3,8 @@ package cn.com.glsx.merchants.controller;
...
@@ -3,6 +3,8 @@ package cn.com.glsx.merchants.controller;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
cn.com.glsx.merchants.request.merchant.MerchantBaseInfoRequest
;
import
cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffFailBatchRopRequest
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffFailBatchRopRequest
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalSearchRopRequest
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalSearchRopRequest
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRopRequest
;
import
cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRopRequest
;
...
@@ -12,6 +14,7 @@ import cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopRespons
...
@@ -12,6 +14,7 @@ import cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopRespons
import
cn.com.glsx.merchants.service.MerchantStaffWithdrawalService
;
import
cn.com.glsx.merchants.service.MerchantStaffWithdrawalService
;
import
cn.com.glsx.merchants.util.WithdrawalPagination
;
import
cn.com.glsx.merchants.util.WithdrawalPagination
;
import
cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest
;
import
cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest
;
import
com.rop.AbstractRopRequest
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.NeedInSessionType
;
import
com.rop.annotation.ServiceMethod
;
import
com.rop.annotation.ServiceMethod
;
import
com.rop.annotation.ServiceMethodBean
;
import
com.rop.annotation.ServiceMethodBean
;
...
@@ -128,4 +131,14 @@ public class MerchantStaffWithdrawalController {
...
@@ -128,4 +131,14 @@ public class MerchantStaffWithdrawalController {
}
}
}
}
@ServiceMethod
(
method
=
"merchants.api.staff.withdrawal.getWithdrawalRate"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"查询积分提现费率"
)
public
RopResponse
<
String
>
getWithdrawalRate
(
MerchantBaseInfoRequest
request
){
try
{
return
RopResponse
.
success
(
merchantStaffWithdrawalService
.
getWithdrawalRate
(
request
.
getMerchantId
()));
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======MerchantStaffWithdrawalController__invoke__getWithdrawalRate__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
}
src/main/java/cn/com/glsx/merchants/controller/StaffController.java
View file @
6ca7fcd
...
@@ -227,4 +227,16 @@ public class StaffController {
...
@@ -227,4 +227,16 @@ public class StaffController {
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
}
@ServiceMethod
(
method
=
"merchants.api.staff.insertStaffBatchByPhone"
,
needInSession
=
NeedInSessionType
.
NO
)
@ApiOperation
(
"批量新增员工"
)
public
RopResponse
<
Boolean
>
insertStaffBatchByPhone
(
StaffJsonRopRequest
ropRequest
)
{
try
{
staffService
.
insertStaffBatchByPhone
(
ropRequest
.
getStaffJson
());
return
RopResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"=======StaffController__invoke__insertStaffBatchByPhone__exception:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
.
getErrId
(),
e
.
getMessage
());
}
}
}
}
src/main/java/cn/com/glsx/merchants/request/staff/StaffJsonRopRequest.java
0 → 100644
View file @
6ca7fcd
package
cn
.
com
.
glsx
.
merchants
.
request
.
staff
;
import
cn.com.glsx.merchants.request.DefaultRequest
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
StaffJsonRopRequest
extends
DefaultRequest
{
@ApiModelProperty
(
notes
=
"批量新增员工"
,
required
=
true
)
private
String
staffJson
;
}
src/main/java/cn/com/glsx/merchants/response/withdrawal/MerchantStaffWithdrawalListRopResponse.java
View file @
6ca7fcd
...
@@ -143,4 +143,10 @@ public class MerchantStaffWithdrawalListRopResponse implements Serializable {
...
@@ -143,4 +143,10 @@ public class MerchantStaffWithdrawalListRopResponse implements Serializable {
@ApiModelProperty
(
example
=
"失败原因"
)
@ApiModelProperty
(
example
=
"失败原因"
)
private
String
failReason
;
private
String
failReason
;
@ApiModelProperty
(
example
=
"提现费率"
)
private
String
withdrawalRate
;
@ApiModelProperty
(
example
=
"到账金额"
)
private
String
arrivedAmount
;
}
}
src/main/java/cn/com/glsx/merchants/service/MerchantStaffWithdrawalService.java
View file @
6ca7fcd
...
@@ -133,4 +133,13 @@ public class MerchantStaffWithdrawalService {
...
@@ -133,4 +133,13 @@ public class MerchantStaffWithdrawalService {
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
}
public
String
getWithdrawalRate
(
Integer
merchantId
)
{
RpcResponse
<
String
>
rpcResponse
=
merchantStaffWithdrawalRemote
.
getWithdrawalRate
(
merchantId
);
if
(
rpcResponse
.
isSuccess
())
{
return
rpcResponse
.
getResult
();
}
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
getMessage
());
}
}
}
src/main/java/cn/com/glsx/merchants/service/StaffService.java
View file @
6ca7fcd
...
@@ -9,6 +9,7 @@ import cn.com.glsx.merchants.convert.ConvertResponse;
...
@@ -9,6 +9,7 @@ import cn.com.glsx.merchants.convert.ConvertResponse;
import
cn.com.glsx.merchants.model.request.StaffBatchRequest
;
import
cn.com.glsx.merchants.model.request.StaffBatchRequest
;
import
cn.com.glsx.merchants.model.request.MerchantFileRequest
;
import
cn.com.glsx.merchants.model.request.MerchantFileRequest
;
import
cn.com.glsx.merchants.model.request.MerchantStaffRequest
;
import
cn.com.glsx.merchants.model.request.MerchantStaffRequest
;
import
cn.com.glsx.merchants.model.request.staff.InsertStaffBatchRpcRequest
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.model.response.MerchantStaffResponse
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
cn.com.glsx.merchants.request.staff.*
;
import
cn.com.glsx.merchants.request.staff.*
;
...
@@ -222,4 +223,12 @@ public class StaffService {
...
@@ -222,4 +223,12 @@ public class StaffService {
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
throw
new
RpcServiceException
(
booleanRpcResponse
.
getException
().
getErrId
(),
booleanRpcResponse
.
getMessage
());
}
}
}
}
public
void
insertStaffBatchByPhone
(
String
staffJson
){
InsertStaffBatchRpcRequest
request
=
JSONObject
.
parseObject
(
staffJson
,
InsertStaffBatchRpcRequest
.
class
);
RpcResponse
<
Boolean
>
rpcResponse
=
merchantStaffRemote
.
insertStaffBatchByPhone
(
request
);
if
(
rpcResponse
.
isFailed
())
{
throw
new
RpcServiceException
(
rpcResponse
.
getException
().
getErrId
(),
rpcResponse
.
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