package com.sqx.modules.invite.service;


import com.sqx.common.utils.PageUtils;
import com.sqx.modules.app.entity.UserEntity;
import com.sqx.modules.invite.entity.Invite;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface InviteService {

    PageUtils selectInviteList(int page, int limit, Integer state, Long userId);

    Integer selectInviteCount(Integer state,Long userId);
    Integer selectInviteCount2(String code);
    Integer selectInviteSignCount(String code);

    List<Long> selectInviteSignByUser(String code);

    Double selectInviteSum(Integer state,Long userId);

    int saveBody(Long userId, UserEntity userEntity);

    PageUtils selectInviteUser(int page,int limit,Long userId,Integer state,Integer userType);

    Integer selectInviteByUserIdCountNotTime(Long userId);

    Integer selectInviteByUserIdCount(Long userId, Date startTime, Date endTime);

    Double selectInviteByUserIdSum(Long userId, Date startTime,Date endTime);

    Double sumInviteMoney(String time,Integer flag);

    PageUtils inviteAnalysis(int page,int limit, String time, Integer flag);

    Map<String,Object> updateInvite(UserEntity userEntity, String format, Long userId, BigDecimal price);

    Invite selectInviteByUser(Long userId, Long inviteeUserId, Integer userType);

}
