提现相关
This commit is contained in:
parent
28c0f8c6ef
commit
58bc6d7a93
|
|
@ -52,15 +52,15 @@ public class AppMenuController {
|
|||
|
||||
@Resource
|
||||
private AliPayService aliPayService;
|
||||
@PostMapping("/AlipayTransferTest")
|
||||
public RespBody AlipayTransferTest() throws Exception{
|
||||
Long l = System.currentTimeMillis();
|
||||
String amount = "0.20";
|
||||
String accountNo = "15619297581";
|
||||
String accountName = "刘一帆";
|
||||
String remake = "11111111111111";
|
||||
String s = aliPayService.alipayTransfer(amount, accountNo, accountName,remake, l.toString());
|
||||
return new RespBody(s);
|
||||
}
|
||||
// @PostMapping("/AlipayTransferTest")
|
||||
// public RespBody AlipayTransferTest() throws Exception{
|
||||
// Long l = System.currentTimeMillis();
|
||||
// String amount = "0.20";
|
||||
// String accountNo = "15619297581";
|
||||
// String accountName = "刘一帆";
|
||||
// String remake = "11111111111111";
|
||||
// String s = aliPayService.alipayTransfer(amount, accountNo, accountName,remake, l.toString());
|
||||
// return new RespBody(s);
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
package com.chaozhanggui.admin.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.chaozhanggui.admin.system.service.MerchantInfoService;
|
||||
import com.chaozhanggui.common.system.config.RespBody;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussBankCard;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussIdCard;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussMerchantImage;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussUserApp;
|
||||
import com.chaozhanggui.dao.system.entity.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
|
|
@ -102,4 +101,31 @@ public class MerchantInfoController {
|
|||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取所有省
|
||||
*/
|
||||
// private void getProvince() {
|
||||
// QueryWrapper<TbPlussAreaCity> queryWrapper = new QueryWrapper<TbPlussAreaCity>().eq("type", "1");
|
||||
// List<TbPlussAreaCity> areaCitiesList = TbPlussAreaCityMapper.selectList(queryWrapper);
|
||||
// for (AreaCity areaCity : areaCitiesList) {
|
||||
// switch (areaCity.getAreaName()) {
|
||||
// case "北京":
|
||||
// areaCity.setAreaName("北京市");
|
||||
// break;
|
||||
// case "天津":
|
||||
// areaCity.setAreaName("天津市");
|
||||
// break;
|
||||
// case "重庆":
|
||||
// areaCity.setAreaName("重庆市");
|
||||
// break;
|
||||
// case "上海":
|
||||
// areaCity.setAreaName("上海市");
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// request.setAttribute("areaCitiesList", areaCitiesList);
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import cn.hutool.json.JSONArray;
|
|||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alipay.api.AlipayApiException;
|
||||
import com.alipay.api.response.AlipayFundTransUniTransferResponse;
|
||||
import com.chaozhanggui.admin.system.util.RedisCst;
|
||||
import com.chaozhanggui.admin.system.util.RedisUtil;
|
||||
import com.chaozhanggui.admin.system.util.StringUtil;
|
||||
|
|
@ -443,8 +444,13 @@ public class Userservice {
|
|||
|
||||
if(promotion.getTypeCode().equals("MG")){
|
||||
cash.setStatus(1);
|
||||
aliPayService.alipayTransfer(cash.getVirrealcashamt().toString(),cash.getAccountno(),cash.getAccountname(),"",cash.getCashnumber());
|
||||
modFunds(cash.getUserid(),cash.getCashamt());
|
||||
AlipayFundTransUniTransferResponse response = aliPayService.alipayTransfer(cash.getVirrealcashamt().toString(), cash.getAccountno(), cash.getAccountname(), "", cash.getCashnumber());
|
||||
if (response.isSuccess() && response.getStatus().equals("SUCCESS")){
|
||||
modFunds(cash.getUserid(),cash.getCashamt());
|
||||
}else {
|
||||
return new RespBody("000071");
|
||||
}
|
||||
|
||||
}
|
||||
cash.setCashstatus(JSONUtil.toJsonStr(cashStatusList));
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import javax.annotation.Resource;
|
|||
public class AliPayService {
|
||||
@Resource
|
||||
AliPayConfig aliPayConfig;
|
||||
public String alipayTransfer(String amount, String accountNo, String accountName,String remake,
|
||||
public AlipayFundTransUniTransferResponse alipayTransfer(String amount, String accountNo, String accountName,String remake,
|
||||
String cashNumber) throws AlipayApiException {
|
||||
CertAlipayRequest alipayConfig = new CertAlipayRequest();
|
||||
alipayConfig.setPrivateKey(aliPayConfig.getPrivateKey());
|
||||
|
|
@ -58,13 +58,7 @@ public class AliPayService {
|
|||
model.setOrderTitle("");
|
||||
request.setBizModel(model);
|
||||
AlipayFundTransUniTransferResponse response = alipayClient.certificateExecute(request);
|
||||
if (response.isSuccess()) {
|
||||
System.out.println("调用成功");
|
||||
return response.getSubMsg();
|
||||
} else {
|
||||
System.out.println("调用失败");
|
||||
return response.getSubMsg();
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ public class ExceptionUtil {
|
|||
map.put("000052","增加错误");
|
||||
|
||||
map.put("000070","对应字典项不匹配");
|
||||
map.put("000071","支付宝资金不足");
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue