Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
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
liqin
chnmuseum-party
Commits
6d785989
Commit
6d785989
authored
May 13, 2021
by
jiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG修改====》》视频汇出,视频名称检索功能无效
parent
8def55b7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
11 deletions
+13
-11
AssetMapper.java
src/main/java/cn/chnmuseum/party/mapper/AssetMapper.java
+2
-1
AssetService.java
src/main/java/cn/chnmuseum/party/service/AssetService.java
+1
-1
AssetServiceImpl.java
...ava/cn/chnmuseum/party/service/impl/AssetServiceImpl.java
+2
-2
AssetController.java
...va/cn/chnmuseum/party/web/controller/AssetController.java
+8
-7
No files found.
src/main/java/cn/chnmuseum/party/mapper/AssetMapper.java
View file @
6d785989
...
...
@@ -29,10 +29,11 @@ public interface AssetMapper extends BaseMapper<Asset> {
"<![CDATA[and co.expire_date_start <= DATE_FORMAT(now(), '%Y-%m-%d') ]]>"
+
"<![CDATA[and co.expire_date_end >= DATE_FORMAT(now(), '%Y-%m-%d') ]]>"
+
"<if test='videoContentCatId != null'>and vcc.id = #{videoContentCatId} </if>"
+
"<if test='nameOrCode != null'>and a.file_name like concat('%',#{nameOrCode},'%') </if>"
+
"<if test='videoContentCopyrightOwnerId != null'>and co.id = #{videoContentCopyrightOwnerId} </if>"
+
"order by a.create_time desc"
+
"</script>"
)
Page
<
Asset
>
selectPageByConditions
(
Page
<
Object
>
page
,
String
videoContentCatId
,
String
videoContentCopyrightOwnerId
);
Page
<
Asset
>
selectPageByConditions
(
Page
<
Object
>
page
,
String
videoContentCatId
,
String
videoContentCopyrightOwnerId
,
String
nameOrCode
);
@Select
(
"<script>"
+
"SELECT b.*, o.code as organ_code, o.`name` as organ_name "
+
...
...
src/main/java/cn/chnmuseum/party/service/AssetService.java
View file @
6d785989
...
...
@@ -17,7 +17,7 @@ import java.util.List;
*/
public
interface
AssetService
extends
IService
<
Asset
>
{
Page
<
Asset
>
pageByConditions
(
Page
<
Object
>
page
,
String
videoContentCatId
,
String
videoContentCopyrightOwnerId
);
Page
<
Asset
>
pageByConditions
(
Page
<
Object
>
page
,
String
videoContentCatId
,
String
videoContentCopyrightOwnerId
,
String
nameOrCode
);
List
<
TBoxOperation
>
listBoxByOrgan
();
...
...
src/main/java/cn/chnmuseum/party/service/impl/AssetServiceImpl.java
View file @
6d785989
...
...
@@ -26,8 +26,8 @@ public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements
private
AssetMapper
assetMapper
;
@Override
public
Page
<
Asset
>
pageByConditions
(
Page
<
Object
>
page
,
String
videoContentCatId
,
String
videoContentCopyrightOwnerId
)
{
return
assetMapper
.
selectPageByConditions
(
page
,
videoContentCatId
,
videoContentCopyrightOwnerId
);
public
Page
<
Asset
>
pageByConditions
(
Page
<
Object
>
page
,
String
videoContentCatId
,
String
videoContentCopyrightOwnerId
,
String
nameOrCode
)
{
return
assetMapper
.
selectPageByConditions
(
page
,
videoContentCatId
,
videoContentCopyrightOwnerId
,
nameOrCode
);
}
@Override
...
...
src/main/java/cn/chnmuseum/party/web/controller/AssetController.java
View file @
6d785989
...
...
@@ -14,7 +14,6 @@ import cn.chnmuseum.party.service.AssetService;
import
cn.chnmuseum.party.web.controller.base.BaseController
;
import
cn.hutool.core.io.IoUtil
;
import
cn.hutool.core.util.ZipUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -71,15 +70,17 @@ public class AssetController extends BaseController {
public
Map
<
String
,
Object
>
getAssetPageList
(
GenericPageParam
genericPageParam
,
@RequestParam
(
value
=
"videoContentCatId"
,
required
=
false
)
String
videoContentCatId
,
@RequestParam
(
value
=
"videoContentCopyrightOwnerId"
,
required
=
false
)
String
videoContentCopyrightOwnerId
)
{
LambdaQueryWrapper
<
Asset
>
ew
=
new
LambdaQueryWrapper
<>();
ew
.
eq
(
Asset:
:
getPublished
,
true
);
//
LambdaQueryWrapper<Asset> ew = new LambdaQueryWrapper<>();
//
ew.eq(Asset::getPublished, true);
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
ew
.
like
(
Asset:
:
getFileName
,
genericPageParam
.
getNameOrCode
());
String
nameOrCode
=
genericPageParam
.
getNameOrCode
();
if
(
StringUtils
.
isBlank
(
nameOrCode
))
{
// ew.like(Asset::getFileName, genericPageParam.getNameOrCode());
nameOrCode
=
null
;
}
// 设置排序规则
ew
.
orderByDesc
(
Asset:
:
getCreateTime
);
Page
<
Asset
>
page
=
this
.
assetService
.
pageByConditions
(
getPage
(),
videoContentCatId
,
videoContentCopyrightOwnerId
);
//
ew.orderByDesc(Asset::getCreateTime);
Page
<
Asset
>
page
=
this
.
assetService
.
pageByConditions
(
getPage
(),
videoContentCatId
,
videoContentCopyrightOwnerId
,
nameOrCode
);
return
getResult
(
page
);
}
...
...
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