From 6c235963d6fc46b38ea59d9b19c6519b892e080b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 16 May 2022 09:42:06 +0800
Subject: [PATCH] 20220516  逻辑删除,更新字段IS_Delete字段为已删除,默认为空,删除后其余信息从查询中过滤了

---
 zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
index 9935dd4..6977ef4 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
@@ -88,7 +88,6 @@
 	
 	<!-- where sql -->
 	<sql id="where_sql">
-		 
 		 <if test="record!=null">
 			<if test="(record.comId!=null and record.comId!='') or  (record.comId!='' and record.comId==0)  ">
 				and com_id  = #{record.comId} 
@@ -318,7 +317,7 @@
 		shop_product_comment c
 		LEFT JOIN shop_product p ON c.product_id = p.id
 		LEFT JOIN shop_order o ON c.order_id = o.id
-		LEFT JOIN biz_user b ON c.user_id = b.open_id
+		LEFT JOIN sys_vip_info b ON c.user_id = b.openid
 		<where>
 		  <include refid="where_sql"></include>
 		 </where>
@@ -338,7 +337,7 @@
 		shop_product_comment c
 		LEFT JOIN shop_product p ON c.product_id = p.id
 		LEFT JOIN shop_order o ON c.order_id = o.id
-		LEFT JOIN biz_user b ON c.user_id = b.open_id
+		LEFT JOIN sys_vip_info b ON c.user_id = b.id
 		<where>
 		   <include refid="where_sql"></include>
 		</where>
@@ -379,8 +378,10 @@
 			shop_product_comment c
 			LEFT JOIN shop_product p ON c.product_id = p.id
 			LEFT JOIN shop_order o ON c.order_id = o.id
-			LEFT JOIN biz_user b ON c.user_id = b.open_id
+			LEFT JOIN sys_vip_info b ON c.user_id = b.id
 		<where>
+			and (b.IS_DELETE is null or b.IS_DELETE = '')
+
 			<if test="record!=null">
 				<if test="(record.userId!=null and record.userId!='') or  (record.userId!='' and record.userId==0)  ">
 					and c.user_id = #{record.userId}
@@ -425,13 +426,13 @@
 			shop_product_comment c
 			LEFT JOIN shop_product p ON c.product_id = p.id
 			LEFT JOIN shop_order o ON c.order_id = o.id
-			LEFT JOIN biz_user b ON c.user_id = b.open_id
+			LEFT JOIN sys_vip_info b ON c.user_id = b.openid
 		<where>
 			and c.product_id = #{record.productId}
 			AND p.del_flag = 2
 			AND o.del_flag = 2
 			AND c.del_flag = 2
-			AND c.com_audit_status = 1
+			AND c.com_audit_status = 1 and (b.IS_DELETE is null or b.IS_DELETE = '')
 		</where>
 		order by c.create_time desc
 		<if test="record.offset >=0  and record.limit >0">
@@ -448,7 +449,7 @@
 		shop_product_comment c
 		LEFT JOIN shop_product p ON c.product_id = p.id
 		LEFT JOIN shop_order o ON c.order_id = o.id
-		LEFT JOIN biz_user b ON c.user_id = b.open_id
+		LEFT JOIN sys_vip_info b ON c.user_id = b.openid
 		<where>
 			<if test="record!=null">
 				<if test="(record.productId!=null and record.productId!='') or  (record.productId!='' and record.productId==0)  ">

--
Gitblit v1.9.1