| | |
| | | |
| | | import cc.mrbird.febs.common.controller.BaseController; |
| | | import cc.mrbird.febs.common.entity.FebsConstant; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.utils.FebsUtil; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.mall.entity.MallExpressInfo; |
| | | import cc.mrbird.febs.mall.entity.MallOrderRefund; |
| | | import cc.mrbird.febs.mall.mapper.MallExpressInfoMapper; |
| | | import cc.mrbird.febs.mall.mapper.MallOrderRefundMapper; |
| | | import cc.mrbird.febs.mall.service.IAdminMallOrderService; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import cn.hutool.core.util.IdUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | |
| | | private final MallOrderRefundMapper mallOrderRefundMapper; |
| | | |
| | | private final MallExpressInfoMapper mallExpressInfoMapper; |
| | | |
| | | public static long idFromMember; |
| | | |
| | | public static long idFromRefund; |
| | | private final RedisUtils redisUtils; |
| | | |
| | | /** |
| | | * 订单列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("orderRefundList") |
| | | @RequiresPermissions("orderRefundList:view") |
| | | public String orderRefundList() { |
| | | return FebsUtil.view("modules/order/orderRefundList"); |
| | | } |
| | | |
| | | /** |
| | | * 订单列表 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 评论列表 |
| | | * @return |
| | | */ |
| | | @GetMapping("commentList") |
| | | @RequiresPermissions("commentList:view") |
| | | public String commentList() { |
| | | return FebsUtil.view("modules/order/commentList"); |
| | | } |
| | | |
| | | /** |
| | | * 订单-发货 |
| | | * @param id |
| | | * @param model |
| | |
| | | @RequiresPermissions("deliverGoods:update") |
| | | public String deliverGoods(@PathVariable long id, Model model) { |
| | | AdminMallOrderVo data = adminMallOrderService.getMallOrderInfoById(id); |
| | | data.setExpressCom("极兔快递"); |
| | | MallExpressInfo mallExpressInfo = mallExpressInfoMapper.selectByOrderId(id); |
| | | if(ObjectUtil.isNotEmpty(mallExpressInfo)){ |
| | | data.setExpressNo(mallExpressInfo.getExpressNo()); |
| | | data.setExpressCom(mallExpressInfo.getExpressCom()); |
| | | }else{ |
| | | data.setExpressCom("极兔快递"); |
| | | } |
| | | model.addAttribute("deliverInfo", data); |
| | | return FebsUtil.view("modules/order/deliverGoods"); |
| | | } |
| | |
| | | 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"); |
| | | } |
| | | |
| | | /** |
| | | * 订单列表-统计商品份数 |
| | | * @return |
| | | */ |
| | | public static String orderIdsStr; |
| | | @GetMapping("/goodsStatistics/{statistics}") |
| | | @RequiresPermissions("goodsStatistics:update") |
| | | public String goodsStatistics(@PathVariable String statistics, Model model) { |
| | | |
| | | String existToken = redisUtils.getString("ADMIN_GOODS_CNT"); |
| | | if (StrUtil.isNotBlank(existToken)) { |
| | | Object o = redisUtils.get(existToken); |
| | | if (ObjectUtil.isNotEmpty(o)) { |
| | | redisUtils.del(existToken); |
| | | } |
| | | } |
| | | redisUtils.set("ADMIN_GOODS_CNT", statistics, -1); |
| | | return FebsUtil.view("modules/order/goodsStatistics"); |
| | | } |
| | | |
| | | } |