| | |
| | | |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | |
| | | import com.stylefeng.guns.modular.system.service.ITCancelOrderService; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderService; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.PushOrderInfoWarpper; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | tDriver.setServerStatus(1); |
| | | driverService.updateById(tDriver); |
| | | } |
| | | |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("id", tOrder.getUserId().toString()); |
| | | map.put("type", "1"); |
| | | PushOrderInfoWarpper pushOrderInfoWarpper = new PushOrderInfoWarpper(); |
| | | pushOrderInfoWarpper.setId(tOrder.getId().longValue()); |
| | | pushOrderInfoWarpper.setState(tOrder.getState()); |
| | | pushOrderInfoWarpper.setCancelObject(3); |
| | | map.put("pushOrderInfoWarpper", JSON.toJSONString(pushOrderInfoWarpper)); |
| | | String result = HttpRequestUtil.postRequest(PushURL.order_push_url, map); |
| | | if(null != tOrder.getDriverId()){ |
| | | map = new HashMap<>(); |
| | | map.put("id", tOrder.getDriverId().toString()); |
| | | map.put("type", "1"); |
| | | PushOrderInfoWarpper pushOrderInfoWarpper1 = new PushOrderInfoWarpper(); |
| | | pushOrderInfoWarpper1.setId(tOrder.getId().longValue()); |
| | | pushOrderInfoWarpper1.setState(tOrder.getState()); |
| | | pushOrderInfoWarpper1.setCancelObject(3); |
| | | map.put("pushOrderInfoWarpper", JSON.toJSONString(pushOrderInfoWarpper1)); |
| | | result = HttpRequestUtil.postRequest(PushURL.order_push_url, map); |
| | | } |
| | | redisUtil.setStrValue("cancelOrder", "true"); |
| | | return SUCCESS_TIP; |
| | | } |