未通过的评论不显示

This commit is contained in:
wangliwen 2022-06-23 18:44:14 +08:00
parent 8f640f66e6
commit 8ade504226
2 changed files with 7 additions and 3 deletions

View File

@ -63,6 +63,9 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
break;
}
});
if (!params.containsKey("creator")) {
wrapper.eq(StringUtils.isNotBlank(params.get("creator").toString()), "del_flag", 0);
}
wrapper.orderByDesc("create_date");
return wrapper;
}

View File

@ -19,11 +19,12 @@
</resultMap>
<select id="commentCount" resultType="java.lang.Long">
SELECT
COUNT( id )
COUNT( id )
FROM
t_demand_comment
t_demand_comment
WHERE
target_id = #{dataId};
del_flag = 0
AND target_id = #{dataId};
</select>
</mapper>