From e3f5c0d35739ffa2c713033d4dabc7dd39ae2425 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Tue, 20 Apr 2021 11:15:29 +0800
Subject: [PATCH] 添加一个官网联系我们的的通知接口

---
 zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml |   54 +++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 35 insertions(+), 19 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml
index cb50621..b8a1a41 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml
@@ -1,30 +1,46 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
 <mapper namespace="com.matrix.system.score.dao.ScoreUseRecordDao">
 
 
-	<select id="selectFlowList" resultType="com.matrix.system.shopXcx.api.vo.ScoreUseRecordVo">
+    <select id="selectFlowList" resultType="com.matrix.system.shopXcx.api.vo.ScoreUseRecordVo">
 
-		select a.*,
-		b.SHOP_NAME,
-		c.su_name as optionName
-		from score_use_record a
-		left join sys_shop_info b on a.shop_id=b.id
-		left join sys_users c on a.opration_user_id=c.su_id
-		where a.open_id=#{record.userId}
-		and DATE_FORMAT(a.create_time,'%Y-%m')=#{record.queryTime}
-		<if test="record.revenueType==1">
-			and a.rec_num>0
-		</if>
-		<if test="record.revenueType==2">
-			<![CDATA[ and a.rec_num<0 ]]>
-		</if>
-		order by a.create_time desc
+        select a.*,
+        b.SHOP_NAME,
+        c.su_name as optionName
+        from score_use_record a
+        left join sys_shop_info b on a.shop_id=b.id
+        left join sys_users c on a.opration_user_id=c.su_id
+        <where>
 
-	</select>
+            <if test="(record.vipId!=null and record.vipId!='')">
+                and a.vip_id=#{record.vipId}
+            </if>
 
+            <if test="record.remarks!=null and record.remarks!=''">
+                and a.remarks like concat('%',#{record.remarks},'%')
+            </if>
+
+            <if test="record.queryTime!=null and record.queryTime!=''">
+                and DATE_FORMAT(a.create_time,'%Y-%m')=#{record.queryTime}
+            </if>
+
+            <if test="record.beginTime != null and record.endTime!=null">
+                and (date(a.create_time) between #{record.beginTime} and #{record.endTime})
+            </if>
+
+            <if test="record.revenueType==1">
+                and a.rec_num>0
+            </if>
+            <if test="record.revenueType==2">
+                <![CDATA[ and a.rec_num<0 ]]>
+            </if>
+        </where>
+        order by a.create_time desc
+
+    </select>
 
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1