Jelajahi Sumber

feat 主流云存储均以支持

1 bulan lalu
induk
melakukan
3d8c8f99bb

+ 4 - 0
edu-travel-remote/edu-travel-remote-commodity/src/main/java/edu/travel/commodity/remote/BaseCountryServeRemoteController.java

@@ -3,13 +3,17 @@ package edu.travel.commodity.remote;
 import edu.travel.commodity.dto.BaseCountryServeDTO;
 import edu.travel.commodity.vo.BaseCountryServeVo;
 import edu.travel.resp.BaseResponse;
+import edu.travel.rpc.RPCBaseResponse;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.validation.Errors;
 import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
 @FeignClient(path = "/base_country_serve",name = "commodity")
 public interface BaseCountryServeRemoteController {
+    @GetMapping("/getByControlId")
+    RPCBaseResponse getByControlId( @RequestBody String id);
 
 }

+ 9 - 0
edu-travel-service/edu-travel-service-commodity/src/main/java/edu/travel/commodity/web/BaseCountryServeController.java

@@ -9,6 +9,7 @@ import edu.travel.interfaces.UpdateGroups;
 import edu.travel.resp.BaseResponse;
 import edu.travel.rpc.RPCBaseResponse;
 import edu.travel.web.BaseController;
+import org.springframework.beans.BeanUtils;
 import org.springframework.validation.Errors;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
@@ -31,4 +32,12 @@ public class BaseCountryServeController  extends BaseController<BaseCountryServe
         return baseCountryServeService.getCountryServePage(dto);
     }
 
+    @Override
+    @GetMapping("/getByControlId")
+    public RPCBaseResponse getByControlId(String id) {
+        BaseResponse baseResponse = super.getById(id);
+        RPCBaseResponse<Object> objectRPCBaseResponse = new RPCBaseResponse<>();
+        BeanUtils.copyProperties(baseResponse, objectRPCBaseResponse);
+        return objectRPCBaseResponse;
+    }
 }