From c554c7ad5405bafa149dbb6429e8245f78b33ffc Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 23 Dec 2020 15:59:53 +0800
Subject: [PATCH] modify

---
 zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml |   48 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
index 6c35040..53c7a77 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
@@ -90,6 +90,7 @@
 		<result property="invalidTime" column="invalid_time" />
 		<result property="useValid" column="use_valid" />
 		<result property="buyValid" column="buy_valid" />
+		<result property="isInfinite" column="is_infinite" />
 
 
 
@@ -299,7 +300,8 @@
 		buy_valid,
 		use_valid,
 		invalid_time,
-		pay_methods
+		pay_methods,
+		is_infinite
 		)
 		VALUES (
 		#{id},
@@ -359,7 +361,8 @@
 			#{buyValid},
 			#{useValid},
 			#{invalidTime},
-			#{payMethods}
+			#{payMethods},
+			#{isInfinite}
 		)
 	</insert>
 
@@ -531,6 +534,9 @@
 			</if>
 			<if test="isDel != null and isDel !='' ">
 				is_del = #{isDel},
+			</if>
+			<if test="isInfinite != null and isInfinite !='' ">
+				is_infinite = #{isInfinite},
 			</if>
 				invalid_time = #{invalidTime},
 				buy_valid = #{buyValid},
@@ -1222,4 +1228,42 @@
 	</select>
 
 
+	<select id="selectShoppingGoodsApiInPage" resultType="com.matrix.system.app.vo.ShoppingGoodsListVo">
+		select
+			id id,
+			code goodsCode,
+			name name,
+			seal_pice price,
+			is_present isPresent,
+			unit unit,
+			measure measure
+		from shopping_goods
+		where 1=1
+		<if test="record.queryKey != null and record.queryKey != ''">
+			and (instr(name,#{record.queryKey}) or instr(code ,#{record.queryKey}) or instr(zjm ,#{record.queryKey}))
+		</if>
+		<if test="record.cateId!=null">
+			and cate_id=#{record.cateId}
+		</if>
+		<if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
+			<if test="pageVo.sort !=null  and pageVo.order !=null">
+				order by ${pageVo.sort} ${pageVo.order}
+			</if>
+			<if test="pageVo.offset >=0  and pageVo.limit >0">
+				limit #{pageVo.offset},#{pageVo.limit}
+			</if>
+		</if>
+	</select>
+
+	<select id="selectShopppingGoodsAipTotal" resultType="java.lang.Integer">
+		select count(1)
+		from shopping_goods
+		where 1=1
+		<if test="record.queryKey != null and record.queryKey != ''">
+			and (instr(name,#{record.queryKey}) or instr(code ,#{record.queryKey}) or instr(zjm ,#{record.queryKey}))
+		</if>
+		<if test="record.cateId!=null">
+			and cate_id=#{record.cateId}
+		</if>
+	</select>
 </mapper>

--
Gitblit v1.9.1