UserPlaceMapper.java 787 B

123456789101112131415161718192021222324
  1. package com.bofeng.dao;
  2. import com.baomidou.mybatisplus.mapper.BaseMapper;
  3. import com.bofeng.entity.UserPlace;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. import org.springframework.stereotype.Repository;
  7. import java.util.List;
  8. import java.util.Map;
  9. @Mapper
  10. @Repository
  11. public interface UserPlaceMapper extends BaseMapper<UserPlace> {
  12. List<UserPlace> getByUserId(@Param("userId") Long userId);
  13. UserPlace getByUserIdAndPlaceId(@Param("userId") Long userId, @Param("placeId") Long placeId);
  14. List<Map<String, Object>> getCurrentPlacesByUserId(@Param("userId") Long userId);
  15. int deleteByUserIdAndPlaceId(@Param("userId") Long userId, @Param("placeId") Long placeId);
  16. int deleteByUserId(@Param("userId") Long userId);
  17. }