From 83be430710bd0269cfc781ab241ff2aba93106f0 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 06 Jan 2021 16:06:43 +0800
Subject: [PATCH] modify
---
zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml | 65 +++++++++++++++++++++++++++-----
1 files changed, 55 insertions(+), 10 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 fac724e..849f191 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
@@ -86,6 +86,12 @@
<result property="goodsSortName" column="goodsSortName" />
+ <result property="payMethods" column="pay_methods" />
+ <result property="invalidTime" column="invalid_time" />
+ <result property="useValid" column="use_valid" />
+ <result property="buyValid" column="buy_valid" />
+ <result property="isInfinite" column="is_infinite" />
+
</resultMap>
@@ -293,7 +299,9 @@
zjm,
buy_valid,
use_valid,
- invalid_time
+ invalid_time,
+ pay_methods,
+ is_infinite
)
VALUES (
#{id},
@@ -352,7 +360,9 @@
#{zjm},
#{buyValid},
#{useValid},
- #{invalidTime}
+ #{invalidTime},
+ #{payMethods},
+ #{isInfinite}
)
</insert>
@@ -525,17 +535,13 @@
<if test="isDel != null and isDel !='' ">
is_del = #{isDel},
</if>
- <if test="invalidTime != null">
+ <if test="isInfinite != null and isInfinite !='' ">
+ is_infinite = #{isInfinite},
+ </if>
invalid_time = #{invalidTime},
- </if>
- <if test="buyValid != null and buyValid !='' ">
buy_valid = #{buyValid},
- </if>
- <if test="useValid != null and useValid !='' ">
use_valid = #{useValid},
- </if>
-
-
+ pay_methods = #{payMethods},
</set>
WHERE id=#{id}
</update>
@@ -1222,4 +1228,43 @@
</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,
+ a.good_type goodsType
+ from shopping_goods a
+ where 1=1 and staus = '上架'
+ <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 a.cate_id in ( select b.id from shopping_goods_category b where (b.id=#{record.cateId} or b.parent_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 a
+ where 1=1 and staus = '上架'
+ <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 a.cate_id in ( select b.id from shopping_goods_category b where (b.id=#{record.cateId} or b.parent_id=#{record.cateId}))
+ </if>
+ </select>
</mapper>
--
Gitblit v1.9.1