From d388e2788b7ef088d7cd40f901b0acdcec460bc3 Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Thu, 01 Apr 2021 00:19:23 +0800
Subject: [PATCH] modify

---
 zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml
index 65db100..bb312b7 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/ArticleTypeDao.xml
@@ -15,6 +15,7 @@
 		<result property="type" column="type" />
 		<result property="parentIds" column="parent_ids" />
 		<result property="shopId" column="shop_id"/>
+		<result property="companyId" column="company_id" />
 			<!--扩展属性  -->
 			<!-- <association property="article" javaType="Article"
 			column="{type_id=id}" select="com.matrix.system.hive.dao.ArticleDao.selectById" /> -->
@@ -32,6 +33,7 @@
 			icon,
 			type,
 			shop_id,
+			company_id,
 			parent_ids
 		)
 	VALUES (
@@ -44,6 +46,7 @@
 			#{icon},
 			#{type},
 			#{shopId},
+			#{companyId},
 			#{parentIds}
 	)
 	</insert>
@@ -229,7 +232,7 @@
 			<if test="record.articleTypeName != null and record.articleTypeName !='' ">
 				and article_type_name = #{record.articleTypeName}
 			</if>
-			<if test="record.parentId != null and record.parentId !='' ">
+			<if test="record.parentId != null or record.parentId ==0 ">
 				and parent_id = #{record.parentId}
 			</if>
 			<if test="record.sort != null and record.sort !='' ">
@@ -250,6 +253,9 @@
 			<if test="record.shopId != null and record.shopId !='' ">
 				and shop_id = #{record.shopId}
 			</if>
+			<if test="record.companyId != null and record.companyId !='' ">
+				and company_id = #{record.companyId}
+			</if>
 		</if>
 	</select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1