新增rtmp客户端管理
This commit is contained in:
parent
71b80b57e1
commit
11c9779f8a
@ -0,0 +1,111 @@
|
|||||||
|
package ink.wgink.module.file.media.controller.api.rtmp;
|
||||||
|
|
||||||
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import ink.wgink.module.file.media.pojo.dtos.rtmp.RtmpClientDTO;
|
||||||
|
import ink.wgink.module.file.media.pojo.vos.rtmp.RtmpClientVO;
|
||||||
|
import ink.wgink.module.file.media.service.rtmp.IRtmpClientService;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ClientController
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "rtmp客户端接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(ISystemConstant.API_PREFIX + "/rtmp-client")
|
||||||
|
public class RtmpClientController extends DefaultBaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRtmpClientService clientService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "新增rtmp客户端", notes = "新增rtmp客户端接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@PostMapping("save")
|
||||||
|
@CheckRequestBodyAnnotation
|
||||||
|
public SuccessResult save(@RequestBody RtmpClientVO rtmpClientVO) {
|
||||||
|
clientService.save(rtmpClientVO);
|
||||||
|
return new SuccessResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除rtmp客户端", notes = "删除rtmp客户端接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@DeleteMapping("remove/{ids}")
|
||||||
|
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||||
|
clientService.remove(Arrays.asList(ids.split("\\_")));
|
||||||
|
return new SuccessResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改rtmp客户端", notes = "修改rtmp客户端接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "clientId", value = "rtmp客户端ID", paramType = "path")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@PutMapping("update/{clientId}")
|
||||||
|
@CheckRequestBodyAnnotation
|
||||||
|
public SuccessResult update(@PathVariable("clientId") String clientId, @RequestBody RtmpClientVO rtmpClientVO) {
|
||||||
|
clientService.update(clientId, rtmpClientVO);
|
||||||
|
return new SuccessResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端详情", notes = "rtmp客户端详情接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "clientId", value = "rtmp客户端ID", paramType = "path")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("get/{clientId}")
|
||||||
|
public RtmpClientDTO get(@PathVariable("clientId") String clientId) {
|
||||||
|
return clientService.get(clientId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端列表", notes = "rtmp客户端列表接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("list")
|
||||||
|
public List<RtmpClientDTO> list() {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return clientService.list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端分页列表", notes = "rtmp客户端分页列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||||
|
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listpage")
|
||||||
|
public SuccessResultList<List<RtmpClientDTO>> listPage(ListPage page) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
page.setParams(params);
|
||||||
|
return clientService.listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端统计", notes = "rtmp客户端统计接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("count")
|
||||||
|
SuccessResultData<Integer> count() {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return new SuccessResultData<>(clientService.count(params));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,80 @@
|
|||||||
|
package ink.wgink.module.file.media.controller.app.api.rtmp;
|
||||||
|
|
||||||
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
|
import ink.wgink.module.file.media.pojo.dtos.rtmp.RtmpClientDTO;
|
||||||
|
import ink.wgink.module.file.media.service.rtmp.IRtmpClientService;
|
||||||
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ClientAppController
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "rtmp客户端接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(ISystemConstant.APP_PREFIX + "/rtmp-client")
|
||||||
|
public class RtmpClientAppController extends DefaultBaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRtmpClientService clientService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端详情(通过ID)", notes = "rtmp客户端详情(通过ID)接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||||
|
@ApiImplicitParam(name = "clientId", value = "rtmp客户端ID", paramType = "path")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("get/{clientId}")
|
||||||
|
public RtmpClientDTO get(@RequestHeader("token") String token, @PathVariable("clientId") String clientId) {
|
||||||
|
return clientService.get(clientId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端列表", notes = "rtmp客户端列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("list")
|
||||||
|
public List<RtmpClientDTO> list(@RequestHeader("token") String token) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return clientService.list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端分页列表", notes = "rtmp客户端分页列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||||
|
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||||
|
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listpage")
|
||||||
|
public SuccessResultList<List<RtmpClientDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
page.setParams(params);
|
||||||
|
return clientService.listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端统计", notes = "rtmp客户端统计接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("count")
|
||||||
|
SuccessResultData<Integer> count() {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return new SuccessResultData<>(clientService.count(params));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package ink.wgink.module.file.media.controller.resource.client;
|
||||||
|
|
||||||
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
|
import ink.wgink.module.file.media.pojo.dtos.rtmp.RtmpClientDTO;
|
||||||
|
import ink.wgink.module.file.media.service.rtmp.IRtmpClientService;
|
||||||
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
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.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ClientResourceController
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "rtmp客户端接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/client")
|
||||||
|
public class RtmpClientResourceController extends DefaultBaseController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRtmpClientService clientService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端详情", notes = "rtmp客户端详情接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||||
|
@ApiImplicitParam(name = "clientId", value = "rtmp客户端ID", paramType = "path")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("get/{clientId}")
|
||||||
|
public RtmpClientDTO get(@PathVariable("clientId") String clientId) {
|
||||||
|
return clientService.get(clientId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端列表", notes = "rtmp客户端列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("list")
|
||||||
|
public List<RtmpClientDTO> list() {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return clientService.list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端分页列表", notes = "rtmp客户端分页列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||||
|
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||||
|
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("listpage")
|
||||||
|
public SuccessResultList<List<RtmpClientDTO>> listPage(ListPage page) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
page.setParams(params);
|
||||||
|
return clientService.listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "rtmp客户端统计", notes = "rtmp客户端统计接口")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("count")
|
||||||
|
SuccessResultData<Integer> count() {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return new SuccessResultData<>(clientService.count(params));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package ink.wgink.module.file.media.controller.route.rtmp;
|
||||||
|
|
||||||
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ClientController
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "rtmp客户端路由")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/rtmp-client")
|
||||||
|
public class RtmpClientRouteController extends DefaultBaseController {
|
||||||
|
|
||||||
|
@GetMapping("save")
|
||||||
|
public ModelAndView save() {
|
||||||
|
return new ModelAndView("rtmp/client/save");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("update")
|
||||||
|
public ModelAndView update() {
|
||||||
|
return new ModelAndView("rtmp/client/update");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public ModelAndView list() {
|
||||||
|
return new ModelAndView("rtmp/client/list");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,130 @@
|
|||||||
|
package ink.wgink.module.file.media.dao.rtmp;
|
||||||
|
|
||||||
|
import ink.wgink.exceptions.RemoveException;
|
||||||
|
import ink.wgink.exceptions.SaveException;
|
||||||
|
import ink.wgink.exceptions.SearchException;
|
||||||
|
import ink.wgink.exceptions.UpdateException;
|
||||||
|
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||||
|
import ink.wgink.module.file.media.pojo.bos.rtmp.RtmpClientBO;
|
||||||
|
import ink.wgink.module.file.media.pojo.pos.rtmp.RtmpClientPO;
|
||||||
|
import ink.wgink.module.file.media.pojo.dtos.rtmp.RtmpClientDTO;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: IClientDao
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@Repository
|
||||||
|
public interface IRtmpClientDao extends IInitBaseTable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增rtmp客户端
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @throws SaveException
|
||||||
|
*/
|
||||||
|
void save(Map<String, Object> params) throws SaveException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除rtmp客户端
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @throws RemoveException
|
||||||
|
*/
|
||||||
|
void remove(Map<String, Object> params) throws RemoveException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除rtmp客户端(物理)
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @throws RemoveException
|
||||||
|
*/
|
||||||
|
void delete(Map<String, Object> params) throws RemoveException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改rtmp客户端
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @throws UpdateException
|
||||||
|
*/
|
||||||
|
void update(Map<String, Object> params) throws UpdateException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端详情
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
RtmpClientDTO get(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端详情
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
RtmpClientBO getBO(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端详情
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
RtmpClientPO getPO(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<RtmpClientDTO> list(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<RtmpClientBO> listBO(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<RtmpClientPO> listPO(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端统计
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
Integer count(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最新的客户端编码
|
||||||
|
*
|
||||||
|
* @param datetime
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
String latestClientCode(String datetime) throws SearchException;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,141 @@
|
|||||||
|
package ink.wgink.module.file.media.pojo.bos.rtmp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @ClassName: ClientBO
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
public class RtmpClientBO {
|
||||||
|
|
||||||
|
private String clientId;
|
||||||
|
private String clientCode;
|
||||||
|
private String clientName;
|
||||||
|
private String clientSummary;
|
||||||
|
private String clientKey;
|
||||||
|
private String clientSecret;
|
||||||
|
private String clientStatus;
|
||||||
|
private String clientUrl;
|
||||||
|
private String expireTime;
|
||||||
|
private String creator;
|
||||||
|
private String gmtCreate;
|
||||||
|
private String modifier;
|
||||||
|
private String gmtModified;
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
|
public String getClientId() {
|
||||||
|
return clientId == null ? "" : clientId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientId(String clientId) {
|
||||||
|
this.clientId = clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientCode() {
|
||||||
|
return clientCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientCode(String clientCode) {
|
||||||
|
this.clientCode = clientCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientName() {
|
||||||
|
return clientName == null ? "" : clientName.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientName(String clientName) {
|
||||||
|
this.clientName = clientName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSummary() {
|
||||||
|
return clientSummary == null ? "" : clientSummary.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSummary(String clientSummary) {
|
||||||
|
this.clientSummary = clientSummary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientKey() {
|
||||||
|
return clientKey == null ? "" : clientKey.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientKey(String clientKey) {
|
||||||
|
this.clientKey = clientKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSecret() {
|
||||||
|
return clientSecret == null ? "" : clientSecret.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSecret(String clientSecret) {
|
||||||
|
this.clientSecret = clientSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientStatus() {
|
||||||
|
return clientStatus == null ? "" : clientStatus.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientStatus(String clientStatus) {
|
||||||
|
this.clientStatus = clientStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientUrl() {
|
||||||
|
return clientUrl == null ? "" : clientUrl.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientUrl(String clientUrl) {
|
||||||
|
this.clientUrl = clientUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExpireTime() {
|
||||||
|
return expireTime == null ? "" : expireTime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpireTime(String expireTime) {
|
||||||
|
this.expireTime = expireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator == null ? "" : creator.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtCreate() {
|
||||||
|
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtCreate(String gmtCreate) {
|
||||||
|
this.gmtCreate = gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModifier() {
|
||||||
|
return modifier == null ? "" : modifier.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifier(String modifier) {
|
||||||
|
this.modifier = modifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtModified() {
|
||||||
|
return gmtModified == null ? "" : gmtModified.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtModified(String gmtModified) {
|
||||||
|
this.gmtModified = gmtModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsDelete() {
|
||||||
|
return isDelete == null ? 0 : isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsDelete(Integer isDelete) {
|
||||||
|
this.isDelete = isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,199 @@
|
|||||||
|
package ink.wgink.module.file.media.pojo.dtos.rtmp;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @ClassName: ClientDTO
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@ApiModel
|
||||||
|
public class RtmpClientDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "clientId", value = "主键")
|
||||||
|
private String clientId;
|
||||||
|
@ApiModelProperty(name = "clientCode", value = "客户端编码")
|
||||||
|
private String clientCode;
|
||||||
|
@ApiModelProperty(name = "clientName", value = "客户端名称")
|
||||||
|
private String clientName;
|
||||||
|
@ApiModelProperty(name = "clientSummary", value = "客户端描述")
|
||||||
|
private String clientSummary;
|
||||||
|
@ApiModelProperty(name = "clientKey", value = "客户端用户名")
|
||||||
|
private String clientKey;
|
||||||
|
@ApiModelProperty(name = "clientSecret", value = "客户端密码")
|
||||||
|
private String clientSecret;
|
||||||
|
@ApiModelProperty(name = "clientStatus", value = "设备状态")
|
||||||
|
private String clientStatus;
|
||||||
|
@ApiModelProperty(name = "clientUrl", value = "客户端地址")
|
||||||
|
private String clientUrl;
|
||||||
|
@ApiModelProperty(name = "expireTime", value = "过期时间")
|
||||||
|
private String expireTime;
|
||||||
|
@ApiModelProperty(name = "areaCode", value = "地区编码")
|
||||||
|
private String areaCode;
|
||||||
|
@ApiModelProperty(name = "areaName", value = "地区名称")
|
||||||
|
private String areaName;
|
||||||
|
@ApiModelProperty(name = "positionLng", value = "位置经度")
|
||||||
|
private String positionLng;
|
||||||
|
@ApiModelProperty(name = "positionLat", value = "位置纬度")
|
||||||
|
private String positionLat;
|
||||||
|
@ApiModelProperty(name = "positionAddress", value = "位置地址")
|
||||||
|
private String positionAddress;
|
||||||
|
@ApiModelProperty(name = "creator", value = "创建人")
|
||||||
|
private String creator;
|
||||||
|
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||||
|
private String gmtCreate;
|
||||||
|
@ApiModelProperty(name = "modifier", value = "修改人")
|
||||||
|
private String modifier;
|
||||||
|
@ApiModelProperty(name = "gmtModified", value = "修改时间")
|
||||||
|
private String gmtModified;
|
||||||
|
|
||||||
|
public String getClientId() {
|
||||||
|
return clientId == null ? "" : clientId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientId(String clientId) {
|
||||||
|
this.clientId = clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientCode() {
|
||||||
|
return clientCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientCode(String clientCode) {
|
||||||
|
this.clientCode = clientCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientName() {
|
||||||
|
return clientName == null ? "" : clientName.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientName(String clientName) {
|
||||||
|
this.clientName = clientName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSummary() {
|
||||||
|
return clientSummary == null ? "" : clientSummary.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSummary(String clientSummary) {
|
||||||
|
this.clientSummary = clientSummary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientKey() {
|
||||||
|
return clientKey == null ? "" : clientKey.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientKey(String clientKey) {
|
||||||
|
this.clientKey = clientKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSecret() {
|
||||||
|
return clientSecret == null ? "" : clientSecret.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSecret(String clientSecret) {
|
||||||
|
this.clientSecret = clientSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientStatus() {
|
||||||
|
return clientStatus == null ? "" : clientStatus.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientStatus(String clientStatus) {
|
||||||
|
this.clientStatus = clientStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientUrl() {
|
||||||
|
return clientUrl == null ? "" : clientUrl.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientUrl(String clientUrl) {
|
||||||
|
this.clientUrl = clientUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExpireTime() {
|
||||||
|
return expireTime == null ? "" : expireTime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpireTime(String expireTime) {
|
||||||
|
this.expireTime = expireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaCode() {
|
||||||
|
return areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaCode(String areaCode) {
|
||||||
|
this.areaCode = areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaName() {
|
||||||
|
return areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaName(String areaName) {
|
||||||
|
this.areaName = areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPositionLng() {
|
||||||
|
return positionLng;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPositionLng(String positionLng) {
|
||||||
|
this.positionLng = positionLng;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPositionLat() {
|
||||||
|
return positionLat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPositionLat(String positionLat) {
|
||||||
|
this.positionLat = positionLat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPositionAddress() {
|
||||||
|
return positionAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPositionAddress(String positionAddress) {
|
||||||
|
this.positionAddress = positionAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator == null ? "" : creator.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtCreate() {
|
||||||
|
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtCreate(String gmtCreate) {
|
||||||
|
this.gmtCreate = gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModifier() {
|
||||||
|
return modifier == null ? "" : modifier.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifier(String modifier) {
|
||||||
|
this.modifier = modifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtModified() {
|
||||||
|
return gmtModified == null ? "" : gmtModified.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtModified(String gmtModified) {
|
||||||
|
this.gmtModified = gmtModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,186 @@
|
|||||||
|
package ink.wgink.module.file.media.pojo.pos.rtmp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @ClassName: ClientPO
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
public class RtmpClientPO {
|
||||||
|
|
||||||
|
private String clientId;
|
||||||
|
private String clientCode;
|
||||||
|
private String clientName;
|
||||||
|
private String clientSummary;
|
||||||
|
private String clientKey;
|
||||||
|
private String clientSecret;
|
||||||
|
private String clientStatus;
|
||||||
|
private String clientUrl;
|
||||||
|
private String expireTime;
|
||||||
|
private String areaCode;
|
||||||
|
private String areaName;
|
||||||
|
private String positionLng;
|
||||||
|
private String positionLat;
|
||||||
|
private String positionAddress;
|
||||||
|
private String creator;
|
||||||
|
private String gmtCreate;
|
||||||
|
private String modifier;
|
||||||
|
private String gmtModified;
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
|
public String getClientId() {
|
||||||
|
return clientId == null ? "" : clientId.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientId(String clientId) {
|
||||||
|
this.clientId = clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientCode() {
|
||||||
|
return clientCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientCode(String clientCode) {
|
||||||
|
this.clientCode = clientCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientName() {
|
||||||
|
return clientName == null ? "" : clientName.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientName(String clientName) {
|
||||||
|
this.clientName = clientName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSummary() {
|
||||||
|
return clientSummary == null ? "" : clientSummary.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSummary(String clientSummary) {
|
||||||
|
this.clientSummary = clientSummary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientKey() {
|
||||||
|
return clientKey == null ? "" : clientKey.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientKey(String clientKey) {
|
||||||
|
this.clientKey = clientKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSecret() {
|
||||||
|
return clientSecret == null ? "" : clientSecret.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSecret(String clientSecret) {
|
||||||
|
this.clientSecret = clientSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientStatus() {
|
||||||
|
return clientStatus == null ? "" : clientStatus.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientStatus(String clientStatus) {
|
||||||
|
this.clientStatus = clientStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientUrl() {
|
||||||
|
return clientUrl == null ? "" : clientUrl.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientUrl(String clientUrl) {
|
||||||
|
this.clientUrl = clientUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExpireTime() {
|
||||||
|
return expireTime == null ? "" : expireTime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpireTime(String expireTime) {
|
||||||
|
this.expireTime = expireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaCode() {
|
||||||
|
return areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaCode(String areaCode) {
|
||||||
|
this.areaCode = areaCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAreaName() {
|
||||||
|
return areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaName(String areaName) {
|
||||||
|
this.areaName = areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPositionLng() {
|
||||||
|
return positionLng;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPositionLng(String positionLng) {
|
||||||
|
this.positionLng = positionLng;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPositionLat() {
|
||||||
|
return positionLat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPositionLat(String positionLat) {
|
||||||
|
this.positionLat = positionLat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPositionAddress() {
|
||||||
|
return positionAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPositionAddress(String positionAddress) {
|
||||||
|
this.positionAddress = positionAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreator() {
|
||||||
|
return creator == null ? "" : creator.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(String creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtCreate() {
|
||||||
|
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtCreate(String gmtCreate) {
|
||||||
|
this.gmtCreate = gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModifier() {
|
||||||
|
return modifier == null ? "" : modifier.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifier(String modifier) {
|
||||||
|
this.modifier = modifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGmtModified() {
|
||||||
|
return gmtModified == null ? "" : gmtModified.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtModified(String gmtModified) {
|
||||||
|
this.gmtModified = gmtModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsDelete() {
|
||||||
|
return isDelete == null ? 0 : isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsDelete(Integer isDelete) {
|
||||||
|
this.isDelete = isDelete;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
package ink.wgink.module.file.media.pojo.vos.rtmp;
|
||||||
|
|
||||||
|
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ClientVO
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@ApiModel
|
||||||
|
public class RtmpClientVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "clientName", value = "客户端名称")
|
||||||
|
@CheckEmptyAnnotation(name = "客户端名称")
|
||||||
|
private String clientName;
|
||||||
|
@ApiModelProperty(name = "clientSummary", value = "客户端描述")
|
||||||
|
private String clientSummary;
|
||||||
|
@ApiModelProperty(name = "clientKey", value = "客户端用户名")
|
||||||
|
@CheckEmptyAnnotation(name = "客户端用户名", verifyType = "letterOrNumber")
|
||||||
|
private String clientKey;
|
||||||
|
@ApiModelProperty(name = "clientSecret", value = "客户端密码")
|
||||||
|
@CheckEmptyAnnotation(name = "客户端密码")
|
||||||
|
private String clientSecret;
|
||||||
|
@ApiModelProperty(name = "clientStatus", value = "设备状态")
|
||||||
|
@CheckEmptyAnnotation(name = "设备状态")
|
||||||
|
private String clientStatus;
|
||||||
|
@ApiModelProperty(name = "clientUrl", value = "客户端地址")
|
||||||
|
@CheckEmptyAnnotation(name = "客户端地址")
|
||||||
|
private String clientUrl;
|
||||||
|
@ApiModelProperty(name = "expireTime", value = "过期时间")
|
||||||
|
@CheckEmptyAnnotation(name = "过期时间")
|
||||||
|
private String expireTime;
|
||||||
|
@ApiModelProperty(name = "areaCode", value = "地区编码")
|
||||||
|
private String areaCode;
|
||||||
|
@ApiModelProperty(name = "areaName", value = "地区名称")
|
||||||
|
private String areaName;
|
||||||
|
@ApiModelProperty(name = "positionLng", value = "位置经度")
|
||||||
|
private String positionLng;
|
||||||
|
@ApiModelProperty(name = "positionLat", value = "位置纬度")
|
||||||
|
private String positionLat;
|
||||||
|
@ApiModelProperty(name = "positionAddress", value = "位置地址")
|
||||||
|
private String positionAddress;
|
||||||
|
|
||||||
|
public String getClientName() {
|
||||||
|
return clientName == null ? "" : clientName.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientName(String clientName) {
|
||||||
|
this.clientName = clientName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSummary() {
|
||||||
|
return clientSummary == null ? "" : clientSummary.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSummary(String clientSummary) {
|
||||||
|
this.clientSummary = clientSummary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientKey() {
|
||||||
|
return clientKey == null ? "" : clientKey.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientKey(String clientKey) {
|
||||||
|
this.clientKey = clientKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientSecret() {
|
||||||
|
return clientSecret == null ? "" : clientSecret.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientSecret(String clientSecret) {
|
||||||
|
this.clientSecret = clientSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientStatus() {
|
||||||
|
return clientStatus == null ? "" : clientStatus.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientStatus(String clientStatus) {
|
||||||
|
this.clientStatus = clientStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClientUrl() {
|
||||||
|
return clientUrl == null ? "" : clientUrl.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClientUrl(String clientUrl) {
|
||||||
|
this.clientUrl = clientUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExpireTime() {
|
||||||
|
return expireTime == null ? "" : expireTime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpireTime(String expireTime) {
|
||||||
|
this.expireTime = expireTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,188 @@
|
|||||||
|
package ink.wgink.module.file.media.service.rtmp;
|
||||||
|
|
||||||
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import ink.wgink.module.file.media.pojo.dtos.rtmp.RtmpClientDTO;
|
||||||
|
import ink.wgink.module.file.media.pojo.vos.rtmp.RtmpClientVO;
|
||||||
|
import ink.wgink.module.file.media.pojo.bos.rtmp.RtmpClientBO;
|
||||||
|
import ink.wgink.module.file.media.pojo.pos.rtmp.RtmpClientPO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: IClientService
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
public interface IRtmpClientService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增rtmp客户端
|
||||||
|
*
|
||||||
|
* @param rtmpClientVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void save(RtmpClientVO rtmpClientVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增rtmp客户端
|
||||||
|
*
|
||||||
|
* @param token
|
||||||
|
* @param rtmpClientVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void save(String token, RtmpClientVO rtmpClientVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增rtmp客户端
|
||||||
|
*
|
||||||
|
* @param rtmpClientVO
|
||||||
|
* @return clientId
|
||||||
|
*/
|
||||||
|
String saveReturnId(RtmpClientVO rtmpClientVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增rtmp客户端
|
||||||
|
*
|
||||||
|
* @param token
|
||||||
|
* @param rtmpClientVO
|
||||||
|
* @return clientId
|
||||||
|
*/
|
||||||
|
String saveReturnId(String token, RtmpClientVO rtmpClientVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除rtmp客户端
|
||||||
|
*
|
||||||
|
* @param ids id列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void remove(List<String> ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除rtmp客户端
|
||||||
|
*
|
||||||
|
* @param token
|
||||||
|
* @param ids id列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void remove(String token, List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除rtmp客户端(物理删除)
|
||||||
|
*
|
||||||
|
* @param ids id列表
|
||||||
|
*/
|
||||||
|
void delete(List<String> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改rtmp客户端
|
||||||
|
*
|
||||||
|
* @param clientId
|
||||||
|
* @param rtmpClientVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void update(String clientId, RtmpClientVO rtmpClientVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改rtmp客户端
|
||||||
|
*
|
||||||
|
* @param token
|
||||||
|
* @param clientId
|
||||||
|
* @param rtmpClientVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
void update(String token, String clientId, RtmpClientVO rtmpClientVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端详情
|
||||||
|
*
|
||||||
|
* @param params 参数Map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RtmpClientDTO get(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端详情
|
||||||
|
*
|
||||||
|
* @param clientId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RtmpClientDTO get(String clientId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端详情
|
||||||
|
*
|
||||||
|
* @param params 参数Map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RtmpClientBO getBO(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端详情
|
||||||
|
*
|
||||||
|
* @param clientId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RtmpClientBO getBO(String clientId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端详情
|
||||||
|
*
|
||||||
|
* @param params 参数Map
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RtmpClientPO getPO(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端详情
|
||||||
|
*
|
||||||
|
* @param clientId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RtmpClientPO getPO(String clientId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RtmpClientDTO> list(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RtmpClientBO> listBO(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RtmpClientPO> listPO(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端分页列表
|
||||||
|
*
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
SuccessResultList<List<RtmpClientDTO>> listPage(ListPage page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rtmp客户端统计
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer count(Map<String, Object> params);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,187 @@
|
|||||||
|
package ink.wgink.module.file.media.service.rtmp.impl;
|
||||||
|
|
||||||
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
|
import ink.wgink.module.file.media.dao.rtmp.IRtmpClientDao;
|
||||||
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import ink.wgink.util.date.DateUtil;
|
||||||
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
|
import ink.wgink.util.UUIDUtil;
|
||||||
|
import ink.wgink.module.file.media.pojo.dtos.rtmp.RtmpClientDTO;
|
||||||
|
import ink.wgink.module.file.media.pojo.vos.rtmp.RtmpClientVO;
|
||||||
|
import ink.wgink.module.file.media.pojo.bos.rtmp.RtmpClientBO;
|
||||||
|
import ink.wgink.module.file.media.pojo.pos.rtmp.RtmpClientPO;
|
||||||
|
import ink.wgink.module.file.media.service.rtmp.IRtmpClientService;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: ClientServiceImpl
|
||||||
|
* @Description: rtmp客户端
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2022-04-26 22:03:44
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
public class RtmpClientServiceImpl extends DefaultBaseService implements IRtmpClientService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRtmpClientDao clientDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save(RtmpClientVO rtmpClientVO) {
|
||||||
|
saveReturnId(rtmpClientVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save(String token, RtmpClientVO rtmpClientVO) {
|
||||||
|
saveReturnId(token, rtmpClientVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String saveReturnId(RtmpClientVO rtmpClientVO) {
|
||||||
|
return saveReturnId(null, rtmpClientVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String saveReturnId(String token, RtmpClientVO rtmpClientVO) {
|
||||||
|
String clientId = UUIDUtil.getUUID();
|
||||||
|
Map<String, Object> params = HashMapUtil.beanToMap(rtmpClientVO);
|
||||||
|
params.put("clientId", clientId);
|
||||||
|
params.put("clientCode", getLatestClientCode());
|
||||||
|
if (StringUtils.isBlank(token)) {
|
||||||
|
setSaveInfo(params);
|
||||||
|
} else {
|
||||||
|
setAppSaveInfo(token, params);
|
||||||
|
}
|
||||||
|
clientDao.save(params);
|
||||||
|
return clientId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove(List<String> ids) {
|
||||||
|
remove(null, ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove(String token, List<String> ids) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("clientIds", ids);
|
||||||
|
if (StringUtils.isBlank(token)) {
|
||||||
|
setUpdateInfo(params);
|
||||||
|
} else {
|
||||||
|
setAppUpdateInfo(token, params);
|
||||||
|
}
|
||||||
|
clientDao.remove(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void delete(List<String> ids) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("clientIds", ids);
|
||||||
|
clientDao.delete(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(String clientId, RtmpClientVO rtmpClientVO) {
|
||||||
|
update(null, clientId, rtmpClientVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(String token, String clientId, RtmpClientVO rtmpClientVO) {
|
||||||
|
Map<String, Object> params = HashMapUtil.beanToMap(rtmpClientVO);
|
||||||
|
params.put("clientId", clientId);
|
||||||
|
if (StringUtils.isBlank(token)) {
|
||||||
|
setUpdateInfo(params);
|
||||||
|
} else {
|
||||||
|
setAppUpdateInfo(token, params);
|
||||||
|
}
|
||||||
|
clientDao.update(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RtmpClientDTO get(Map<String, Object> params) {
|
||||||
|
return clientDao.get(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RtmpClientDTO get(String clientId) {
|
||||||
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
|
params.put("clientId", clientId);
|
||||||
|
return get(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RtmpClientBO getBO(Map<String, Object> params) {
|
||||||
|
return clientDao.getBO(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RtmpClientBO getBO(String clientId) {
|
||||||
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
|
params.put("clientId", clientId);
|
||||||
|
return getBO(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RtmpClientPO getPO(Map<String, Object> params) {
|
||||||
|
return clientDao.getPO(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RtmpClientPO getPO(String clientId) {
|
||||||
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
|
params.put("clientId", clientId);
|
||||||
|
return getPO(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RtmpClientDTO> list(Map<String, Object> params) {
|
||||||
|
return clientDao.list(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RtmpClientBO> listBO(Map<String, Object> params) {
|
||||||
|
return clientDao.listBO(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RtmpClientPO> listPO(Map<String, Object> params) {
|
||||||
|
return clientDao.listPO(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SuccessResultList<List<RtmpClientDTO>> listPage(ListPage page) {
|
||||||
|
PageHelper.startPage(page.getPage(), page.getRows());
|
||||||
|
List<RtmpClientDTO> rtmpClientDTOS = list(page.getParams());
|
||||||
|
PageInfo<RtmpClientDTO> pageInfo = new PageInfo<>(rtmpClientDTOS);
|
||||||
|
return new SuccessResultList<>(rtmpClientDTOS, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer count(Map<String, Object> params) {
|
||||||
|
Integer count = clientDao.count(params);
|
||||||
|
return count == null ? 0 : count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取最新的客户端编码
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getLatestClientCode() {
|
||||||
|
String datetime = DateUtil.getDays();
|
||||||
|
String latestClientCode = clientDao.latestClientCode(datetime);
|
||||||
|
int todayLatestIndex = 0;
|
||||||
|
if (!StringUtils.isBlank(latestClientCode)) {
|
||||||
|
todayLatestIndex = Integer.parseInt(latestClientCode.replace(datetime, ""));
|
||||||
|
}
|
||||||
|
return String.format("%s%06d", datetime, todayLatestIndex + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,335 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<base th:href="${#request.getContextPath() + '/'}">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md12">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-body">
|
||||||
|
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="keywords" class="layui-input search-item search-item-width-100" placeholder="输入关键字">
|
||||||
|
</div>
|
||||||
|
新增时间
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="startTime" class="layui-input search-item search-item-width-100" placeholder="开始时间" readonly>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<input type="text" id="endTime" class="layui-input search-item search-item-width-100" placeholder="结束时间" readonly>
|
||||||
|
</div>
|
||||||
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
||||||
|
<i class="fa fa-lg fa-search"></i> 搜索
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
||||||
|
<!-- 表头按钮组 -->
|
||||||
|
<script type="text/html" id="headerToolBar">
|
||||||
|
<div class="layui-btn-group">
|
||||||
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||||
|
<i class="fa fa-lg fa-plus"></i> 新增
|
||||||
|
</button>
|
||||||
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||||
|
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||||
|
</button>
|
||||||
|
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||||
|
<i class="fa fa-lg fa-trash"></i> 删除
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/'
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index'
|
||||||
|
}).use(['index', 'table', 'laydate', 'common'], function() {
|
||||||
|
var $ = layui.$;
|
||||||
|
var $win = $(window);
|
||||||
|
var table = layui.table;
|
||||||
|
var admin = layui.admin;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var common = layui.common;
|
||||||
|
var resizeTimeout = null;
|
||||||
|
var tableUrl = 'api/rtmp-client/listpage';
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
function initTable() {
|
||||||
|
table.render({
|
||||||
|
elem: '#dataTable',
|
||||||
|
id: 'dataTable',
|
||||||
|
url: top.restAjax.path(tableUrl, []),
|
||||||
|
width: admin.screen() > 1 ? '100%' : '',
|
||||||
|
height: $win.height() - 90,
|
||||||
|
limit: 20,
|
||||||
|
limits: [20, 40, 60, 80, 100, 200],
|
||||||
|
toolbar: '#headerToolBar',
|
||||||
|
request: {
|
||||||
|
pageName: 'page',
|
||||||
|
limitName: 'rows'
|
||||||
|
},
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{type:'checkbox', fixed: 'left'},
|
||||||
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
|
{field: 'clientCode', width: 180, title: '编码', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'clientName', width: 180, title: '客户端名称', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'clientSummary', width: 180, title: '客户端描述', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'clientKey', width: 180, title: '客户端用户名', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'clientSecret', width: 180, title: '客户端密码', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'clientStatus', width: 180, title: '设备状态', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'clientUrl', width: 180, title: '客户端地址', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'expireTime', width: 180, title: '过期时间', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'creator', width: 180, title: '创建人', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'gmtCreate', width: 180, title: '创建时间', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'modifier', width: 180, title: '修改人', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'gmtModified', width: 180, title: '修改时间', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{field: 'isDelete', width: 180, title: '是否删除', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row[this.field];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
return rowData;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
],
|
||||||
|
page: true,
|
||||||
|
parseData: function(data) {
|
||||||
|
return {
|
||||||
|
'code': 0,
|
||||||
|
'msg': '',
|
||||||
|
'count': data.total,
|
||||||
|
'data': data.rows
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 重载表格
|
||||||
|
function reloadTable(currentPage) {
|
||||||
|
table.reload('dataTable', {
|
||||||
|
where: {
|
||||||
|
keywords: $('#keywords').val(),
|
||||||
|
startTime: $('#startTime').val(),
|
||||||
|
endTime: $('#endTime').val()
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
curr: currentPage
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 初始化日期
|
||||||
|
function initDate() {
|
||||||
|
// 日期选择
|
||||||
|
laydate.render({
|
||||||
|
elem: '#startTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
laydate.render({
|
||||||
|
elem: '#endTime',
|
||||||
|
format: 'yyyy-MM-dd'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
function removeData(ids) {
|
||||||
|
top.dialog.msg(top.dataMessage.delete, {
|
||||||
|
time: 0,
|
||||||
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||||
|
shade: 0.3,
|
||||||
|
yes: function (index) {
|
||||||
|
top.dialog.close(index);
|
||||||
|
var layIndex;
|
||||||
|
top.restAjax.delete(top.restAjax.path('api/rtmp-client/remove/{ids}', [ids]), {}, null, function (code, data) {
|
||||||
|
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
|
||||||
|
reloadTable();
|
||||||
|
}, function (code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function () {
|
||||||
|
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function () {
|
||||||
|
top.dialog.close(layIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initTable();
|
||||||
|
initDate();
|
||||||
|
// 事件 - 页面变化
|
||||||
|
$win.on('resize', function() {
|
||||||
|
clearTimeout(resizeTimeout);
|
||||||
|
resizeTimeout = setTimeout(function() {
|
||||||
|
reloadTable();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
// 事件 - 搜索
|
||||||
|
$(document).on('click', '#search', function() {
|
||||||
|
reloadTable(1);
|
||||||
|
});
|
||||||
|
// 事件 - 增删改
|
||||||
|
table.on('toolbar(dataTable)', function(obj) {
|
||||||
|
var layEvent = obj.event;
|
||||||
|
var checkStatus = table.checkStatus('dataTable');
|
||||||
|
var checkDatas = checkStatus.data;
|
||||||
|
if(layEvent === 'saveEvent') {
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: false,
|
||||||
|
closeBtn: 0,
|
||||||
|
area: ['100%', '100%'],
|
||||||
|
shadeClose: true,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/rtmp-client/save', []),
|
||||||
|
end: function() {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if(layEvent === 'updateEvent') {
|
||||||
|
if(checkDatas.length === 0) {
|
||||||
|
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||||
|
} else if(checkDatas.length > 1) {
|
||||||
|
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||||
|
} else {
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: false,
|
||||||
|
closeBtn: 0,
|
||||||
|
area: ['100%', '100%'],
|
||||||
|
shadeClose: true,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/rtmp-client/update?clientId={clientId}', [checkDatas[0].clientId]),
|
||||||
|
end: function() {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if(layEvent === 'removeEvent') {
|
||||||
|
if(checkDatas.length === 0) {
|
||||||
|
top.dialog.msg(top.dataMessage.table.selectDelete);
|
||||||
|
} else {
|
||||||
|
var ids = '';
|
||||||
|
for(var i = 0, item; item = checkDatas[i++];) {
|
||||||
|
if(i > 1) {
|
||||||
|
ids += '_';
|
||||||
|
}
|
||||||
|
ids += item['clientId'];
|
||||||
|
}
|
||||||
|
removeData(ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,174 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<base th:href="${#request.getContextPath() + '/'}">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
<style>
|
||||||
|
.layui-form-pane .layui-form-label {width: 130px;}
|
||||||
|
.layui-form-pane .layui-input-block {margin-left: 130px;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header">
|
||||||
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
|
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||||
|
<a href="javascript:void(0);"><cite>新增内容</cite></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">客户端名称 *</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="clientName" name="clientName" class="layui-input" value="" placeholder="请输入客户端名称" maxlength="255" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">客户端描述</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="clientSummary" name="clientSummary" class="layui-input" value="" placeholder="请输入客户端描述" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">客户端用户名 *</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="clientKey" name="clientKey" class="layui-input" value="" placeholder="请输入客户端用户名" maxlength="255" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">客户端密码 *</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="clientSecret" name="clientSecret" class="layui-input" value="" placeholder="请输入客户端密码" maxlength="255" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item" pane>
|
||||||
|
<label class="layui-form-label">设备状态</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="radio" name="clientStatus" value="active" title="激活" checked>
|
||||||
|
<input type="radio" name="clientStatus" value="unActive" title="不可用">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">过期时间</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="expireTime" name="expireTime" class="layui-input" placeholder="请输入过期时间" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label">客户端地址</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<textarea id="clientUrl" name="clientUrl" class="layui-textarea" placeholder="请输入客户端地址" lay-verify="required"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-layout-admin">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<div class="layui-footer" style="left: 0;">
|
||||||
|
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
||||||
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index' //主入口模块
|
||||||
|
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||||
|
var $ = layui.$;
|
||||||
|
var form = layui.form;
|
||||||
|
var laytpl = layui.laytpl;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
|
||||||
|
function closeBox() {
|
||||||
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
|
}
|
||||||
|
|
||||||
|
function initDate() {
|
||||||
|
// 日期选择
|
||||||
|
laydate.render({
|
||||||
|
elem: '#expireTime',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
type: 'date',
|
||||||
|
trigger: 'click'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化内容
|
||||||
|
function initData() {
|
||||||
|
initDate();
|
||||||
|
}
|
||||||
|
initData();
|
||||||
|
|
||||||
|
// 提交表单
|
||||||
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
|
top.dialog.close(index);
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.post(top.restAjax.path('api/rtmp-client/save', []), formData.field, null, function(code, data) {
|
||||||
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||||
|
time: 0,
|
||||||
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||||
|
shade: 0.3,
|
||||||
|
yes: function(index) {
|
||||||
|
top.dialog.close(index);
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
|
btn2: function() {
|
||||||
|
closeBox();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.close').on('click', function() {
|
||||||
|
closeBox();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 校验
|
||||||
|
form.verify({
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,190 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<base th:href="${#request.getContextPath() + '/'}">
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="renderer" content="webkit">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||||
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
||||||
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||||
|
<style>
|
||||||
|
.layui-form-pane .layui-form-label {width: 130px;}
|
||||||
|
.layui-form-pane .layui-input-block {margin-left: 130px;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
||||||
|
<div class="layui-card">
|
||||||
|
<div class="layui-card-header">
|
||||||
|
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||||
|
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||||
|
<a href="javascript:void(0);"><cite>编辑内容</cite></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">客户端名称 *</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="clientName" name="clientName" class="layui-input" value="" placeholder="请输入客户端名称" maxlength="255" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">客户端描述</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="clientSummary" name="clientSummary" class="layui-input" value="" placeholder="请输入客户端描述" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">客户端用户名 *</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="clientKey" name="clientKey" class="layui-input" value="" placeholder="请输入客户端用户名" maxlength="255" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">客户端密码 *</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="clientSecret" name="clientSecret" class="layui-input" value="" placeholder="请输入客户端密码" maxlength="255" lay-verify="required">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item" pane>
|
||||||
|
<label class="layui-form-label">设备状态</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="radio" name="clientStatus" value="active" title="激活" checked>
|
||||||
|
<input type="radio" name="clientStatus" value="unActive" title="不可用">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-col-xs6">
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<label class="layui-form-label">过期时间</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<input type="text" id="expireTime" name="expireTime" class="layui-input" placeholder="请输入过期时间" maxlength="255">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<label class="layui-form-label">客户端地址</label>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<textarea id="clientUrl" name="clientUrl" class="layui-textarea" placeholder="请输入客户端地址" lay-verify="required"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item layui-layout-admin">
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<div class="layui-footer" style="left: 0;">
|
||||||
|
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
|
||||||
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||||
|
<script>
|
||||||
|
layui.config({
|
||||||
|
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||||
|
}).extend({
|
||||||
|
index: 'lib/index' //主入口模块
|
||||||
|
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||||
|
var $ = layui.$;
|
||||||
|
var form = layui.form;
|
||||||
|
var laytpl = layui.laytpl;
|
||||||
|
var laydate = layui.laydate;
|
||||||
|
var clientId = top.restAjax.params(window.location.href).clientId;
|
||||||
|
|
||||||
|
|
||||||
|
function closeBox() {
|
||||||
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
|
}
|
||||||
|
|
||||||
|
function initDate() {
|
||||||
|
// 日期选择
|
||||||
|
laydate.render({
|
||||||
|
elem: '#expireTime',
|
||||||
|
format: 'yyyy-MM-dd',
|
||||||
|
type: 'date',
|
||||||
|
trigger: 'click'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化内容
|
||||||
|
function initData() {
|
||||||
|
initDate();
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.get(top.restAjax.path('api/rtmp-client/get/{clientId}', [clientId]), {}, null, function(code, data) {
|
||||||
|
var dataFormData = {};
|
||||||
|
for(var i in data) {
|
||||||
|
dataFormData[i] = data[i] +'';
|
||||||
|
}
|
||||||
|
form.val('dataForm', dataFormData);
|
||||||
|
form.render(null, 'dataForm');
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
initData();
|
||||||
|
|
||||||
|
// 提交表单
|
||||||
|
form.on('submit(submitForm)', function(formData) {
|
||||||
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
|
top.dialog.close(index);
|
||||||
|
var loadLayerIndex;
|
||||||
|
top.restAjax.put(top.restAjax.path('api/rtmp-client/update/{clientId}', [clientId]), formData.field, null, function(code, data) {
|
||||||
|
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
||||||
|
time: 0,
|
||||||
|
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||||
|
shade: 0.3,
|
||||||
|
yes: function(index) {
|
||||||
|
top.dialog.close(index);
|
||||||
|
window.location.reload();
|
||||||
|
},
|
||||||
|
btn2: function() {
|
||||||
|
closeBox();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
}, function() {
|
||||||
|
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||||
|
}, function() {
|
||||||
|
top.dialog.close(loadLayerIndex);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.close').on('click', function() {
|
||||||
|
closeBox();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 校验
|
||||||
|
form.verify({
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user