#
luxiaotao1123
2021-02-25 f4d88d94a86b8a067dfad51d5bc8efaf09a2d616
src/main/java/zy/cloud/wms/common/web/BaseController.java
@@ -9,6 +9,8 @@
import com.core.exception.CoolException;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import zy.cloud.wms.manager.entity.Tag;
import zy.cloud.wms.manager.service.TagService;
import zy.cloud.wms.system.entity.User;
import zy.cloud.wms.system.service.UserService;
@@ -28,6 +30,8 @@
    protected HttpServletRequest request;
    @Autowired
    private UserService userService;
    @Autowired
    private TagService tagService;
    protected Long getUserId(){
        return Long.parseLong(String.valueOf(request.getAttribute("userId")));
@@ -50,6 +54,14 @@
        return "";
    }
    protected Tag getOriginTag(){
        Tag tag = tagService.selectOne(new EntityWrapper<Tag>().eq("level", 1));
        if (tag == null) {
            throw new CoolException("归类数据错误");
        }
        return tag;
    }
    /**
     * 分页组装
     * @param pageNumber