| | |
| | | package com.stylefeng.guns.modular.system.controller.specialTrain; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.controller.general.TDriverController; |
| | | import com.stylefeng.guns.modular.system.controller.util.GetOpenBodySig; |
| | | import com.stylefeng.guns.modular.system.dao.LineShiftDriverMapper; |
| | | import com.stylefeng.guns.modular.system.dao.OrderCancelMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import org.apache.commons.lang.time.DateFormatUtils; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PayMoneyUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Sort; |
| | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | @Autowired |
| | | private TDriverController tDriverController; |
| | | |
| | | |
| | | /** |
| | | * 取消跨城出行订单 |
| | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | public static ResultUtil cancleMoney(BigDecimal amount,String no) throws Exception { |
| | | JSONObject json = new JSONObject(); |
| | | json.put("requestTimestamp", DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); // 报文请求时间 |
| | | // json.put("merOrderId", Util.getMerOrderId("34U0")); // 商户订单号 |
| | | json.put("merOrderId", no); // 商户订单号 |
| | | json.put("mid", "898150841210108"); // 商户号 |
| | | json.put("tid", "84UJWSE8"); // 终端号 |
| | | json.put("instMid", "QRPAYDEFAULT"); // 业务类型 |
| | | BigDecimal multiply = amount.multiply(new BigDecimal(100)); |
| | | int money = multiply.intValue(); |
| | | json.put("refundAmount",money); // 支付总金额 |
| | | System.err.println("请求报文json:\n" + json); |
| | | String url = "https://test-api-open.chinaums.com/v1/netpay/refund"; |
| | | // String url = "https://api-mop.chinaums.com/v1/netpay/refund"; |
| | | //OPEN-BODY-SIG 方式 |
| | | String result = GetOpenBodySig.sendOpenBodySig(url, json.toString()); |
| | | System.err.println("响应报文json:\n" + result); |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | Object appPayRequest = jsonObject.get("appPayRequest"); |
| | | System.out.println(appPayRequest); |
| | | return ResultUtil.success(appPayRequest); |
| | | } |
| | | |
| | | @Autowired |
| | | private ITEnterpriseWithdrawalService tEnterpriseWithdrawalService; |
| | | @Autowired |
| | | private IUserWithdrawalService userWithdrawalService; |
| | | |
| | | |
| | | } |