| | |
| | | TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>().eq("districtCode", registAreaCode).ge("startTime", new Date()).lt("endTime", new Date()).last("AND FIND_IN_SET(" + 3 + ", bizType) limit 1")); |
| | | if(tDriverPromotionActivity!=null){ |
| | | Double payMoney = orderCrossCity.getPayMoney(); |
| | | BigDecimal bigDecimal = tDriverPromotionActivity.getCommissionRatio().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(payMoney)).setScale(2, RoundingMode.HALF_UP); |
| | | BigDecimal bigDecimal = new BigDecimal(tDriverPromotionActivity.getCommissionRatio()).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(payMoney)).setScale(2, RoundingMode.HALF_UP); |
| | | orderCrossCity.setPromotionDriverId(userInfo.getBindDriverId()); |
| | | orderCrossCity.setPromotionMoney(bigDecimal); |
| | | orderCrossCity.setPromotionActivityId(tDriverPromotionActivity.getId()); |
| | | this.baseMapper.updateById(orderCrossCity); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryMyTripList(Integer uid, Integer pageNum, Integer size) throws Exception { |
| | | pageNum = (pageNum - 1) * size; |
| | | List<Map<String, Object>> maps = orderCrossCityMapper.queryMyTripList(uid, pageNum, size); |
| | | for (Map<String, Object> map : maps) { |
| | | if (Integer.valueOf(String.valueOf(map.get("state"))) == 11) { |
| | | map.put("state", map.get("oldState")); |
| | | } |
| | | } |
| | | return maps; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> queryMyTripListAll(Integer uid) throws Exception { |
| | | |
| | | List<Map<String, Object>> maps = orderCrossCityMapper.queryMyTripListAll(uid); |
| | | for (Map<String, Object> map : maps) { |
| | | if (Integer.valueOf(String.valueOf(map.get("state"))) == 11) { |
| | | map.put("state", map.get("oldState")); |
| | | } |
| | | } |
| | | return maps; |
| | | } |
| | | } |