jyy
2021-03-16 2511686fa3bcc154dad551a4bc8ef6839037a8c7
zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java
@@ -4,8 +4,12 @@
import com.matrix.core.pojo.PaginationVO;
import com.matrix.system.app.dto.ArticleListDto;
import com.matrix.system.hive.action.BaseController;
import com.matrix.system.hive.action.util.QueryUtil;
import com.matrix.system.hive.bean.Article;
import com.matrix.system.hive.bean.ArticleType;
import com.matrix.system.hive.bean.SysShopInfo;
import com.matrix.system.hive.dao.ArticleDao;
import com.matrix.system.hive.dao.SysShopInfoDao;
import com.matrix.system.hive.service.ArticleService;
import com.matrix.system.hive.service.ArticleTypeService;
import io.swagger.annotations.Api;
@@ -25,6 +29,7 @@
    @Autowired
    private ArticleTypeService articleTypeService;
    @Autowired
    private ArticleService articleService;
@@ -32,8 +37,7 @@
    @GetMapping(value = "/findKnowledgeType")
    public AjaxResult findKnowledgeType() {
        ArticleType type = new ArticleType();
        type.setShopId(getMe().getShopId());
        type.setParentId(0L);
        type.setCompanyId(getMe().getCompanyId());
        return AjaxResult.buildSuccessInstance(articleTypeService.findByModel(type));
    }
@@ -45,6 +49,7 @@
        pageVo.setLimit(articleListDto.getPageSize());
        Article article = new Article();
        QueryUtil.setQueryLimitCom(article);
        article.setTypeId(articleListDto.getTypeId());
        return AjaxResult.buildSuccessInstance(articleService.findApiArticleListInPage(article, pageVo));
    }