12345678910111213141516171819202122232425262728293031 |
- package com.bofeng.dao;
- import com.baomidou.mybatisplus.mapper.BaseMapper;
- import com.bofeng.entity.MsReport;
- import com.bofeng.entity.MsSuspected;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Select;
- import org.springframework.stereotype.Repository;
- import java.util.List;
- /**
- * @Author: xielianghe
- * @Date: 2020/2/4 15:39
- */
- @Mapper
- @Repository
- public interface MsSuspectedMapper extends BaseMapper<MsSuspected> {
- List<MsSuspected> selectByReportId(@Param("reportId") Long reportId);
- //判断家人姓名是否重复
- @Select("select * from ms_suspected where report_id=#{reportId} and user_name=#{userName}")
- List<MsSuspected> selectUserNameNum(@Param("reportId") Long reportId, @Param("userName") String userName);
- //判断家人是否有历史评分
- @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")
- Integer selectUserNameScore(@Param("userCreate") Long userCreate, @Param("userName") String userName, @Param("suspectedId") Long suspectedId);
- }
|