package com.mmc.iuav.user.dao.userpoints;

import com.mmc.iuav.user.entity.userpoints.UserPointsDO;
import com.mmc.iuav.user.model.qo.PageQO;
import com.mmc.iuav.user.model.qo.userpoints.UserPointQO;
import com.mmc.iuav.user.model.vo.BuyPointsVO;
import com.mmc.iuav.user.model.vo.UserPointsSortVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author small
 * @Date 2023/8/5 13:20
 * @Version 1.0
 */
@Mapper
public interface UserPointsDao {
    UserPointsDO selectUserPoints(Integer id);

    void updatePoints(UserPointsDO userPointsDO);

    void insertPoints(UserPointsDO userPointsDO);

    List<UserPointsDO> userPointList(UserPointQO param);

    int count(UserPointQO param);

    BuyPointsVO selectBuyPointsType(@Param("id") Integer id);

    List<BuyPointsVO> selectAllBuyPointsType();
    void insertBuyPointsType(BuyPointsVO buyPointsVO);

    void updateBuyPointsType(BuyPointsVO buyPointsVO);

    /**
     * 积分排行榜
     * @param pageQO
     * @return {@link List}<{@link UserPointsSortVO}>
     */
    List<UserPointsSortVO> selectUserPointsSort(PageQO pageQO);
}
