|
@@ -11,10 +11,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -44,7 +41,7 @@ public class CameraManageController {
|
|
|
*/
|
|
|
@RequestMapping(value = "insert", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "增加摄像头",notes = "stauts为300009,公司/部门信息错误")
|
|
|
- public AjaxMessage<Integer> insert(@ApiParam(value = "设置配置", required = true) @RequestBody CameraManage cameraManage) {
|
|
|
+ public AjaxMessage<Integer> insert(@ApiParam(value = "新增摄像头", required = true) @RequestBody CameraManage cameraManage) {
|
|
|
int result = cameraManageService.insert(cameraManage);
|
|
|
if(result==1){
|
|
|
return new AjaxMessage<>(ResultStatus.OK, result);
|
|
@@ -62,7 +59,7 @@ public class CameraManageController {
|
|
|
*/
|
|
|
@RequestMapping(value = "update", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "修改摄像头",notes = "stauts为300009,公司/部门信息错误")
|
|
|
- public AjaxMessage<Integer> update(@ApiParam(value = "设置配置", required = true) @RequestBody CameraManage cameraManage) {
|
|
|
+ public AjaxMessage<Integer> update(@ApiParam(value = "修改摄像头", required = true) @RequestBody CameraManage cameraManage) {
|
|
|
int result = cameraManageService.update(cameraManage);
|
|
|
if(result==1){
|
|
|
return new AjaxMessage<>(ResultStatus.OK, result);
|
|
@@ -95,8 +92,12 @@ public class CameraManageController {
|
|
|
*/
|
|
|
@RequestMapping(value = "selectPage", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "查询摄像头列表")
|
|
|
- public AjaxMessage<Pagination<CameraManage>> selectPage(Integer pageNum, Integer pageSize,Integer companyId,
|
|
|
- Integer departMentId,Integer sceneId,String name) {
|
|
|
+ public AjaxMessage<Pagination<CameraManage>> selectPage(@RequestParam(required = false) Integer pageNum,
|
|
|
+ @RequestParam(required = false)Integer pageSize,
|
|
|
+ @RequestParam(required = false) Integer companyId,
|
|
|
+ @RequestParam(required = false)Integer departMentId,
|
|
|
+ @RequestParam(required = false) Integer sceneId,
|
|
|
+ @RequestParam(required = false) String name) {
|
|
|
CameraManage cameraManage = new CameraManage();
|
|
|
cameraManage.setCompanyOrgId(companyId);
|
|
|
cameraManage.setDeptOrgId(departMentId);
|
|
@@ -116,7 +117,7 @@ public class CameraManageController {
|
|
|
*/
|
|
|
@RequestMapping(value = "selectBySceneId", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "查询摄像头列表")
|
|
|
- public AjaxMessage<List<CameraManage>> selectBySceneId(Integer sceneId) {
|
|
|
+ public AjaxMessage<List<CameraManage>> selectBySceneId(@RequestParam(required = false) Integer sceneId) {
|
|
|
CameraManage cameraManage = new CameraManage();
|
|
|
cameraManage.setSceneId(sceneId);
|
|
|
List<CameraManage> cameraManages = cameraManageService.selectList(cameraManage);
|
|
@@ -131,7 +132,7 @@ public class CameraManageController {
|
|
|
*/
|
|
|
@RequestMapping(value = "get", method = RequestMethod.POST)
|
|
|
@ApiOperation(value = "查询摄像头列表")
|
|
|
- public AjaxMessage<CameraManage> selectById(Integer id) {
|
|
|
+ public AjaxMessage<CameraManage> selectById(@RequestParam(required = false) Integer id) {
|
|
|
CameraManage cameraManage =cameraManageService.selectById(id);
|
|
|
return new AjaxMessage<>(ResultStatus.OK, cameraManage);
|
|
|
}
|