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
4a50d3e6
Commit
4a50d3e6
authored
Sep 09, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频API开发
parent
a6b025f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
DataDictionaryController.java
.../boot/biz/common/controller/DataDictionaryController.java
+42
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/DataDictionaryController.java
View file @
4a50d3e6
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.biz.common.controller;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -460,4 +461,45 @@ public class DataDictionaryController extends BaseController {
List
<
Map
<
String
,
Object
>>
listMap
=
iDataDictionaryService
.
listUserJobStatistic
(
bizOrgCode
);
return
ResponseHelper
.
buildResponse
(
listMap
);
}
/**
* 新增数据字典 - 存储默认展示视频
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/saveDefaultVideo"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"存储默认展示视频"
,
notes
=
"存储默认展示视频"
)
public
boolean
saveDefaultVideo
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
String
type
=
"DEFAULT_VIDEO"
;
LambdaUpdateWrapper
<
DataDictionary
>
lambda
=
new
LambdaUpdateWrapper
<>();
lambda
.
eq
(
DataDictionary:
:
getType
,
type
);
iDataDictionaryService
.
remove
(
lambda
);
List
<
DataDictionary
>
insertList
=
new
ArrayList
<>();
List
<
String
>
list
=
(
List
<
String
>)
map
.
get
(
"videos"
);
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
DataDictionary
dataDictionary
=
new
DataDictionary
();
String
code
=
list
.
get
(
i
).
split
(
"@"
)[
0
];
String
name
=
list
.
get
(
i
).
split
(
"@"
)[
1
];
dataDictionary
.
setName
(
name
);
dataDictionary
.
setCode
(
type
+
i
);
dataDictionary
.
setTypeDesc
(
code
);
dataDictionary
.
setType
(
type
);
insertList
.
add
(
dataDictionary
);
}
iDataDictionaryService
.
saveBatch
(
insertList
);
return
Boolean
.
TRUE
;
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getDictVideoList"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据字典类型查询字典 - 应急默认视频"
,
notes
=
"根据字典类型查询字典 - 应急默认视频"
)
public
ResponseModel
<
Object
>
getDictVideoList
(
@RequestParam
String
type
)
throws
Exception
{
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
List
<
DataDictionary
>
list
=
iDataDictionaryService
.
list
(
queryWrapper
);
return
ResponseHelper
.
buildResponse
(
list
);
}
}
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