package com.ruoyi.xq.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.xq.domain.UserExtend;
import com.ruoyi.xq.dto.admin.user.UserExtendAdminVo;
import com.ruoyi.xq.dto.app.account.AccountDetailVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * 用户邀请Mapper接口
 *
 * @author 77
 * @date 2024-03-04
 */
public interface UserExtendMapper extends BaseMapper<UserExtend> {

    boolean decrIncome(@Param("userId") Long userId, @Param("price") BigDecimal price);

    boolean incrIncome(@Param("userId") Long userId, @Param("price") BigDecimal price);

    boolean incrWxTransNum(@Param("userId") Long userId, @Param("wxTransNum") Integer wxTransNum);

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

    boolean incsWithdrawCount(@Param("userId") Long userId, @Param("withdrawMonty") BigDecimal withdrawMonty);


    boolean incsConsumeTotal(@Param("userId") Long userId, @Param("consumeMonty") BigDecimal consumeMonty);

    boolean incsWxTransNum(@Param("userId") Long userId, @Param("num") int num);
}
