huanghongfa
2021-04-22 40c6bb2a4e15f3c2a5a72f3842404b49a25d4be8
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopOrderServiceImpl.java
@@ -559,8 +559,13 @@
            return R.fail("订单不存在");
        }
        if(!(comShopOrderDO.getStatus()==2)
                || !(comShopOrderDO.getDeleteStatus()==1)){
                || !(comShopOrderDO.getDeliveryStatus()==1)){
            return R.fail("订单发货失败,订单状态不允许发货");
        }
        ComShopStoreDO storeDO  = comShopStoreDAO.selectById(comShopOrderDO.getStoreId());
        if(storeDO.getDeliveryType()!=2){
            return R.fail("该商家不支持通过快递物流发货");
        }
        comShopOrderDO.setDeliveryStatus(2);
        comShopOrderDO.setDeliveryType(2);
@@ -580,11 +585,17 @@
        if(comShopOrderDO==null){
            return R.fail("订单不存在");
        }
        if(!(comShopOrderDO.getStatus()==2)){
        if(!(comShopOrderDO.getStatus()==2)
                || !(comShopOrderDO.getDeliveryStatus()==1)){
            return R.fail("当前订单不能配送");
        }
        ComShopStoreDO storeDO  = comShopStoreDAO.selectById(comShopOrderDO.getStoreId());
        if(storeDO.getDeliveryType()!=1){
            return R.fail("该商家不支持通过商家配送");
        }
        comShopOrderDO.setDeliveryStatus(4);
        comShopOrderDO.setDeliveryType(1);
        comShopOrderDO.setStatus(3);
        int updated = comShopOrderDAO.updateById(comShopOrderDO);
        if(updated==1){
            return R.ok("开始配送");
@@ -601,6 +612,10 @@
        if(!(comShopOrderDO.getDeliveryStatus() == 4)){
            return R.fail("订单还未开始配送");
        }
        if(!(comShopOrderDO.getStatus() == 3)){
            return R.fail("订单还未发货");
        }
        comShopOrderDO.setStatus(4);
        comShopOrderDO.setDeliveryStatus(5);
        int updated = comShopOrderDAO.updateById(comShopOrderDO);
        if(updated==1){
@@ -612,7 +627,7 @@
    @Override
    public R shopOrderExportData(ComShopOrderExportDTO comShopOrderExportDTO) {
        Page page = new Page();
        page.setSize(1000);
        page.setSize(10000);
        page.setCurrent(1);
        IPage<ExcelShopOrderDTO>  excelShopOrderDTO = comShopOrderDAO.selectOrderExport(page, comShopOrderExportDTO);
        return R.ok(excelShopOrderDTO.getRecords());
@@ -621,7 +636,7 @@
    @Override
    public R shopOrderFundsExportData(ComShopFundsExportDTO comShopFundsExportDTO) {
        Page page = new Page();
        page.setSize(1000);
        page.setSize(10000);
        page.setCurrent(1);
        IPage<ExcelShopFundsDTO>  excelShopFundsDTO = comShopOrderDAO.selectFundsExport(page, comShopFundsExportDTO);
        return R.ok(excelShopFundsDTO.getRecords());