package com.sqx.modules.app.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sqx.common.utils.PageUtils;
import com.sqx.common.utils.Result;
import com.sqx.modules.app.entity.UserMoney;
import com.sqx.modules.app.entity.UserMoneyDetails;
import com.sqx.modules.artificer.entity.Period;
import org.springframework.web.bind.annotation.RequestAttribute;

import java.math.BigDecimal;

public interface UserMoneyService extends IService<UserMoney> {

    Result payUserMoneyArtificer(@RequestAttribute Long userId, Long artificerId, BigDecimal money);

    UserMoney selectUserMoneyByUserId(Long userId);

    void updateMoney(int i, Long userId, double money);

    void updateMoney(UserMoney userMoney);

    Double selectMyProfit(Long userId);

    PageUtils balanceDetailed(@RequestAttribute Long userId, Page<UserMoneyDetails> ipage);

    Result profitDetailed(@RequestAttribute Long userId, Page ipage, String startTime,String endTime);

    void updateSad(int i, Long userId, double payMoney);
}
