MsSuspectedMapper.java 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. package com.bofeng.dao;
  2. import com.baomidou.mybatisplus.mapper.BaseMapper;
  3. import com.bofeng.entity.MsReport;
  4. import com.bofeng.entity.MsSuspected;
  5. import org.apache.ibatis.annotations.Mapper;
  6. import org.apache.ibatis.annotations.Param;
  7. import org.apache.ibatis.annotations.Select;
  8. import org.springframework.stereotype.Repository;
  9. import java.util.List;
  10. /**
  11. * @Author: xielianghe
  12. * @Date: 2020/2/4 15:39
  13. */
  14. @Mapper
  15. @Repository
  16. public interface MsSuspectedMapper extends BaseMapper<MsSuspected> {
  17. List<MsSuspected> selectByReportId(@Param("reportId") Long reportId);
  18. //判断家人姓名是否重复
  19. @Select("select * from ms_suspected where report_id=#{reportId} and user_name=#{userName}")
  20. List<MsSuspected> selectUserNameNum(@Param("reportId") Long reportId, @Param("userName") String userName);
  21. //判断家人是否有历史评分
  22. @Select("select score from ms_suspected where user_create=#{userCreate} and user_name=#{userName} and suspected_id !=#{suspectedId} order by time_update desc limit 1")
  23. Integer selectUserNameScore(@Param("userCreate") Long userCreate, @Param("userName") String userName, @Param("suspectedId") Long suspectedId);
  24. }