| | |
| | | import cn.exrick.xboot.core.common.vo.Result; |
| | | import cn.exrick.xboot.core.entity.User; |
| | | import cn.exrick.xboot.core.service.UserService; |
| | | import cn.exrick.xboot.your.entity.Area; |
| | | import cn.exrick.xboot.your.entity.AreaSection; |
| | | import cn.exrick.xboot.your.entity.OrderDetail; |
| | | import cn.exrick.xboot.your.entity.OrderTask; |
| | | import cn.exrick.xboot.your.entity.*; |
| | | import cn.exrick.xboot.your.service.*; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | |
| | | @Autowired |
| | | private IAreaSectionService iAreaSectionService; |
| | | |
| | | @Autowired |
| | | private ICarService iCarService; |
| | | |
| | | @RequestMapping(value = "/get/{id}", method = RequestMethod.GET) |
| | | @ApiOperation(value = "通过id获取") |
| | | public Result<OrderTask> get(@PathVariable String id) { |
| | |
| | | wrapper.eq("user_id",securityUtil.getCurrUser().getId()); |
| | | Area area = iAreaService.getOne(wrapper); |
| | | if(area==null){ |
| | | QueryWrapper<Car> carQueryWrapper = new QueryWrapper<Car>(); |
| | | carQueryWrapper.eq("user_id",securityUtil.getCurrUser().getId()); |
| | | Car one = iCarService.getOne(carQueryWrapper); |
| | | |
| | | QueryWrapper<Area> wrapper3 = new QueryWrapper<Area>(); |
| | | wrapper3.eq("user_id",one.getFollowUserId()); |
| | | area = iAreaService.getOne(wrapper); |
| | | if(area==null){ |
| | | return ResultUtil.error("请联系管理员绑定片区配送员"); |
| | | } |
| | | } |
| | | |
| | | QueryWrapper<OrderTask> wrapper2 = new QueryWrapper<OrderTask>(); |
| | | String format = DateUtil.format(new Date(), "yyyy-MM-dd"); |