From 6794d55dfc524bf534f0669e046d27d03dc4bc33 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 30 Dec 2020 21:21:30 +0800
Subject: [PATCH] modify
---
zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml | 2 +-
zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java | 15 +++++++++++++++
zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java | 14 ++++++++++++++
3 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java b/zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java
index 2e23de7..4fd7d76 100644
--- a/zq-erp/src/main/java/com/matrix/system/app/action/ApiKnowledgeAction.java
+++ b/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;
+ }
+
}
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
index 30443b0..2857afc 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ArticleTypeController.java
+++ b/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, "文章类型");
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
index 0fdc2aa..2d1f072 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
+++ b/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} ]]>
--
Gitblit v1.9.1