|
|
@@ -971,7 +971,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
dealFreeGoods(orderGoods, add);
|
|
|
}
|
|
|
|
|
|
- instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
+// instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
result.put("orderId", add.getOrderId());
|
|
|
result.put("orderSn", out_trade_no);
|
|
|
@@ -1153,7 +1153,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
for (OrderGoods orderGoods : freeList) {
|
|
|
dealFreeGoods(orderGoods, add);
|
|
|
}
|
|
|
- instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
+// instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
result.put("orderId", add.getOrderId());
|
|
|
result.put("orderSn", out_trade_no);
|
|
|
@@ -1636,10 +1636,12 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
//大于0元,获取微信支付信息
|
|
|
if (payPrice.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
payResult = iWxPayService.payment(pay_no, userVo.getOpenId(), body, payPrice);
|
|
|
- }else {
|
|
|
- instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
}
|
|
|
|
|
|
+// else {
|
|
|
+// instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
+// }
|
|
|
+
|
|
|
payResult.put("orderSn", out_trade_no);
|
|
|
return payResult;
|
|
|
}
|
|
|
@@ -1669,183 +1671,183 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
add.setOrderCost(BigDecimal.ZERO);
|
|
|
add.setOrderProfit(BigDecimal.ZERO);
|
|
|
|
|
|
- String TenantId = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
- //获取机构分成方式
|
|
|
- SysTenant tenant = sysTenantService
|
|
|
- .getOne(new LambdaQueryWrapper<SysTenant>()
|
|
|
- .eq(SysTenant::getTenantId,TenantId));
|
|
|
- Integer divideModel = tenant.getDivideModel();
|
|
|
- //成本和盈亏
|
|
|
- // 获取企业默认成本模板
|
|
|
- TopCostTp costTp = topCostTpService.getOne(new LambdaQueryWrapper<TopCostTp>()
|
|
|
- .eq(TopCostTp::getTenantId, TenantId).eq(TopCostTp::getDefaultStatus, 1).last("limit 1"));
|
|
|
- if (ObjectUtils.isNotNull(costTp)){
|
|
|
- List<OrderGoods> orderGoodsList = iOrderGoodsService
|
|
|
- .list(new LambdaQueryWrapper<OrderGoods>()
|
|
|
- .eq(OrderGoods::getOrderSn, add.getOrderSn())
|
|
|
- .ne(OrderGoods::getRefundStatus,2)
|
|
|
- .eq(OrderGoods::getStatus, 1));
|
|
|
- TopCostTpVo topCostTpVo = BeanUtil.toBean(costTp, TopCostTpVo.class);
|
|
|
- //成本项
|
|
|
- BigDecimal costTotal = new BigDecimal("0.00");//成本
|
|
|
- BigDecimal profitTotal = new BigDecimal("0.00"); //盈亏
|
|
|
- BigDecimal divideTotal = new BigDecimal("0.00");//分成
|
|
|
- for (OrderGoods orderGoods : orderGoodsList) {
|
|
|
- BigDecimal goodsPrice = orderGoods.getGoodsRealPrice();
|
|
|
- //商品业务层 新系统默认是学校业务
|
|
|
- String businessName = iOrderGoodsService.getBusinessById(orderGoods.getOrderGoodsId());
|
|
|
- List<TopCostTpItem> items = topCostTpItemService.getCostByBusiness(businessName, costTp.getTpId());
|
|
|
- if (CollectionUtils.isEmpty(items)) {
|
|
|
- //匹配不到成本项
|
|
|
- continue;
|
|
|
- }
|
|
|
- //根据订单金额匹配成本阶梯
|
|
|
- List<TopCostTpItem> tpItems = new ArrayList<>();
|
|
|
- for (TopCostTpItem x : items) {
|
|
|
- BigDecimal price = goodsPrice;
|
|
|
- if (ObjectUtil.isNotNull(x.getDockStatus()) && x.getDockStatus() == 1){
|
|
|
- //启用成本扣除项
|
|
|
- switch (x.getDockType()){
|
|
|
- case 1://百分比
|
|
|
- //成本扣除金额
|
|
|
- BigDecimal divide1 = x.getDockValue().divide(new BigDecimal("100"));
|
|
|
- BigDecimal multiply = goodsPrice.multiply(divide1);
|
|
|
- price = price.subtract(multiply);
|
|
|
- break;
|
|
|
- case 2://固定金额
|
|
|
- price = price.subtract(x.getDockValue());
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if ((ObjectUtils.isNull(x.getMinValue()) && ObjectUtils.isNull(x.getMaxValue()))
|
|
|
- || (price.compareTo(x.getMinValue()) > 0 && (x.getMaxValue().compareTo(new BigDecimal("-1.00")) == 0 || price.compareTo(x.getMaxValue()) < 0))
|
|
|
- || (price.compareTo(x.getMinValue()) == 0 && (x.getMaxValue().compareTo(new BigDecimal("-1.00")) == 0 || price.compareTo(x.getMaxValue()) == 0))){
|
|
|
- tpItems.add(x);
|
|
|
- }
|
|
|
- }
|
|
|
- if (CollectionUtils.isEmpty(tpItems)) {
|
|
|
- //匹配不到成本项阶梯值
|
|
|
- continue;
|
|
|
- }
|
|
|
-// if (tpItems.size() > 1) {
|
|
|
-// //匹配到多个成本项
|
|
|
-// throw new CustomException(String.format("成本项阶梯匹配有误!(有多个)请检查【%s,价格:%s】", businessName, goodsPrice.toString()));
|
|
|
+// String TenantId = ServletUtils.getRequest().getHeader("TenantId");
|
|
|
+// //获取机构分成方式
|
|
|
+// SysTenant tenant = sysTenantService
|
|
|
+// .getOne(new LambdaQueryWrapper<SysTenant>()
|
|
|
+// .eq(SysTenant::getTenantId,TenantId));
|
|
|
+// Integer divideModel = tenant.getDivideModel();
|
|
|
+// //成本和盈亏
|
|
|
+// // 获取企业默认成本模板
|
|
|
+// TopCostTp costTp = topCostTpService.getOne(new LambdaQueryWrapper<TopCostTp>()
|
|
|
+// .eq(TopCostTp::getTenantId, TenantId).eq(TopCostTp::getDefaultStatus, 1).last("limit 1"));
|
|
|
+// if (ObjectUtils.isNotNull(costTp)){
|
|
|
+// List<OrderGoods> orderGoodsList = iOrderGoodsService
|
|
|
+// .list(new LambdaQueryWrapper<OrderGoods>()
|
|
|
+// .eq(OrderGoods::getOrderSn, add.getOrderSn())
|
|
|
+// .ne(OrderGoods::getRefundStatus,2)
|
|
|
+// .eq(OrderGoods::getStatus, 1));
|
|
|
+// TopCostTpVo topCostTpVo = BeanUtil.toBean(costTp, TopCostTpVo.class);
|
|
|
+// //成本项
|
|
|
+// BigDecimal costTotal = new BigDecimal("0.00");//成本
|
|
|
+// BigDecimal profitTotal = new BigDecimal("0.00"); //盈亏
|
|
|
+// BigDecimal divideTotal = new BigDecimal("0.00");//分成
|
|
|
+// for (OrderGoods orderGoods : orderGoodsList) {
|
|
|
+// BigDecimal goodsPrice = orderGoods.getGoodsRealPrice();
|
|
|
+// //商品业务层 新系统默认是学校业务
|
|
|
+// String businessName = iOrderGoodsService.getBusinessById(orderGoods.getOrderGoodsId());
|
|
|
+// List<TopCostTpItem> items = topCostTpItemService.getCostByBusiness(businessName, costTp.getTpId());
|
|
|
+// if (CollectionUtils.isEmpty(items)) {
|
|
|
+// //匹配不到成本项
|
|
|
+// continue;
|
|
|
// }
|
|
|
- BigDecimal divideMoney = new BigDecimal("0.00");//分成
|
|
|
- BigDecimal cost = new BigDecimal("0.00");//成本
|
|
|
- BigDecimal bigDecimal = new BigDecimal("100");
|
|
|
- for (TopCostTpItem tpItem : tpItems) {
|
|
|
- BigDecimal goodsDecimal = goodsPrice;
|
|
|
- //换算订单成本和盈亏
|
|
|
- TopCostTpItem topCostTpItem = tpItem;
|
|
|
- orderGoods.setDivideType(topCostTpItem.getDockType());
|
|
|
- orderGoods.setDivideRate(topCostTpItem.getDockValue());
|
|
|
- if (ObjectUtil.isNotNull(topCostTpItem.getDockStatus()) && topCostTpItem.getDockStatus() == 1){
|
|
|
- //启用成本扣除项
|
|
|
- switch (topCostTpItem.getDockType()){
|
|
|
- case 1://百分比
|
|
|
- //成本扣除金额
|
|
|
- BigDecimal divide1 = topCostTpItem.getDockValue().divide(bigDecimal);
|
|
|
- BigDecimal multiply = goodsDecimal.multiply(divide1);
|
|
|
- goodsDecimal = goodsDecimal.subtract(multiply);
|
|
|
- break;
|
|
|
- case 2://固定金额
|
|
|
- goodsDecimal = goodsDecimal.subtract(topCostTpItem.getDockValue());
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- switch (topCostTpItem.getItemType()) {
|
|
|
- case 1://百分比
|
|
|
- BigDecimal divide = topCostTpItem.getTypeValue().divide(bigDecimal);
|
|
|
- BigDecimal multiply = goodsDecimal.multiply(divide);
|
|
|
- cost = cost.add(multiply);
|
|
|
- if (topCostTpItem.getItemCategory() == 1 && add.getFinishStatus() == 1){
|
|
|
- //订单已完单 并且是分成成本
|
|
|
- divideMoney = divideMoney.add(multiply);
|
|
|
- }
|
|
|
- break;
|
|
|
- case 2://固定金额
|
|
|
- cost = cost.add(topCostTpItem.getTypeValue());
|
|
|
- if (topCostTpItem.getItemCategory() == 1 && add.getFinishStatus() == 1){
|
|
|
- //分成
|
|
|
- divideMoney = divideMoney.add(topCostTpItem.getTypeValue());
|
|
|
- }
|
|
|
- break;
|
|
|
- default:
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (add.getFinishStatus() == 1 && divideTotal.compareTo(BigDecimal.ZERO) >0 ){
|
|
|
- orderGoods.setDivideModel(divideModel);
|
|
|
- orderGoods.setDivideMoney(divideMoney);
|
|
|
- iOrderGoodsService.updateById(orderGoods);
|
|
|
- }
|
|
|
- costTotal = costTotal.add(cost);
|
|
|
- divideTotal = divideTotal.add(divideMoney);
|
|
|
- }
|
|
|
- List<TopCostTpItem> costTpItemList = topCostTpItemService
|
|
|
- .list(new LambdaQueryWrapper<TopCostTpItem>()
|
|
|
- .eq(TopCostTpItem::getTpId, costTp.getTpId())
|
|
|
- .eq(TopCostTpItem::getStatus, 1));
|
|
|
- if (CollectionUtils.isNotEmpty(costTpItemList)) {
|
|
|
- List<TopCostTpItemVo> itemVoList = costTpItemList.stream().map(x -> BeanUtil.toBean(x, TopCostTpItemVo.class)).collect(Collectors.toList());
|
|
|
- topCostTpVo.setItemList(itemVoList);
|
|
|
- }
|
|
|
- //实际账款 = 已收 - 已退
|
|
|
- BigDecimal subtract = add.getOrderReceived().subtract(add.getOrderRefunded());
|
|
|
- profitTotal = subtract.subtract(costTotal);
|
|
|
- add.setOrderCost(costTotal);
|
|
|
- add.setOrderProfit(profitTotal);
|
|
|
- add.setCostJson(JSONObject.toJSONString(topCostTpVo));
|
|
|
- if (add.getFinishStatus() == 1 && divideTotal.compareTo(BigDecimal.ZERO) >0){
|
|
|
- add.setDivideModel(divideModel);
|
|
|
- add.setDivideStatus(2);//待审核
|
|
|
- add.setAccomplishTime(DateUtils.getNowTime());
|
|
|
- if (divideModel == 1) {
|
|
|
- //机构分成
|
|
|
- add.setDivideCompanyMoney(divideTotal);
|
|
|
- } else {
|
|
|
- //业务员分成
|
|
|
- add.setDivideSellerMoney(divideTotal);
|
|
|
- }
|
|
|
-
|
|
|
- //创建订单分成审核流程
|
|
|
- List<TopOldOrderCheck> checkList = topOldOrderCheckService
|
|
|
- .list(new LambdaQueryWrapper<TopOldOrderCheck>().in(TopOldOrderCheck::getCheckType, Arrays.asList(5, 6))
|
|
|
- .orderByAsc(TopOldOrderCheck::getCheckSort));
|
|
|
- if (CollectionUtils.isNotEmpty(checkList)) {
|
|
|
- List<TopOldOrderCheckLog> logs = new ArrayList<>();
|
|
|
- for (int i = 0; i < checkList.size(); i++) {
|
|
|
- TopOldOrderCheck check = checkList.get(i);
|
|
|
- TopOldOrderCheckLog log = new TopOldOrderCheckLog();
|
|
|
- log.setOrderSn(add.getOrderSn());
|
|
|
- log.setRoleId(check.getCheckRole());
|
|
|
- log.setCheckFrom(divideModel == 1? 2:3);
|
|
|
- log.setUpdateTime(DateUtils.getNowTime());
|
|
|
- log.setCreateTime(DateUtils.getNowTime());
|
|
|
- log.setTenantId(add.getTenantId());
|
|
|
- log.setCheckSign(i > 0 ? 0 : 1);
|
|
|
- log.setCheckSort(check.getCheckSort());
|
|
|
- log.setType(check.getCheckType());
|
|
|
- log.setTenantId(Long.valueOf(TenantId));
|
|
|
- if (check.getCheckType() == 6) {
|
|
|
- //分成支付
|
|
|
- log.setCheckStatus(2);//待支付
|
|
|
- } else {
|
|
|
- log.setCheckStatus(0);//待审核
|
|
|
- }
|
|
|
- logs.add(log);
|
|
|
- }
|
|
|
- topOldOrderCheckLogService.saveBatch(logs);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// //根据订单金额匹配成本阶梯
|
|
|
+// List<TopCostTpItem> tpItems = new ArrayList<>();
|
|
|
+// for (TopCostTpItem x : items) {
|
|
|
+// BigDecimal price = goodsPrice;
|
|
|
+// if (ObjectUtil.isNotNull(x.getDockStatus()) && x.getDockStatus() == 1){
|
|
|
+// //启用成本扣除项
|
|
|
+// switch (x.getDockType()){
|
|
|
+// case 1://百分比
|
|
|
+// //成本扣除金额
|
|
|
+// BigDecimal divide1 = x.getDockValue().divide(new BigDecimal("100"));
|
|
|
+// BigDecimal multiply = goodsPrice.multiply(divide1);
|
|
|
+// price = price.subtract(multiply);
|
|
|
+// break;
|
|
|
+// case 2://固定金额
|
|
|
+// price = price.subtract(x.getDockValue());
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// if ((ObjectUtils.isNull(x.getMinValue()) && ObjectUtils.isNull(x.getMaxValue()))
|
|
|
+// || (price.compareTo(x.getMinValue()) > 0 && (x.getMaxValue().compareTo(new BigDecimal("-1.00")) == 0 || price.compareTo(x.getMaxValue()) < 0))
|
|
|
+// || (price.compareTo(x.getMinValue()) == 0 && (x.getMaxValue().compareTo(new BigDecimal("-1.00")) == 0 || price.compareTo(x.getMaxValue()) == 0))){
|
|
|
+// tpItems.add(x);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if (CollectionUtils.isEmpty(tpItems)) {
|
|
|
+// //匹配不到成本项阶梯值
|
|
|
+// continue;
|
|
|
+// }
|
|
|
+//// if (tpItems.size() > 1) {
|
|
|
+//// //匹配到多个成本项
|
|
|
+//// throw new CustomException(String.format("成本项阶梯匹配有误!(有多个)请检查【%s,价格:%s】", businessName, goodsPrice.toString()));
|
|
|
+//// }
|
|
|
+// BigDecimal divideMoney = new BigDecimal("0.00");//分成
|
|
|
+// BigDecimal cost = new BigDecimal("0.00");//成本
|
|
|
+// BigDecimal bigDecimal = new BigDecimal("100");
|
|
|
+// for (TopCostTpItem tpItem : tpItems) {
|
|
|
+// BigDecimal goodsDecimal = goodsPrice;
|
|
|
+// //换算订单成本和盈亏
|
|
|
+// TopCostTpItem topCostTpItem = tpItem;
|
|
|
+// orderGoods.setDivideType(topCostTpItem.getDockType());
|
|
|
+// orderGoods.setDivideRate(topCostTpItem.getDockValue());
|
|
|
+// if (ObjectUtil.isNotNull(topCostTpItem.getDockStatus()) && topCostTpItem.getDockStatus() == 1){
|
|
|
+// //启用成本扣除项
|
|
|
+// switch (topCostTpItem.getDockType()){
|
|
|
+// case 1://百分比
|
|
|
+// //成本扣除金额
|
|
|
+// BigDecimal divide1 = topCostTpItem.getDockValue().divide(bigDecimal);
|
|
|
+// BigDecimal multiply = goodsDecimal.multiply(divide1);
|
|
|
+// goodsDecimal = goodsDecimal.subtract(multiply);
|
|
|
+// break;
|
|
|
+// case 2://固定金额
|
|
|
+// goodsDecimal = goodsDecimal.subtract(topCostTpItem.getDockValue());
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// switch (topCostTpItem.getItemType()) {
|
|
|
+// case 1://百分比
|
|
|
+// BigDecimal divide = topCostTpItem.getTypeValue().divide(bigDecimal);
|
|
|
+// BigDecimal multiply = goodsDecimal.multiply(divide);
|
|
|
+// cost = cost.add(multiply);
|
|
|
+// if (topCostTpItem.getItemCategory() == 1 && add.getFinishStatus() == 1){
|
|
|
+// //订单已完单 并且是分成成本
|
|
|
+// divideMoney = divideMoney.add(multiply);
|
|
|
+// }
|
|
|
+// break;
|
|
|
+// case 2://固定金额
|
|
|
+// cost = cost.add(topCostTpItem.getTypeValue());
|
|
|
+// if (topCostTpItem.getItemCategory() == 1 && add.getFinishStatus() == 1){
|
|
|
+// //分成
|
|
|
+// divideMoney = divideMoney.add(topCostTpItem.getTypeValue());
|
|
|
+// }
|
|
|
+// break;
|
|
|
+// default:
|
|
|
+// break;
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// if (add.getFinishStatus() == 1 && divideTotal.compareTo(BigDecimal.ZERO) >0 ){
|
|
|
+// orderGoods.setDivideModel(divideModel);
|
|
|
+// orderGoods.setDivideMoney(divideMoney);
|
|
|
+// iOrderGoodsService.updateById(orderGoods);
|
|
|
+// }
|
|
|
+// costTotal = costTotal.add(cost);
|
|
|
+// divideTotal = divideTotal.add(divideMoney);
|
|
|
+// }
|
|
|
+// List<TopCostTpItem> costTpItemList = topCostTpItemService
|
|
|
+// .list(new LambdaQueryWrapper<TopCostTpItem>()
|
|
|
+// .eq(TopCostTpItem::getTpId, costTp.getTpId())
|
|
|
+// .eq(TopCostTpItem::getStatus, 1));
|
|
|
+// if (CollectionUtils.isNotEmpty(costTpItemList)) {
|
|
|
+// List<TopCostTpItemVo> itemVoList = costTpItemList.stream().map(x -> BeanUtil.toBean(x, TopCostTpItemVo.class)).collect(Collectors.toList());
|
|
|
+// topCostTpVo.setItemList(itemVoList);
|
|
|
+// }
|
|
|
+// //实际账款 = 已收 - 已退
|
|
|
+// BigDecimal subtract = add.getOrderReceived().subtract(add.getOrderRefunded());
|
|
|
+// profitTotal = subtract.subtract(costTotal);
|
|
|
+// add.setOrderCost(costTotal);
|
|
|
+// add.setOrderProfit(profitTotal);
|
|
|
+// add.setCostJson(JSONObject.toJSONString(topCostTpVo));
|
|
|
+// if (add.getFinishStatus() == 1 && divideTotal.compareTo(BigDecimal.ZERO) >0){
|
|
|
+// add.setDivideModel(divideModel);
|
|
|
+// add.setDivideStatus(2);//待审核
|
|
|
+// add.setAccomplishTime(DateUtils.getNowTime());
|
|
|
+// if (divideModel == 1) {
|
|
|
+// //机构分成
|
|
|
+// add.setDivideCompanyMoney(divideTotal);
|
|
|
+// } else {
|
|
|
+// //业务员分成
|
|
|
+// add.setDivideSellerMoney(divideTotal);
|
|
|
+// }
|
|
|
+//
|
|
|
+// //创建订单分成审核流程
|
|
|
+// List<TopOldOrderCheck> checkList = topOldOrderCheckService
|
|
|
+// .list(new LambdaQueryWrapper<TopOldOrderCheck>().in(TopOldOrderCheck::getCheckType, Arrays.asList(5, 6))
|
|
|
+// .orderByAsc(TopOldOrderCheck::getCheckSort));
|
|
|
+// if (CollectionUtils.isNotEmpty(checkList)) {
|
|
|
+// List<TopOldOrderCheckLog> logs = new ArrayList<>();
|
|
|
+// for (int i = 0; i < checkList.size(); i++) {
|
|
|
+// TopOldOrderCheck check = checkList.get(i);
|
|
|
+// TopOldOrderCheckLog log = new TopOldOrderCheckLog();
|
|
|
+// log.setOrderSn(add.getOrderSn());
|
|
|
+// log.setRoleId(check.getCheckRole());
|
|
|
+// log.setCheckFrom(divideModel == 1? 2:3);
|
|
|
+// log.setUpdateTime(DateUtils.getNowTime());
|
|
|
+// log.setCreateTime(DateUtils.getNowTime());
|
|
|
+// log.setTenantId(add.getTenantId());
|
|
|
+// log.setCheckSign(i > 0 ? 0 : 1);
|
|
|
+// log.setCheckSort(check.getCheckSort());
|
|
|
+// log.setType(check.getCheckType());
|
|
|
+// log.setTenantId(Long.valueOf(TenantId));
|
|
|
+// if (check.getCheckType() == 6) {
|
|
|
+// //分成支付
|
|
|
+// log.setCheckStatus(2);//待支付
|
|
|
+// } else {
|
|
|
+// log.setCheckStatus(0);//待审核
|
|
|
+// }
|
|
|
+// logs.add(log);
|
|
|
+// }
|
|
|
+// topOldOrderCheckLogService.saveBatch(logs);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -2073,9 +2075,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
throw new CustomException("请先授权绑定公众号信息");
|
|
|
}
|
|
|
payResult = iWxPayService.paymentGzh(pay_no, userVo.getGzhOpenId(), body, payPrice, bo.getUrl());
|
|
|
- }else {
|
|
|
- instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
}
|
|
|
+// else {
|
|
|
+// instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
+// }
|
|
|
|
|
|
payResult.put("orderSn", out_trade_no);
|
|
|
return payResult;
|
|
|
@@ -2277,9 +2280,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
//大于0元,获取微信支付信息
|
|
|
if (payPrice.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
payResult = iWxPayService.paymentPc(pay_no, userVo.getOpenId(), body, payPrice);
|
|
|
- }else {
|
|
|
- instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
}
|
|
|
+// else {
|
|
|
+// instTimeSettleOrder(add,DateUtils.getNowTime());
|
|
|
+// }
|
|
|
|
|
|
payResult.put("orderSn", out_trade_no);
|
|
|
return payResult;
|