package org.jeecg.modules.bytedance.common.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.bytedance.common.entity.UserAllocation;

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

/**
 * @Description: 用户分配
 * @Author: jeecg-boot
 * @Date: 2019-08-08
 * @Version: V1.0
 */
public interface IUserAllocationService extends IService<UserAllocation> {

    UserAllocation getByAccountId(Long accountId);

    List<UserAllocation> getByParams(Long projectId, String systemType,Integer accountStatus);

    List<UserAllocation> getByMediaId(String mediaId);

    List<UserAllocation> listByMediaId(String mediaId, int accountStatus);

    String getAdvertiserIdByAccountId(Long accountId);

    List<JSONObject> getAccountListByProject(Long projectId);

    List<JSONObject> getUserIdListByProjectId(Long projectId);

    List<JSONObject> getAccountIdListByUserId(Long userId);

    List<JSONObject> getAccountIdsByUserId(String userId);

    List<UserAllocation> getUserAllocations(String mediaId ,int switchType);

    JSONObject getSwitchStatusByAccount(Long accountId);

    List<Long> getAccountsByDeleteComment();

    Map<Long, List<JSONObject>> getAccountListByProjectList(List<JSONObject> projectList);


    //递归查询下级
    Set<String> recursiveQuerySubordinate(String userId);
}
