Commit a2a9d1fe authored by libin's avatar libin

提现线下方式修改

parent ca407882
......@@ -55,4 +55,7 @@ public class WalletCathListDTO {
private String accountNumber;
private String accountName;
@ApiModelProperty(value = "线下提现方式 1:自动 2:手动")
private Integer offlineWay;
}
......@@ -130,4 +130,8 @@ public class MyWalletCath implements Serializable {
@Column(name = "account_name")
private String accountName;
@Column(name = "offline_way")
@ApiModelProperty(value = "线下提现方式 1:自动 2:手动")
private Integer offlineWay;
}
......@@ -51,4 +51,7 @@ public class WalletCathAdminVo {
private String accountNumber;
private String accountName;
@ApiModelProperty(value = "线下提现方式 1:自动 2:手动")
private Integer offlineWay;
}
package com.github.wxiaoqi.security.admin.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
......@@ -12,6 +14,8 @@ import java.math.BigDecimal;
* @data 2019/7/12 9:20
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WalletPageVo {
private Integer id;
......
......@@ -379,7 +379,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
/**
* 提现审核
*/
public ObjectRestResponse verifyCath(Integer cathId, String reason, Integer status) {
public ObjectRestResponse verifyCath(Integer cathId,String payMentNo,String reason, Integer status) {
boolean isvalid = status == WithDrawStatusEnum.REJECT.getCode() && StringUtils.isBlank(reason) || cathId == null || cathId == 0;
if (isvalid) {
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空");
......@@ -399,7 +399,9 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
BigDecimal realAmount = cath.getRealAmount();
BigDecimal commission = cath.getCommission();
if (status == WithDrawStatusEnum.AGREE.getCode()) {
if(org.springframework.util.StringUtils.hasText(payMentNo)){
withDrawProcess(cath.getOrderNo(),payMentNo,null,true);
}else {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String host = StringUtils.defaultIfBlank(request.getHeader("userHost"), ClientUtil.getClientIp(request));
FundPayVo fundPayVo = FundPayVo.builder()
......@@ -413,6 +415,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
.build();
sendPayMessage(fundPayVo);
log.info("发送提现消息成功:【{}】", fundPayVo);
}
} else {
cath.setStauts(status);
cath.setReason(reason);
......@@ -475,7 +478,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
detail.setUserId(myWalletCath.getUserId());
detail.setItype(1);
//设置提现单号
detail.setWithDrawOrderNo(orderNo);
detail.setWithDrawOrderNo(myWalletCath.getOrderNo());
detail.setCono(myWalletCath.getId().intValue());
detail.setBalance(myWalletCath.getBalance());
detail.setAmount(myWalletCath.getAmount());
......
......@@ -38,9 +38,10 @@ public class WalletCathAdminController {
public ObjectRestResponse verifyCath(
@RequestParam(value = "cathId",defaultValue = "0") Integer cathId,
@RequestParam(value = "reason",defaultValue = "") String reason,
@RequestParam(value = "status",defaultValue = "1") Integer status){
@RequestParam(value = "status",defaultValue = "1") Integer status,
@RequestParam(value = "payMentNo",required = false) String payMentNo){
try {
return myWalletBiz.verifyCath(cathId,reason,status);
return myWalletBiz.verifyCath(cathId,payMentNo,reason,status);
}catch (Exception e) {
throw new BaseException(e);
}
......
......@@ -18,7 +18,8 @@
wc.cono,
wc.order_no AS `orderNo`,
wc.account_number AS `accountNumber`,
wc.account_name AS `accountName`
wc.account_name AS `accountName`,
wc.offline_way AS `offlineWay`
FROM
(SELECT * FROM `my_wallet_cath` WHERE 1 = 1
<if test="state != null">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment