| | |
| | | return "CH" + sdf.format(new Date()) + UUIDUtil.getRandomCode(5); |
| | | } |
| | | |
| | | @Autowired |
| | | private DouGongPayUtil douGongPayUtil; |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRES_NEW) |
| | | public ResultUtil payThankYouFee(Integer uid, Integer orderId, Double money, Integer payType, Integer type) throws Exception { |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_6_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 6, String.valueOf(orderId), 4); |
| | | resultUtil = douGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 6, String.valueOf(orderId), 4); |
| | | |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 6, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | |
| | | } |
| | | UserInfo userInfo = userInfoService.selectById(id); |
| | | UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>().eq("phone", userInfo.getPhone()).eq("type",1)); |
| | | Region province = regionService.getRegionByCode(userWithdrawal.getBankCardProvinceCode()); |
| | | Region city = regionService.getRegionByCode(userWithdrawal.getBankCardCityCode()); |
| | | userWithdrawal.setBankCardProvince(province == null ? "" : province.getName()); |
| | | userWithdrawal.setBankCardCity(city == null ? "" : city.getName()); |
| | | if(userWithdrawal!=null){ |
| | | Region province = regionService.getRegionByCode(userWithdrawal.getBankCardProvinceCode()); |
| | | Region city = regionService.getRegionByCode(userWithdrawal.getBankCardCityCode()); |
| | | userWithdrawal.setBankCardProvince(province == null ? "" : province.getName()); |
| | | userWithdrawal.setBankCardCity(city == null ? "" : city.getName()); |
| | | } |
| | | |
| | | return ResultUtil.success(userWithdrawal==null?new UserWithdrawal():userWithdrawal); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | return ResultUtil.error("请先进行进件操作"); |
| | | } |
| | | try { |
| | | BalanceAcctReq balanceAcctReq = new BalanceAcctReq(); |
| | | balanceAcctReq.setCusId(driverWith.getCusId()); |
| | | BalanceAcctListResp balanceAcctListResp = BalanceAcctExample.retrieveByUserId(balanceAcctReq); |
| | | List<BalanceAcctItem> balanceAccts = balanceAcctListResp.getBalanceAccts(); |
| | | for (BalanceAcctItem balanceAcct : balanceAccts) { |
| | | if(balanceAcct.getBalanceAcctId().equals(driverWith.getBalanceAcctId())){ |
| | | if(balanceAcct.getSettledAmount().doubleValue()==0){ |
| | | return ResultUtil.success(new BigDecimal(0)); |
| | | } |
| | | return ResultUtil.success(new BigDecimal(balanceAcct.getSettledAmount()).divide(new BigDecimal(100))); |
| | | } |
| | | } |
| | | BigDecimal bigDecimal = douGongBasicDataBiz.balanceQuery(driverWith.getHuifuId()); |
| | | return ResultUtil.success(bigDecimal); |
| | | // BalanceAcctReq balanceAcctReq = new BalanceAcctReq(); |
| | | // balanceAcctReq.setCusId(driverWith.getCusId()); |
| | | // BalanceAcctListResp balanceAcctListResp = BalanceAcctExample.retrieveByUserId(balanceAcctReq); |
| | | // List<BalanceAcctItem> balanceAccts = balanceAcctListResp.getBalanceAccts(); |
| | | // for (BalanceAcctItem balanceAcct : balanceAccts) { |
| | | // if(balanceAcct.getBalanceAcctId().equals(driverWith.getBalanceAcctId())){ |
| | | // if(balanceAcct.getSettledAmount().doubleValue()==0){ |
| | | // return ResultUtil.success(new BigDecimal(0)); |
| | | // } |
| | | // return ResultUtil.success(new BigDecimal(balanceAcct.getSettledAmount()).divide(new BigDecimal(100))); |
| | | // } |
| | | // } |
| | | } catch (UpyztException e) { |
| | | e.printStackTrace(); |
| | | System.out.println("用户获取可提现余额:"+e); |
| | | return ResultUtil.error(e.getMessage()); |
| | | } |
| | | return ResultUtil.success(new BigDecimal(0)); |
| | | } |
| | | |
| | | |
| | |
| | | private String rsa_public_key; |
| | | |
| | | |
| | | @GetMapping("/api/order/getDgWxPay") |
| | | @ApiOperation(value = "获取微信支付参数", tags = {"用户端-订单"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | }) |
| | | public ResultUtil<String> getDgWxPay(String param){ |
| | | String value = redisUtil.getValue(param); |
| | | return ResultUtil.success(value); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | String trans_stat = jsonObject.get("trans_stat").toString(); |
| | | if ("S".equals(trans_stat)) { |
| | | String[] split = out_trade_no.split("_"); |
| | | Integer uid = Integer.valueOf(split[0]); |
| | | Integer id = Integer.valueOf(split[1]); |
| | | Integer uid = Integer.valueOf(split[1]); |
| | | Integer id = Integer.valueOf(split[0]); |
| | | String payAmt = jsonObject.get("pay_amt").toString(); |
| | | userInfoService.payCancelUserBalance(Integer.valueOf(uid), order_id, Integer.valueOf(id), 1); |
| | | // appOrderController.createAllocationReqUser(1, Integer.valueOf(uid), 1, new BigDecimal(payAmt).divide(new BigDecimal(100)).doubleValue()); |
| | |
| | | String trans_stat = jsonObject.get("trans_stat").toString(); |
| | | if ("S".equals(trans_stat)) { |
| | | String[] split = out_trade_no.split("_"); |
| | | Integer uid = Integer.valueOf(split[0]); |
| | | Integer id = Integer.valueOf(split[1]); |
| | | Integer uid = Integer.valueOf(split[1]); |
| | | Integer id = Integer.valueOf(split[0]); |
| | | String payAmt = jsonObject.get("pay_amt").toString(); |
| | | userInfoService.payCancelUserBalance(Integer.valueOf(uid), order_id, Integer.valueOf(id), 2); |
| | | |
| | |
| | | @Autowired |
| | | private ISystemNoticeService systemNoticeService; |
| | | |
| | | |
| | | @Autowired |
| | | private DouGongPayUtil douGongPayUtil; |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRES_NEW) |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_7_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 7, String.valueOf(orderId), 4); |
| | | resultUtil = douGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 7, String.valueOf(orderId), 4); |
| | | |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 7, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | |
| | | rows = rows.stream().filter(e->e.getMoney()<=orderCrossCity.getOrderMoney()|| e.getDataType()==2).collect(Collectors.toList()); |
| | | return rows; |
| | | } |
| | | |
| | | @Autowired |
| | | private DouGongPayUtil douGongPayUtil; |
| | | /** |
| | | * 订单支付 |
| | | * @param payType |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 3, String.valueOf(orderId), 1); |
| | | resultUtil = douGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 3, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderCrossCity.getUserId(), 1, orderId, 3, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | |
| | | } |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 3, String.valueOf(orderId), 1); |
| | | resultUtil = douGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 3, String.valueOf(orderId), 1); |
| | | paymentRecordService.saveData(1, orderCrossCity.getUserId(), 1, orderId, 3, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | |
| | | |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("订单取消", "", id + "_3_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/wxCancelOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 3, String.valueOf(id), 5); |
| | | resultUtil = douGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 3, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderCrossCity.getUserId(), 1, id, 3, 1, query.getMoney(), "", 1);//添加预支付数据 |
| | | |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(id + ",3", 9, 5, uid.toString(), "订单取消", query.getMoney(), callbackPath + "/base/wxCancelOrderTaxi", "", type, appletsOpenId); |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_3_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 3, String.valueOf(orderId), 4); |
| | | resultUtil = douGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 3, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 3, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/trade/acctpayment/pay", paramsInfo, null, false);; |
| | | System.out.println(response); |
| | | } |
| | | |
| | | /** |
| | | * 电子账户余额查询 |
| | | * |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public BigDecimal balanceQuery(String huifuId) throws Exception { |
| | | // 1. 数据初始化,填入对应的商户配置 |
| | | MerConfig merConfig = new MerConfig(); |
| | | merConfig.setProcutId(huiFuProperties.getProductId()); |
| | | merConfig.setSysId(huiFuProperties.getSysId()); |
| | | merConfig.setRsaPrivateKey(huiFuProperties.getRsaPrivateKey()); |
| | | merConfig.setRsaPublicKey(huiFuProperties.getRsaPublicKey()); |
| | | BasePay.initWithMerConfig(merConfig); |
| | | // 2.组装请求参数 |
| | | Map<String, Object> paramsInfo = new HashMap<>(); |
| | | // 汇付ID |
| | | paramsInfo.put("huifu_id", huifuId); |
| | | // 请求流水号 |
| | | paramsInfo.put("req_seq_id", RequestSeqUtil.generateForHuiFu()); |
| | | // 请求日期 |
| | | paramsInfo.put("req_date", DateUtil.format(new Date(), "yyyyMMdd")); |
| | | log.info("账户余额信息查询返回参数:{}", paramsInfo); |
| | | // 3. 发起API调用 |
| | | Map<String, Object> response = BasePayRequest.requestBasePay("v2/trade/acctpayment/balance/query", paramsInfo, null, false); |
| | | log.info("账户余额信息查询返回参数:{}", response); |
| | | String string = response.get("acctInfo_list").toString(); |
| | | JSONArray accountList = JSONArray.parseArray(string); |
| | | if (accountList != null && !accountList.isEmpty()) { |
| | | JSONObject acctInfo = accountList.getJSONObject(0); |
| | | log.info("账户余额信息查询返回余额:{}", acctInfo.getString("avail_bal")); |
| | | return acctInfo.getBigDecimal("avl_bal"); |
| | | } |
| | | return BigDecimal.ZERO; |
| | | } |
| | | } |
| | |
| | | import com.huifu.bspay.sdk.opps.core.net.BasePayRequest; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.huifu.properties.HuiFuProperties; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | |
| | | /** |
| | | * 斗拱支付工具类 |
| | | */ |
| | | @Component |
| | | public class DouGongPayUtil { |
| | | |
| | | @Value("${huifu.product_id}") |
| | |
| | | private static String privateKeyBase64; |
| | | |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | |
| | | |
| | | private static String callbackPath = "http://221.182.45.100:8006";//支付回调网关地址 |
| | | // private static String callbackPath = "https://zhentonggongsi.com:443/user";//支付回调网关地址 |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | |
| | |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | public static ResultUtil wxPayOrder(String money, String openId, String goodsDesc, int type, String orderId, int callType) { |
| | | public ResultUtil wxPayOrder(String money, String openId, String goodsDesc, int type, String orderId, int callType) { |
| | | HttpRequest post = HttpUtil.createPost("https://api.huifu.com/v4/trade/payment/create"); |
| | | String req_seq_id = orderId + "_" + type + "_" + System.currentTimeMillis() + ToolUtil.getRandomNumber(10); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd"); |
| | |
| | | |
| | | HttpResponse execute = post.execute(); |
| | | System.out.println(execute.body()); |
| | | |
| | | String randomString = ToolUtil.getRandomString(18); |
| | | redisUtil.setStrValue("dg_wx_pay:"+randomString,execute.body(),300); |
| | | JSONObject jsonObject = JSONObject.parseObject(execute.body()); |
| | | jsonObject.put("req_seq_id",req_seq_id); |
| | | jsonObject.put("dg_wx_pay","dg_wx_pay:"+randomString); |
| | | return ResultUtil.success(jsonObject); |
| | | } |
| | | |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", orderLogistics.getType(), String.valueOf(orderId), 1); |
| | | resultUtil = douGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", orderLogistics.getType(), String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderLogistics.getUserId(), 1, orderId, orderLogistics.getType(), 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | |
| | | } |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("小件物流下单支付", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "小件物流下单支付", orderLogistics.getType(), String.valueOf(orderId), 1); |
| | | resultUtil = douGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "小件物流下单支付", orderLogistics.getType(), String.valueOf(orderId), 1); |
| | | paymentRecordService.saveData(1, orderLogistics.getUserId(), 1, orderId, orderLogistics.getType(), 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("小件物流补差价", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderLogisticsSpread", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "小件物流补差价", orderLogistics.getType(), String.valueOf(orderId), 2); |
| | | resultUtil = douGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "小件物流补差价", orderLogistics.getType(), String.valueOf(orderId), 2); |
| | | paymentRecordService.saveData(1, orderLogistics.getUserId(), 1, orderId, orderLogistics.getType(), 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | return "LO" + sdf.format(new Date()) + UUIDUtil.getRandomCode(5); |
| | | } |
| | | @Autowired |
| | | private DouGongPayUtil douGongPayUtil; |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRES_NEW) |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", orderLogistics.getType(), String.valueOf(orderId), 4); |
| | | resultUtil = douGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", orderLogistics.getType(), String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, orderLogistics.getType(), 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | // resultUtil = payMoneyUtil.alipay("感谢费", "感谢费", "", orderId + "_" + orderLogistics.getType() + "_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/aliPayThankYouFee"); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", orderLogistics.getType(), String.valueOf(orderId), 4); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", orderLogistics.getType(), String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(1, uid, 1, orderId, orderLogistics.getType(), 2, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 3){//余额支付 |
| | |
| | | map.put("id", integer); |
| | | return ResultUtil.success(map); |
| | | } |
| | | |
| | | @Autowired |
| | | private DouGongPayUtil douGongPayUtil; |
| | | |
| | | /** |
| | | * 取消订单操作 |
| | |
| | | orderCancelService.updateById(orderCancel); |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("订单取消", "", id + "_1_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/wxCancelOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 1, String.valueOf(id), 5); |
| | | resultUtil = douGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 1, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, id, 1, 1, query.getMoney(), "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 1, String.valueOf(orderId), 1); |
| | | resultUtil = douGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 1, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderId, 1, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | // DG支付 |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 1, String.valueOf(orderId), 1); |
| | | resultUtil = douGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 1, String.valueOf(orderId), 1); |
| | | paymentRecordService.saveData(1, orderPrivateCar.getUserId(), 1, orderId, 1, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2) {//支付宝支付 |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_1_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 1, String.valueOf(orderId), 4); |
| | | resultUtil = douGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 1, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 1, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | |
| | | return taxiCardWapper; |
| | | } |
| | | |
| | | @Autowired |
| | | private DouGongPayUtil douGongPayUtil; |
| | | @Override |
| | | public ResultUtil payTaxiCard(Integer uid, Integer id, Integer payType, Integer type) throws Exception { |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("购买出行卡", "", ToolUtil.getRandomString(10), taxiCard.getSellingPrice().toString(), "/base/wxPayTaxiCardPaymentSpread", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(taxiCard.getSellingPrice().toString(), userInfo.getAppletsOpenId(), "购买出行卡", 1, String.valueOf(id), 3); |
| | | resultUtil = douGongPayUtil.wxPayOrder(taxiCard.getSellingPrice().toString(), userInfo.getAppletsOpenId(), "购买出行卡", 1, String.valueOf(id), 3); |
| | | paymentRecordService.saveData(4, taxiCardPayment.getUserId(), 1, taxiCardPayment.getId(), null, 1, taxiCard.getSellingPrice(), "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | |
| | | userInfoMapper.setUrgentUser(name, phone, uid); |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private DouGongPayUtil douGongPayUtil; |
| | | /** |
| | | * 充值余额 |
| | | * @param payType |
| | |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // return payMoneyUtil.weixinpay("余额充值", uid.toString(), integer.toString(), money.toString(), "/base/wxCancelUserBalance", app, userInfo.getAppletsOpenId()); |
| | | |
| | | return DouGongPayUtil.wxPayOrder(money.toString(), appletsOpenId, "余额充值", uid, String.valueOf(integer), 6); |
| | | return douGongPayUtil.wxPayOrder(money.toString(), appletsOpenId, "余额充值", uid, String.valueOf(integer), 6); |
| | | |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(integer.toString(), 9, 5, uid.toString(), "余额充值", money, callbackPath + "/base/wxCancelUserBalance", uid.toString(), type, appletsOpenId); |
| | | // if(map.get("code").equals("200")){ |
| | |
| | | orderCancelService.updateById(orderCancel); |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("订单取消", "", id + "_2_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/wxCancelOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 2, String.valueOf(id), 5); |
| | | resultUtil = douGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 2, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, id, 2, 1, query.getMoney(), "", 1);//添加预支付数据 |
| | | |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(id + ",2", 9, 5, uid.toString(), "订单取消", query.getMoney(), callbackPath + "/base/wxCancelOrderTaxi", "", type, appletsOpenId); |
| | |
| | | orderCancel.setPayType(2); |
| | | orderCancelService.updateById(orderCancel); |
| | | // resultUtil = payMoneyUtil.alipay("订单取消", "订单取消", "", id + "_2_" + UUIDUtil.getRandomCode(5), query.getMoney().toString(), "/base/aliCancelOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 2, String.valueOf(id), 5); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(query.getMoney().toString(), userInfo.getAppletsOpenId(), "订单取消", 2, String.valueOf(id), 5); |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, id, 2, 2, query.getMoney(), "", 1);//添加预支付数据 |
| | | |
| | | // Map<String, String> map = icbcPayUtil.placeAnOrder(id + ",2", 10, 5, uid.toString(), "订单取消", query.getMoney(), callbackPath + "/base/aliCancelOrderTaxi", "", type, null); |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | resultUtil = douGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, orderId, 2, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |
| | | // resultUtil = payMoneyUtil.alipay("完成订单", "完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/aliPayOrderTaxi"); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | resultUtil = DouGongPayUtil.aliPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, orderId, 2, 2, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | |
| | | } |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("完成订单", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), orderMoney.toString(), "/base/wxPayOrderTaxi", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | resultUtil = douGongPayUtil.wxPayOrder(orderMoney.toString(), userInfo.getAppletsOpenId(), "完成订单", 2, String.valueOf(orderId), 1); |
| | | |
| | | paymentRecordService.saveData(1, orderTaxi.getUserId(), 1, orderId, 2, 1, orderMoney, "", 1);//添加预支付数据 |
| | | } |
| | |
| | | return "TA" + sdf.format(new Date()) + UUIDUtil.getRandomCode(5); |
| | | } |
| | | |
| | | @Autowired |
| | | private DouGongPayUtil douGongPayUtil; |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRES_NEW) |
| | | public ResultUtil payThankYouFee(Integer uid, Integer orderId, Double money, Integer payType, Integer type) throws Exception { |
| | |
| | | if(payType == 1){//微信支付 |
| | | String app = type == 1 ? "APP" : "JSAPI"; |
| | | // resultUtil = payMoneyUtil.weixinpay("感谢费", "", orderId + "_2_" + UUIDUtil.getRandomCode(5), money.toString(), "/base/wxPayThankYouFee", app, userInfo.getAppletsOpenId()); |
| | | resultUtil = DouGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 2, String.valueOf(orderId), 4); |
| | | resultUtil = douGongPayUtil.wxPayOrder(money.toString(), userInfo.getAppletsOpenId(), "感谢费", 2, String.valueOf(orderId), 4); |
| | | paymentRecordService.saveData(3, uid, 1, orderId, 2, 1, money, "", 1);//添加预支付数据 |
| | | } |
| | | if(payType == 2){//支付宝支付 |