| package cc.mrbird.febs.mall.controller; | 
|   | 
| import cc.mrbird.febs.common.controller.BaseController; | 
| import cc.mrbird.febs.common.entity.FebsConstant; | 
| import cc.mrbird.febs.common.utils.FebsUtil; | 
| import cc.mrbird.febs.mall.entity.MallOrderRefund; | 
| import cc.mrbird.febs.mall.mapper.MallOrderRefundMapper; | 
| import cc.mrbird.febs.mall.service.IAdminMallOrderService; | 
| import cc.mrbird.febs.mall.vo.*; | 
| import lombok.RequiredArgsConstructor; | 
| import org.apache.shiro.authz.annotation.RequiresPermissions; | 
| import org.springframework.stereotype.Controller; | 
| import org.springframework.ui.Model; | 
| import org.springframework.web.bind.annotation.GetMapping; | 
| import org.springframework.web.bind.annotation.PathVariable; | 
| import org.springframework.web.bind.annotation.RequestMapping; | 
|   | 
| @Controller("orderView") | 
| @RequestMapping(FebsConstant.VIEW_PREFIX + "modules/order") | 
| @RequiredArgsConstructor | 
| public class ViewMallOrderController extends BaseController { | 
|   | 
|     private final IAdminMallOrderService adminMallOrderService; | 
|   | 
|     private final MallOrderRefundMapper mallOrderRefundMapper; | 
|   | 
|     public static long idFromMember; | 
|   | 
|     public static long idFromRefund; | 
|   | 
|     /** | 
|      * 订单列表 | 
|      * @return | 
|      */ | 
|     @GetMapping("orderList") | 
|     @RequiresPermissions("orderList:view") | 
|     public String orderList() { | 
|         return FebsUtil.view("modules/order/orderList"); | 
|     } | 
|   | 
|     /** | 
|      * 订单-发货 | 
|      * @param id | 
|      * @param model | 
|      * @return | 
|      */ | 
|     @GetMapping("deliverGoods/{id}") | 
|     @RequiresPermissions("deliverGoods:update") | 
|     public String deliverGoods(@PathVariable long id, Model model) { | 
|         AdminMallOrderVo data = adminMallOrderService.getMallOrderInfoById(id); | 
|         model.addAttribute("deliverInfo", data); | 
|         return FebsUtil.view("modules/order/deliverGoods"); | 
|     } | 
|   | 
|     /** | 
|      * 订单-详情 | 
|      * @param id | 
|      * @param model | 
|      * @return | 
|      */ | 
|     @GetMapping("orderDetail/{id}") | 
|     @RequiresPermissions("orderDetail:view") | 
|     public String orderDetail(@PathVariable long id, Model model) { | 
|         idFromMember = id; | 
|         AdminOrderDetailVo data = adminMallOrderService.getMallOrderDetailById(id); | 
|         model.addAttribute("orderDetail", data); | 
|         return FebsUtil.view("modules/order/orderDetail"); | 
|     } | 
|   | 
|     /** | 
|      * 订单退款 | 
|      * @return | 
|      */ | 
|     @GetMapping("refundList") | 
|     @RequiresPermissions("refundList:view") | 
|     public String refundList() { | 
|         return FebsUtil.view("modules/order/refundList"); | 
|     } | 
|   | 
|     /** | 
|      * 退款详情 | 
|       * @param id | 
|      * @param model | 
|      * @return | 
|      */ | 
|     @GetMapping("refunding/{id}") | 
|     @RequiresPermissions("refunding:view") | 
|     public String seeReceiveInfo(@PathVariable long id, Model model) { | 
|         idFromRefund = id; | 
|         return FebsUtil.view("modules/order/refunding"); | 
|     } | 
|   | 
|     /** | 
|      * 退款地址列表 | 
|      * @return | 
|      */ | 
|     @GetMapping("refundAddress") | 
|     @RequiresPermissions("refundAddress:view") | 
|     public String refundAddress() { | 
|         return FebsUtil.view("modules/order/refundAddress"); | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 退款地址-新增 | 
|      * @return | 
|      */ | 
|     @GetMapping("addAddress") | 
|     @RequiresPermissions("addAddress:add") | 
|     public String addAddress() { | 
|         return FebsUtil.view("modules/order/addAddress"); | 
|     } | 
|   | 
|     /** | 
|      * 退款地址-详情 | 
|      * @param id | 
|      * @param model | 
|      * @return | 
|      */ | 
|     @GetMapping("updateAddress/{id}") | 
|     @RequiresPermissions("updateAddress:update") | 
|     public String updateAddress(@PathVariable long id, Model model) { | 
|         AdminMallOrderRefundAddressVo data = adminMallOrderService.getMallOrderRefundAddressInfoById(id); | 
|         model.addAttribute("addressInfo", data); | 
|         return FebsUtil.view("modules/order/updateAddress"); | 
|     } | 
|   | 
|     /** | 
|      * 订单退款-同意并选择地址 | 
|      * @param id | 
|      * @param model | 
|      * @return | 
|      */ | 
|     @GetMapping("withAddress/{id}") | 
|     @RequiresPermissions("withAddress:update") | 
|     public String withAddress(@PathVariable long id, Model model) { | 
|         AdminMallOrderRefundVo data = adminMallOrderService.getMallOrderRefundInfoById(id); | 
|         model.addAttribute("withAddress", data); | 
|         return FebsUtil.view("modules/order/withAddress"); | 
|     } | 
|   | 
|     /** | 
|      * 商家支付方式-列表 | 
|      * @return | 
|      */ | 
|     @GetMapping("payMethodList") | 
|     @RequiresPermissions("payMethodList:view") | 
|     public String payMethodList() { | 
|         return FebsUtil.view("modules/order/payMethodList"); | 
|     } | 
|   | 
|   | 
|   | 
|     /** | 
|      * 商家支付方式-详情 | 
|      * @param id | 
|      * @param model | 
|      * @return | 
|      */ | 
|     @GetMapping("payMethodEdit/{id}") | 
|     @RequiresPermissions("payMethodEdit:update") | 
|     public String payMethodEdit(@PathVariable long id, Model model) { | 
|         AdminMallPayMethodEditVo data = adminMallOrderService.getMallPayMethodEditInfoById(id); | 
|         model.addAttribute("payMethodEdit", data); | 
|         return FebsUtil.view("modules/order/payMethodEdit"); | 
|     } | 
|   | 
|     /** | 
|      * 退款记录-订单详情 | 
|      * @param id | 
|      * @param model | 
|      * @return | 
|      */ | 
|     @GetMapping("refundOrderDetail/{id}") | 
|     @RequiresPermissions("refundOrderDetail:view") | 
|     public String refundOrderDetail(@PathVariable long id, Model model) { | 
|         MallOrderRefund mallOrderRefund = mallOrderRefundMapper.selectById(id); | 
|         Long orderId = mallOrderRefund.getOrderId(); | 
|         AdminOrderDetailVo data = adminMallOrderService.getMallOrderDetailById(orderId); | 
|         model.addAttribute("refundOrderDetail", data); | 
|         return FebsUtil.view("modules/order/refundOrderDetail"); | 
|     } | 
|   | 
|     /** | 
|      * 退款记录-收款方式 | 
|      * @param id | 
|      * @param model | 
|      * @return | 
|      */ | 
|     @GetMapping("refundPayInfo/{id}") | 
|     @RequiresPermissions("refundPayInfo:update") | 
|     public String refundPayInfo(@PathVariable long id, Model model) { | 
|         AdminMallMemberPaymentVo data = adminMallOrderService.getMallMemberRefundPayInfoByFlowId(id); | 
|         model.addAttribute("refundPayInfo", data); | 
|         return FebsUtil.view("modules/order/refundPayInfo"); | 
|     } | 
|   | 
| } |