VideoIntegrateController.java 1.9 KB
package com.skua.modules.system.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.modules.system.vo.VideoIntegrateVO;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

 /**
  * <pre>
  * 与三方视频对接
  * </pre>
  * @author Li Yuanyuan
  * @version V0.1, 2020年6月1日 下午2:18:00
  */
@Api(tags="与三方视频对接")
@RestController
@RequestMapping("/v1/sys/video")
@ConditionalOnProperty("skua.video.ip")
public class VideoIntegrateController {
	
	@Value("${skua.video.ip}")
	private String ip;
	@Value("${skua.video.port}")
	private String port;
	@Value("${skua.video.username}")
	private String username;
	@Value("${skua.video.password}")
	private String password;
	@Value("${skua.video.secretkey}")
	private String secretkey;
	
	/**
	 * <pre>
	 * 获取三方视频连接配置数据
	 * </pre>
	 * @return
	 * @author Li Yuanyuan, 2020年6月1日 下午2:21:58
	 */
	@AutoLog(value = "获取三方视频连接配置数据")
	@ApiOperation(value="获取三方视频连接配置数据", notes="获取三方视频连接配置数据")
	@GetMapping(value = "/getVideoIntegrateInfo")
	public Result<VideoIntegrateVO> getVideoIntegrateInfo() {
		Result<VideoIntegrateVO> result = new Result<VideoIntegrateVO>();
		VideoIntegrateVO vo = new VideoIntegrateVO();
		vo.setIp(ip);vo.setPort(port);vo.setUsername(username);vo.setPassword(password);vo.setSecretkey(secretkey);
		result.success("三方视频配置获取成功");
		result.setResult(vo);
		return result;
	}
}