|
@@ -1,12 +1,19 @@
|
|
|
package com.galaxis.manatee.controller;
|
|
|
|
|
|
+import com.galaxis.capsule.dto.ChuanyunProjectDTO;
|
|
|
+import com.galaxis.manatee.manager.ClawFeign;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.context.request.WebRequest;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* @author zcj
|
|
|
* @version 0.1
|
|
@@ -16,6 +23,12 @@ import org.springframework.web.context.request.WebRequest;
|
|
|
@Slf4j
|
|
|
public class ClawController {
|
|
|
|
|
|
+ private ClawFeign clawFeign;
|
|
|
+
|
|
|
+ public ClawController(ClawFeign clawFeign) {
|
|
|
+ this.clawFeign = clawFeign;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 接口调用异常
|
|
|
* @param exception 系统抛出异常
|
|
@@ -24,7 +37,15 @@ public class ClawController {
|
|
|
*/
|
|
|
@ExceptionHandler(value = {Exception.class})
|
|
|
public ResponseEntity vehicleNotFound(Exception exception, WebRequest request) {
|
|
|
- log.warn("异常");
|
|
|
+ log.warn("clawController异常");
|
|
|
+ exception.printStackTrace();
|
|
|
return new ResponseEntity(exception, HttpStatus.BAD_REQUEST);
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/test/claw")
|
|
|
+ public Page<ChuanyunProjectDTO> test(){
|
|
|
+ Map<String,String> map=new HashMap<>(1);
|
|
|
+ map.put("projectCode_eq","a00001");
|
|
|
+ return clawFeign.findChuanyunProjectPageable(map);
|
|
|
+ }
|
|
|
}
|