7 changed files with 54 additions and 83 deletions
@ -1,40 +0,0 @@ |
|||||
package com.epmet.dto.feign; |
|
||||
|
|
||||
import com.epmet.commons.tools.constant.ServiceConstant; |
|
||||
import com.epmet.commons.tools.utils.Result; |
|
||||
import com.epmet.dto.feign.fallback.GovOrgSelfFeignClientFallBack; |
|
||||
import com.epmet.dto.form.PublishGridListFormDTO; |
|
||||
import com.epmet.dto.result.ArticleGridResultDTO; |
|
||||
import com.epmet.dto.result.PublishAgencyListResultDTO; |
|
||||
import org.springframework.cloud.openfeign.FeignClient; |
|
||||
import org.springframework.http.MediaType; |
|
||||
import org.springframework.web.bind.annotation.PathVariable; |
|
||||
import org.springframework.web.bind.annotation.PostMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestBody; |
|
||||
|
|
||||
/** |
|
||||
* @Description gov-org服务 |
|
||||
* @Author sun |
|
||||
*/ |
|
||||
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgSelfFeignClientFallBack.class) |
|
||||
public interface GovOrgSelfFeignClient { |
|
||||
|
|
||||
/** |
|
||||
* @param staffId |
|
||||
* @return |
|
||||
* @Author sun |
|
||||
* @Description 党建声音-政府端-可选发布范围接口调用 |
|
||||
**/ |
|
||||
@PostMapping(value = "gov/org/customeragency/getagencygridlist/{staffId}", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|
||||
Result<ArticleGridResultDTO> getAgencyGridList(@PathVariable("staffId") String staffId); |
|
||||
|
|
||||
/** |
|
||||
* @param staffId |
|
||||
* @return |
|
||||
* @Author sun |
|
||||
* @Description 党建声音-政府端-可选发布单位接口调用 |
|
||||
**/ |
|
||||
@PostMapping(value = "gov/org/customeragency/getpublishagencylist/{staffId}", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) |
|
||||
Result<PublishAgencyListResultDTO> getPublishAgencyList(@PathVariable("staffId") String staffId); |
|
||||
|
|
||||
} |
|
@ -1,29 +0,0 @@ |
|||||
package com.epmet.dto.feign.fallback; |
|
||||
|
|
||||
import com.epmet.commons.tools.constant.ServiceConstant; |
|
||||
import com.epmet.commons.tools.utils.ModuleUtils; |
|
||||
import com.epmet.commons.tools.utils.Result; |
|
||||
import com.epmet.dto.feign.GovOrgSelfFeignClient; |
|
||||
import com.epmet.dto.form.PublishGridListFormDTO; |
|
||||
import com.epmet.dto.result.ArticleGridResultDTO; |
|
||||
import com.epmet.dto.result.PublishAgencyListResultDTO; |
|
||||
import org.springframework.stereotype.Component; |
|
||||
|
|
||||
/** |
|
||||
* @Description gov-org服务 |
|
||||
* @Author sun |
|
||||
*/ |
|
||||
@Component |
|
||||
public class GovOrgSelfFeignClientFallBack implements GovOrgSelfFeignClient { |
|
||||
|
|
||||
@Override |
|
||||
public Result<ArticleGridResultDTO> getAgencyGridList(String staffId) { |
|
||||
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyGridList", staffId); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public Result<PublishAgencyListResultDTO> getPublishAgencyList(String staffId) { |
|
||||
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getPublishAgencyList", staffId); |
|
||||
} |
|
||||
|
|
||||
} |
|
Loading…
Reference in new issue