package com.hw.system.api;

import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.constant.ServiceNameConstants;
import com.hw.common.core.domain.R;
import com.hw.system.api.domain.common.WfProcessActivity;
import com.hw.system.api.domain.common.vo.WfProcessActivityVo;
import com.hw.system.api.factory.RemoteSysCommonFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @ClassName : RemoteSysCommon
 * @Description : zhouhy
 * @Author :
 * @Date: 2024-02-18 15:24
 */
@FeignClient(contextId = "remoteSysCommonService", value = ServiceNameConstants.SYS_COMMON_SERVICE, fallbackFactory = RemoteSysCommonFallbackFactory.class)
public interface RemoteSysCommonService {
    @GetMapping("/wfprocessactivity/list")
    R<?> selectWfProcessActivity(@RequestHeader(SecurityConstants.INNER) String source, WfProcessActivity wfProcessActivity);

    @PostMapping("/wfprocessactivity/selectProcessActivityIdByWfProcessId")
    Long selectProcessActivityIdByWfProcessId(@RequestHeader(SecurityConstants.FROM_SOURCE) String source, Long wfProcessId);

    @PostMapping("/wfprocessactivity/getWfProcessActivityByUI")
    R<WfProcessActivity> getWfProcessActivityByUI(@RequestBody WfProcessActivityVo wfProcessActivityVo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
