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
8905e998
Commit
8905e998
authored
Mar 23, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
2c27db79
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
104 additions
and
19 deletions
+104
-19
FastDFSUtils.java
...cn/wisenergy/chnmuseum/party/common/dfs/FastDFSUtils.java
+1
-1
ApplicableScopeEnum.java
...rgy/chnmuseum/party/common/enums/ApplicableScopeEnum.java
+33
-0
CodeGenerator.java
...senergy/chnmuseum/party/common/mybatis/CodeGenerator.java
+0
-7
MetaObjectHandlerConfig.java
...nmuseum/party/common/mybatis/MetaObjectHandlerConfig.java
+1
-1
MysqlGenerator.java
...energy/chnmuseum/party/common/mybatis/MysqlGenerator.java
+15
-4
AjaxResult.java
...va/cn/wisenergy/chnmuseum/party/common/vo/AjaxResult.java
+1
-1
AudioVo.java
.../java/cn/wisenergy/chnmuseum/party/common/vo/AudioVo.java
+24
-0
Department.java
...va/cn/wisenergy/chnmuseum/party/common/vo/Department.java
+1
-0
VideoVo.java
.../java/cn/wisenergy/chnmuseum/party/common/vo/VideoVo.java
+25
-0
Index.java
src/main/java/cn/wisenergy/chnmuseum/party/model/Index.java
+0
-2
AssetController.java
...nergy/chnmuseum/party/web/controller/AssetController.java
+3
-3
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/dfs/FastDFSUtils.java
View file @
8905e998
...
@@ -21,8 +21,8 @@ import java.io.InputStream;
...
@@ -21,8 +21,8 @@ import java.io.InputStream;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
@Component
@Slf4j
@Slf4j
@Component
public
class
FastDFSUtils
{
public
class
FastDFSUtils
{
private
static
String
dfsFileAccessBasePath
;
private
static
String
dfsFileAccessBasePath
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/ApplicableScopeEnum.java
0 → 100644
View file @
8905e998
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
enums
;
public
enum
ApplicableScopeEnum
{
ALL_PLAT
(
1
,
"全平台"
),
THIS_ORGAN
(
2
,
"仅本单位"
),
THIS_ORGAN_SUB
(
3
,
"本单位及下属单位"
);
private
Integer
code
;
private
String
msg
;
ApplicableScopeEnum
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
}
src/main/java/cn/wisenergy/chnmuseum/party/common/mybatis/CodeGenerator.java
View file @
8905e998
...
@@ -69,7 +69,6 @@ public class CodeGenerator {
...
@@ -69,7 +69,6 @@ public class CodeGenerator {
* 分页列表查询是否排序 true:有排序参数/false:无
* 分页列表查询是否排序 true:有排序参数/false:无
*/
*/
private
boolean
pageListOrder
=
false
;
private
boolean
pageListOrder
=
false
;
/**
/**
* 是否生成validation校验,true:生成/false:不生成
* 是否生成validation校验,true:生成/false:不生成
*/
*/
...
@@ -94,23 +93,18 @@ public class CodeGenerator {
...
@@ -94,23 +93,18 @@ public class CodeGenerator {
* 分页查询参数父类
* 分页查询参数父类
*/
*/
private
String
superPageParam
;
private
String
superPageParam
;
/**
/**
* 分页排序查询参数父类
* 分页排序查询参数父类
*/
*/
private
String
superPageOrderParam
;
private
String
superPageOrderParam
;
/**
/**
* 分页工具类路径
* 分页工具类路径
*/
*/
private
String
commonPageUtil
;
private
String
commonPageUtil
;
/**
/**
* 实体父类实体列表
* 实体父类实体列表
*/
*/
private
String
[]
superEntityCommonColumns
;
private
String
[]
superEntityCommonColumns
;
// 公共类包路径
/**
/**
* 公共id参数路径
* 公共id参数路径
*/
*/
...
@@ -261,7 +255,6 @@ public class CodeGenerator {
...
@@ -261,7 +255,6 @@ public class CodeGenerator {
// 查询参数类路径
// 查询参数类路径
map
.
put
(
"pageParamPath"
,
paramPackage
+
StringPool
.
DOT
+
pascalTableName
+
"PageParam"
);
map
.
put
(
"pageParamPath"
,
paramPackage
+
StringPool
.
DOT
+
pascalTableName
+
"PageParam"
);
// 查询参数共公包路径
// 查询参数共公包路径
System
.
out
.
println
(
"superPageParam = "
+
superPageParam
);
map
.
put
(
"superPageParamPath"
,
superPageParam
);
map
.
put
(
"superPageParamPath"
,
superPageParam
);
map
.
put
(
"superPageOrderParamPath"
,
superPageOrderParam
);
map
.
put
(
"superPageOrderParamPath"
,
superPageOrderParam
);
map
.
put
(
"commonPageUtilPath"
,
commonPageUtil
);
map
.
put
(
"commonPageUtilPath"
,
commonPageUtil
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/mybatis/MetaObjectHandlerConfig.java
View file @
8905e998
...
@@ -44,7 +44,7 @@ public class MetaObjectHandlerConfig implements MetaObjectHandler {
...
@@ -44,7 +44,7 @@ public class MetaObjectHandlerConfig implements MetaObjectHandler {
// this.setFieldValByName("modifierBy", 111L, metaObject);
// this.setFieldValByName("modifierBy", 111L, metaObject);
}
}
/*
*
/*
* 获取当前登录用户
* 获取当前登录用户
*
*
* @return 用户对象
* @return 用户对象
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/mybatis/MysqlGenerator.java
View file @
8905e998
...
@@ -2,11 +2,22 @@ package cn.wisenergy.chnmuseum.party.common.mybatis;
...
@@ -2,11 +2,22 @@ package cn.wisenergy.chnmuseum.party.common.mybatis;
public
class
MysqlGenerator
{
public
class
MysqlGenerator
{
private
static
final
String
[]
tableNames
=
new
String
[]
{
private
static
final
String
[]
tableNames
=
new
String
[]{
"t_user_role_link"
"asset"
,
"asset_type"
,
"copyright_owner"
,
"copyright_owner_asset_type"
,
"copyright_owner_board_type"
,
"exhibition_board"
,
"exhibition_board_cat"
,
"learning_content"
,
"learning_content_board"
,
"learning_content_board_cat"
,
"learning_content_copyright_owner"
,
"learning_project"
};
};
private
static
final
String
projectPath
=
"D:\\develop\\Project\\chnmuseum-party"
;
//
private static final String projectPath = "D:\\develop\\Project\\chnmuseum-party";
//
private static final String projectPath = "/opt/ss";
private
static
final
String
projectPath
=
"/opt/ss"
;
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
CodeGenerator
codeGenerator
=
new
CodeGenerator
();
CodeGenerator
codeGenerator
=
new
CodeGenerator
();
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/AjaxResult.java
View file @
8905e998
...
@@ -13,7 +13,7 @@ public class AjaxResult {
...
@@ -13,7 +13,7 @@ public class AjaxResult {
/**
/**
* 是否成功
* 是否成功
*/
*/
private
boolean
success
=
true
;
private
boolean
success
;
/**
/**
* 失败或成功的提示信息
* 失败或成功的提示信息
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/AudioVo.java
0 → 100644
View file @
8905e998
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
vo
;
import
lombok.*
;
import
lombok.experimental.Accessors
;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
AudioVo
{
private
String
fileName
;
private
String
fileExtName
;
private
Long
fileSize
;
private
String
fileUrl
;
private
String
language
;
}
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/Department.java
View file @
8905e998
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
vo
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
vo
;
public
class
Department
{
public
class
Department
{
private
Long
id
;
private
Long
id
;
private
String
name
;
private
String
name
;
private
Long
parentId
;
private
Long
parentId
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/
Asset
Vo.java
→
src/main/java/cn/wisenergy/chnmuseum/party/common/vo/
Video
Vo.java
View file @
8905e998
...
@@ -9,46 +9,17 @@ import lombok.experimental.Accessors;
...
@@ -9,46 +9,17 @@ import lombok.experimental.Accessors;
@NoArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
Asset
Vo
{
public
class
Video
Vo
{
private
String
fileName
;
private
String
fileName
;
private
String
fileExt
;
private
String
fileExt
Name
;
private
Long
fileSize
;
private
Long
fileSize
;
private
String
fileUrl
;
private
String
fileUrl
;
public
String
getFileName
()
{
private
String
language
;
return
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
public
String
getFileExt
()
{
return
fileExt
;
}
public
void
setFileExt
(
String
fileExt
)
{
this
.
fileExt
=
fileExt
;
}
public
Long
getFileSize
()
{
return
fileSize
;
}
public
void
setFileSize
(
Long
fileSize
)
{
this
.
fileSize
=
fileSize
;
}
public
String
getFileUrl
()
{
return
fileUrl
;
}
public
void
setFileUrl
(
String
fileUrl
)
{
this
.
fileUrl
=
fileUrl
;
}
}
}
src/main/java/cn/wisenergy/chnmuseum/party/model/Index.java
View file @
8905e998
...
@@ -14,8 +14,6 @@ import java.sql.Timestamp;
...
@@ -14,8 +14,6 @@ import java.sql.Timestamp;
*/
*/
public
class
Index
{
public
class
Index
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"单据id"
)
@ApiModelProperty
(
"单据id"
)
private
String
id
;
private
String
id
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AssetController.java
View file @
8905e998
...
@@ -6,7 +6,7 @@ import cn.wisenergy.chnmuseum.party.common.enums.RESPONSE_CODE_ENUM;
...
@@ -6,7 +6,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.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.
Asset
Vo
;
import
cn.wisenergy.chnmuseum.party.common.vo.
Video
Vo
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.model.AssetType
;
import
cn.wisenergy.chnmuseum.party.model.AssetType
;
...
@@ -76,12 +76,12 @@ public class AssetController extends BaseController {
...
@@ -76,12 +76,12 @@ public class AssetController extends BaseController {
if
(
files
.
length
==
0
)
{
if
(
files
.
length
==
0
)
{
throw
new
InterfaceException
(
RESPONSE_CODE_ENUM
.
REQUEST_PARAMS_ERROR
.
getCode
(),
"视频必须上传"
);
throw
new
InterfaceException
(
RESPONSE_CODE_ENUM
.
REQUEST_PARAMS_ERROR
.
getCode
(),
"视频必须上传"
);
}
}
final
List
<
Asset
Vo
>
filesMetadata
=
new
ArrayList
<>(
2
);
final
List
<
Video
Vo
>
filesMetadata
=
new
ArrayList
<>(
2
);
for
(
MultipartFile
file
:
files
)
{
for
(
MultipartFile
file
:
files
)
{
// 原始文件名
// 原始文件名
String
originalFilename
=
file
.
getOriginalFilename
();
String
originalFilename
=
file
.
getOriginalFilename
();
String
url
=
FastDFSUtils
.
uploadFile
(
file
.
getInputStream
(),
file
.
getSize
(),
originalFilename
);
String
url
=
FastDFSUtils
.
uploadFile
(
file
.
getInputStream
(),
file
.
getSize
(),
originalFilename
);
filesMetadata
.
add
(
AssetVo
.
builder
().
fileName
(
originalFilename
).
fileExt
(
FilenameUtils
.
getExtension
(
originalFilename
))
filesMetadata
.
add
(
VideoVo
.
builder
().
fileName
(
originalFilename
).
fileExtName
(
FilenameUtils
.
getExtension
(
originalFilename
))
.
fileSize
(
file
.
getSize
()).
fileUrl
(
url
).
build
());
.
fileSize
(
file
.
getSize
()).
fileUrl
(
url
).
build
());
}
}
asset
.
setVideoUrl
(
JSONObject
.
toJSONString
(
filesMetadata
));
asset
.
setVideoUrl
(
JSONObject
.
toJSONString
(
filesMetadata
));
...
...
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