1.太米支付调试
This commit is contained in:
parent
7d2d80e89e
commit
4b3b0f1b42
|
@ -1,13 +1,12 @@
|
||||||
package com.ruoyi.web.controller.common;
|
package com.ruoyi.web.controller.common;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.ruoyi.common.constant.ServiceConstants;
|
import com.ruoyi.common.constant.ServiceConstants;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.pay.syb.util.SybUtil;
|
|
||||||
import com.ruoyi.common.pay.tm.TmPayService;
|
import com.ruoyi.common.pay.tm.TmPayService;
|
||||||
import com.ruoyi.common.pay.tm.enums.PayStatus;
|
import com.ruoyi.common.pay.tm.enums.PayStatus;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.http.HttpUtils;
|
||||||
import com.ruoyi.system.domain.EtCallbackLog;
|
import com.ruoyi.system.domain.EtCallbackLog;
|
||||||
import com.ruoyi.system.domain.vo.AttachVo;
|
import com.ruoyi.system.domain.vo.AttachVo;
|
||||||
import com.ruoyi.system.mapper.EtCallbackLogMapper;
|
import com.ruoyi.system.mapper.EtCallbackLogMapper;
|
||||||
|
@ -24,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.TreeMap;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ScheduledExecutorService;
|
import java.util.concurrent.ScheduledExecutorService;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
@ -89,35 +88,52 @@ public class CallbackController {
|
||||||
@RequestMapping(value = "/tmwx", method = RequestMethod.POST)
|
@RequestMapping(value = "/tmwx", method = RequestMethod.POST)
|
||||||
public String tmwx(HttpServletRequest request) {
|
public String tmwx(HttpServletRequest request) {
|
||||||
try {
|
try {
|
||||||
request.setCharacterEncoding("UTF-8");//通知传输的编码为GBK
|
String body = HttpUtils.getBody(request);
|
||||||
// 获取所有参数
|
log.info("【太米微信支付回调】接收对象 : " + body);
|
||||||
TreeMap<String, String> params = SybUtil.getParams(request);
|
// 先把body转成map
|
||||||
log.info("【太米微信支付回调】接收对象 : " + JSON.toJSONString(params));
|
Map<String, Object> params = JSON.parseObject(body, Map.class);
|
||||||
// 验证签名
|
// 验证签名
|
||||||
boolean sign = tmPayService.validSign(params);
|
boolean sign = tmPayService.validSign(params);
|
||||||
if (sign) {
|
if (sign) {
|
||||||
EtCallbackLog etCallbackLog = new EtCallbackLog();
|
EtCallbackLog etCallbackLog = new EtCallbackLog();
|
||||||
etCallbackLog.setBody(JSON.toJSONString(params));
|
etCallbackLog.setBody(body);
|
||||||
etCallbackLog.setType("1");
|
etCallbackLog.setType("1");
|
||||||
String payType = params.get("payType"); // 交易类型
|
String payType = (String)params.get("payType"); // 交易类型
|
||||||
String outTradeNo = params.get("outTradeId"); // 商户自定义订单号
|
String outTradeNo = (String)params.get("outTradeId"); // 商户自定义订单号
|
||||||
String trxStatus = params.get("payStatus"); // 交易结果
|
String trxStatus = (String)params.get("payStatus"); // 交易结果
|
||||||
String remark = params.get("remark"); // 附加信息,用于判断业务类型
|
// 构建attachVo
|
||||||
AttachVo attachVo = JSONObject.parseObject(remark,AttachVo.class);
|
AttachVo attach = generateAttach(outTradeNo);
|
||||||
log.info("【太米微信支付回调】回调参数--附加信息 : 【{}】",JSON.toJSONString(attachVo));
|
log.info("【太米微信支付回调】创建的attachVo : " + JSON.toJSONString(attach));
|
||||||
if(PayStatus.isSuccess(trxStatus) && payType.equals("wx_pay")) {
|
if(PayStatus.isSuccess(trxStatus) && payType.equals("wx_pay")) {
|
||||||
// 新版支付订单
|
// 新版支付订单
|
||||||
callbackService.businessHandle(outTradeNo,attachVo, ServiceConstants.PAY_TYPE_TLWX);
|
callbackService.businessHandle(outTradeNo,attach, ServiceConstants.PAY_TYPE_TLWX);
|
||||||
}
|
}
|
||||||
//异步保存回调日志
|
//异步保存回调日志
|
||||||
asynchronousSaveCallbackLog(etCallbackLog);
|
asynchronousSaveCallbackLog(etCallbackLog);
|
||||||
|
}else {
|
||||||
|
throw new ServiceException("签名验证失败");
|
||||||
}
|
}
|
||||||
return "error";
|
return "{\"result\":\"SUCCESS\"}";
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException(e.getMessage());
|
throw new ServiceException(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private AttachVo generateAttach(String outTradeNo) {
|
||||||
|
AttachVo attachVo = new AttachVo();
|
||||||
|
// 如果outTradeNo以tmwx开头,则说明是attachVo.setType(1)
|
||||||
|
if(outTradeNo.startsWith("tmwx")){
|
||||||
|
attachVo.setType("1");
|
||||||
|
}else if (outTradeNo.startsWith("tmyj")){
|
||||||
|
attachVo.setType("4");
|
||||||
|
}else if(outTradeNo.startsWith("tmyhj")){
|
||||||
|
attachVo.setType("3");
|
||||||
|
}else{
|
||||||
|
throw new ServiceException("订单号格式错误");
|
||||||
|
}
|
||||||
|
return attachVo;
|
||||||
|
}
|
||||||
|
|
||||||
private void asynchronousSaveCallbackLog(EtCallbackLog etCallbackLog) {
|
private void asynchronousSaveCallbackLog(EtCallbackLog etCallbackLog) {
|
||||||
//开异步线程保存回调参数
|
//开异步线程保存回调参数
|
||||||
scheduledExecutorService.schedule(() -> {
|
scheduledExecutorService.schedule(() -> {
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class Application {
|
||||||
* 订单查询
|
* 订单查询
|
||||||
*/
|
*/
|
||||||
public static void orderQuery(String outTradeId) {
|
public static void orderQuery(String outTradeId) {
|
||||||
HashMap<String, String> body = new HashMap<String, String>();
|
HashMap<String, Object> body = new HashMap<>();
|
||||||
body.put("outTradeId", outTradeId);
|
body.put("outTradeId", outTradeId);
|
||||||
body.put("terminalType", "1");
|
body.put("terminalType", "1");
|
||||||
body.put("shopId", "488");
|
body.put("shopId", "488");
|
||||||
|
@ -31,7 +31,7 @@ public class Application {
|
||||||
* 退款
|
* 退款
|
||||||
*/
|
*/
|
||||||
public static void refund() {
|
public static void refund() {
|
||||||
HashMap<String, String> body = new HashMap<String, String>();
|
HashMap<String,Object> body = new HashMap<>();
|
||||||
body.put("refundFee", "0.01");
|
body.put("refundFee", "0.01");
|
||||||
body.put("terminalType", "1");
|
body.put("terminalType", "1");
|
||||||
body.put("tradeId", "1");
|
body.put("tradeId", "1");
|
||||||
|
@ -62,7 +62,7 @@ public class Application {
|
||||||
* 小程序支付
|
* 小程序支付
|
||||||
*/
|
*/
|
||||||
public static void miniPay() {
|
public static void miniPay() {
|
||||||
HashMap<String, String> body = new HashMap<String, String>();
|
HashMap<String, Object> body = new HashMap<>();
|
||||||
body.put("payAmount", "1");
|
body.put("payAmount", "1");
|
||||||
body.put("terminalType", "1");
|
body.put("terminalType", "1");
|
||||||
body.put("shopId", "488");
|
body.put("shopId", "488");
|
||||||
|
@ -77,13 +77,13 @@ public class Application {
|
||||||
doPost("/open/Pay/miniPay", body);
|
doPost("/open/Pay/miniPay", body);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void doPost(String url, HashMap<String, String> body) {
|
private static void doPost(String url, HashMap<String, Object> body) {
|
||||||
body.put("developerId", "100001");
|
body.put("developerId", "100001");
|
||||||
body.put("version", "1.0");
|
body.put("version", "1.0");
|
||||||
body.put("timestamp", String.valueOf(System.currentTimeMillis() / 1000));
|
body.put("timestamp", String.valueOf(System.currentTimeMillis() / 1000));
|
||||||
body.put("nonceStr", StringUtils.getRandomString(16));
|
body.put("nonceStr", TmPayUtil.getRandomString(16));
|
||||||
String bodyStr = StringUtils.getAsciiSort(body);
|
String bodyStr = TmPayUtil.getAsciiSort(body);
|
||||||
String sign = Md5Utils.getMD5Code(bodyStr+"&key="+SIGNKEY).toUpperCase();
|
String sign = TmPayUtil.getMD5Code(bodyStr+"&key="+SIGNKEY).toUpperCase();
|
||||||
body.put("sign", sign);
|
body.put("sign", sign);
|
||||||
|
|
||||||
HashMap<String, String> headerData = new HashMap<String, String>();
|
HashMap<String, String> headerData = new HashMap<String, String>();
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
package com.ruoyi.common.pay.tm;
|
|
||||||
|
|
||||||
import java.security.MessageDigest;
|
|
||||||
import java.security.NoSuchAlgorithmException;
|
|
||||||
|
|
||||||
public class Md5Utils {
|
|
||||||
|
|
||||||
// 全局数组
|
|
||||||
private final static String[] strDigits = { "0", "1", "2", "3", "4", "5",
|
|
||||||
"6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
|
|
||||||
|
|
||||||
// 返回形式为数字跟字符串
|
|
||||||
public static String byteToArrayString(byte bByte) {
|
|
||||||
int iRet = bByte;
|
|
||||||
if (iRet < 0) {
|
|
||||||
iRet += 256;
|
|
||||||
}
|
|
||||||
int iD1 = iRet / 16;
|
|
||||||
int iD2 = iRet % 16;
|
|
||||||
return strDigits[iD1] + strDigits[iD2];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 返回形式只为数字
|
|
||||||
public static String byteToNum(byte bByte) {
|
|
||||||
int iRet = bByte;
|
|
||||||
if (iRet < 0) {
|
|
||||||
iRet += 256;
|
|
||||||
}
|
|
||||||
return String.valueOf(iRet);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 转换字节数组为16进制字串
|
|
||||||
public static String byteToString(byte[] bByte) {
|
|
||||||
StringBuffer sBuffer = new StringBuffer();
|
|
||||||
for (int i = 0; i < bByte.length; i++) {
|
|
||||||
sBuffer.append(byteToArrayString(bByte[i]));
|
|
||||||
}
|
|
||||||
return sBuffer.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* md5 加密
|
|
||||||
* @param strObj
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String getMD5Code(String strObj) {
|
|
||||||
String resultString = null;
|
|
||||||
try {
|
|
||||||
resultString = new String(strObj);
|
|
||||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
|
||||||
// md.digest() 该函数返回值为存放哈希值结果的byte数组
|
|
||||||
resultString = byteToString(md.digest(strObj.getBytes()));
|
|
||||||
} catch (NoSuchAlgorithmException ex) {
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
return resultString;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,73 +0,0 @@
|
||||||
package com.ruoyi.common.pay.tm;
|
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
public class StringUtils {
|
|
||||||
|
|
||||||
private static Random random = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取随机数
|
|
||||||
* @param length
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String getRandomString(int length) {
|
|
||||||
// 定义一个字符串(A-Z,a-z1-9)即62位;
|
|
||||||
String str = "zxcvbnmlkjhgfdsaqwertyuiopQWERTYUIOPASDFGHJKLZXCVBNM1234567890";
|
|
||||||
// 由Random生成随机数
|
|
||||||
if (random == null) {
|
|
||||||
random = new Random();
|
|
||||||
}
|
|
||||||
StringBuffer sb = new StringBuffer();
|
|
||||||
// 长度为几就循环几次
|
|
||||||
for (int i = 0; i < length; ++i) {
|
|
||||||
// 产生0-61的数字
|
|
||||||
int number = random.nextInt(62);
|
|
||||||
// 将产生的数字通过length次承载到sb中
|
|
||||||
sb.append(str.charAt(number));
|
|
||||||
}
|
|
||||||
// 将承载的字符转换成字符串
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getUUID() {
|
|
||||||
return UUID.randomUUID().toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getUUIDNoLine() {
|
|
||||||
String s = UUID.randomUUID().toString();
|
|
||||||
return s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18) + s.substring(19, 23) + s.substring(24);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参数名ASCII码从小到大排序(字典序)
|
|
||||||
* @param map
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String getAsciiSort(Map<String, String> map) {
|
|
||||||
List<Entry<String, String>> infoIds = new ArrayList<Entry<String, String>>(map.entrySet());
|
|
||||||
// 对所有传入参数按照字段名的 ASCII 码从小到大排序(字典序)
|
|
||||||
Collections.sort(infoIds, new Comparator<Entry<String, String>>() {
|
|
||||||
public int compare(Entry<String, String> o1, Entry<String, String> o2) {
|
|
||||||
return ((String) o1.getKey()).compareToIgnoreCase((String) o2.getKey());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 构造签名键值对的格式
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
for (Entry<String, String> item : infoIds) {
|
|
||||||
if (item.getKey() != null || item.getKey() != "") {
|
|
||||||
String key = item.getKey();
|
|
||||||
String val = item.getValue();
|
|
||||||
if (!(val == "" || val == null)) {
|
|
||||||
sb.append(key + "=" + val + "&");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(sb.toString().endsWith("&")) {
|
|
||||||
sb.deleteCharAt(sb.length() - 1);
|
|
||||||
}
|
|
||||||
return sb.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -11,7 +11,7 @@ import com.ruoyi.common.utils.http.HttpUtils;
|
||||||
import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
|
import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.TreeMap;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 太米支付
|
* 太米支付
|
||||||
|
@ -19,17 +19,17 @@ import java.util.TreeMap;
|
||||||
@Service
|
@Service
|
||||||
public class TmPayService {
|
public class TmPayService {
|
||||||
|
|
||||||
private final static String SIGNKEY = "ac6d97e67b444b7a43edfc9182634786";
|
private final static String SIGNKEY = "b4ixpiogfj5vu3tbkv23gj0dvo2j2ksz";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单查询
|
* 订单查询
|
||||||
*/
|
*/
|
||||||
public static TmTradeInfo orderQuery(IChannelInfo channel, String outTradeNo) {
|
public static TmTradeInfo orderQuery(IChannelInfo channel, String outTradeNo) {
|
||||||
HashMap<String, String> body = new HashMap<String, String>();
|
HashMap<String, Object> body = new HashMap<>();
|
||||||
body.put("outTradeId", outTradeNo);
|
body.put("outTradeId", outTradeNo);
|
||||||
body.put("terminalType", "1");
|
body.put("terminalType", "1");
|
||||||
body.put("shopId", channel.getShopId());
|
body.put("shopId", channel.getShopId());
|
||||||
String response = doPost("/open/Pay/orderQuery", body,channel);
|
String response = doPost(channel.getHttpUrl() + "/open/Pay/orderQuery", body,channel);
|
||||||
if (com.ruoyi.common.utils.StringUtils.hasText(response)) {
|
if (com.ruoyi.common.utils.StringUtils.hasText(response)) {
|
||||||
JSONObject jsonResponse = JSON.parseObject(response);
|
JSONObject jsonResponse = JSON.parseObject(response);
|
||||||
if (jsonResponse.getInteger("errCode") == 0 && "ok".equals(jsonResponse.getString("errMsg"))) {
|
if (jsonResponse.getInteger("errCode") == 0 && "ok".equals(jsonResponse.getString("errMsg"))) {
|
||||||
|
@ -47,12 +47,12 @@ public class TmPayService {
|
||||||
* 退款
|
* 退款
|
||||||
*/
|
*/
|
||||||
public static RefundInfo refund(IChannelInfo channel,RefundAble refundAble) {
|
public static RefundInfo refund(IChannelInfo channel,RefundAble refundAble) {
|
||||||
HashMap<String, String> body = new HashMap<String, String>();
|
HashMap<String, Object> body = new HashMap<>();
|
||||||
body.put("refundFee", String.valueOf(refundAble.getAmount()));
|
body.put("refundFee", String.valueOf(refundAble.getAmount()));
|
||||||
body.put("terminalType", "1");
|
body.put("terminalType", "1");
|
||||||
body.put("outTradeId", refundAble.getOutRefundNo());
|
body.put("outTradeId", refundAble.getOutRefundNo());
|
||||||
body.put("shopId", channel.getShopId());
|
body.put("shopId", channel.getShopId());
|
||||||
String response = doPost("/open/Pay/refund", body,channel);
|
String response = doPost(channel.getHttpUrl() + "/open/Pay/refund", body,channel);
|
||||||
if (com.ruoyi.common.utils.StringUtils.hasText(response)) {
|
if (com.ruoyi.common.utils.StringUtils.hasText(response)) {
|
||||||
JSONObject jsonResponse = JSON.parseObject(response);
|
JSONObject jsonResponse = JSON.parseObject(response);
|
||||||
if (jsonResponse.getInteger("errCode") == 0 && "ok".equals(jsonResponse.getString("errMsg"))) {
|
if (jsonResponse.getInteger("errCode") == 0 && "ok".equals(jsonResponse.getString("errMsg"))) {
|
||||||
|
@ -70,18 +70,18 @@ public class TmPayService {
|
||||||
* 关闭订单
|
* 关闭订单
|
||||||
*/
|
*/
|
||||||
public static void closeOrder(IChannelInfo channel, String outTradeNo) {
|
public static void closeOrder(IChannelInfo channel, String outTradeNo) {
|
||||||
HashMap<String, String> body = new HashMap<String, String>();
|
HashMap<String, Object> body = new HashMap<>();
|
||||||
body.put("outTradeId", outTradeNo);
|
body.put("outTradeId", outTradeNo);
|
||||||
body.put("terminalType", "1");
|
body.put("terminalType", "1");
|
||||||
body.put("shopId", channel.getShopId());
|
body.put("shopId", channel.getShopId());
|
||||||
doPost("/open/Pay/orderClose", body,channel);
|
doPost(channel.getHttpUrl() + "/open/Pay/orderClose", body,channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小程序支付
|
* 小程序支付
|
||||||
*/
|
*/
|
||||||
public static PrepayWithRequestPaymentResponse pay(IChannelInfo channel, Payable payable) {
|
public static PrepayWithRequestPaymentResponse pay(IChannelInfo channel, Payable payable) {
|
||||||
HashMap<String, String> body = new HashMap<>();
|
HashMap<String, Object> body = new HashMap<>();
|
||||||
body.put("payAmount", String.valueOf(payable.getAmount()));
|
body.put("payAmount", String.valueOf(payable.getAmount()));
|
||||||
body.put("terminalType", "1");
|
body.put("terminalType", "1");
|
||||||
body.put("shopId", channel.getShopId()); // 从渠道获取shopId
|
body.put("shopId", channel.getShopId()); // 从渠道获取shopId
|
||||||
|
@ -110,14 +110,14 @@ public class TmPayService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static String doPost(String url, HashMap<String, String> body, IChannelInfo channel) {
|
private static String doPost(String url, HashMap<String, Object> body, IChannelInfo channel) {
|
||||||
body.put("developerId", channel.getDeveloperId());
|
body.put("developerId", channel.getDeveloperId());
|
||||||
body.put("version", "1.0");
|
body.put("version", "1.0");
|
||||||
body.put("timestamp", String.valueOf(System.currentTimeMillis() / 1000));
|
body.put("timestamp", String.valueOf(System.currentTimeMillis() / 1000));
|
||||||
body.put("nonceStr", StringUtils.getRandomString(16));
|
body.put("nonceStr", TmPayUtil.getRandomString(16));
|
||||||
|
|
||||||
String bodyStr = StringUtils.getAsciiSort(body);
|
String bodyStr = TmPayUtil.getAsciiSort(body);
|
||||||
String sign = Md5Utils.getMD5Code(bodyStr + "&key=" + channel.getSignKey()).toUpperCase();
|
String sign = TmPayUtil.getMD5Code(bodyStr + "&key=" + channel.getSignKey()).toUpperCase();
|
||||||
body.put("sign", sign);
|
body.put("sign", sign);
|
||||||
|
|
||||||
HashMap<String, String> headerData = new HashMap<>();
|
HashMap<String, String> headerData = new HashMap<>();
|
||||||
|
@ -127,17 +127,20 @@ public class TmPayService {
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean validSign(TreeMap<String, String> params) {
|
public boolean validSign(Map<String, Object> params) {
|
||||||
// 获取传递过来的签名
|
// 获取传递过来的签名
|
||||||
String receivedSign = params.get("sign"); // 获取签名字段
|
String receivedSign = (String)params.get("sign");
|
||||||
|
// 获取签名字段
|
||||||
|
System.out.println("获取到的签名-------------:"+receivedSign);
|
||||||
if (receivedSign == null) {
|
if (receivedSign == null) {
|
||||||
return false; // 如果没有传递签名,验签失败
|
return false; // 如果没有传递签名,验签失败
|
||||||
}
|
}
|
||||||
// 移除签名字段后,重新生成签名
|
// 移除签名字段后,重新生成签名
|
||||||
params.remove("sign");
|
params.remove("sign");
|
||||||
// 按照请求时的签名逻辑,生成签名字符串
|
// 按照请求时的签名逻辑,生成签名字符串
|
||||||
String paramsStr = StringUtils.getAsciiSort(params); // 按ASCII排序
|
String paramsStr = TmPayUtil.getAsciiSort(params); // 按ASCII排序
|
||||||
String generatedSign = Md5Utils.getMD5Code(paramsStr + "&key=" + SIGNKEY).toUpperCase(); // 重新生成签名
|
String generatedSign = TmPayUtil.getMD5Code(paramsStr + "&key=" + SIGNKEY).toUpperCase(); // 重新生成签名
|
||||||
|
System.out.println("新生成的签名-----------:"+generatedSign);
|
||||||
// 比较签名是否一致
|
// 比较签名是否一致
|
||||||
return generatedSign.equals(receivedSign);
|
return generatedSign.equals(receivedSign);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,131 @@
|
||||||
|
package com.ruoyi.common.pay.tm;
|
||||||
|
|
||||||
|
import java.security.MessageDigest;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
public class TmPayUtil {
|
||||||
|
// 全局数组
|
||||||
|
private final static String[] strDigits = { "0", "1", "2", "3", "4", "5",
|
||||||
|
"6", "7", "8", "9", "a", "b", "c", "d", "e", "f" };
|
||||||
|
|
||||||
|
private static Random random = null;
|
||||||
|
|
||||||
|
// 返回形式为数字跟字符串
|
||||||
|
public static String byteToArrayString(byte bByte) {
|
||||||
|
int iRet = bByte;
|
||||||
|
if (iRet < 0) {
|
||||||
|
iRet += 256;
|
||||||
|
}
|
||||||
|
int iD1 = iRet / 16;
|
||||||
|
int iD2 = iRet % 16;
|
||||||
|
return strDigits[iD1] + strDigits[iD2];
|
||||||
|
}
|
||||||
|
|
||||||
|
// 返回形式只为数字
|
||||||
|
public static String byteToNum(byte bByte) {
|
||||||
|
int iRet = bByte;
|
||||||
|
if (iRet < 0) {
|
||||||
|
iRet += 256;
|
||||||
|
}
|
||||||
|
return String.valueOf(iRet);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换字节数组为16进制字串
|
||||||
|
public static String byteToString(byte[] bByte) {
|
||||||
|
StringBuffer sBuffer = new StringBuffer();
|
||||||
|
for (int i = 0; i < bByte.length; i++) {
|
||||||
|
sBuffer.append(byteToArrayString(bByte[i]));
|
||||||
|
}
|
||||||
|
return sBuffer.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* md5 加密
|
||||||
|
* @param strObj
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getMD5Code(String strObj) {
|
||||||
|
String resultString = null;
|
||||||
|
try {
|
||||||
|
resultString = new String(strObj);
|
||||||
|
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||||
|
// md.digest() 该函数返回值为存放哈希值结果的byte数组
|
||||||
|
resultString = byteToString(md.digest(strObj.getBytes()));
|
||||||
|
} catch (NoSuchAlgorithmException ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
return resultString;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取随机数
|
||||||
|
* @param length
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getRandomString(int length) {
|
||||||
|
// 定义一个字符串(A-Z,a-z1-9)即62位;
|
||||||
|
String str = "zxcvbnmlkjhgfdsaqwertyuiopQWERTYUIOPASDFGHJKLZXCVBNM1234567890";
|
||||||
|
// 由Random生成随机数
|
||||||
|
if (random == null) {
|
||||||
|
random = new Random();
|
||||||
|
}
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
// 长度为几就循环几次
|
||||||
|
for (int i = 0; i < length; ++i) {
|
||||||
|
// 产生0-61的数字
|
||||||
|
int number = random.nextInt(62);
|
||||||
|
// 将产生的数字通过length次承载到sb中
|
||||||
|
sb.append(str.charAt(number));
|
||||||
|
}
|
||||||
|
// 将承载的字符转换成字符串
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getUUID() {
|
||||||
|
return UUID.randomUUID().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getUUIDNoLine() {
|
||||||
|
String s = UUID.randomUUID().toString();
|
||||||
|
return s.substring(0, 8) + s.substring(9, 13) + s.substring(14, 18) + s.substring(19, 23) + s.substring(24);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参数名ASCII码从小到大排序(字典序)
|
||||||
|
* @param map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getAsciiSort(Map<String, Object> map) {
|
||||||
|
List<Entry<String, Object>> infoIds = new ArrayList<>(map.entrySet());
|
||||||
|
|
||||||
|
// 对所有传入参数按照字段名的 ASCII 码从小到大排序(字典序)
|
||||||
|
Collections.sort(infoIds, new Comparator<Entry<String, Object>>() {
|
||||||
|
public int compare(Entry<String, Object> o1, Entry<String, Object> o2) {
|
||||||
|
return o1.getKey().compareToIgnoreCase(o2.getKey());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 构造签名键值对的格式
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (Entry<String, Object> item : infoIds) {
|
||||||
|
String key = item.getKey();
|
||||||
|
Object val = item.getValue();
|
||||||
|
|
||||||
|
if (key != null && !key.isEmpty() && val != null) {
|
||||||
|
sb.append(key).append("=").append(val.toString()).append("&");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sb.length() > 0 && sb.charAt(sb.length() - 1) == '&') {
|
||||||
|
sb.deleteCharAt(sb.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -152,7 +152,7 @@ public class TmTradeInfo {
|
||||||
/**
|
/**
|
||||||
* 已退款金额,单位分
|
* 已退款金额,单位分
|
||||||
*/
|
*/
|
||||||
private Integer refundAmount;
|
private String refundAmount;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 终端sn号
|
* 终端sn号
|
||||||
|
|
|
@ -187,8 +187,8 @@ public class CallbackServiceImpl implements CallbackService {
|
||||||
EtOrder order = orderService.selectEtOrderByOutTradeNo(outTradeNo);
|
EtOrder order = orderService.selectEtOrderByOutTradeNo(outTradeNo);
|
||||||
EtOrder order1 = new EtOrder();
|
EtOrder order1 = new EtOrder();
|
||||||
order1.setOrderId(order.getOrderId());
|
order1.setOrderId(order.getOrderId());
|
||||||
logger.info("【微信支付回调】订单信息 : " + JSON.toJSONString(order));
|
logger.info("【微信/太米支付回调】订单信息 : " + JSON.toJSONString(order));
|
||||||
logger.info("【微信支付回调】========== orderId : " + order.getOrderId());
|
logger.info("【微信/太米支付回调】========== orderId : " + order.getOrderId());
|
||||||
|
|
||||||
AsUser asUser = asUserMapper.selectUserById(order.getUserId());
|
AsUser asUser = asUserMapper.selectUserById(order.getUserId());
|
||||||
/** 支付回调逻辑 1. 处理预约还是开锁 电压 */
|
/** 支付回调逻辑 1. 处理预约还是开锁 电压 */
|
||||||
|
@ -197,13 +197,13 @@ public class CallbackServiceImpl implements CallbackService {
|
||||||
asDevice = asDeviceMapper.selectAsDeviceBySn(order.getSn());
|
asDevice = asDeviceMapper.selectAsDeviceBySn(order.getSn());
|
||||||
}
|
}
|
||||||
if(attachVo.getType().equals(ServiceConstants.BUSINESS_TYPE_RIDING)){
|
if(attachVo.getType().equals(ServiceConstants.BUSINESS_TYPE_RIDING)){
|
||||||
logger.info("【微信支付回调】骑行支付");
|
logger.info("【微信/太米支付回调】骑行支付");
|
||||||
// 1-骑行支付 关锁
|
// 1-骑行支付 关锁
|
||||||
EtOperatingArea area = etOperatingAreaService.selectEtOperatingAreaByAreaId(order.getAreaId());
|
EtOperatingArea area = etOperatingAreaService.selectEtOperatingAreaByAreaId(order.getAreaId());
|
||||||
order1.setMark("骑行支付");
|
order1.setMark("骑行支付");
|
||||||
logger.info("=================【微信支付回调】11111111==================");
|
logger.info("=================【微信支付回调】11111111==================");
|
||||||
if(ServiceConstants.RETURN_VERIFY_YES.equals(area.getReturnVerify())){
|
if(ServiceConstants.RETURN_VERIFY_YES.equals(area.getReturnVerify())){
|
||||||
logger.info("【微信支付回调】还车-----需要-----拍照审核");
|
logger.info("【微信/太米支付回调】还车-----需要-----拍照审核");
|
||||||
order1.setStatus(ServiceConstants.ORDER_STATUS_TO_BE_AUDIT);//如果还车需要拍照审核,状态为待审核
|
order1.setStatus(ServiceConstants.ORDER_STATUS_TO_BE_AUDIT);//如果还车需要拍照审核,状态为待审核
|
||||||
BigDecimal amount = order.getPayFee();
|
BigDecimal amount = order.getPayFee();
|
||||||
|
|
||||||
|
@ -212,13 +212,13 @@ public class CallbackServiceImpl implements CallbackService {
|
||||||
asynchronousMsg(order, amount);
|
asynchronousMsg(order, amount);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
logger.info("【微信支付回调】还车-----不需要-----拍照审核");
|
logger.info("【微信/太米支付回调】还车-----不需要-----拍照审核");
|
||||||
order1.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END);
|
order1.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END);
|
||||||
// 还车结算___小时后自动退押金---创建一个定时器TimerTask,计算出退还时间后,执行退款操作
|
// 还车结算___小时后自动退押金---创建一个定时器TimerTask,计算出退还时间后,执行退款操作
|
||||||
logger.info("=================【微信支付回调】22222222==================");
|
logger.info("=================【微信/太米支付回调】22222222==================");
|
||||||
// 退还押金处理
|
// 退还押金处理
|
||||||
refundDeposit(area.getDeposit(), order, asUser);
|
refundDeposit(area.getDeposit(), order, asUser);
|
||||||
logger.info("=================【微信支付回调】33333333==================");
|
logger.info("=================【微信/太米支付回调】33333333==================");
|
||||||
// 用户付款通知
|
// 用户付款通知
|
||||||
if("1".equals(area.getMsgSwitch())){
|
if("1".equals(area.getMsgSwitch())){
|
||||||
asynchronousMsg2(order);
|
asynchronousMsg2(order);
|
||||||
|
@ -228,14 +228,14 @@ public class CallbackServiceImpl implements CallbackService {
|
||||||
asDevice.setLockStatus(ServiceConstants.LOCK_STATUS_CLOSE);
|
asDevice.setLockStatus(ServiceConstants.LOCK_STATUS_CLOSE);
|
||||||
// 新增资金流水记录
|
// 新增资金流水记录
|
||||||
EtCapitalFlow capitalFlow = capitalFlowRecords(order, ServiceConstants.FLOW_TYPE_INCOME, ServiceConstants.ORDER_TYPE_RIDING, ServiceConstants.OWNER_TYPE_OPERATOR, null, ServiceConstants.PAY_TYPE_WX);
|
EtCapitalFlow capitalFlow = capitalFlowRecords(order, ServiceConstants.FLOW_TYPE_INCOME, ServiceConstants.ORDER_TYPE_RIDING, ServiceConstants.OWNER_TYPE_OPERATOR, null, ServiceConstants.PAY_TYPE_WX);
|
||||||
logger.info("=================【骑行支付回调-新增资金流水记录后】=================={}",JSON.toJSON(capitalFlow));
|
logger.info("=================【微信/太米支付回调-新增资金流水记录后】=================={}",JSON.toJSON(capitalFlow));
|
||||||
order1.setHandlingCharge(capitalFlow.getHandlingCharge());
|
order1.setHandlingCharge(capitalFlow.getHandlingCharge());
|
||||||
order1.setPlatformServiceFee(capitalFlow.getPlatformServiceFee());
|
order1.setPlatformServiceFee(capitalFlow.getPlatformServiceFee());
|
||||||
order1.setOperatorDividend(capitalFlow.getOperatorDividend());
|
order1.setOperatorDividend(capitalFlow.getOperatorDividend());
|
||||||
order1.setCost(getCost(order.getPayFee()));
|
order1.setCost(getCost(order.getPayFee()));
|
||||||
logger.info("=================【微信支付回调】4444444==================");
|
logger.info("=================【微信/太米支付回调】4444444==================");
|
||||||
}else if(attachVo.getType().equals(ServiceConstants.BUSINESS_TYPE_APPOINTMENT)){
|
}else if(attachVo.getType().equals(ServiceConstants.BUSINESS_TYPE_APPOINTMENT)){
|
||||||
logger.info("【微信支付回调】取消预约支付");
|
logger.info("【微信/太米支付回调】取消预约支付");
|
||||||
// 2-取消预约支付
|
// 2-取消预约支付
|
||||||
order1.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END);
|
order1.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END);
|
||||||
order1.setMark("取消预约支付");
|
order1.setMark("取消预约支付");
|
||||||
|
@ -243,34 +243,34 @@ public class CallbackServiceImpl implements CallbackService {
|
||||||
asDevice.setLockStatus(ServiceConstants.LOCK_STATUS_CLOSE);
|
asDevice.setLockStatus(ServiceConstants.LOCK_STATUS_CLOSE);
|
||||||
}else if(attachVo.getType().equals(ServiceConstants.ORDER_TYPE_COUPON)){
|
}else if(attachVo.getType().equals(ServiceConstants.ORDER_TYPE_COUPON)){
|
||||||
/** 优惠券订单 */
|
/** 优惠券订单 */
|
||||||
logger.info("【微信支付回调】优惠券支付");
|
logger.info("【微信/太米支付回调】优惠券支付");
|
||||||
// 3-优惠券支付
|
// 3-优惠券支付
|
||||||
order1.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END);
|
order1.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END);
|
||||||
order1.setMark("优惠券支付");
|
order1.setMark("优惠券支付");
|
||||||
// 优惠券成功处理逻辑
|
// 优惠券成功处理逻辑
|
||||||
couponSuccessHandle(order);
|
couponSuccessHandle(order);
|
||||||
}else if(attachVo.getType().equals(ServiceConstants.BUSINESS_TYPE_DEPOSIT)){
|
}else if(attachVo.getType().equals(ServiceConstants.BUSINESS_TYPE_DEPOSIT)){
|
||||||
logger.info("【微信支付回调】押金支付");
|
logger.info("【微信/太米支付回调】押金支付");
|
||||||
// 4-押金支付
|
// 4-押金支付
|
||||||
order1.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END);
|
order1.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END);
|
||||||
asUser.setBalance(order.getTotalFee());
|
asUser.setBalance(order.getTotalFee());
|
||||||
order1.setMark("押金支付");
|
order1.setMark("押金支付");
|
||||||
// 删除用户缓存
|
// 删除用户缓存
|
||||||
String token = attachVo.getToken();
|
String token = attachVo.getToken();
|
||||||
logger.info("【微信支付回调】删除用户缓存:"+token);
|
logger.info("【微信/太米支付回调】删除用户缓存:"+token);
|
||||||
if (StringUtils.isNotNull(token))
|
if (StringUtils.isNotNull(token))
|
||||||
{
|
{
|
||||||
redisCache.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + token);
|
redisCache.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + token);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
logger.error("【微信支付回调】 : 支付场景不存在");
|
logger.error("【微信/太米支付回调】 : 支付场景不存在");
|
||||||
throw new ServiceException("【微信支付回调】支付场景不存在");
|
throw new ServiceException("【微信/太米支付回调】支付场景不存在");
|
||||||
}
|
}
|
||||||
if(ObjectUtil.isNotNull(asDevice)){
|
if(ObjectUtil.isNotNull(asDevice)){
|
||||||
int device = asDeviceService.updateAsDevice(asDevice);
|
int device = asDeviceService.updateAsDevice(asDevice);
|
||||||
if(device==0){
|
if(device==0){
|
||||||
logger.error("【微信支付回调】更新车辆状态失败");
|
logger.error("【微信/太米支付回调】更新车辆状态失败");
|
||||||
throw new ServiceException("【微信支付回调】更新车辆状态失败");
|
throw new ServiceException("【微信/太米支付回调】更新车辆状态失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,27 +283,27 @@ public class CallbackServiceImpl implements CallbackService {
|
||||||
if(ObjectUtil.isNotNull(order.getLogId())){
|
if(ObjectUtil.isNotNull(order.getLogId())){
|
||||||
EtCouponUserLog couponUserLog = etCouponClaimLogMapper.selectEtCouponClaimLogByLogId(order.getLogId());
|
EtCouponUserLog couponUserLog = etCouponClaimLogMapper.selectEtCouponClaimLogByLogId(order.getLogId());
|
||||||
EtCoupon etCoupon = etCouponMapper.selectEtCouponByCouponId(couponUserLog.getCouponId());
|
EtCoupon etCoupon = etCouponMapper.selectEtCouponByCouponId(couponUserLog.getCouponId());
|
||||||
logger.info("【微信支付回调】优惠券信息 : " + JSON.toJSONString(etCoupon));
|
logger.info("【微信/太米支付回调】优惠券信息 : " + JSON.toJSONString(etCoupon));
|
||||||
if(ObjectUtil.isNotNull(etCoupon) && (etCoupon.getType().equals(ServiceConstants.COUPON_TYPE_DISCOUNT_CARD) || etCoupon.getType().equals(ServiceConstants.COUPON_TYPE_VOUCHER)) && couponUserLog.getLimitNum() > 0){
|
if(ObjectUtil.isNotNull(etCoupon) && (etCoupon.getType().equals(ServiceConstants.COUPON_TYPE_DISCOUNT_CARD) || etCoupon.getType().equals(ServiceConstants.COUPON_TYPE_VOUCHER)) && couponUserLog.getLimitNum() > 0){
|
||||||
etCouponClaimLogMapper.deductLimitNum(couponUserLog.getLogId());
|
etCouponClaimLogMapper.deductLimitNum(couponUserLog.getLogId());
|
||||||
logger.info("【微信支付回调】优惠券使用次数-1");
|
logger.info("【微信/太米支付回调】优惠券使用次数-1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.info("=================【微信支付回调】开始更新订单信息=================={}",JSON.toJSON(order1));
|
logger.info("=================【微信/太米支付回调】开始更新订单信息=================={}",JSON.toJSON(order1));
|
||||||
int updateEtOrder = orderService.updateEtOrder(order1);
|
int updateEtOrder = orderService.updateEtOrder(order1);
|
||||||
if(updateEtOrder==0){
|
if(updateEtOrder==0){
|
||||||
logger.error("【微信支付回调】更新订单信息失败");
|
logger.error("【微信/太米支付回调】更新订单信息失败");
|
||||||
throw new ServiceException("【微信支付回调】更新订单信息失败");
|
throw new ServiceException("【微信/太米支付回调】更新订单信息失败");
|
||||||
}
|
}
|
||||||
if(attachVo.getType().equals(ServiceConstants.BUSINESS_TYPE_DEPOSIT)){
|
if(attachVo.getType().equals(ServiceConstants.BUSINESS_TYPE_DEPOSIT)){
|
||||||
logger.info("=================【微信支付回调】开始更新用户信息==================");
|
logger.info("=================【微信/太米支付回调】开始更新用户信息==================");
|
||||||
int updateUser = userService.updateUser(asUser);
|
int updateUser = userService.updateUser(asUser);
|
||||||
if(updateUser==0){
|
if(updateUser==0){
|
||||||
logger.error("【微信支付回调】更新用户押金失败");
|
logger.error("【微信/太米支付回调】更新用户押金失败");
|
||||||
throw new ServiceException("【微信支付回调】更新用户押金失败");
|
throw new ServiceException("【微信/太米支付回调】更新用户押金失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.info("=================【微信支付回调】全部结束!!!!!==================");
|
logger.info("=================【微信/太米支付回调】全部结束!!!!!==================");
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
});
|
});
|
||||||
if(!execute)throw new ServiceException("管理员开锁失败");
|
if(!execute)throw new ServiceException("管理员开锁失败");
|
||||||
|
|
|
@ -122,7 +122,15 @@ public class WxPayService implements IWxPayService {
|
||||||
if(PayChannel.CT_WX.equalsCode(channelVO.getCode()) || PayChannel.YS_WX.equalsCode(channelVO.getCode())){
|
if(PayChannel.CT_WX.equalsCode(channelVO.getCode()) || PayChannel.YS_WX.equalsCode(channelVO.getCode())){
|
||||||
outTradeNo = IdUtils.getOrderNo("wx");
|
outTradeNo = IdUtils.getOrderNo("wx");
|
||||||
}else if(PayChannel.TM_WX.equalsCode(channelVO.getCode())){
|
}else if(PayChannel.TM_WX.equalsCode(channelVO.getCode())){
|
||||||
outTradeNo = IdUtils.getOrderNo("tlwx");
|
if(payType.equals(ServiceConstants.ORDER_TYPE_RIDING)){
|
||||||
|
outTradeNo = IdUtils.getOrderNo("tmwx");
|
||||||
|
} else if(payType.equals(ServiceConstants.BUSINESS_TYPE_DEPOSIT)){
|
||||||
|
outTradeNo = IdUtils.getOrderNo("tmyj");
|
||||||
|
}else if(payType.equals(ServiceConstants.ORDER_TYPE_COUPON)){
|
||||||
|
outTradeNo = IdUtils.getOrderNo("tmyhj");
|
||||||
|
}else{
|
||||||
|
throw new ServiceException("暂不支持该支付场景");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String type = order.getType();
|
String type = order.getType();
|
||||||
String description = type.equals(ServiceConstants.ORDER_TYPE_RIDING) ? "骑行订单-"+billNo : "押金充值-"+billNo;
|
String description = type.equals(ServiceConstants.ORDER_TYPE_RIDING) ? "骑行订单-"+billNo : "押金充值-"+billNo;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user