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