Commit f729bb77 authored by 李成龙's avatar 李成龙

添加电梯视频

parent ea90397b
package com.yeejoin.amos.boot.module.tzs.biz.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.feign.AmosFeignService;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorBaseInfoDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorDto;
import com.yeejoin.amos.boot.module.tzs.api.dto.ElevatorInfoDto;
......@@ -21,28 +46,9 @@ import com.yeejoin.amos.boot.module.tzs.biz.service.impl.MaintainInfoServiceImpl
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TestInfoServiceImpl;
import com.yeejoin.amos.boot.module.tzs.biz.utils.BeanDtoVoUtils;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* 电梯Api
......@@ -68,7 +74,8 @@ public class ElevatorController extends BaseController {
@Autowired
private MaintainInfoServiceImpl maintainInfoService;
@Autowired
private EquipFeignClient equipFeignClient;
@Autowired
private TestInfoServiceImpl testInfoService;
......@@ -339,5 +346,25 @@ public class ElevatorController extends BaseController {
return ResponseHelper.buildResponse(elevatorInfoDto);
}
/**
* 视频列表分页查询
*
* @return
*/
// @TycloudOperation( needAuth = true, ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/video/list")
// @ApiOperation(httpMethod = "GET", value = " 视频分页查询", notes = "视频分页查询")
// public ResponseModel<Object> getVideo(Integer pageNum, Integer pageSize) {
// ResponseModel<Page<Map<String, Object>>> data= equipFeignClient.pageVideo(pageNum,pageSize,null,null,null);
// return ResponseHelper.buildResponse(data!=null?data.getResult():null);
// }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getVideo", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "分页获取视频", notes = "分页获取视频")
public ResponseModel<Object> getVideo(Integer current, Integer size)throws Exception {
ResponseModel<Page<Map<String, Object>>> data= equipFeignClient.pageVideo(current,size,null,null,null);
return ResponseHelper.buildResponse(data!=null?data.getResult():null);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment