package com.hai.service;

import com.alibaba.fastjson.JSONObject;
import com.hai.entity.BsDistributionRebate;
import com.hai.entity.BsDistributionUserRel;
import com.hai.entity.HighUser;

import java.util.List;
import java.util.Map;

/**
 * @serviceName BsDistributionUserRelService.java
 * @author Sum1Dream
 * @version 1.0.0
 * @Description // 分销用户关联接口
 * @createTime 17:47 2022/8/11
 **/
public interface BsDistributionUserRelService {

    /**
    * @Author Sum1Dream
    * @name insertDistributionRebate.java
    * @Description // 新增关联关系
    * @Date 17:55 2022/8/11
    * @Param [java.lang.Long, java.lang.Long]
    * @return void
    */
    void insertDistributionRebate(Long userId , Long popularizeUserId , String regionId);

    /**
    * @Author Sum1Dream
    * @name getDistributionRebateList.java
    * @Description // 查询关联列表
    * @Date 17:51 2022/8/11
    * @Param [java.util.Map<java.lang.String,java.lang.Object>]
    * @return java.util.List<com.hai.entity.BsDistributionRebate>
    */
    List<BsDistributionUserRel> getDistributionUserRelList(Map<String, Object> map);

    /**
    * @Author Sum1Dream
    * @name findDistributionUserRel.java
    * @Description // 查询关联关系详情
    * @Date 18:00 2022/8/11
    * @Param [java.util.Map<java.lang.String,java.lang.Object>]
    * @return com.hai.entity.BsDistributionUserRel
    */
    BsDistributionUserRel findDistributionUserRel(Map<String, Object> map);

    /**
    * @Author Sum1Dream
    * @name distributionRebate.java
    * @Description // 分销返利
    * @Date 14:24 2022/8/15
    * @Param [com.alibaba.fastjson.JSONObject]
    * @return void
    */
    void  distributionRebate(JSONObject object);

    /**
    * @Author Sum1Dream
    * @name userDistributionStatistics.java
    * @Description // 用户分销统计
    * @Date 10:50 2022/8/16
    * @Param [java.lang.Long]
    * @return com.alibaba.fastjson.JSONObject
    */
    JSONObject userDistributionStatistics(Long userId);


    /**
    * @Author Sum1Dream
    * @name getDistributionRebateList.java
    * @Description //TODO
    * @Date 15:52 2022/8/18
    * @Param [java.util.Map<java.lang.String,java.lang.Object>]
    * @return java.util.List<com.hai.entity.BsDistributionRebate>
    */
    List<BsDistributionRebate> getDistributionRebateList(Map<String, Object> map) throws Exception;

    /**
    * @Author Sum1Dream
    * @name getDistributionAgent.java
    * @Description // 查询分销代理商
    * @Date 16:11 2022/8/18
    * @Param []
    * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
    */
    List<Map<String , Object>> getDistributionAgent();

    /**
    * @Author Sum1Dream
    * @name getDistributionFirst.java
    * @Description // 查询一级分销
    * @Date 16:27 2022/8/18
    * @Param [] 
    * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
    */
    List<Map<String , Object>> getDistributionFirst(Long agentId);

    /**
    * @Author Sum1Dream
    * @name getDistributionSecond.java
    * @Description // 查询二级分销
    * @Date 16:27 2022/8/18
    * @Param []
    * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
    */
    List<Map<String , Object>> getDistributionSecond(Long agentId , Long popularizeUserId);

    /**
    * @Author Sum1Dream
    * @name getDistributionIntegralList.java
    * @Description // 查询分销积分列表
    * @Date 17:10 2022/8/18
    * @Param [java.util.Map<java.lang.String,java.lang.Object>]
    * @return java.util.List<com.hai.entity.BsDistributionRebate>
    */
    List<BsDistributionRebate> getDistributionIntegralList(Map<String , Object> map);

    /**
    * @Author Sum1Dream
    * @name agentUserList.java
    * @Description // 查询代理商用户
    * @Date 15:21 2022/8/19
    * @Param []
    * @return java.util.List<com.hai.entity.HighUser>
    */
    List<HighUser> agentUserList();

}
