xiaoyong931011
2022-09-08 b1f0ad3c1841546b01ef0c6dc15a9cd099be8d83
20220902
2 files modified
27 ■■■■■ changed files
src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java 22 ●●●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/order/orderList.html 5 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/controller/AdminMallOrderController.java
@@ -12,6 +12,7 @@
import cc.mrbird.febs.common.utils.excl.ResponseHeadUtil;
import cc.mrbird.febs.mall.dto.*;
import cc.mrbird.febs.mall.entity.*;
import cc.mrbird.febs.mall.mapper.MallExpressInfoMapper;
import cc.mrbird.febs.mall.mapper.MallOrderRefundOperationMapper;
import cc.mrbird.febs.mall.service.IAdminMallGoodsService;
import cc.mrbird.febs.mall.service.IAdminMallOrderService;
@@ -20,9 +21,11 @@
import cc.mrbird.febs.system.entity.Dept;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -45,6 +48,7 @@
public class AdminMallOrderController extends BaseController {
    private final IAdminMallOrderService adminMallOrderService;
    private final MallExpressInfoMapper mallExpressInfoMapper;
    /**
     * 订单列表
@@ -278,8 +282,22 @@
                } else {
                    temp.add("");
                }
                temp.add(item.getStatus());
                switch (item.getStatus()) {
                    case 2:
                        temp.add("待发货");
                        break;
                    case 3:
                        temp.add("已发货");
                        break;
                    default:
                }
                Long id = item.getId();
                MallExpressInfo mallExpressInfo = mallExpressInfoMapper.selectByOrderId(id);
                if(ObjectUtil.isNotNull(mallExpressInfo)){
                    temp.add(mallExpressInfo.getExpressNo());
                    temp.add(mallExpressInfo.getExpressCom());
                    temp.add(mallExpressInfo.getExpressCode());
                }
                list.add(temp);
            }
        }
src/main/resources/templates/febs/views/modules/order/orderList.html
@@ -83,6 +83,7 @@
    <div class="layui-btn-container">
        <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="exportDeliver">导出未发货订单</button>
        <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" id="importDeliver" lay-event="importDeliver">导入发货</button>
        <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="exportDeliverDone">导出已发货订单</button>
    </div>
</script>
<!-- 表格操作栏 end -->
@@ -113,6 +114,10 @@
            if (event == 'exportDeliver') {
                window.location.href = ctx + "admin/order/exportOrderList?orderType=1&status=2";
            }
            if (event == 'exportDeliverDone') {
                window.location.href = ctx + "admin/order/exportOrderList?orderType=1&status=3";
            }
        });
        upload.render({