package com.xxl.job.executor.common.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxl.job.executor.common.entity.UserAllocation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 用户分配
 * @Author: jeecg-boot
 * @Date: 2019-08-08
 * @Version: V1.0
 */
public interface UserAllocationMapper extends BaseMapper<UserAllocation> {
    List<UserAllocation> selectAccountListByProjectId(@Param("projectId") Long projectId);

    String queryAdvertiserId(@Param("accountId") Long accountId);

    String queryUserIdByAccountId(@Param("accountId") Long accountId);

    List<JSONObject> getAccountListByProject(@Param("projectId") Long projectId);

    List<JSONObject> getUserIdListByProjectId(@Param("projectId") Long projectId);

    List<JSONObject> getAccountIdListByUserId(@Param("userId") Long userId);

    Long getProjectIdByAccountId(@Param("accountId") Long accountId);

    UserAllocation getUserAllocation(@Param("accountId") Long accountId);
}
