|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.cweb.controller; |
|
|
|
package com.cweb.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
|
|
import com.alipay.api.domain.PayModeModel; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.hfkj.channel.lakala.LaKaLaTradeService; |
|
|
|
import com.hfkj.channel.lakala.LaKaLaTradeService; |
|
|
@ -189,6 +190,10 @@ public class BsTradeOrderController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
|
|
|
System.out.println(new BigDecimal("50").compareTo(new BigDecimal("1000"))); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/createJSAPIOrder",method = RequestMethod.POST) |
|
|
|
@RequestMapping(value="/createJSAPIOrder",method = RequestMethod.POST) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "创建交易【JSAPI】订单") |
|
|
|
@ApiOperation(value = "创建交易【JSAPI】订单") |
|
|
@ -197,6 +202,7 @@ public class BsTradeOrderController { |
|
|
|
if (body == null |
|
|
|
if (body == null |
|
|
|
|| StringUtils.isBlank(body.getString("qrCodeSN")) |
|
|
|
|| StringUtils.isBlank(body.getString("qrCodeSN")) |
|
|
|
|| StringUtils.isBlank(body.getString("payMode")) |
|
|
|
|| StringUtils.isBlank(body.getString("payMode")) |
|
|
|
|
|
|
|
|| StringUtils.isBlank(body.getString("payUserId")) |
|
|
|
|| body.getBigDecimal("totalAmount") == null |
|
|
|
|| body.getBigDecimal("totalAmount") == null |
|
|
|
) { |
|
|
|
) { |
|
|
|
log.error("configStore error!", "参数错误"); |
|
|
|
log.error("configStore error!", "参数错误"); |
|
|
@ -208,11 +214,9 @@ public class BsTradeOrderController { |
|
|
|
log.error("configStore error!", "未知支付方式"); |
|
|
|
log.error("configStore error!", "未知支付方式"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知支付方式"); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知支付方式"); |
|
|
|
} |
|
|
|
} |
|
|
|
if ((TradeOrderPayModeEnum.ALIPAY.getCode().equals(payMode.getCode()) |
|
|
|
if (payMode.getCode().equals(TradeOrderPayModeEnum.UQRCODEPAY.getCode()) && |
|
|
|
|| TradeOrderPayModeEnum.WECHAT.getCode().equals(payMode.getCode())) |
|
|
|
body.getBigDecimal("totalAmount").compareTo(new BigDecimal("1000")) == 1) { |
|
|
|
&& StringUtils.isBlank(body.getString("payUserId"))) { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "云闪付单笔交易限额1000元"); |
|
|
|
log.error("configStore error!", "参数错误"); |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (body.getBigDecimal("totalAmount").compareTo(new BigDecimal("0.01")) == -1) { |
|
|
|
if (body.getBigDecimal("totalAmount").compareTo(new BigDecimal("0.01")) == -1) { |
|
|
|