| | |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITTimeoutAppealService timeoutAppealService; |
| | | |
| | | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | @Autowired |
| | | private IUserCouponRecordService userCouponRecordService; |
| | | |
| | | |
| | | @Resource |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | /** |
| | | * 跳转到小件物流订单首页 |
| | | */ |
| | |
| | | public String index() { |
| | | return PREFIX + "tOrderLogistics.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加小件物流订单 |
| | | */ |
| | |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | if (SinataUtil.isNotEmpty(insertTime)) { |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOrderLogisticsService.getLogisticsOrderList(page, beginTime, endTime, ShiroExtUtil.getUser().getRoleType(), ShiroExtUtil.getUser().getObjectId(), |
| | | page.setRecords(tOrderLogisticsService.getLogisticsOrderList(page, beginTime, endTime, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId(), |
| | | orderNum, orderSource, type, userName, userPhone, recipient, recipientPhone, driver, state)); |
| | | return super.packForBT(page); |
| | | } |
| | |
| | | @RequestMapping(value = "/cancel") |
| | | @ResponseBody |
| | | public Object cancel(@RequestParam Integer tOrderLogisticsId) { |
| | | try{ |
| | | ShiroUser user = ShiroExtUtil.getUser(); |
| | | try { |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | TOrderLogistics tOrderLogistics = tOrderLogisticsService.selectById(tOrderLogisticsId); |
| | | tOrderLogistics.setState(10); |
| | | |
| | | |
| | | //已支付的情况下进行退款操作 |
| | | if(null != tOrderLogistics.getPayType() && null != tOrderLogistics.getPayMoney()) { |
| | | if (tOrderLogistics.getPayType() ==3) {//余额支付 |
| | | if (null != tOrderLogistics.getPayType() && null != tOrderLogistics.getPayMoney()) { |
| | | if (tOrderLogistics.getPayType() == 3) {//余额支付 |
| | | TUser tUser = userService.selectById(tOrderLogistics.getUserId()); |
| | | tUser.setBalance(tUser.getBalance().add(tOrderLogistics.getPayMoney())); |
| | | userService.updateById(tUser); |