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/SysProjUseDao.xml | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
index 8dd31a1..5c35d98 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
@@ -25,6 +25,7 @@
<result property="projName" column="proj_name"/>
<result property="deductionNum" column="deductionNum"/>
<result property="isCourse" column="is_course"/>
+ <result property="timeLength" column="time_length"/>
@@ -227,13 +228,17 @@
<select id="selectInPage" resultMap="SysProjUseMap">
select
a.*,
- b.TIME_LENGTH
+ b.TIME_LENGTH,
+ b.img
from sys_proj_use a
left join shopping_goods b on a.proj_id=b.id
where 1=1
<if test="record!=null">
<if test="record.id != null and record.id !='' ">
and a.ID = #{record.id}
+ </if>
+ <if test="record.queryKey != null and record.queryKey !='' ">
+ and (instr(b.name, #{record.queryKey}) or instr(b.zjm, #{record.queryKey}) or instr(goods_no, #{record.queryKey}))
</if>
<if test="record.orderItemId != null and record.orderItemId !='' ">
and a.ORDER_ITEM_ID = #{record.orderItemId}
@@ -266,7 +271,9 @@
<if test="record.failTime != null ">
and a.FAIL_TIME = #{record.failTime}
</if>
-
+ <if test="record.targetFailTime != null ">
+ and date_format(#{record.failTime}, '%Y-%m-%d') > date_format(a.FAIL_TIME, '%Y-%m-%d')
+ </if>
<if test="record.price != null and record.price !='' ">
and a.PRICE = #{record.price}
</if>
@@ -422,8 +429,11 @@
<!-- 根据对象查询 -->
<select id="selectByModel" resultMap="SysProjUseMap">
select
- a.*
+ a.*,
+ b.time_length,
+ b.img
from sys_proj_use a
+ left join shopping_goods b on a.proj_id=b.id
where 1=1
<if test="record!=null">
<if test="record.id != null and record.id !='' ">
@@ -722,4 +732,9 @@
group by b.id) t
</select>
+ <select id="selectHasValidProjUse" resultMap="SysProjUseMap">
+ select * from sys_proj_use
+ where date_format(now(), '%Y-%m-%d') > date_format(FAIL_TIME, '%Y-%m-%d') and STATUS='有效'
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1