Commit a2a9d1fe authored by libin's avatar libin

提现线下方式修改

parent ca407882
...@@ -55,4 +55,7 @@ public class WalletCathListDTO { ...@@ -55,4 +55,7 @@ public class WalletCathListDTO {
private String accountNumber; private String accountNumber;
private String accountName; private String accountName;
@ApiModelProperty(value = "线下提现方式 1:自动 2:手动")
private Integer offlineWay;
} }
...@@ -130,4 +130,8 @@ public class MyWalletCath implements Serializable { ...@@ -130,4 +130,8 @@ public class MyWalletCath implements Serializable {
@Column(name = "account_name") @Column(name = "account_name")
private String accountName; private String accountName;
@Column(name = "offline_way")
@ApiModelProperty(value = "线下提现方式 1:自动 2:手动")
private Integer offlineWay;
} }
...@@ -51,4 +51,7 @@ public class WalletCathAdminVo { ...@@ -51,4 +51,7 @@ public class WalletCathAdminVo {
private String accountNumber; private String accountNumber;
private String accountName; private String accountName;
@ApiModelProperty(value = "线下提现方式 1:自动 2:手动")
private Integer offlineWay;
} }
package com.github.wxiaoqi.security.admin.vo; package com.github.wxiaoqi.security.admin.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -12,6 +14,8 @@ import java.math.BigDecimal; ...@@ -12,6 +14,8 @@ import java.math.BigDecimal;
* @data 2019/7/12 9:20 * @data 2019/7/12 9:20
*/ */
@Data @Data
@AllArgsConstructor
@NoArgsConstructor
public class WalletPageVo { public class WalletPageVo {
private Integer id; private Integer id;
......
...@@ -379,7 +379,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -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; boolean isvalid = status == WithDrawStatusEnum.REJECT.getCode() && StringUtils.isBlank(reason) || cathId == null || cathId == 0;
if (isvalid) { if (isvalid) {
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空"); return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数不能为空");
...@@ -399,20 +399,23 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -399,20 +399,23 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
BigDecimal realAmount = cath.getRealAmount(); BigDecimal realAmount = cath.getRealAmount();
BigDecimal commission = cath.getCommission(); BigDecimal commission = cath.getCommission();
if (status == WithDrawStatusEnum.AGREE.getCode()) { if (status == WithDrawStatusEnum.AGREE.getCode()) {
if(org.springframework.util.StringUtils.hasText(payMentNo)){
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); withDrawProcess(cath.getOrderNo(),payMentNo,null,true);
String host = StringUtils.defaultIfBlank(request.getHeader("userHost"), ClientUtil.getClientIp(request)); }else {
FundPayVo fundPayVo = FundPayVo.builder() HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
.amount(cath.getCathType() == 0 ? String.valueOf(cath.getRealAmount().multiply(new BigDecimal(100)).doubleValue()) : String.format("%.2f", cath.getRealAmount().doubleValue())) String host = StringUtils.defaultIfBlank(request.getHeader("userHost"), ClientUtil.getClientIp(request));
.payeeAccount(cath.getAccountNumber()) FundPayVo fundPayVo = FundPayVo.builder()
.orderNo(cath.getOrderNo()) .amount(cath.getCathType() == 0 ? String.valueOf(cath.getRealAmount().multiply(new BigDecimal(100)).doubleValue()) : String.format("%.2f", cath.getRealAmount().doubleValue()))
.payerShowName("欣新房车网络科技(广东)股份有限公司") .payeeAccount(cath.getAccountNumber())
.remark("提现转账") .orderNo(cath.getOrderNo())
.type(cath.getCathType()) .payerShowName("欣新房车网络科技(广东)股份有限公司")
.creatIp(host) .remark("提现转账")
.build(); .type(cath.getCathType())
sendPayMessage(fundPayVo); .creatIp(host)
log.info("发送提现消息成功:【{}】", fundPayVo); .build();
sendPayMessage(fundPayVo);
log.info("发送提现消息成功:【{}】", fundPayVo);
}
} else { } else {
cath.setStauts(status); cath.setStauts(status);
cath.setReason(reason); cath.setReason(reason);
...@@ -475,7 +478,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In ...@@ -475,7 +478,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> implements In
detail.setUserId(myWalletCath.getUserId()); detail.setUserId(myWalletCath.getUserId());
detail.setItype(1); detail.setItype(1);
//设置提现单号 //设置提现单号
detail.setWithDrawOrderNo(orderNo); detail.setWithDrawOrderNo(myWalletCath.getOrderNo());
detail.setCono(myWalletCath.getId().intValue()); detail.setCono(myWalletCath.getId().intValue());
detail.setBalance(myWalletCath.getBalance()); detail.setBalance(myWalletCath.getBalance());
detail.setAmount(myWalletCath.getAmount()); detail.setAmount(myWalletCath.getAmount());
......
...@@ -38,9 +38,10 @@ public class WalletCathAdminController { ...@@ -38,9 +38,10 @@ public class WalletCathAdminController {
public ObjectRestResponse verifyCath( public ObjectRestResponse verifyCath(
@RequestParam(value = "cathId",defaultValue = "0") Integer cathId, @RequestParam(value = "cathId",defaultValue = "0") Integer cathId,
@RequestParam(value = "reason",defaultValue = "") String reason, @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 { try {
return myWalletBiz.verifyCath(cathId,reason,status); return myWalletBiz.verifyCath(cathId,payMentNo,reason,status);
}catch (Exception e) { }catch (Exception e) {
throw new BaseException(e); throw new BaseException(e);
} }
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
wc.cono, wc.cono,
wc.order_no AS `orderNo`, wc.order_no AS `orderNo`,
wc.account_number AS `accountNumber`, wc.account_number AS `accountNumber`,
wc.account_name AS `accountName` wc.account_name AS `accountName`,
wc.offline_way AS `offlineWay`
FROM FROM
(SELECT * FROM `my_wallet_cath` WHERE 1 = 1 (SELECT * FROM `my_wallet_cath` WHERE 1 = 1
<if test="state != null"> <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