From 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期二, 19 七月 2022 21:49:55 +0800
Subject: [PATCH] 优化添加设备 功能

---
 java110-db/src/main/resources/mapper/user/WechatSubscribeV1ServiceDaoImplMapper.xml |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/user/WechatSubscribeV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/user/WechatSubscribeV1ServiceDaoImplMapper.xml
index 260695e..f002f5c 100644
--- a/java110-db/src/main/resources/mapper/user/WechatSubscribeV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/user/WechatSubscribeV1ServiceDaoImplMapper.xml
@@ -33,6 +33,43 @@
     </insert>
 
 
+
+    <select id="queryDistinctWechatSubscribes" parameterType="Map" resultType="Map">
+        select distinct t.open_id,t.open_id openId,t.app_id,t.app_id
+        appId,t.nickname,t.headimgurl,t.status_cd,t.status_cd statusCd,t.user_id,t.user_id
+        userId,t.open_type,t.open_type openType
+        from wechat_subscribe t
+        where 1 =1
+        <if test="subId !=null and subId != ''">
+            and t.sub_id= #{subId}
+        </if>
+        <if test="openId !=null and openId != ''">
+            and t.open_id= #{openId}
+        </if>
+        <if test="appId !=null and appId != ''">
+            and t.app_id= #{appId}
+        </if>
+        <if test="nickname !=null and nickname != ''">
+            and t.nickname= #{nickname}
+        </if>
+        <if test="headimgurl !=null and headimgurl != ''">
+            and t.headimgurl= #{headimgurl}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="openType !=null and openType != ''">
+            and t.open_type= #{openType}
+        </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
+
+    </select>
     <!-- 鏌ヨ寰俊鍏虫敞淇℃伅 add by wuxw 2018-07-03 -->
     <select id="getWechatSubscribeInfo" parameterType="Map" resultType="Map">
         select t.sub_id,t.sub_id subId,t.open_id,t.open_id openId,t.app_id,t.app_id

--
Gitblit v1.8.0