package com.github.wxiaoqi.security.admin.mapper;


import com.github.wxiaoqi.security.admin.dto.UserCommentFindDTO;
import com.github.wxiaoqi.security.admin.entity.UserComment;
import com.github.wxiaoqi.security.admin.vo.UserCommentVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.additional.idlist.SelectByIdListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface UserCommentMapper extends Mapper<UserComment>, SelectByIdListMapper<UserComment,Integer> {

    @Update("update user_comment  set reply_num=reply_num+1 where id=#{id}")
    void   addreplyNum(@Param("id") Integer id);

    List<UserCommentVo> selectList(UserCommentFindDTO commentFindDTO);


    List<UserCommentVo> selectListByToUserId(UserCommentFindDTO commentFindDTO);

}