Helius
2020-12-30 6794d55dfc524bf534f0669e046d27d03dc4bc33
modify
3 files modified
31 ■■■■■ changed files
zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java 14 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java 15 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java
@@ -1,6 +1,11 @@
package com.matrix.system.app.action;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.system.hive.service.ArticleTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -13,4 +18,13 @@
@RequestMapping(value = "/api/know")
public class ApiKnowledgeAction {
    @Autowired
    private ArticleTypeService articleTypeService;
    @ApiOperation(value = "获取知识库分类", notes = "获取知识库分类")
    @GetMapping(value = "/findKnowledgeType")
    public AjaxResult findKnowledgeType() {
        return null;
    }
}
zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
@@ -1,16 +1,21 @@
package com.matrix.system.hive.action;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Resource;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.pojo.PaginationVO;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.constance.Dictionary;
import com.matrix.system.hive.bean.ArticleType;
import com.matrix.system.hive.plugin.message.StringUtil;
import com.matrix.system.hive.plugin.util.CollectionUtils;
import com.matrix.system.hive.service.ArticleTypeService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -110,6 +115,16 @@
           articleType.setType(Dictionary.ARTICEL_TYPE_NAME_MDXY);
        SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        articleType.setShopId(users.getShopId());
        Long parentId = articleType.getParentId();
        List<Long> ids = new ArrayList<>();
        while (parentId != 0) {
            ArticleType type = currentService.findById(parentId);
            ids.add(type.getId());
            parentId = type.getParentId();
        }
        articleType.setParentIds(CollectionUtils.isNotEmpty(ids) ? StringUtils.collToStr(ids, ",") : null);
        if (articleType.getId() != null) {
            return modify(currentService, articleType, "文章类型");
zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
@@ -132,7 +132,7 @@
        select
        <foreach collection="list" index="index" item="item"   separator=","  >
            (
            select IFNULL(sum(card_Pay), 0)
            select IFNULL(sum(arrears), 0)
            from sys_order
            where STATU in ('欠款')
            and <![CDATA[order_time > #{item.beginTime}   and  order_time < #{item.endTime} ]]>