package com.td.boss.game.complayerland.service;

import com.td.boss.common.service.*;
import com.td.boss.game.complayerland.pojo.ComPlayerLand;
import com.td.boss.game.complayerland.pojo.ComPlayerLandAndCanSteal;
import com.td.boss.game.complayerland.vo.ComPlayerLandAndPlantVo;
import com.td.boss.game.complayerland.vo.ComPlayerLandAndUserInfoVo;
import com.td.boss.game.complayerland.vo.ComPlayerLandVo;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface ComPlayerLandService extends CommonService<ComPlayerLandVo, ComPlayerLand, Integer> {

    List<ComPlayerLand> findAllByUserId(String userId);

    /**
     * 返回一个已种植并且成熟的列表
     * @param userId
     * @return
     */
    List<ComPlayerLand> findAllByUserIdAndPlantAndMature(String userId);

    //获取可以偷取的土地用户，用于首页偷菜列表显示,返回一个不包括自己的列表
    List<ComPlayerLandAndUserInfoVo> findAllByCanStealNotSelf(String userId, Pageable pageable);

    //根据userId 获取可偷取的参数
    List<ComPlayerLandAndCanSteal> findCanStealByUserIdAndOtherUserId(String userId,String otherUserId);

    List<ComPlayerLandAndUserInfoVo> findAllByCanStealAndOtherUser(String userId);

    //获取当前用户的全部可偷土地
    List<ComPlayerLand> findAllByCanStealOtherLands(String userId,String otherUserId);

    ComPlayerLand findById(Integer id);

    ComPlayerLand findByLandId(Integer id);

    ComPlayerLand findByUserIdAndLandId(String userId,Integer id);

    ComPlayerLand AddComPlayerLand(ComPlayerLand comPlayerLand);

}
