|
@@ -8,6 +8,8 @@ import com.fdkankan.platform.goods.service.ICameraDetailService;
|
|
|
import com.fdkankan.platform.goods.service.ICameraService;
|
|
|
import com.fdkankan.platform.goods.service.ICompanyService;
|
|
|
import com.fdkankan.platform.user.service.IUserService;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -21,6 +23,8 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RequestMapping("/feign")
|
|
|
public class SceneFeign {
|
|
|
|
|
|
+ private static Logger log = LoggerFactory.getLogger("programLog");
|
|
|
+
|
|
|
@Autowired
|
|
|
private ICameraService cameraService;
|
|
|
@Autowired
|
|
@@ -32,31 +36,49 @@ public class SceneFeign {
|
|
|
|
|
|
@PostMapping("/getCameraByChildName")
|
|
|
public Camera getCameraByChildName(@RequestParam(value = "childName", required = false) String childName) {
|
|
|
- return cameraService.getByChildName(childName);
|
|
|
+ log.info("scene服务调用:getCameraByChildName,参数:childName:{},",childName);
|
|
|
+ Camera camera = cameraService.getByChildName(childName);
|
|
|
+ log.info("scene服务调用:getCameraByChildName,返回:{}",camera);
|
|
|
+ return camera;
|
|
|
}
|
|
|
|
|
|
@PostMapping("/getCameraDetailByCameraId")
|
|
|
public CameraDetail getCameraDetailByCameraId(@RequestParam(value = "cameraId", required = false) Long cameraId) {
|
|
|
- return cameraDetailService.getByCameraId(cameraId);
|
|
|
+ log.info("scene服务调用:getCameraDetailByCameraId,参数:cameraId:{},",cameraId);
|
|
|
+ CameraDetail detail = cameraDetailService.getByCameraId(cameraId);
|
|
|
+ log.info("scene服务调用:getCameraDetailByCameraId,返回:{}",detail);
|
|
|
+ return detail;
|
|
|
}
|
|
|
|
|
|
@PostMapping("/updateCameraDetailByCameraIdAndSpace")
|
|
|
public CameraDetail updateCameraDetailByCameraIdAndSpace(@RequestParam(value = "cameraId", required = false) Long cameraId,
|
|
|
@RequestParam(value = "space", required = false) Long space) {
|
|
|
- return cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId,space);
|
|
|
+ log.info("scene服务调用:updateCameraDetailByCameraIdAndSpace,参数:cameraId:{},space:{},",cameraId,space);
|
|
|
+ CameraDetail detail = cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId,space);
|
|
|
+ log.info("scene服务调用:updateCameraDetailByCameraIdAndSpace,返回:{}",detail);
|
|
|
+ return detail;
|
|
|
}
|
|
|
|
|
|
@PostMapping("/getCameraBySnCode")
|
|
|
public Camera getCameraBySnCode(@RequestParam(value = "snCode", required = false) String snCode) {
|
|
|
- return cameraService.getBySnCode(snCode);
|
|
|
+ log.info("scene服务调用:getCameraBySnCode,参数:snCode:{},",snCode);
|
|
|
+ Camera detail = cameraService.getBySnCode(snCode);
|
|
|
+ log.info("scene服务调用:getCameraBySnCode,返回:{}",detail);
|
|
|
+ return detail;
|
|
|
}
|
|
|
@PostMapping("/getSSOUserByUserId")
|
|
|
public SSOUser getSSOUserByUserId(@RequestParam(value = "userId", required = false) Long userId) {
|
|
|
- return userService.getSSOUserByUserId(userId);
|
|
|
+ log.info("scene服务调用:getSSOUserByUserId,参数:userId:{},",userId);
|
|
|
+ SSOUser ssoUser = userService.getSSOUserByUserId(userId);
|
|
|
+ log.info("scene服务调用:getSSOUserByUserId,返回:{}",ssoUser);
|
|
|
+ return ssoUser;
|
|
|
}
|
|
|
@PostMapping("/getCompanyById")
|
|
|
public Company getCompanyById(@RequestParam(value = "companyId", required = false) Long companyId) {
|
|
|
- return companyService.getById(companyId);
|
|
|
+ log.info("scene服务调用: getCompanyById,参数:companyId:{},",companyId);
|
|
|
+ Company entity = companyService.getById(companyId);
|
|
|
+ log.info("scene服务调用: getCompanyById,返回:{}",entity);
|
|
|
+ return entity;
|
|
|
}
|
|
|
|
|
|
}
|