Default Changelist
This commit is contained in:
45
src/main/java/com/xkrs/controller/CameraController.java
Normal file
45
src/main/java/com/xkrs/controller/CameraController.java
Normal file
@ -0,0 +1,45 @@
|
||||
package com.xkrs.controller;
|
||||
|
||||
import com.xkrs.dao.CameraDao;
|
||||
import com.xkrs.model.entity.CameraInformation;
|
||||
import com.xkrs.service.CameraService;
|
||||
import com.xkrs.service.FireService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: XinYi Song
|
||||
* @Date: 2022/3/3 11:56
|
||||
*/
|
||||
@RestController
|
||||
public class CameraController {
|
||||
@Resource
|
||||
private CameraService cameraService;
|
||||
|
||||
@Resource
|
||||
private CameraDao cameraDao;
|
||||
|
||||
@GetMapping("/Select")
|
||||
public List<CameraInformation> getCameraInformation(){
|
||||
|
||||
return cameraService.SelectCameraAll();
|
||||
}
|
||||
|
||||
@GetMapping("/Insert")
|
||||
public boolean insertCameraInformation(CameraInformation cameraInformation){
|
||||
try {
|
||||
cameraService.InsertCamera(cameraInformation);
|
||||
return true;
|
||||
}
|
||||
catch (Exception e){
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user