Merge branch 'master' into dev

yy_dev
胡锐 1 year ago
commit 84b6c27f23
  1. 5
      bweb/src/main/java/com/bweb/controller/TestController.java
  2. 14
      cweb/src/main/java/com/cweb/controller/BsTradeOrderController.java

@ -40,10 +40,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.io.File;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
@Controller
@RequestMapping(value = "/test")

@ -1,6 +1,7 @@
package com.cweb.controller;
import com.alibaba.fastjson.JSONObject;
import com.alipay.api.domain.PayModeModel;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
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)
@ResponseBody
@ApiOperation(value = "创建交易【JSAPI】订单")
@ -197,6 +202,7 @@ public class BsTradeOrderController {
if (body == null
|| StringUtils.isBlank(body.getString("qrCodeSN"))
|| StringUtils.isBlank(body.getString("payMode"))
|| StringUtils.isBlank(body.getString("payUserId"))
|| body.getBigDecimal("totalAmount") == null
) {
log.error("configStore error!", "参数错误");
@ -208,11 +214,9 @@ public class BsTradeOrderController {
log.error("configStore error!", "未知支付方式");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知支付方式");
}
if ((TradeOrderPayModeEnum.ALIPAY.getCode().equals(payMode.getCode())
|| TradeOrderPayModeEnum.WECHAT.getCode().equals(payMode.getCode()))
&& StringUtils.isBlank(body.getString("payUserId"))) {
log.error("configStore error!", "参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
if (payMode.getCode().equals(TradeOrderPayModeEnum.UQRCODEPAY.getCode()) &&
body.getBigDecimal("totalAmount").compareTo(new BigDecimal("1000")) == 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "云闪付单笔交易限额1000元");
}
if (body.getBigDecimal("totalAmount").compareTo(new BigDecimal("0.01")) == -1) {

Loading…
Cancel
Save