| | |
| | | } |
| | | appPlaceOrderVo.setEndTime(DateUtils.addMinutes(order.getCreateTime(), delayTime)); |
| | | // 小程序微信下单支付 |
| | | createWxPayInfo(appPlaceOrderVo, userId, order.getShopId(), orderGoods.getGoodsName(), outTradeNo, |
| | | // createWxPayInfo(appPlaceOrderVo, userId, order.getShopId(), orderGoods.getGoodsName(), outTradeNo, |
| | | // orderId, order.getPayMoney(), appPlaceActivityDto.getOpenid(), |
| | | // appPlaceActivityDto.getSpbillCreateIp()); |
| | | |
| | | // 小程序微信下单支付 TODO 更换支付渠道(汇付天下) |
| | | createWxPayInfo1(appPlaceOrderVo, userId, order.getShopId(), orderGoods.getGoodsName(), outTradeNo, |
| | | orderId, order.getPayMoney(), appPlaceActivityDto.getOpenid(), |
| | | appPlaceActivityDto.getSpbillCreateIp()); |
| | | //生成自动取消订单延时任务 |
| | |
| | | Order order = this.getById(orderId); |
| | | if (order.getOrderStatus() != 2) { |
| | | throw new ServiceException(AppErrorConstant.VERIFY_USED); |
| | | } |
| | | //判断商户是否有分账权限 |
| | | Shop shop = remoteShopService.getShop(shopId).getData(); |
| | | if(shop.getAccountFlag()!=1){ |
| | | throw new ServiceException(AppErrorConstant.SHOP_NO_VERIFY); |
| | | } |
| | | // 根据订单用户ID获取用户信息 |
| | | Member member = remoteMemberService.getMember(order.getUserId()).getData(); |
| | |
| | | BigDecimal proportionPercent = null; |
| | | //商户订单获取统一分成 活动订单获取活动分成 |
| | | if(orderFrom==1){ |
| | | if(null == vo.getShareRatio()){ |
| | | proportionPercent = new BigDecimal(redisService.getCacheObject(SecurityConstant.SHOP_COMMON_PROPORTION).toString()); |
| | | }else{ |
| | | proportionPercent = new BigDecimal(vo.getShareRatio()); |
| | | } |
| | | }else{ |
| | | R<ShopProportionVo> resultShopProportion = remoteShopService.getShopProportion(shopId); |
| | | shopProportion = resultShopProportion.getData(); |
| | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("div_amt", String.format("%.2f", multiply.doubleValue())); |
| | | jsonObject.put("huifu_id", vo.getHuifuId()); |
| | | acctInfos.add(jsonObject); |
| | | //平台商户 |
| | | double pt_amount = orderMoney.subtract(multiply).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | JSONObject jsonObject1 = new JSONObject(); |