| | |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.OrderCancelMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.ICBCPayUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | @Autowired |
| | | private ITTimeoutAppealService timeoutAppealService; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | @RequestMapping("/tOrderLogistics_detail/{tOrderLogisticsId}") |
| | | public String tOrderLogistics_detail(@PathVariable Integer tOrderLogisticsId, Model model) { |
| | | Map<String,Object> tOrderLogistics = tOrderLogisticsService.getLogisticsOrderDetailById(tOrderLogisticsId); |
| | | TTimeoutAppeal tTimeoutAppeal = timeoutAppealService.selectOne(new EntityWrapper<TTimeoutAppeal>().eq("orderId",tOrderLogistics.get("id"))); |
| | | if (ToolUtil.isNotEmpty(tTimeoutAppeal) && ToolUtil.isNotEmpty(tTimeoutAppeal.getReturnMoney())){ |
| | | tOrderLogistics.put("returnMoney",tTimeoutAppeal.getReturnMoney()); |
| | | }else { |
| | | tOrderLogistics.put("returnMoney","0.00"); |
| | | } |
| | | tOrderLogistics.put("userPhone", null != tOrderLogistics.get("userPhone") ? AESUtil.decrypt(tOrderLogistics.get("userPhone").toString()) : ""); |
| | | model.addAttribute("item",tOrderLogistics); |
| | | return PREFIX + "tOrderLogistics_detail.html"; |
| | | } |
| | |
| | | tOrderLogistics.setIsDelete(2); |
| | | tOrderLogisticsService.updateById(tOrderLogistics); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改收件人 |
| | | * @param id |
| | | * @param name |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/updateRecipient") |
| | | @ResponseBody |
| | | public ResultUtil updateRecipient(Integer id, String name, String phone){ |
| | | try { |
| | | TOrderLogistics tOrderLogistics = tOrderLogisticsService.selectById(id); |
| | | if(ToolUtil.isNotEmpty(name)){ |
| | | tOrderLogistics.setRecipient(name); |
| | | } |
| | | if(ToolUtil.isNotEmpty(phone)){ |
| | | tOrderLogistics.setRecipientPhone(phone); |
| | | } |
| | | tOrderLogisticsService.updateById(tOrderLogistics); |
| | | if(tOrderLogistics.getState() == 4 || tOrderLogistics.getState() == 6){ |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("orderId", id.toString()); |
| | | String result = HttpRequestUtil.postRequest(PushURL.zull_user_url + "/driver/base/order/sendVerificationCode1", map); |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | } |