package org.jeecg.modules.ctop.service;

import cn.com.ctop.common.module.entity.Project;
import cn.com.ctop.common.module.entity.SysUser;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.ctop.entity.ProjectMember;

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

/**
 * 项目成员
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2019-11-19
 */
public interface IProjectMemberService extends IService<ProjectMember> {
    void addMember(SysUser sysUser, Project project);

    List<Long> selectProjectsByUserId(String userId);

    List<ProjectMember> getProjects(List<Integer> mediaIds);

    List<Map<String, Object>> getProjectAccountByUserId(String userId, String mediaType);

    ProjectMember getProjectByParams(Long targetProject, String userId);

    List<ProjectMember> getOwnProjects(List<Integer> mediaIds);

    List<ProjectMember> getSaleOwnProjects(List<Integer> mediaIds);

    List<Long> getProjectByMap(String userId);

    List<Project> selectListByUserId(String userId);

    List<Long> getProjectByAccountIds(JSONArray accountIds);

    List<JSONObject> getProjectByUserIdAndMediaIds(String userId, List<Integer> mediaIds);

    List<Map<String, Object>> getAllProjectAccount(String mediaType);
}
