Commit 6ca7fcda by xiongzs

Merge from rop-merchant SCRM_v3.8.0

1 parent 17786971
...@@ -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
...@@ -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());
}
}
} }
...@@ -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());
}
}
} }
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;
}
...@@ -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;
} }
...@@ -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());
}
} }
...@@ -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());
}
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!