| | |
| | | package com.ruoyi.media.controller; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.media.service.IMediaService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody Vtdu vtdu) |
| | | { |
| | | if (StringUtils.isEmpty(vtdu.getName())) { |
| | | return AjaxResult.error("通道名称不能为空"); |
| | | } |
| | | if (StringUtils.isEmpty(vtdu.getRtspSource())) { |
| | | return AjaxResult.error("rtsp地址不能为空"); |
| | | } |
| | | return toAjax(vtduService.insertVtdu(vtdu)); |
| | | } |
| | | |