|
|
@@ -48,38 +48,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</where>
|
|
|
</select>
|
|
|
<select id="selectFsStoreOrderScrmCommentByUser" parameterType="FsStoreOrderScrmComment" resultMap="FsStoreOrderScrmCommentResult">
|
|
|
- select comment_id,
|
|
|
- order_id,
|
|
|
- content,
|
|
|
- case when is_anonymous != 1 then nick_name else '匿名用户' end as nick_name,
|
|
|
- user_id,
|
|
|
- is_anonymous,
|
|
|
- is_show,
|
|
|
- rating,
|
|
|
- merchant_reply,
|
|
|
- image_url,
|
|
|
- video_url,
|
|
|
- product_ids,
|
|
|
- is_del,
|
|
|
- store_id,
|
|
|
- store_name,
|
|
|
- create_time,
|
|
|
- update_time
|
|
|
- from fs_store_order_scrm_comment
|
|
|
- where is_del != 1 and (isShow = 1 or user_id = #{userId})
|
|
|
- <if test="orderId != null "> and order_id = #{orderId}</if>
|
|
|
- <if test="showSelf != null and showSelf = 1"> and user_id = #{userId}</if>
|
|
|
- <if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
- <if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
|
|
- <if test="isAnonymous != null "> and is_anonymous = #{isAnonymous}</if>
|
|
|
- <if test="rating != null and rating != ''"> and rating = #{rating}</if>
|
|
|
- <if test="merchantReply != null and merchantReply != ''"> and merchant_reply = #{merchantReply}</if>
|
|
|
- <if test="imageUrl != null and imageUrl != ''"> and image_url = #{imageUrl}</if>
|
|
|
- <if test="videoUrl != null and videoUrl != ''"> and video_url = #{videoUrl}</if>
|
|
|
- <if test="productIds != null and productIds != ''"> and find_in_set(#{productIds}, product_ids) > 0</if>
|
|
|
- <if test="storeId != null "> and store_id = #{storeId}</if>
|
|
|
- <if test="storeName != null and storeName != ''"> and store_name like concat('%', #{storeName}, '%')</if>
|
|
|
- order by create_time desc
|
|
|
+ select
|
|
|
+ t1.comment_id,
|
|
|
+ t1.order_id,
|
|
|
+ t1.content,
|
|
|
+ case when t1.is_anonymous != 1 then t1.nick_name else '匿名用户' end as nick_name,
|
|
|
+ t1.user_id,
|
|
|
+ t1.is_anonymous,
|
|
|
+ t1.is_show,
|
|
|
+ t1.rating,
|
|
|
+ t1.merchant_reply,
|
|
|
+ t1.image_url,
|
|
|
+ t1.video_url,
|
|
|
+ t1.product_ids,
|
|
|
+ t1.is_del,
|
|
|
+ t1.store_id,
|
|
|
+ t1.store_name,
|
|
|
+ t1.create_time,
|
|
|
+ t1.update_time,
|
|
|
+ t2.avatar as user_avatar
|
|
|
+ from fs_store_order_scrm_comment t1
|
|
|
+ left join fs_user t2 on t1.user_id = t2.user_id
|
|
|
+ where t1.is_del != 1 and (t1.is_show = 1 or t1.user_id = #{userId})
|
|
|
+ <if test="orderId != null and orderId != '' "> and t1.order_id = #{orderId}</if>
|
|
|
+ <if test="showSelf != null and showSelf != 0"> and t1.user_id = #{userId}</if>
|
|
|
+ <if test="content != null and content != ''"> and t1.content = #{content}</if>
|
|
|
+ <if test="nickName != null and nickName != ''"> and t1.nick_name like concat('%', #{nickName}, '%')</if>
|
|
|
+ <if test="isAnonymous != null "> and t1.is_anonymous = #{isAnonymous}</if>
|
|
|
+ <if test="rating != null and rating != ''"> and t1.rating = #{rating}</if>
|
|
|
+ <if test="merchantReply != null and merchantReply != ''"> and t1.merchant_reply = #{merchantReply}</if>
|
|
|
+ <if test="imageUrl != null and imageUrl != ''"> and t1.image_url = #{imageUrl}</if>
|
|
|
+ <if test="videoUrl != null and videoUrl != ''"> and t1.video_url = #{videoUrl}</if>
|
|
|
+ <if test="productIds != null and productIds != ''"> and find_in_set(#{productIds}, t1.product_ids) > 0</if>
|
|
|
+ <if test="storeId != null "> and t1.store_id = #{storeId}</if>
|
|
|
+ <if test="storeName != null and storeName != ''"> and t1.store_name like concat('%', #{storeName}, '%')</if>
|
|
|
+ order by t1.create_time desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectFsStoreOrderScrmCommentByManager" parameterType="FsStoreOrderScrmComment" resultMap="FsStoreOrderScrmCommentResult">
|