package com.fjs.scenic.mapper.user;

import com.fjs.scenic.entity.user.UserStatistical;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

public interface UserStatisticalMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(UserStatistical record);

    int insertSelective(UserStatistical record);

    UserStatistical selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UserStatistical record);

    int updateByPrimaryKey(UserStatistical record);

    int deleteByUserId(Integer id);

    int inserts(List<UserStatistical> list);

    List<UserStatistical> selectByUserId(Integer userID);

    List<HashMap<String,Object>> selectForPage(UserStatistical record);

    int delByOpenid(String openid);

    List<UserStatistical> verifyPermission(@Param("userID") Integer userID, @Param("pressId")Integer pressId);

    /**
     * 修改密码 （通过userid）
     * @param userId
     * @param newKey 新密码
     * @return
     */
    boolean updateSecretKeyByUserId(@Param("userId")Integer userId, @Param("newKey")String newKey);
}