| | |
| | | Map<String, Object> map = incomeService.saveIncome(orderTaxi.getId(), 2, orderTaxi.getOrderMoney()); |
| | | orderTaxi.setSplitAllocation(JSON.toJSONString(map)); |
| | | |
| | | this.updateAllColumnById(orderTaxi); |
| | | promotion(orderTaxi.getId()); |
| | | |
| | | // TODO: 2020/5/24 这里需要给司机和用户推送订单状态 |
| | |
| | | resultUtil = appOrderController.placeAnOrder(new BigDecimal(orderMoney), 4, orderId, 9, integer); |
| | | |
| | | } |
| | | |
| | | this.updateAllColumnById(orderTaxi); |
| | | if(payType!=3){ |
| | | this.updateAllColumnById(orderTaxi); |
| | | } |
| | | |
| | | return resultUtil; |
| | | } |
| | | |
| | |
| | | UserInfo userInfo = userInfoService.selectById(orderTaxi.getUserId()); |
| | | if (orderTaxi.getPromotionDriverId() != null) { |
| | | String registAreaCode = userInfo.getRegistAreaCode(); |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 2 + ", bizType) limit 1")); |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", registAreaCode).le("startTime", new Date()).ge("endTime", new Date()).last("AND FIND_IN_SET(" + 2 + ", bizType) limit 1")); |
| | | if (tDriverPromotionActivity != null) { |
| | | Double payMoney = orderTaxi.getPayMoney(); |
| | | BigDecimal bigDecimal = tDriverPromotionActivity.getCommissionRatio().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(payMoney)).setScale(2, RoundingMode.HALF_UP); |
| | | orderTaxi.setPromotionDriverId(userInfo.getBindDriverId()); |
| | | orderTaxi.setPromotionMoney(bigDecimal); |
| | | orderTaxi.setPromotionActivityId(tDriverPromotionActivity.getId()); |
| | | orderTaxi.setSuccessTime(new Date()); |
| | | this.baseMapper.updateById(orderTaxi); |
| | | } |
| | | } |