package com.vctgo.system.api;

import com.vctgo.common.core.constant.ServiceNameConstants;
import com.vctgo.common.core.domain.R;
import com.vctgo.system.api.domain.ProfileCoreExperience;
import com.vctgo.system.api.domain.ProfileLabel;
import com.vctgo.system.api.domain.SysPlatformUser;
import com.vctgo.system.api.domain.dto.ProfileActivityCaseDto;
import com.vctgo.system.api.domain.dto.ProfileUserInfoDto;
import com.vctgo.system.api.domain.dto.SysBranchKindergartenDto;
import com.vctgo.system.api.factory.RemoteProfileFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 内部资料服务
 *
 * @author vctgo
 */
@FeignClient(contextId = "remoteProfileService", value = ServiceNameConstants.PROFILE_SERVICE, fallbackFactory = RemoteProfileFallbackFactory.class)
public interface RemoteProfileService {

    /**
     * 获取内部资料“有效”用户详细信息
     *
     * @param userId 用户Id
     * @return 结果
     */
    @GetMapping(value = "/userInfo/valid/{userId}")
    R<ProfileUserInfoDto> getValidUserInfoByUserId(@PathVariable("userId") Long userId);


    /**
     * 平台用户删除同步园所资料用户删除
     *
     * @param userIds 用户Id
     * @return 结果
     */
    @PostMapping(value = "/userInfo/delete")
    R<String> deleteProfileUser(@RequestBody Long[] userIds);

    /**
     * 用户中心信息修改-用户信息变更
     *
     * @param sysPlatformUser 用户Id
     * @return 结果
     */
    @PostMapping(value = "/userInfo/modify")
    R<String> modifyUserInfo(@RequestBody SysPlatformUser sysPlatformUser);

    /**
     * 园所管理　->  园所信息同步 “内部资源管理”
     *
     * @param sysBranchKindergartenDto 用户Id
     * @return 结果
     */
    @PostMapping(value = "/kindergarten/modify")
    R<String> modifyKindergartenInfo(@RequestBody SysBranchKindergartenDto sysBranchKindergartenDto);

    /**
     * 获取标签列表
     * @param labelIdList
     * @return
     */
    @GetMapping("/label/getProfileLabelList/{labelIdList}")
    R<List<ProfileLabel>> getProfileLabelList(@PathVariable("labelIdList")List<Long> labelIdList);

    /**
     * 获取核心经验列表
     * @param coreIdList
     * @return
     */
    @GetMapping("/experience/getCoreExperience/{coreIdList}")
    R<List<ProfileCoreExperience>> getCoreExperience(@PathVariable("coreIdList")List<Long> coreIdList);

    /**
     * 根据图书Id集合获取活动案例列表
     * @param bookIdList
     * @return
     */
    @GetMapping("/case/caseList/{materialType}/{bookIdList}")
    R<List<ProfileActivityCaseDto>> getCaseByBookIdList(@PathVariable("materialType") String materialType,@PathVariable("bookIdList") String bookIdList);
}
