Commit 238b332c by xiongzs

Merge all from rop-merchant:合并0320版本rop代码:银行卡提现版本

1 parent ba9faf9a
...@@ -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.5.0-SNAPSHOT</version> <version>3.6.0-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.controller; package cn.com.glsx.merchants.controller;
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.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;
import cn.com.glsx.merchants.request.withdrawal.StaffWithdrawalImportRopRequest;
import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse; import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse;
import cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopResponse;
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 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;
...@@ -90,4 +95,37 @@ public class MerchantStaffWithdrawalController { ...@@ -90,4 +95,37 @@ public class MerchantStaffWithdrawalController {
} }
} }
@ServiceMethod(method = "merchants.api.staff.withdrawal.batchFail", needInSession = NeedInSessionType.NO)
@ApiOperation("批量失败")
public RopResponse<Boolean> failBatch(MerchantStaffFailBatchRopRequest request){
try {
return RopResponse.success(merchantStaffWithdrawalService.failBatch(request));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__batchFail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.staff.withdrawal.importBankWithdrawal", needInSession = NeedInSessionType.NO)
@ApiOperation("提现结果导入")
public RopResponse<StaffImportWithdrawalRopResponse> importBankWithdrawal(StaffWithdrawalImportRopRequest request){
try {
return RopResponse.success(merchantStaffWithdrawalService.importBankWithdrawal(request));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__importBankWithdrawal__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.staff.withdrawal.exportBankWithdrawal", needInSession = NeedInSessionType.NO)
@ApiOperation("导出提现结果")
public RopResponse<String> exportBankWithdrawal(MerchantStaffWithdrawalSearchRopRequest request){
try {
return RopResponse.success(merchantStaffWithdrawalService.exportBankWithdrawal(request));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__exportBankWithdrawal__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
} }
package cn.com.glsx.merchants.request.withdrawal;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class MerchantStaffFailBatchRopRequest extends DefaultRequest {
@ApiModelProperty(notes = "提现记录id",required = true)
private List<Integer> ids;
@ApiModelProperty(notes = "失败原因",required = true)
private String failReason;
}
...@@ -63,12 +63,20 @@ public class MerchantStaffWithdrawalSearchRopRequest extends DefaultRequest { ...@@ -63,12 +63,20 @@ public class MerchantStaffWithdrawalSearchRopRequest extends DefaultRequest {
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date withdrawalEndTime; private Date withdrawalEndTime;
@NotNull @ApiModelProperty(value = "提现方式 1.微信提现 2.运营从后台核销 3、银行卡提现")
@ApiModelProperty(notes = "分页数", name = "pageSize",required = true) private Integer isWithdrawal;
@ApiModelProperty("导出状态 0:未导出 1:已导出 ")
private Integer exportStatus;
@ApiModelProperty(value = "导出模板 1:河南优登信息科技有限公司 2:湖南好招网络科技有限公司")
private Integer fileType;
@ApiModelProperty(notes = "分页数", name = "pageSize")
private Integer pageSize; private Integer pageSize;
@NotNull @ApiModelProperty(notes = "当前页", name = "pageNum")
@ApiModelProperty(notes = "当前页", name = "pageNum",required = true)
private Integer pageNum; private Integer pageNum;
} }
package cn.com.glsx.merchants.request.withdrawal; package cn.com.glsx.merchants.request.withdrawal;
import cn.com.glsx.merchants.request.DefaultRequest; import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
...@@ -14,6 +15,13 @@ import java.util.List; ...@@ -14,6 +15,13 @@ import java.util.List;
@Data @Data
public class MerchantStaffWithdrawalUpdateRopRequest extends DefaultRequest { public class MerchantStaffWithdrawalUpdateRopRequest extends DefaultRequest {
@ApiModelProperty(notes = "提现记录ids",required = true)
private List<Integer> idList; private List<Integer> idList;
@ApiModelProperty(notes = "提现类型:1:微信提现 2:银行卡提现")
private Integer withDrawType;
} }
package cn.com.glsx.merchants.request.withdrawal;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class StaffWithdrawalImportRopRequest extends DefaultRequest {
@ApiModelProperty(notes = "文件路径",required = true)
private String fileUrl;
@ApiModelProperty(notes = "文件类型 1:河南优登信息科技有限公司 2:湖南好招网络科技有限公司",required = true)
private Integer fileType;
}
...@@ -102,7 +102,45 @@ public class MerchantStaffWithdrawalListRopResponse implements Serializable { ...@@ -102,7 +102,45 @@ public class MerchantStaffWithdrawalListRopResponse implements Serializable {
@ApiModelProperty(example = "微信openid") @ApiModelProperty(example = "微信openid")
private String wechatOpenId; private String wechatOpenId;
@ApiModelProperty("所属商户") @ApiModelProperty(example = "所属商户")
private String merchantName; private String merchantName;
@ApiModelProperty(example = "银行预留手机号")
private String bankUserName;
@ApiModelProperty(example = "银行卡提现流水号")
private String bankSerialNumber;
/**
* 银行名称
*/
@ApiModelProperty(example = "银行名称")
private String bankName;
/**
* 银行卡号
*/
@ApiModelProperty(example = "银行卡号")
private String bankNumber;
/**
* 银行预留手机号
*/
@ApiModelProperty(example = "银行预留手机号")
private String bankPhone;
/**
* 身份证号
*/
@ApiModelProperty(example = "身份证号")
private String idCardNo;
@ApiModelProperty(example = "导出状态 0:未导出 1:已导出 ")
private Integer exportStatus;
@ApiModelProperty(example = "失败原因")
private String failReason;
} }
package cn.com.glsx.merchants.response.withdrawal;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class StaffImportWithdrawalRopResponse implements Serializable {
@ApiModelProperty(example = "导出结果")
private Boolean flag;
@ApiModelProperty(example = "失败模板")
private String failFileUrl;
@ApiModelProperty("导入成功数")
private Integer successNum;
}
...@@ -5,14 +5,20 @@ import cn.com.glsx.framework.core.beans.rpc.RpcResponse; ...@@ -5,14 +5,20 @@ 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.merchants.convert.ConvertRequest; import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse; import cn.com.glsx.merchants.convert.ConvertResponse;
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;
import cn.com.glsx.merchants.request.withdrawal.StaffWithdrawalImportRopRequest;
import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse; import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse;
import cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopResponse;
import cn.com.glsx.merchants.util.WithdrawalPagination; 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; import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalInsertRpcRequest;
import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest; import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest;
import cn.com.glsx.stoassistant.model.request.withdrawal.StaffWithdrawalImportRpcRequest;
import cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalListRpcResponse; 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.MerchantStaffWithdrawalPageRpcResponse;
import cn.com.glsx.stoassistant.model.response.withdrawal.StaffImportWithdrawalRpcResponse;
import cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote; import cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -98,4 +104,33 @@ public class MerchantStaffWithdrawalService { ...@@ -98,4 +104,33 @@ public class MerchantStaffWithdrawalService {
} }
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage()); throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
} }
public Boolean failBatch(MerchantStaffFailBatchRopRequest request) {
MerchantStaffFailBatchRpcRequest rpcRequest = ConvertRequest.convertRequest(request, new MerchantStaffFailBatchRpcRequest());
RpcResponse<Boolean> rpcResponse = merchantStaffWithdrawalRemote.failBatch(rpcRequest);
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public StaffImportWithdrawalRopResponse importBankWithdrawal(StaffWithdrawalImportRopRequest request) {
StaffWithdrawalImportRpcRequest rpcRequest = ConvertRequest.convertRequest(request, new StaffWithdrawalImportRpcRequest());
RpcResponse<StaffImportWithdrawalRpcResponse> rpcResponse = merchantStaffWithdrawalRemote.importBankWithdrawal(rpcRequest);
if (rpcResponse.isSuccess()) {
return ConvertResponse.convertObject(rpcResponse.getResult(),StaffImportWithdrawalRopResponse.class);
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public String exportBankWithdrawal(MerchantStaffWithdrawalSearchRopRequest request) {
MerchantStaffWithdrawalSearchRpcRequest rpcRequest = ConvertRequest.convertRequest(request, new MerchantStaffWithdrawalSearchRpcRequest());
RpcResponse<String> rpcResponse = merchantStaffWithdrawalRemote.exportBankWithdrawal(rpcRequest);
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
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!