From 4a9de05ddd680d96c0010d31289bb36482a9c473 Mon Sep 17 00:00:00 2001
From: 陶杰 <1378534974@qq.com>
Date: 星期三, 09 十月 2024 13:41:55 +0800
Subject: [PATCH] 1.商品评论-增加显示隐藏 2.商品统计-隐藏不统计 3.商品评论-增加回复
---
src/main/resources/mapper/comment/FlowerCommentMapperCustom.xml | 32 ++++++++------------------------
1 files changed, 8 insertions(+), 24 deletions(-)
diff --git a/src/main/resources/mapper/comment/FlowerCommentMapperCustom.xml b/src/main/resources/mapper/comment/FlowerCommentMapperCustom.xml
index 1b53dd8..bb03787 100644
--- a/src/main/resources/mapper/comment/FlowerCommentMapperCustom.xml
+++ b/src/main/resources/mapper/comment/FlowerCommentMapperCustom.xml
@@ -2,29 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mzl.flower.mapper.comment.FlowerCommentMapperCustom">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.mzl.flower.entity.FlowerCommentDO">
- <id column="id" property="id" />
- <result column="deleted" property="deleted" />
- <result column="create_by" property="createBy" />
- <result column="create_time" property="createTime" />
- <result column="update_by" property="updateBy" />
- <result column="update_time" property="updateTime" />
- <result column="order_id" property="orderId" />
- <result column="order_item_id" property="orderItemId" />
-
- <result column="customer_id" property="customerId" />
- <result column="customer_user_id" property="customerUserId" />
- <result column="supplier_id" property="supplierId" />
- <result column="supplier_user_id" property="supplierUserId" />
-
- <result column="flower_id" property="flowerId" />
- <result column="flower_cover" property="flowerCover" />
- <result column="comment_grade" property="commentGrade" />
- <result column="comment" property="comment" />
- <result column="comment_images" property="commentImages" />
- <result column="anonymity_falg" property="anonymityFalg" />
- </resultMap>
<select id="getPage" resultType="com.mzl.flower.dto.response.comment.FlowerCommentVO">
<include refid="baseSql" />
</select>
@@ -35,7 +12,7 @@
SELECT
COALESCE(ROUND(SUM(c.comment_grade) / NULLIF(COUNT(1), 0), 1), 0) AS average_grade
FROM t_flower_comment c
- WHERE c.deleted = false
+ WHERE c.deleted = false and c.show_flag=0
AND c.supplier_id = #{supplierId}
</select>
@@ -72,6 +49,13 @@
<if test="param.flowerId != null">
and c.flower_id = #{param.flowerId}
</if>
+ <if test="param.showFlag != null">
+ and c.show_flag = #{param.showFlag}
+ </if>
+
+
+
+ order by c.create_time desc
</sql>
--
Gitblit v1.9.3