#
luxiaotao1123
2021-04-13 47015b98442acc527509235d5b9c22857751aeef
src/main/java/zy/cloud/wms/manager/controller/OrderController.java
@@ -10,7 +10,9 @@
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.R;
import com.core.exception.CoolException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import zy.cloud.wms.common.web.BaseController;
import zy.cloud.wms.manager.entity.Order;
@@ -44,6 +46,9 @@
        excludeTrash(param);
        convert(param, wrapper);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        else {
            wrapper.orderBy("update_time", false);
        }
        return R.ok(orderService.selectPage(new Page<>(curr, limit), wrapper));
    }
@@ -90,6 +95,21 @@
        return R.ok();
    }
    @RequestMapping(value = "/orders/delete/auth")
    @ManagerAuth
    @Transactional
    public R deleteBatch(@RequestParam(value = "ids[]") Long[] ids){
        if (Cools.isEmpty((Object) ids)){
            return R.error();
        }
        for (Long id : ids){
            if (!orderService.deleteById(id)) {
                throw new CoolException("服务器错误,请联系管理员");
            }
        }
        return R.ok();
    }
    @RequestMapping(value = "/order/export/auth")
    @ManagerAuth
    public R export(@RequestBody JSONObject param){