ym923 | 2c16516 | 2025-06-06 17:54:39 +0800 | [diff] [blame^] | 1 | package com.pt5.pthouduan.mapper; |
| 2 | |
| 3 | import com.pt5.pthouduan.entity.Complain; |
| 4 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 5 | import org.apache.ibatis.annotations.Mapper; |
| 6 | import org.apache.ibatis.annotations.Param; |
| 7 | |
| 8 | import java.util.List; |
| 9 | |
| 10 | /** |
| 11 | * <p> |
| 12 | * 投诉 Mapper 接口 |
| 13 | * </p> |
| 14 | * |
| 15 | * 功能:增、删、改、查(按被投诉用户ID和投诉发起人ID) |
| 16 | * |
| 17 | * @author ym |
| 18 | * @since 2025-04-14 |
| 19 | */ |
| 20 | @Mapper |
| 21 | public interface ComplainMapper extends BaseMapper<Complain> { |
| 22 | |
| 23 | // 创建投诉 |
| 24 | void save(Complain complain); |
| 25 | |
| 26 | // 根据投诉ID删除 |
| 27 | int deleteByComplainid(@Param("complainid") Integer complainid); |
| 28 | |
| 29 | // 更新投诉 |
| 30 | int updateComplain(Complain complain); |
| 31 | |
| 32 | // 根据被投诉用户ID查询投诉列表 |
| 33 | List<Complain> selectByDuser(@Param("duser") Long duser); |
| 34 | |
| 35 | // 根据投诉发起人ID查询投诉列表 |
| 36 | List<Complain> selectByPuse(@Param("puse") Long puse); |
| 37 | |
| 38 | // 根据投诉ID查询投诉记录 |
| 39 | Complain selectByComplainId(@Param("complainid") Integer complainid); |
| 40 | |
| 41 | // 获取所有投诉记录 |
| 42 | List<Complain> selectAllComplains(); |
| 43 | |
| 44 | |
| 45 | } |