| | |
| | | import com.stylefeng.guns.modular.system.dao.CarServiceMapper; |
| | | import com.stylefeng.guns.modular.system.dao.RegionMapper; |
| | | import com.stylefeng.guns.modular.system.dao.SystemPriceMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserInfoMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | |
| | | |
| | | @Resource |
| | | private CarServiceMapper carServiceMapper; |
| | | |
| | | @Resource |
| | | private UserInfoMapper userInfoMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private TDriverPromotionActivityService driverPromotionActivityService; |
| | | |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | |
| | | // orderPrivateCar.setBindId(map.get("bindId")); |
| | | // } |
| | | |
| | | |
| | | |
| | | // 是否推广订单 |
| | | Integer promotion = isPromotion(uid); |
| | | orderPrivateCar.setPromotion(promotion); |
| | | |
| | | this.updateById(orderPrivateCar); |
| | | |
| | | //处理摆渡车的情况 |
| | |
| | | } |
| | | |
| | | |
| | | private Integer isPromotion(Integer userId){ |
| | | UserInfo userInfo = userInfoMapper.selectById(userId); |
| | | if(userInfo.getBindDriverId()!=null && userInfo.getBindExpireDate().getTime()<=System.currentTimeMillis()){ |
| | | 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(" + 1 + ", bizType) limit 1")); |
| | | if(tDriverPromotionActivity!=null){ |
| | | return 2; |
| | | } |
| | | } |
| | | return null; |
| | | |
| | | } |
| | | /** |
| | | * 获取订单详情页(服务中的页面) |
| | | * @param orderId |