package com.yida.data.school.feign.smart;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import com.yida.data.common.core.entity.smart.EduSmartWelcomeGuideRosterRelation;
import com.yida.data.common.core.entity.smart.EduSmartWelcomeGuideStep;
import com.yida.data.school.fallback.smart.RemoteSmartWelcomeServiceFallback;
import com.yida.data.school.fallback.transaction.RemoteProductOrderServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * RemoteSmartWelcomeService远程接口
 *
 * @author ZYJ
 * @date 2023/5/17
 */
@FeignClient(value = FebsServerConstant.EDU_SCHOOL, contextId = "smartWelcomeServiceClient",
        fallbackFactory = RemoteSmartWelcomeServiceFallback.class)
public interface RemoteSmartWelcomeService {

    /**
     * 查询openId是否绑定了对应的信息
     *
     * @param openId 微信openId
     * @param deptId 学校id
     * @return com.yida.data.common.core.common.ResultBean<com.yida.data.common.core.entity.smart.EduSmartWelcomeGuideRosterRelation>
     * @author ZYJ
     * @date 2023/5/17 15:12
     */
    @GetMapping("/in/eduSmartWelcome/getOpenIdRelation")
    ResultBean<EduSmartWelcomeGuideRosterRelation> getOpenIdRelation(@RequestParam String openId,
                                                                     @RequestParam Long deptId);

    /**
     * 查询人员步骤信息
     *
     * @param relationId 绑定关系id
     * @param guideId    指南id
     * @return com.yida.data.common.core.common.ResultBean<java.util.List < com.yida.data.common.core.entity.smart.EduSmartWelcomeGuideStep>>
     * @author ZYJ
     * @date 2023/5/19 15:43
     */
    @GetMapping("/in/eduSmartWelcome/listStepInfo")
    ResultBean<List<EduSmartWelcomeGuideStep>> listStepInfo(@RequestParam Long relationId,
                                                            @RequestParam Long guideId);

    /**
     * 更新超时迎新订单状态
     *
     * @return com.yida.data.common.core.common.ResultBean<java.lang.String>
     * @author ZYJ
     * @date 2023/6/21 13:41
     */
    @GetMapping("/in/eduGuideStepOrder/updateGuideRosterOrderStatus")
    ResultBean<String> updateGuideRosterOrderStatus();
}
