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
c4901dd1
Commit
c4901dd1
authored
Mar 25, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
a3bd1b70
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
26 deletions
+60
-26
BasePageOrderParam.java
...senergy/chnmuseum/party/common/vo/BasePageOrderParam.java
+3
-3
CopyrightOwner.java
...va/cn/wisenergy/chnmuseum/party/model/CopyrightOwner.java
+12
-12
AssetController.java
...nergy/chnmuseum/party/web/controller/AssetController.java
+6
-2
AssetTypeController.java
...y/chnmuseum/party/web/controller/AssetTypeController.java
+0
-1
CopyrightOwnerController.java
...museum/party/web/controller/CopyrightOwnerController.java
+28
-7
ExhibitionBoardCatController.java
...um/party/web/controller/ExhibitionBoardCatController.java
+4
-0
FileUploadController.java
.../chnmuseum/party/web/controller/FileUploadController.java
+7
-1
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/BasePageOrderParam.java
View file @
c4901dd1
...
@@ -24,9 +24,6 @@ public abstract class BasePageOrderParam extends BasePageParam {
...
@@ -24,9 +24,6 @@ public abstract class BasePageOrderParam extends BasePageParam {
@ApiModelProperty
(
"名称/编码"
)
@ApiModelProperty
(
"名称/编码"
)
private
String
nameOrCode
;
private
String
nameOrCode
;
@ApiModelProperty
(
"类型"
)
private
String
type
;
@ApiModelProperty
(
"操作类型"
)
@ApiModelProperty
(
"操作类型"
)
private
String
operationType
;
private
String
operationType
;
...
@@ -42,6 +39,9 @@ public abstract class BasePageOrderParam extends BasePageParam {
...
@@ -42,6 +39,9 @@ public abstract class BasePageOrderParam extends BasePageParam {
@ApiModelProperty
(
"创建人"
)
@ApiModelProperty
(
"创建人"
)
private
String
creatorName
;
private
String
creatorName
;
@ApiModelProperty
(
"版权方类型"
)
private
String
ownerType
;
@ApiModelProperty
(
"视频分类ID"
)
@ApiModelProperty
(
"视频分类ID"
)
private
String
assetTypeId
;
private
String
assetTypeId
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/CopyrightOwner.java
View file @
c4901dd1
...
@@ -42,24 +42,24 @@ public class CopyrightOwner implements Serializable {
...
@@ -42,24 +42,24 @@ public class CopyrightOwner implements Serializable {
@ApiModelProperty
(
"版权方名称"
)
@ApiModelProperty
(
"版权方名称"
)
@TableField
(
"name"
)
@TableField
(
"name"
)
@NotBlank
(
message
=
"版权方名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"版权方名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"版权方类型"
)
@ApiModelProperty
(
"版权方类型"
)
@TableField
(
"owner_type"
)
@TableField
(
"owner_type"
)
@NotBlank
(
message
=
"版权方类型不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"版权方类型不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
ownerType
;
private
String
ownerType
;
@ApiModelProperty
(
"版权方有效期开始"
)
@ApiModelProperty
(
"版权方有效期开始"
)
@TableField
(
"expire_date_start"
)
@TableField
(
"expire_date_start"
)
@NotNull
(
message
=
"版权方有效期开始不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotNull
(
message
=
"版权方有效期开始不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
LocalDate
expireDateStart
;
private
LocalDate
expireDateStart
;
@ApiModelProperty
(
"版权方有效期结束"
)
@ApiModelProperty
(
"版权方有效期结束"
)
@TableField
(
"expire_date_end"
)
@TableField
(
"expire_date_end"
)
@NotNull
(
message
=
"版权方有效期结束不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotNull
(
message
=
"版权方有效期结束不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
LocalDate
expireDateEnd
;
private
LocalDate
expireDateEnd
;
@ApiModelProperty
(
"备注"
)
@ApiModelProperty
(
"备注"
)
@TableField
(
"remarks"
)
@TableField
(
"remarks"
)
private
String
remarks
;
private
String
remarks
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AssetController.java
View file @
c4901dd1
...
@@ -224,11 +224,15 @@ public class AssetController extends BaseController {
...
@@ -224,11 +224,15 @@ public class AssetController extends BaseController {
Asset
asset
=
assetService
.
getById
(
id
);
Asset
asset
=
assetService
.
getById
(
id
);
if
(
asset
.
getAssetTypeId
()
!=
null
)
{
if
(
asset
.
getAssetTypeId
()
!=
null
)
{
AssetType
assetType
=
this
.
assetTypeService
.
getById
(
asset
.
getAssetTypeId
());
AssetType
assetType
=
this
.
assetTypeService
.
getById
(
asset
.
getAssetTypeId
());
asset
.
setAssetTypeName
(
assetType
.
getName
());
if
(
assetType
!=
null
)
{
asset
.
setAssetTypeName
(
assetType
.
getName
());
}
}
}
if
(
asset
.
getAssetCopyrightOwnerId
()
!=
null
)
{
if
(
asset
.
getAssetCopyrightOwnerId
()
!=
null
)
{
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
asset
.
getAssetCopyrightOwnerId
());
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
asset
.
getAssetCopyrightOwnerId
());
asset
.
setAssetCopyrightOwnerName
(
copyrightOwner
.
getName
());
if
(
copyrightOwner
!=
null
)
{
asset
.
setAssetCopyrightOwnerName
(
copyrightOwner
.
getName
());
}
}
}
return
getResult
(
asset
);
return
getResult
(
asset
);
}
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AssetTypeController.java
View file @
c4901dd1
...
@@ -135,7 +135,6 @@ public class AssetTypeController extends BaseController {
...
@@ -135,7 +135,6 @@ public class AssetTypeController extends BaseController {
Page
<
AssetType
>
page
=
this
.
assetTypeService
.
page
(
getPage
(),
queryWrapper
);
Page
<
AssetType
>
page
=
this
.
assetTypeService
.
page
(
getPage
(),
queryWrapper
);
for
(
AssetType
assetType
:
page
.
getRecords
())
{
for
(
AssetType
assetType
:
page
.
getRecords
())
{
LambdaQueryWrapper
<
Asset
>
lambdaQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getAssetTypeId
,
assetType
.
getId
());
LambdaQueryWrapper
<
Asset
>
lambdaQueryWrapper
=
Wrappers
.<
Asset
>
lambdaQuery
().
eq
(
Asset:
:
getAssetTypeId
,
assetType
.
getId
());
//lambdaQueryWrapper.eq(Asset::getAuditStatusAdd)
lambdaQueryWrapper
=
lambdaQueryWrapper
.
select
(
Asset:
:
getId
).
select
(
Asset:
:
getAssetCopyrightOwnerId
);
lambdaQueryWrapper
=
lambdaQueryWrapper
.
select
(
Asset:
:
getId
).
select
(
Asset:
:
getAssetCopyrightOwnerId
);
List
<
Asset
>
assetList
=
this
.
assetService
.
list
(
lambdaQueryWrapper
);
List
<
Asset
>
assetList
=
this
.
assetService
.
list
(
lambdaQueryWrapper
);
final
List
<
String
>
assetCopyrightOwnerIdList
=
assetList
.
stream
().
map
(
Asset:
:
getAssetCopyrightOwnerId
).
collect
(
Collectors
.
toList
());
final
List
<
String
>
assetCopyrightOwnerIdList
=
assetList
.
stream
().
map
(
Asset:
:
getAssetCopyrightOwnerId
).
collect
(
Collectors
.
toList
());
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/CopyrightOwnerController.java
View file @
c4901dd1
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
import
cn.wisenergy.chnmuseum.party.common.enums.CopyrightOwnerTypeEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.CopyrightOwnerTypeEnum
;
import
cn.wisenergy.chnmuseum.party.common.util.TimeUtils
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
...
@@ -137,17 +138,24 @@ public class CopyrightOwnerController extends BaseController {
...
@@ -137,17 +138,24 @@ public class CopyrightOwnerController extends BaseController {
return
getFailResult
();
return
getFailResult
();
}
}
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"copyrightOwnerType"
,
value
=
"版权方类型"
,
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
)
})
@GetMapping
(
"/getList"
)
@GetMapping
(
"/getList"
)
@RequiresPermissions
(
"copyright:owner:list"
)
@RequiresPermissions
(
"copyright:owner:list"
)
@ApiOperation
(
value
=
"获取版权方全部列表(无分页)"
,
notes
=
"获取版权方全部列表(无分页)"
)
@ApiOperation
(
value
=
"获取版权方全部列表(无分页)"
,
notes
=
"获取版权方全部列表(无分页)"
)
public
Map
<
String
,
Object
>
getCopyrightOwnerList
()
{
public
Map
<
String
,
Object
>
getCopyrightOwnerList
(
@RequestParam
(
"copyrightOwnerType"
)
CopyrightOwnerTypeEnum
copyrightOwnerTypeEnum
)
{
List
<
CopyrightOwner
>
copyrightOwnerList
=
copyrightOwnerService
.
list
(
Wrappers
.<
CopyrightOwner
>
lambdaQuery
());
LambdaQueryWrapper
<
CopyrightOwner
>
lambdaQueryWrapper
=
Wrappers
.<
CopyrightOwner
>
lambdaQuery
().
eq
(
CopyrightOwner:
:
getOwnerType
,
copyrightOwnerTypeEnum
.
name
());
lambdaQueryWrapper
.
le
(
CopyrightOwner:
:
getExpireDateStart
,
TimeUtils
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()))
.
ge
(
CopyrightOwner:
:
getExpireDateEnd
,
TimeUtils
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()));
List
<
CopyrightOwner
>
copyrightOwnerList
=
copyrightOwnerService
.
list
(
lambdaQueryWrapper
);
return
getResult
(
copyrightOwnerList
);
return
getResult
(
copyrightOwnerList
);
}
}
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"ownerType"
,
value
=
"版权方类型"
,
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
...
@@ -157,6 +165,7 @@ public class CopyrightOwnerController extends BaseController {
...
@@ -157,6 +165,7 @@ public class CopyrightOwnerController extends BaseController {
@ApiOperation
(
value
=
"获取版权方分页列表"
,
notes
=
"获取版权方分页列表"
)
@ApiOperation
(
value
=
"获取版权方分页列表"
,
notes
=
"获取版权方分页列表"
)
public
Map
<
String
,
Object
>
getCopyrightOwnerPageList
(
GenericPageParam
genericPageParam
)
{
public
Map
<
String
,
Object
>
getCopyrightOwnerPageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
CopyrightOwner
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
CopyrightOwner
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
CopyrightOwner:
:
getOwnerType
,
genericPageParam
.
getOwnerType
());
// 对名称或编码模糊查询
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
queryWrapper
.
like
(
CopyrightOwner:
:
getName
,
genericPageParam
.
getNameOrCode
());
queryWrapper
.
like
(
CopyrightOwner:
:
getName
,
genericPageParam
.
getNameOrCode
());
...
@@ -172,15 +181,27 @@ public class CopyrightOwnerController extends BaseController {
...
@@ -172,15 +181,27 @@ public class CopyrightOwnerController extends BaseController {
queryWrapper
.
select
(
queryWrapper
.
select
(
CopyrightOwner:
:
getId
,
CopyrightOwner:
:
getId
,
CopyrightOwner:
:
getName
,
CopyrightOwner:
:
getName
,
CopyrightOwner:
:
getExpireDateStart
,
CopyrightOwner:
:
getExpireDateEnd
,
CopyrightOwner:
:
getRemarks
,
CopyrightOwner:
:
getCreateTime
,
CopyrightOwner:
:
getCreateTime
,
CopyrightOwner:
:
getUpdateTime
);
CopyrightOwner:
:
getUpdateTime
);
Page
<
CopyrightOwner
>
page
=
this
.
copyrightOwnerService
.
page
(
getPage
(),
queryWrapper
);
Page
<
CopyrightOwner
>
page
=
this
.
copyrightOwnerService
.
page
(
getPage
(),
queryWrapper
);
for
(
CopyrightOwner
copyrightOwner
:
page
.
getRecords
())
{
for
(
CopyrightOwner
copyrightOwner
:
page
.
getRecords
())
{
final
List
<
CopyrightOwnerAssetType
>
CopyrightOwnerAssetTypeList
=
this
.
copyrightOwnerAssetTypeService
.
list
(
Wrappers
.<
CopyrightOwnerAssetType
>
lambdaQuery
().
eq
(
CopyrightOwnerAssetType:
:
getCopyrightOwnerId
,
copyrightOwner
.
getId
()));
if
(
CopyrightOwnerTypeEnum
.
ASSET
.
name
().
equals
(
genericPageParam
.
getOwnerType
()))
{
final
List
<
String
>
idList
=
CopyrightOwnerAssetTypeList
.
stream
().
map
(
CopyrightOwnerAssetType:
:
getAssetTypeId
).
collect
(
Collectors
.
toList
());
final
List
<
CopyrightOwnerAssetType
>
CopyrightOwnerAssetTypeList
=
this
.
copyrightOwnerAssetTypeService
.
list
(
Wrappers
.<
CopyrightOwnerAssetType
>
lambdaQuery
().
eq
(
CopyrightOwnerAssetType:
:
getCopyrightOwnerId
,
copyrightOwner
.
getId
()));
List
<
AssetType
>
assetTypeList
=
this
.
assetTypeService
.
listByIds
(
idList
);
final
List
<
String
>
idList
=
CopyrightOwnerAssetTypeList
.
stream
().
map
(
CopyrightOwnerAssetType:
:
getAssetTypeId
).
collect
(
Collectors
.
toList
());
final
String
assetTypeNameList
=
assetTypeList
.
stream
().
map
(
AssetType:
:
getName
).
collect
(
Collectors
.
joining
(
"、"
));
List
<
AssetType
>
assetTypeList
=
this
.
assetTypeService
.
listByIds
(
idList
);
copyrightOwner
.
setAssetTypeNames
(
assetTypeNameList
);
final
String
assetTypeNameList
=
assetTypeList
.
stream
().
map
(
AssetType:
:
getName
).
collect
(
Collectors
.
joining
(
"、"
));
copyrightOwner
.
setAssetTypeNames
(
assetTypeNameList
);
}
else
if
(
CopyrightOwnerTypeEnum
.
EXHIBITION_BOARD
.
name
().
equals
(
genericPageParam
.
getOwnerType
()))
{
LambdaQueryWrapper
<
ExhibitionBoard
>
lambdaQueryWrapper
=
Wrappers
.<
ExhibitionBoard
>
lambdaQuery
().
eq
(
ExhibitionBoard:
:
getBoardCopyrightOwnerId
,
copyrightOwner
.
getId
());
final
List
<
ExhibitionBoard
>
exhibitionBoardList
=
this
.
exhibitionBoardService
.
list
(
lambdaQueryWrapper
);
final
List
<
String
>
assetTypeIdList
=
exhibitionBoardList
.
stream
().
map
(
ExhibitionBoard:
:
getAssetTypeId
).
collect
(
Collectors
.
toList
());
final
List
<
AssetType
>
assetTypeList
=
this
.
assetTypeService
.
listByIds
(
assetTypeIdList
);
String
assetTypeNames
=
assetTypeList
.
stream
().
map
(
AssetType:
:
getName
).
collect
(
Collectors
.
joining
(
"、"
));
copyrightOwner
.
setAssetTypeNames
(
assetTypeNames
);
}
}
}
return
getResult
(
page
);
return
getResult
(
page
);
}
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardCatController.java
View file @
c4901dd1
...
@@ -156,6 +156,10 @@ public class ExhibitionBoardCatController extends BaseController {
...
@@ -156,6 +156,10 @@ public class ExhibitionBoardCatController extends BaseController {
Page
<
ExhibitionBoardCat
>
page
=
this
.
exhibitionBoardCatService
.
page
(
getPage
(),
queryWrapper
);
Page
<
ExhibitionBoardCat
>
page
=
this
.
exhibitionBoardCatService
.
page
(
getPage
(),
queryWrapper
);
for
(
ExhibitionBoardCat
exhibitionBoardCat
:
page
.
getRecords
())
{
for
(
ExhibitionBoardCat
exhibitionBoardCat
:
page
.
getRecords
())
{
}
}
return
getResult
(
page
);
return
getResult
(
page
);
}
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/FileUploadController.java
View file @
c4901dd1
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
import
cn.hutool.core.util.ArrayUtil
;
import
cn.wisenergy.chnmuseum.party.common.dfs.FastDFSUtils
;
import
cn.wisenergy.chnmuseum.party.common.dfs.FastDFSUtils
;
import
cn.wisenergy.chnmuseum.party.common.enums.FileTypeEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.FileTypeEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.HANDLE_STATUS_ENUM
;
import
cn.wisenergy.chnmuseum.party.common.enums.HANDLE_STATUS_ENUM
;
...
@@ -7,6 +8,7 @@ import cn.wisenergy.chnmuseum.party.common.enums.RESPONSE_CODE_ENUM;
...
@@ -7,6 +8,7 @@ import cn.wisenergy.chnmuseum.party.common.enums.RESPONSE_CODE_ENUM;
import
cn.wisenergy.chnmuseum.party.common.mvc.InterfaceException
;
import
cn.wisenergy.chnmuseum.party.common.mvc.InterfaceException
;
import
cn.wisenergy.chnmuseum.party.common.vo.BatchUploadResVO
;
import
cn.wisenergy.chnmuseum.party.common.vo.BatchUploadResVO
;
import
cn.wisenergy.chnmuseum.party.common.vo.ImageUploadResult
;
import
cn.wisenergy.chnmuseum.party.common.vo.ImageUploadResult
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -37,6 +39,7 @@ import java.util.Objects;
...
@@ -37,6 +39,7 @@ import java.util.Objects;
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/file"
)
@RequestMapping
(
"/file"
)
@Api
(
tags
=
{
"文件上传接口"
})
public
class
FileUploadController
{
public
class
FileUploadController
{
// 允许上传的格式
// 允许上传的格式
...
@@ -46,7 +49,10 @@ public class FileUploadController {
...
@@ -46,7 +49,10 @@ public class FileUploadController {
private
static
final
String
[]
VIDEO_TYPE
=
new
String
[]{
"MP4"
,
"FLV"
};
private
static
final
String
[]
VIDEO_TYPE
=
new
String
[]{
"MP4"
,
"FLV"
};
// 允许上传的格式
// 允许上传的格式
private
static
final
String
[]
DATUM_TYPE
=
new
String
[]{
"PDF"
,
"DOC"
,
"DOCX"
,
"XLS"
,
"XLSX"
,
"PPT"
,
"PPTX"
,
"JPG"
,
"JPEG"
,
"PNG"
,
"BMP"
,
"WBMP"
,
"MP4"
,
"FLV"
};
private
static
final
String
[]
DOC_TYPE
=
new
String
[]{
"PDF"
,
"DOC"
,
"DOCX"
,
"XLS"
,
"XLSX"
,
"PPT"
,
"PPTX"
};
// 允许上传的格式
private
static
final
String
[]
DATUM_TYPE
=
ArrayUtil
.
addAll
(
DOC_TYPE
,
IMAGE_TYPE
,
VIDEO_TYPE
);
// @RequestMapping(value = "/upload", method = RequestMethod.POST)
// @RequestMapping(value = "/upload", method = RequestMethod.POST)
// public ResponseEntity<PicUploadResult> upload(@RequestParam(value = "bc_cover", required = true) MultipartFile uploadFile, HttpServletResponse response) throws Exception {
// public ResponseEntity<PicUploadResult> upload(@RequestParam(value = "bc_cover", required = true) MultipartFile uploadFile, HttpServletResponse response) throws Exception {
...
...
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