|
|
@@ -1,11 +1,14 @@
|
|
|
package com.usoftchina.saas.inquiry.api;
|
|
|
|
|
|
+import com.usoftchina.saas.exception.BizException;
|
|
|
+import com.usoftchina.saas.exception.ExceptionCode;
|
|
|
import com.usoftchina.saas.inquiry.po.inquiry.*;
|
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-@FeignClient(url = "${b2b.baseUrl.inquiry}", name = "inquiry-server")
|
|
|
+@FeignClient(url = "${b2b.baseUrl.inquiry}", name = "inquiry-server", fallback = InquiryApi.DefaultFallback.class)
|
|
|
@RequestMapping("/inquiry")
|
|
|
public interface InquiryApi {
|
|
|
|
|
|
@@ -126,4 +129,54 @@ public interface InquiryApi {
|
|
|
@PostMapping("/buyer/refuse")
|
|
|
void refuseQuote(@RequestParam("id") Long id, @RequestParam("status") Short status, @RequestParam("enuu") Long enuu,
|
|
|
@RequestParam("useruu") Long useruu, @RequestParam("refusereason") String refusereason);
|
|
|
+
|
|
|
+
|
|
|
+ @Component
|
|
|
+ class DefaultFallback implements InquiryApi{
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public IPage<PurcInquiryItemInfo> getInquiry(int pageNumber, int pageSize, String keyword, int isLogin) {
|
|
|
+ throw new BizException(ExceptionCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public IPage<InquiryEnRemind> findEnRemind(Long useruu, Long enuu, int pageNumber, int pageSize, Integer enableOffer, String keyword, Integer quoted, Long fromDate, Long endDate) {
|
|
|
+ throw new BizException(ExceptionCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public IPage<InquiryRemind> findRemindByUserInfo(Long useruu, Long enuu, int pageNumber, int pageSize, Integer enableOffer, String keyword, Integer quoted, Long fromDate, Long endDate) {
|
|
|
+ throw new BizException(ExceptionCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ModelMap saveQuote(PublicInquiryItem publicInquiryItem) {
|
|
|
+ throw new BizException(ExceptionCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public PurcInquiry saveInquiry(PurcInquiry inquiry) {
|
|
|
+ throw new BizException(ExceptionCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public IPage<PurcInquiryItemInfo> getInquiryList(Long enUU, Integer overdue, int pageNumber, int pageSize, String state, Long fromDate, String keyword, Long endDate) {
|
|
|
+ throw new BizException(ExceptionCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public IPage<PurcInquiryItemInfo> findQuotationsByPage(String state, Long enUU, int pageNumber, int pageSize, Long fromDate, String keyword, Integer overdue, Long endDate) {
|
|
|
+ throw new BizException(ExceptionCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void adoptQuote(Long id, Short status, Long enuu, Long useruu) {
|
|
|
+ throw new BizException(ExceptionCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void refuseQuote(Long id, Short status, Long enuu, Long useruu, String refusereason) {
|
|
|
+ throw new BizException(ExceptionCode.SYSTEM_BUSY);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|