接口优化
This commit is contained in:
parent
661b02bdad
commit
3e70048a2a
|
@ -1,6 +1,5 @@
|
||||||
package com.hisense.monitormanage.controller;
|
package com.hisense.monitormanage.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.hisense.monitormanage.dto.*;
|
import com.hisense.monitormanage.dto.*;
|
||||||
import com.hisense.monitormanage.entity.*;
|
import com.hisense.monitormanage.entity.*;
|
||||||
import com.hisense.monitormanage.mapper.*;
|
import com.hisense.monitormanage.mapper.*;
|
||||||
|
@ -134,7 +133,7 @@ public class Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectByChannelCode")
|
@GetMapping("selectByChannelCode")
|
||||||
@ApiOperation("根据channelCode查询摄像头详细信息")
|
@ApiOperation("根据摄像头编号查询摄像头详细信息")
|
||||||
@ApiImplicitParam(name = "channelCode",value = "摄像头标识",required = true,dataType = "String")
|
@ApiImplicitParam(name = "channelCode",value = "摄像头标识",required = true,dataType = "String")
|
||||||
public Result selectByChannelCode(String channelCode){
|
public Result selectByChannelCode(String channelCode){
|
||||||
|
|
||||||
|
@ -170,7 +169,7 @@ public class Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectByParentId")
|
@GetMapping("selectByParentId")
|
||||||
@ApiOperation("根据parentId和checkStatus查询摄像头")
|
@ApiOperation("根据摄像头的组织Id和异常状态查询摄像头")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "parentId",value = "摄像头的组织Id",required = true,dataType = "String"),
|
@ApiImplicitParam(name = "parentId",value = "摄像头的组织Id",required = true,dataType = "String"),
|
||||||
@ApiImplicitParam(name = "checkStatus",value = "异常状态 1正常,0异常",required = true,dataType = "String")
|
@ApiImplicitParam(name = "checkStatus",value = "异常状态 1正常,0异常",required = true,dataType = "String")
|
||||||
|
@ -231,14 +230,13 @@ public class Controller {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有标签
|
* 查询所有标签
|
||||||
* @param label
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectAllLabel")
|
@GetMapping("selectAllLabel")
|
||||||
@ApiOperation("查询所有标签")
|
@ApiOperation("查询所有标签")
|
||||||
public Result selectAllLabel(Label label ){
|
public Result selectAllLabel(){
|
||||||
|
|
||||||
List<Label> labels = cameraChannelMapper.selectAllLabel(label);
|
List<Label> labels = cameraChannelMapper.selectAllLabel();
|
||||||
|
|
||||||
Result success = Result.success(labels);
|
Result success = Result.success(labels);
|
||||||
|
|
||||||
|
@ -250,6 +248,8 @@ public class Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectByLabelName")
|
@GetMapping("selectByLabelName")
|
||||||
|
@ApiOperation("根据标签名字模糊查询标签")
|
||||||
|
@ApiImplicitParam(name = "labelName",value = "标签名称",required = true,dataType = "String")
|
||||||
public Result selectByLabelName(String labelName){
|
public Result selectByLabelName(String labelName){
|
||||||
|
|
||||||
List<Label> labels = cameraChannelMapper.selectByLabelName(labelName);
|
List<Label> labels = cameraChannelMapper.selectByLabelName(labelName);
|
||||||
|
@ -265,7 +265,7 @@ public class Controller {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectSubOrgan")
|
@GetMapping("selectSubOrgan")
|
||||||
@ApiOperation("根据parentId查询组织")
|
@ApiOperation("根据上级组织id查询组织")
|
||||||
@ApiImplicitParam(name = "parentId",value = "上级组织id",required = true,dataType = "String")
|
@ApiImplicitParam(name = "parentId",value = "上级组织id",required = true,dataType = "String")
|
||||||
public Result selectSubOrganization(String parentId){
|
public Result selectSubOrganization(String parentId){
|
||||||
if (parentId == null){
|
if (parentId == null){
|
||||||
|
|
|
@ -4,9 +4,9 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.hisense.monitormanage.entity.Event;
|
import com.hisense.monitormanage.entity.Event;
|
||||||
import com.hisense.monitormanage.entity.Result;
|
import com.hisense.monitormanage.entity.Result;
|
||||||
import com.hisense.monitormanage.mapper.EventMapper;
|
import com.hisense.monitormanage.mapper.EventMapper;
|
||||||
import com.hisense.monitormanage.mapper.SedimentTrailMapper;
|
|
||||||
import com.hisense.monitormanage.service.EventService;
|
import com.hisense.monitormanage.service.EventService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -170,6 +170,7 @@ public class EventController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("selectByName")
|
@GetMapping("selectByName")
|
||||||
@ApiOperation("根据事件名称查询事件")
|
@ApiOperation("根据事件名称查询事件")
|
||||||
|
@ApiImplicitParam(name = "eventCnName",value = "事件名称",required = true,dataType = "String")
|
||||||
public Result selectByName(String eventCnName){
|
public Result selectByName(String eventCnName){
|
||||||
List<Event> byName = eventMapper.selectByName(eventCnName);
|
List<Event> byName = eventMapper.selectByName(eventCnName);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
||||||
|
|
||||||
|
@ -32,7 +31,7 @@ public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
||||||
void updateState(@Param("list") List list);
|
void updateState(@Param("list") List list);
|
||||||
|
|
||||||
@Select("select * from t_label")
|
@Select("select * from t_label")
|
||||||
List<Label> selectAllLabel(Label label);
|
List<Label> selectAllLabel();
|
||||||
|
|
||||||
@Select("select * from t_label where label_name like concat('%',#{labelName},'%')")
|
@Select("select * from t_label where label_name like concat('%',#{labelName},'%')")
|
||||||
List<Label> selectByLabelName(String labelName);
|
List<Label> selectByLabelName(String labelName);
|
||||||
|
|
Loading…
Reference in New Issue