1231231231231231312312

This commit is contained in:
Zhang HaoYang 2023-12-29 01:40:51 +08:00
parent c6c0665f61
commit d39c308250
2 changed files with 6 additions and 1 deletions

View File

@ -183,6 +183,11 @@ public class CommentServiceImpl implements CommentService {
{ {
String child = commentDao.queryChildId(commentId); String child = commentDao.queryChildId(commentId);
if(child == null)
{
commentDao.deleteByPrimaryKey(commentId);
return "处理完成";
}
String [] childrens = child.split(","); String [] childrens = child.split(",");
int flag = 0; int flag = 0;
for(String id : childrens) for(String id : childrens)

View File

@ -64,7 +64,7 @@
FROM ln_comment AS t FROM ln_comment AS t
ORDER BY t.id ASC) t1, ORDER BY t.id ASC) t1,
(SELECT @pids := #{commentId,jdbcType=INTEGER}) t2) t3 (SELECT @pids := #{commentId,jdbcType=INTEGER}) t2) t3
WHERE ischild != '0' and id = #{commentId,jdbcType=INTEGER} WHERE ischild != '0'
order by id desc order by id desc
limit 1 limit 1
</select> </select>