package com.yonge.cooleshow.biz.dal.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yonge.cooleshow.biz.dal.dto.UserAccountRecordDto;
import com.yonge.cooleshow.biz.dal.dto.req.TotalReq;
import com.yonge.cooleshow.biz.dal.entity.UserAccountRecord;
import com.yonge.cooleshow.biz.dal.vo.UserAccountVo;
import com.yonge.cooleshow.biz.dal.dto.search.UserAccountSearch;
import com.yonge.cooleshow.biz.dal.entity.UserAccount;
import com.yonge.cooleshow.biz.dal.vo.res.AccountTotal;
import com.yonge.cooleshow.common.entity.HttpResponseResult;

/**
 * 用户账户表 服务类
 * @author liweifan
 * @date 2022-03-30
 */
public interface UserAccountService extends IService<UserAccount>  {

	/**
     * 查询详情
     * @author liweifan
 	 * @date 2022-03-30
     */
	UserAccountVo detail(Long id);

    /**
     * 分页查询
     * @author liweifan
 	 * @date 2022-03-30
     */
    IPage<UserAccountVo> selectPage(IPage<UserAccountVo> page, UserAccountSearch query);
    /***
     * 账户变更（账户变更使用该方法，有分布式锁）
     * @author liweifan
     * @param: accountRecordDto
     * @updateTime 2022/4/7 16:40
     * @return: java.lang.Integer
     */
    HttpResponseResult<UserAccountRecord> accountChange(UserAccountRecordDto accountRecordDto);
    /***
     * 账户统计查询
     * @author liweifan
     * @param: totalReq
     * @updateTime 2022/4/24 10:48
     * @return: com.yonge.cooleshow.common.entity.HttpResponseResult<com.yonge.cooleshow.biz.dal.vo.res.AccountTotal>
     */
    HttpResponseResult<AccountTotal> accountTotal(TotalReq totalReq);
}