Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
03571466
Commit
03571466
authored
Jun 01, 2024
by
kinky2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改气瓶单位视频接口
parent
aae26323
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
95 additions
and
5 deletions
+95
-5
CommonVideoEnum.java
.../amos/boot/module/cylinder/api/enums/CommonVideoEnum.java
+51
-0
CommonVideoDto.java
...amos/boot/module/cylinder/flc/api/dto/CommonVideoDto.java
+20
-0
CylinderUnitVideoDto.java
...oot/module/cylinder/flc/api/dto/CylinderUnitVideoDto.java
+4
-0
CylinderUnitVideo.java
...oot/module/cylinder/flc/api/entity/CylinderUnitVideo.java
+5
-0
ICylinderUnitVideoService.java
...e/cylinder/flc/api/service/ICylinderUnitVideoService.java
+3
-1
CylinderUnitController.java
...e/cylinder/flc/biz/controller/CylinderUnitController.java
+2
-1
CylinderUnitVideoServiceImpl.java
...er/flc/biz/service/impl/CylinderUnitVideoServiceImpl.java
+10
-3
No files found.
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/api/enums/CommonVideoEnum.java
0 → 100644
View file @
03571466
package
com
.
yeejoin
.
amos
.
boot
.
module
.
cylinder
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
/**
*
* <pre>
* 通用视频协议枚举
* </pre>
*
*/
@Getter
@AllArgsConstructor
public
enum
CommonVideoEnum
{
HLS
(
"2"
,
"hls"
);
private
String
code
;
private
String
name
;
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
static
CommonVideoEnum
getEnum
(
String
code
)
{
for
(
CommonVideoEnum
status
:
CommonVideoEnum
.
values
())
{
if
(
status
.
getCode
().
equals
(
code
))
{
return
status
;
}
}
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/dto/CommonVideoDto.java
0 → 100644
View file @
03571466
package
com
.
yeejoin
.
amos
.
boot
.
module
.
cylinder
.
flc
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@Data
@ApiModel
(
value
=
"CommonVideoDto"
,
description
=
"通用视频信息"
)
public
class
CommonVideoDto
{
private
String
key
;
private
String
url
;
private
String
type
;
private
String
title
;
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/dto/CylinderUnitVideoDto.java
View file @
03571466
...
...
@@ -21,6 +21,10 @@ public class CylinderUnitVideoDto extends BaseDto {
*/
private
String
url
;
/**
*视频标题
*/
private
String
title
;
/**
*appkey
*/
private
String
appKey
;
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/entity/CylinderUnitVideo.java
View file @
03571466
...
...
@@ -31,6 +31,11 @@ public class CylinderUnitVideo extends BaseEntity{/**
@TableField
(
"url"
)
private
String
url
;
/**
*视频标题
*/
@TableField
(
"title"
)
private
String
title
;
/**
*appkey
*/
@TableField
(
"app_key"
)
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/service/ICylinderUnitVideoService.java
View file @
03571466
package
com
.
yeejoin
.
amos
.
boot
.
module
.
cylinder
.
flc
.
api
.
service
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CommonVideoDto
;
import
java.util.List
;
/**
...
...
@@ -11,5 +13,5 @@ import java.util.List;
*/
public
interface
ICylinderUnitVideoService
{
List
<
String
>
getUnitVideoUrl
(
Long
unitSeq
);
List
<
CommonVideoDto
>
getUnitVideoUrl
(
Long
unitSeq
);
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/controller/CylinderUnitController.java
View file @
03571466
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.cylinder.flc.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CommonVideoDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderUnitDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderUnit
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.service.ICylinderInfoService
;
...
...
@@ -128,7 +129,7 @@ public class CylinderUnitController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUnitVideoUrl"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据气瓶企业seq查询视频链接"
,
notes
=
"根据气瓶企业seq查询视频链接"
)
public
ResponseModel
<
List
<
String
>>
getUnitVideoUrl
(
@RequestParam
Long
unitSeq
)
{
public
ResponseModel
<
List
<
CommonVideoDto
>>
getUnitVideoUrl
(
@RequestParam
Long
unitSeq
)
{
return
ResponseHelper
.
buildResponse
(
icylinderUnitVideoService
.
getUnitVideoUrl
(
unitSeq
));
}
}
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/service/impl/CylinderUnitVideoServiceImpl.java
View file @
03571466
...
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.boot.module.cylinder.flc.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.cylinder.api.enums.CommonVideoEnum
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CommonVideoDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CylinderUnitVideoDto
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderUnitVideo
;
import
com.yeejoin.amos.boot.module.cylinder.flc.api.mapper.CylinderUnitVideoMapper
;
...
...
@@ -40,8 +42,8 @@ public class CylinderUnitVideoServiceImpl extends BaseService<CylinderUnitVideoD
private
static
final
String
CODE_404
=
"404"
;
private
static
final
String
CODE_20001
=
"20001"
;
@Override
public
List
<
String
>
getUnitVideoUrl
(
Long
unitSeq
)
{
List
<
String
>
result
=
new
ArrayList
<
String
>();
public
List
<
CommonVideoDto
>
getUnitVideoUrl
(
Long
unitSeq
)
{
List
<
CommonVideoDto
>
result
=
new
ArrayList
<
CommonVideoDto
>();
LambdaQueryWrapper
<
CylinderUnitVideo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
CylinderUnitVideo:
:
getUnitSeq
,
unitSeq
);
CylinderUnitVideo
cylinderUnitVideo
=
this
.
getBaseMapper
().
selectOne
(
wrapper
);
...
...
@@ -86,7 +88,12 @@ public class CylinderUnitVideoServiceImpl extends BaseService<CylinderUnitVideoD
String
dataS
=
videoJsonObject
.
get
(
"data"
).
toString
();
JSONObject
dd
=
JSON
.
parseObject
(
dataS
);
String
url
=
dd
.
get
(
"url"
).
toString
();
result
.
add
(
url
);
CommonVideoDto
commonVideoDto
=
new
CommonVideoDto
();
commonVideoDto
.
setUrl
(
url
);
commonVideoDto
.
setKey
(
channelNo
);
commonVideoDto
.
setType
(
CommonVideoEnum
.
getEnum
(
cylinderUnitVideo
.
getProtocol
()).
getName
());
commonVideoDto
.
setTitle
(
cylinderUnitVideo
.
getTitle
());
result
.
add
(
commonVideoDto
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment