package com.ruoyi.cai.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.cai.domain.Account;
import com.ruoyi.cai.dto.admin.vo.AccountAdminVo;
import org.apache.ibatis.annotations.Param;

/**
 * 用户账户Mapper接口
 *
 * @author 77
 * @date 2023-12-23
 */
public interface AccountMapper extends BaseMapper<Account> {

    long decrCoin(@Param("userId") Long userId, @Param("coin") Long coin);

    long incsCoin(@Param("userId") Long userId, @Param("coin") Long coin);

    void incsIncomeCoin(@Param("userId") Long userId, @Param("incomeCoin") Long incomeCoin);


    long decrIncomeCoin(@Param("userId") Long userId, @Param("incomeCoin") Long incomeCoin);

    Page<AccountAdminVo> pageAdmin(@Param("build") Page<Object> build, @Param("bo") AccountAdminVo bo);
}
