Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
bb5a9983
Commit
bb5a9983
authored
Mar 17, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
d726ac9c
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
601 additions
and
235 deletions
+601
-235
AuditStatusEnum.java
...senergy/chnmuseum/party/common/enums/AuditStatusEnum.java
+7
-7
CopyrightOwnerTypeEnum.java
.../chnmuseum/party/common/enums/CopyrightOwnerTypeEnum.java
+37
-0
Asset.java
src/main/java/cn/wisenergy/chnmuseum/party/model/Asset.java
+1
-1
AssetType.java
...in/java/cn/wisenergy/chnmuseum/party/model/AssetType.java
+20
-10
CopyrightOwner.java
...va/cn/wisenergy/chnmuseum/party/model/CopyrightOwner.java
+25
-13
CopytightOwnerAssetType.java
...energy/chnmuseum/party/model/CopytightOwnerAssetType.java
+17
-6
CopytightOwnerBoardType.java
...energy/chnmuseum/party/model/CopytightOwnerBoardType.java
+17
-6
ExhibitionBoard.java
...a/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
+49
-35
ExhibitionBoardCat.java
...n/wisenergy/chnmuseum/party/model/ExhibitionBoardCat.java
+22
-12
AssetController.java
...nergy/chnmuseum/party/web/controller/AssetController.java
+17
-12
AssetTypeController.java
...y/chnmuseum/party/web/controller/AssetTypeController.java
+140
-8
CopyrightOwnerController.java
...museum/party/web/controller/CopyrightOwnerController.java
+148
-8
AssetMapper.xml
src/main/resources/mapper/AssetMapper.xml
+10
-10
AssetTypeMapper.xml
src/main/resources/mapper/AssetTypeMapper.xml
+7
-7
BoardTalkingMapper.xml
src/main/resources/mapper/BoardTalkingMapper.xml
+7
-7
CopyrightOwnerMapper.xml
src/main/resources/mapper/CopyrightOwnerMapper.xml
+9
-9
CopytightOwnerAssetTypeMapper.xml
src/main/resources/mapper/CopytightOwnerAssetTypeMapper.xml
+4
-4
CopytightOwnerBoardTypeMapper.xml
src/main/resources/mapper/CopytightOwnerBoardTypeMapper.xml
+4
-4
ExhibitionBoardCatMapper.xml
src/main/resources/mapper/ExhibitionBoardCatMapper.xml
+8
-8
ExhibitionBoardMapper.xml
src/main/resources/mapper/ExhibitionBoardMapper.xml
+16
-19
LearningContentBoardMapper.xml
src/main/resources/mapper/LearningContentBoardMapper.xml
+4
-4
LearningContentCopyrightOwnerMapper.xml
.../resources/mapper/LearningContentCopyrightOwnerMapper.xml
+4
-4
LearningContentMapper.xml
src/main/resources/mapper/LearningContentMapper.xml
+8
-8
RunLogMapper.xml
src/main/resources/mapper/RunLogMapper.xml
+7
-7
SysLogMapper.xml
src/main/resources/mapper/SysLogMapper.xml
+8
-8
controller.java.vm
src/main/resources/templates/controller.java.vm
+3
-2
entity.java.vm
src/main/resources/templates/entity.java.vm
+1
-1
mapper.xml.vm
src/main/resources/templates/mapper.xml.vm
+1
-15
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/AuditStatusEnum.java
View file @
bb5a9983
...
@@ -5,26 +5,26 @@ package cn.wisenergy.chnmuseum.party.common.enums;
...
@@ -5,26 +5,26 @@ package cn.wisenergy.chnmuseum.party.common.enums;
*/
*/
public
enum
AuditStatusEnum
{
public
enum
AuditStatusEnum
{
TBC
(
"1"
,
"待审核"
),
TBC
(
1
,
"待审核"
),
REFUSED
(
"2"
,
"已驳回"
),
REFUSED
(
2
,
"已驳回"
),
APPROVED_FIRST
(
"3"
,
"初审通过"
);
APPROVED_FIRST
(
3
,
"初审通过"
);
// 错误编码
// 错误编码
private
String
code
;
private
Integer
code
;
// 信息
// 信息
private
String
msg
;
private
String
msg
;
// 相应编码有参构造函数
// 相应编码有参构造函数
AuditStatusEnum
(
String
code
,
String
msg
)
{
AuditStatusEnum
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
code
=
code
;
this
.
msg
=
msg
;
this
.
msg
=
msg
;
}
}
public
String
getCode
()
{
public
Integer
getCode
()
{
return
code
;
return
code
;
}
}
public
void
setCode
(
String
code
)
{
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
this
.
code
=
code
;
}
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/CopyrightOwnerTypeEnum.java
0 → 100644
View file @
bb5a9983
package
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
enums
;
/**
* 版权方类型枚举
*/
public
enum
CopyrightOwnerTypeEnum
{
ASSET
(
1
,
"视频"
),
EXHIBITION_BOARD
(
2
,
"展板"
);
// 错误编码
private
Integer
code
;
// 信息
private
String
type
;
CopyrightOwnerTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
src/main/java/cn/wisenergy/chnmuseum/party/model/Asset.java
View file @
bb5a9983
...
@@ -49,7 +49,7 @@ public class Asset implements Serializable {
...
@@ -49,7 +49,7 @@ public class Asset implements Serializable {
private
String
assetCopyrightOwnerId
;
private
String
assetCopyrightOwnerId
;
@ApiModelProperty
(
"视频类别ID"
)
@ApiModelProperty
(
"视频类别ID"
)
@TableField
(
"asset_type_id"
)
@TableField
(
value
=
"asset_type_id"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
@NotBlank
(
message
=
"视频类别ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"视频类别ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
assetTypeId
;
private
String
assetTypeId
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/AssetType.java
View file @
bb5a9983
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.
Data
;
import
lombok.
*
;
import
lombok.
EqualsAndHashCode
;
import
lombok.
experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -15,37 +19,43 @@ import java.time.LocalDateTime;
...
@@ -15,37 +19,43 @@ import java.time.LocalDateTime;
* </p>
* </p>
*
*
* @author Danny Lee
* @author Danny Lee
* @since 2021-03-1
6
* @since 2021-03-1
7
*/
*/
@Data
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"asset_type"
)
@TableName
(
"asset_type"
)
@ApiModel
(
value
=
"
AssetType对象
"
,
description
=
"视频分类"
)
@ApiModel
(
value
=
"
视频分类
"
,
description
=
"视频分类"
)
public
class
AssetType
implements
Serializable
{
public
class
AssetType
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"视频分类ID"
)
@ApiModelProperty
(
"视频分类ID"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"视频分类ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
private
String
id
;
@ApiModelProperty
(
value
=
"视频分类名称"
)
@ApiModelProperty
(
"视频分类名称"
)
@TableField
(
"name"
)
@TableField
(
"name"
)
@NotBlank
(
message
=
"视频分类名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
"备注"
)
@TableField
(
"remarks"
)
@TableField
(
"remarks"
)
private
String
remarks
;
private
String
remarks
;
@ApiModelProperty
(
value
=
"版权方ID"
)
@ApiModelProperty
(
"版权方ID"
)
@TableField
(
"copyright_owner_id"
)
@TableField
(
"copyright_owner_id"
)
private
String
copyrightOwnerId
;
private
String
copyrightOwnerId
;
@ApiModelProperty
(
value
=
"创建日期"
)
@ApiModelProperty
(
"创建日期"
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
@ApiModelProperty
(
value
=
"更新日期"
)
@ApiModelProperty
(
"更新日期"
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
LocalDateTime
updateTime
;
private
LocalDateTime
updateTime
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/CopyrightOwner.java
View file @
bb5a9983
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.
Data
;
import
lombok.
*
;
import
lombok.
EqualsAndHashCode
;
import
lombok.
experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -15,45 +19,53 @@ import java.time.LocalDateTime;
...
@@ -15,45 +19,53 @@ import java.time.LocalDateTime;
* </p>
* </p>
*
*
* @author Danny Lee
* @author Danny Lee
* @since 2021-03-1
6
* @since 2021-03-1
7
*/
*/
@Data
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"copyright_owner"
)
@TableName
(
"copyright_owner"
)
@ApiModel
(
value
=
"
CopyrightOwner对象
"
,
description
=
"版权方"
)
@ApiModel
(
value
=
"
版权方
"
,
description
=
"版权方"
)
public
class
CopyrightOwner
implements
Serializable
{
public
class
CopyrightOwner
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"版权方ID"
)
@ApiModelProperty
(
"版权方ID"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"版权方ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
private
String
id
;
@ApiModelProperty
(
value
=
"版权方名称"
)
@ApiModelProperty
(
"版权方名称"
)
@TableField
(
"name"
)
@TableField
(
"name"
)
@NotBlank
(
message
=
"版权方名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"版权方类型"
)
@ApiModelProperty
(
"版权方类型"
)
@TableField
(
"owner_type"
)
@TableField
(
"owner_type"
)
private
Integer
ownerType
;
private
String
ownerType
;
@ApiModelProperty
(
value
=
"版权方有效期开始"
)
@ApiModelProperty
(
"版权方有效期开始"
)
@TableField
(
"expire_date_start"
)
@TableField
(
"expire_date_start"
)
@NotNull
(
message
=
"版权方有效期开始不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
LocalDateTime
expireDateStart
;
private
LocalDateTime
expireDateStart
;
@ApiModelProperty
(
value
=
"版权方有效期结束"
)
@ApiModelProperty
(
"版权方有效期结束"
)
@TableField
(
"expire_date_end"
)
@TableField
(
"expire_date_end"
)
@NotNull
(
message
=
"版权方有效期结束不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
LocalDateTime
expireDateEnd
;
private
LocalDateTime
expireDateEnd
;
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
"备注"
)
@TableField
(
"remarks"
)
@TableField
(
"remarks"
)
private
String
remarks
;
private
String
remarks
;
@ApiModelProperty
(
value
=
"创建日期"
)
@ApiModelProperty
(
"创建日期"
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
@ApiModelProperty
(
value
=
"更新日期"
)
@ApiModelProperty
(
"更新日期"
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
LocalDateTime
updateTime
;
private
LocalDateTime
updateTime
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/CopytightOwnerAssetType.java
View file @
bb5a9983
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.
Data
;
import
lombok.
*
;
import
lombok.
EqualsAndHashCode
;
import
lombok.
experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
...
@@ -17,25 +21,32 @@ import java.io.Serializable;
...
@@ -17,25 +21,32 @@ import java.io.Serializable;
* </p>
* </p>
*
*
* @author Danny Lee
* @author Danny Lee
* @since 2021-03-1
6
* @since 2021-03-1
7
*/
*/
@Data
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"copytight_owner_asset_type"
)
@TableName
(
"copytight_owner_asset_type"
)
@ApiModel
(
value
=
"
CopytightOwnerAssetType对象
"
,
description
=
"版权方视频分类"
)
@ApiModel
(
value
=
"
版权方视频分类
"
,
description
=
"版权方视频分类"
)
public
class
CopytightOwnerAssetType
implements
Serializable
{
public
class
CopytightOwnerAssetType
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
private
String
id
;
@ApiModelProperty
(
value
=
"版权方ID"
)
@ApiModelProperty
(
"版权方ID"
)
@TableField
(
"copyright_owner_id"
)
@TableField
(
"copyright_owner_id"
)
@NotBlank
(
message
=
"版权方ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
copyrightOwnerId
;
private
String
copyrightOwnerId
;
@ApiModelProperty
(
value
=
"视频分类ID"
)
@ApiModelProperty
(
"视频分类ID"
)
@TableField
(
"asset_type_id"
)
@TableField
(
"asset_type_id"
)
@NotBlank
(
message
=
"视频分类ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
assetTypeId
;
private
String
assetTypeId
;
}
}
src/main/java/cn/wisenergy/chnmuseum/party/model/CopytightOwnerBoardType.java
View file @
bb5a9983
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.
Data
;
import
lombok.
*
;
import
lombok.
EqualsAndHashCode
;
import
lombok.
experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
...
@@ -17,25 +21,32 @@ import java.io.Serializable;
...
@@ -17,25 +21,32 @@ import java.io.Serializable;
* </p>
* </p>
*
*
* @author Danny Lee
* @author Danny Lee
* @since 2021-03-1
6
* @since 2021-03-1
7
*/
*/
@Data
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"copytight_owner_board_type"
)
@TableName
(
"copytight_owner_board_type"
)
@ApiModel
(
value
=
"
CopytightOwnerBoardType对象
"
,
description
=
"版权方展板分类"
)
@ApiModel
(
value
=
"
版权方展板分类
"
,
description
=
"版权方展板分类"
)
public
class
CopytightOwnerBoardType
implements
Serializable
{
public
class
CopytightOwnerBoardType
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
private
String
id
;
@ApiModelProperty
(
value
=
"版权方ID"
)
@ApiModelProperty
(
"版权方ID"
)
@TableField
(
"copyright_owner_id"
)
@TableField
(
"copyright_owner_id"
)
@NotBlank
(
message
=
"版权方ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
copyrightOwnerId
;
private
String
copyrightOwnerId
;
@ApiModelProperty
(
value
=
"展板分类ID"
)
@ApiModelProperty
(
"展板分类ID"
)
@TableField
(
"board_type_id"
)
@TableField
(
"board_type_id"
)
@NotBlank
(
message
=
"展板分类ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
boardTypeId
;
private
String
boardTypeId
;
}
}
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
View file @
bb5a9983
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.Version
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
com.baomidou.mybatisplus.annotations.Version
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
java
.io.Serializable
;
import
java
x.validation.constraints.NotNull
;
import
java.time.LocalDateTime
;
import
com.baomidou.mybatisplus.annotation.TableField
;
/**
/**
* <p>
* <p>
...
@@ -16,7 +30,7 @@ import java.time.LocalDateTime;
...
@@ -16,7 +30,7 @@ import java.time.LocalDateTime;
* </p>
* </p>
*
*
* @author Danny Lee
* @author Danny Lee
* @since 2021-03-1
6
* @since 2021-03-1
7
*/
*/
@Data
@Data
@Builder
@Builder
...
@@ -25,75 +39,75 @@ import java.time.LocalDateTime;
...
@@ -25,75 +39,75 @@ import java.time.LocalDateTime;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"exhibition_board"
)
@TableName
(
"exhibition_board"
)
@ApiModel
(
value
=
"
ExhibitionBoard对象
"
,
description
=
"展板"
)
@ApiModel
(
value
=
"
展板
"
,
description
=
"展板"
)
public
class
ExhibitionBoard
implements
Serializable
{
public
class
ExhibitionBoard
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
"展板内容ID"
)
@ApiModelProperty
(
"展板内容ID"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"展板内容IDID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
private
String
id
;
@ApiModelProperty
(
"展板分类名称"
)
@ApiModelProperty
(
"展板分类名称"
)
@TableField
(
"name"
)
@TableField
(
"name"
)
@NotBlank
(
message
=
"展板分类名称不能为空"
)
@NotBlank
(
message
=
"展板分类名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
}
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"展板版权方ID"
)
@ApiModelProperty
(
"展板版权方ID"
)
@TableField
(
"
board_
copyright_owner_id"
)
@TableField
(
"copyright_owner_id"
)
@NotBlank
(
message
=
"展板版权方ID不能为空"
)
@NotBlank
(
message
=
"展板版权方ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
}
)
private
String
boardC
opyrightOwnerId
;
private
String
c
opyrightOwnerId
;
@ApiModelProperty
(
"展板分类ID"
)
@ApiModelProperty
(
"展板分类ID"
)
@TableField
(
"exhibition_board_cat_id"
)
@TableField
(
"exhibition_board_cat_id"
)
@NotBlank
(
message
=
"展板分类ID不能为空"
)
@NotBlank
(
message
=
"展板分类ID不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
}
)
private
String
exhibitionBoardCatId
;
private
String
exhibitionBoardCatId
;
@ApiModelProperty
(
"展板图片URL"
)
@ApiModelProperty
(
"展板图片URL"
)
@TableField
(
"board_img_url"
)
@TableField
(
"board_img_url"
)
@NotBlank
(
message
=
"展板图片URL不能为空"
)
@NotBlank
(
message
=
"展板图片URL不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
}
)
private
String
boardImgUrl
;
private
String
boardImgUrl
;
@ApiModelProperty
(
"展板二维码URL"
)
@ApiModelProperty
(
"展板二维码URL"
)
@TableField
(
"board_qrcode_url"
)
@TableField
(
"board_qrcode_url"
)
@NotBlank
(
message
=
"展板二维码URL不能为空"
)
@NotBlank
(
message
=
"展板二维码URL不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
}
)
private
String
boardQrcodeUrl
;
private
String
boardQrcodeUrl
;
@ApiModelProperty
(
"简介"
)
@ApiModelProperty
(
"简介"
)
@TableField
(
"introduction"
)
@TableField
(
"introduction"
)
@NotBlank
(
message
=
"简介不能为空"
)
@NotBlank
(
message
=
"简介不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
introduction
;
private
String
introduction
;
@ApiModelProperty
(
"视频版权方ID"
)
@TableField
(
"asset_copyright_owner_id"
)
private
String
assetCopyrightOwnerId
;
@ApiModelProperty
(
"视频类别ID"
)
@ApiModelProperty
(
"视频类别ID"
)
@TableField
(
"asset_type"
)
@TableField
(
"asset_type"
)
private
String
assetType
;
private
String
assetType
;
@ApiModelProperty
(
"视频ID"
)
@ApiModelProperty
(
"视频ID"
)
@TableField
(
"asset_id"
)
@TableField
(
"asset_id"
)
private
String
assetId
;
private
String
assetId
;
@ApiModelProperty
(
"导览音频URL"
)
@ApiModelProperty
(
"导览音频URL"
)
@TableField
(
"guide_audio_url"
)
@TableField
(
"guide_audio_url"
)
private
String
guideAudioUrl
;
private
String
guideAudioUrl
;
@ApiModelProperty
(
"参考资料"
)
@ApiModelProperty
(
"参考资料"
)
@TableField
(
"reference_material"
)
@TableField
(
"reference_material"
)
private
String
referenceMaterial
;
private
String
referenceMaterial
;
@ApiModelProperty
(
"创建日期"
)
@ApiModelProperty
(
"创建日期"
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"修改日期"
)
@ApiModelProperty
(
"修改日期"
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
LocalDateTime
updateTime
;
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"审核状态"
)
@ApiModelProperty
(
"审核状态"
)
@TableField
(
"audit_status"
)
@TableField
(
"audit_status"
)
private
String
auditStatus
;
private
String
auditStatus
;
}
}
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoardCat.java
View file @
bb5a9983
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
model
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.
Data
;
import
lombok.
*
;
import
lombok.
EqualsAndHashCode
;
import
lombok.
experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -15,37 +19,43 @@ import java.time.LocalDateTime;
...
@@ -15,37 +19,43 @@ import java.time.LocalDateTime;
* </p>
* </p>
*
*
* @author Danny Lee
* @author Danny Lee
* @since 2021-03-1
6
* @since 2021-03-1
7
*/
*/
@Data
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"exhibition_board_cat"
)
@TableName
(
"exhibition_board_cat"
)
@ApiModel
(
value
=
"
ExhibitionBoardCat对象
"
,
description
=
"展板分类"
)
@ApiModel
(
value
=
"
展板分类
"
,
description
=
"展板分类"
)
public
class
ExhibitionBoardCat
implements
Serializable
{
public
class
ExhibitionBoardCat
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
ASSIGN_ID
)
@NotNull
(
message
=
"ID不能为空"
,
groups
=
{
Update
.
class
})
private
String
id
;
private
String
id
;
@ApiModelProperty
(
value
=
"展板分类名称"
)
@ApiModelProperty
(
"展板分类名称"
)
@TableField
(
"name"
)
@TableField
(
"name"
)
@NotBlank
(
message
=
"展板分类名称不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"所属版权方ID"
)
@ApiModelProperty
(
"所属版权方ID"
)
@TableField
(
"copyright_owner"
)
@TableField
(
"copyright_owner"
)
private
String
copyrightOwner
;
private
String
copyrightOwner
;
@ApiModelProperty
(
value
=
"创建日期"
)
@ApiModelProperty
(
"备注"
)
@TableField
(
"remarks"
)
private
String
remarks
;
@ApiModelProperty
(
"创建日期"
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
@TableField
(
value
=
"create_time"
,
fill
=
FieldFill
.
INSERT
)
private
LocalDateTime
createTime
;
private
LocalDateTime
createTime
;
@ApiModelProperty
(
value
=
"修改日期"
)
@ApiModelProperty
(
"修改日期"
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
@TableField
(
value
=
"update_time"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
LocalDateTime
updateTime
;
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
value
=
"备注"
)
@TableField
(
"remarks"
)
private
String
remarks
;
}
}
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AssetController.java
View file @
bb5a9983
...
@@ -47,7 +47,7 @@ import java.util.Map;
...
@@ -47,7 +47,7 @@ import java.util.Map;
*/
*/
@Slf4j
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/
interface/
asset"
)
@RequestMapping
(
"/asset"
)
@Api
(
tags
=
{
"视频操作接口"
})
@Api
(
tags
=
{
"视频操作接口"
})
public
class
AssetController
extends
BaseController
{
public
class
AssetController
extends
BaseController
{
...
@@ -188,11 +188,14 @@ public class AssetController extends BaseController {
...
@@ -188,11 +188,14 @@ public class AssetController extends BaseController {
Asset:
:
getUpdateTime
);
Asset:
:
getUpdateTime
);
Page
<
Asset
>
page
=
this
.
assetService
.
page
(
getPage
(),
queryWrapper
);
Page
<
Asset
>
page
=
this
.
assetService
.
page
(
getPage
(),
queryWrapper
);
for
(
Asset
asset
:
page
.
getRecords
())
{
for
(
Asset
asset
:
page
.
getRecords
())
{
AssetType
assetType
=
this
.
assetTypeService
.
getById
(
asset
.
getAssetTypeId
());
if
(
asset
.
getAssetTypeId
()
!=
null
)
{
asset
.
setAssetTypeName
(
assetType
.
getName
());
AssetType
assetType
=
this
.
assetTypeService
.
getById
(
asset
.
getAssetTypeId
());
asset
.
setAssetTypeName
(
assetType
.
getName
());
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
asset
.
getAssetCopyrightOwnerId
());
}
asset
.
setAssetCopyrightOwnerName
(
copyrightOwner
.
getName
());
if
(
asset
.
getAssetCopyrightOwnerId
()
!=
null
)
{
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
asset
.
getAssetCopyrightOwnerId
());
asset
.
setAssetCopyrightOwnerName
(
copyrightOwner
.
getName
());
}
}
}
return
getResult
(
page
);
return
getResult
(
page
);
}
}
...
@@ -205,12 +208,14 @@ public class AssetController extends BaseController {
...
@@ -205,12 +208,14 @@ public class AssetController extends BaseController {
@RequiresPermissions
(
"asset:get:id"
)
@RequiresPermissions
(
"asset:get:id"
)
public
Map
<
String
,
Object
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
public
Map
<
String
,
Object
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
Asset
asset
=
assetService
.
getById
(
id
);
Asset
asset
=
assetService
.
getById
(
id
);
if
(
asset
.
getAssetTypeId
()
!=
null
)
{
AssetType
assetType
=
this
.
assetTypeService
.
getById
(
asset
.
getAssetTypeId
());
AssetType
assetType
=
this
.
assetTypeService
.
getById
(
asset
.
getAssetTypeId
());
asset
.
setAssetTypeName
(
assetType
.
getName
());
asset
.
setAssetTypeName
(
assetType
.
getName
());
}
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
asset
.
getAssetCopyrightOwnerId
());
if
(
asset
.
getAssetCopyrightOwnerId
()
!=
null
)
{
asset
.
setAssetCopyrightOwnerName
(
copyrightOwner
.
getName
());
CopyrightOwner
copyrightOwner
=
this
.
copyrightOwnerService
.
getById
(
asset
.
getAssetCopyrightOwnerId
());
asset
.
setAssetCopyrightOwnerName
(
copyrightOwner
.
getName
());
}
return
getResult
(
asset
);
return
getResult
(
asset
);
}
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AssetTypeController.java
View file @
bb5a9983
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
org.springframework.web.bind.annotation.RestController
;
import
cn.wisenergy.chnmuseum.party.model.AssetType
;
import
cn.wisenergy.chnmuseum.party.service.AssetService
;
import
cn.wisenergy.chnmuseum.party.service.AssetTypeService
;
import
cn.wisenergy.chnmuseum.party.service.CopyrightOwnerService
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* <p>
* <p
re
>
* 视频分类 前端控制器
* 视频分类 前端控制器
* </p>
* </p
re
>
*
*
* @author Danny Lee
* @author Danny Lee
* @since 2021-03-1
6
* @since 2021-03-1
7
*/
*/
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/party/asset-type"
)
@RequestMapping
(
"/assetType"
)
@Api
(
tags
=
{
"视频分类操作接口"
})
public
class
AssetTypeController
extends
BaseController
{
public
class
AssetTypeController
extends
BaseController
{
@Resource
private
AssetTypeService
assetTypeService
;
@Resource
private
AssetService
assetService
;
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
@PostMapping
(
"/save"
)
@RequiresPermissions
(
"asset:type:save"
)
@ApiOperation
(
value
=
"添加视频分类"
,
notes
=
"添加视频分类"
)
public
Map
<
String
,
Object
>
saveAssetType
(
@Validated
(
value
=
{
Add
.
class
})
AssetType
assetType
)
{
// 保存业务节点信息
boolean
result
=
assetTypeService
.
save
(
assetType
);
// 返回操作结果
if
(
result
)
{
return
getSuccessResult
();
}
else
{
// 保存失败
return
getFailResult
();
}
}
@PutMapping
(
"/update"
)
@RequiresPermissions
(
"asset:type:update"
)
@ApiOperation
(
value
=
"修改视频分类信息"
,
notes
=
"修改视频分类信息"
)
public
Map
<
String
,
Object
>
updateAssetType
(
@Validated
AssetType
assetType
)
{
boolean
flag
=
assetTypeService
.
updateById
(
assetType
);
if
(
flag
)
{
return
getSuccessResult
();
}
return
getFailResult
();
}
@DeleteMapping
(
"/delete/{id}"
)
@RequiresPermissions
(
"asset:type:delete"
)
@ApiOperation
(
value
=
"根据ID删除视频分类"
,
notes
=
"根据ID删除视频分类"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"path"
,
dataType
=
"String"
)
})
public
Map
<
String
,
Object
>
deleteAssetType
(
@PathVariable
(
"id"
)
String
id
)
{
boolean
result1
=
assetTypeService
.
removeById
(
id
);
// Asset entity = new Asset();
// entity.setAssetTypeId(null);
LambdaUpdateWrapper
<
Asset
>
updateWrapper
=
Wrappers
.<
Asset
>
lambdaUpdate
().
eq
(
Asset:
:
getAssetTypeId
,
id
);
updateWrapper
.
set
(
Asset:
:
getAssetTypeId
,
null
);
boolean
result2
=
this
.
assetService
.
update
(
updateWrapper
);
if
(
result1
&&
result2
)
{
return
getSuccessResult
();
}
return
getFailResult
();
}
@GetMapping
(
"/getList"
)
@RequiresPermissions
(
"asset:type:list"
)
@ApiOperation
(
value
=
"获取视频分类全部列表(无分页)"
,
notes
=
"获取视频分类全部列表(无分页)"
)
public
Map
<
String
,
Object
>
getAssetTypeList
()
{
List
<
AssetType
>
assetTypeList
=
assetTypeService
.
list
();
return
getResult
(
assetTypeList
);
}
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/getPageList"
)
@RequiresPermissions
(
"asset:type:page"
)
@ApiOperation
(
value
=
"获取视频分类分页列表"
,
notes
=
"获取视频分类分页列表"
)
public
Map
<
String
,
Object
>
getAssetTypePageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
AssetType
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
queryWrapper
.
like
(
AssetType:
:
getName
,
genericPageParam
.
getNameOrCode
());
}
// 根据创建时间区间检索
if
(
genericPageParam
.
getStartDate
()
!=
null
&&
genericPageParam
.
getEndDate
()
!=
null
)
{
queryWrapper
.
ge
(
AssetType:
:
getCreateTime
,
genericPageParam
.
getStartDate
().
atTime
(
0
,
0
,
0
))
.
le
(
AssetType:
:
getCreateTime
,
genericPageParam
.
getEndDate
().
atTime
(
23
,
59
,
59
));
}
// 设置排序规则
queryWrapper
.
orderByDesc
(
AssetType:
:
getCreateTime
);
// 设置查询内容
queryWrapper
.
select
(
AssetType:
:
getId
,
AssetType:
:
getName
,
AssetType:
:
getCreateTime
,
AssetType:
:
getUpdateTime
);
Page
<
AssetType
>
page
=
this
.
assetTypeService
.
page
(
getPage
(),
queryWrapper
);
for
(
AssetType
assetType
:
page
.
getRecords
())
{
}
return
getResult
(
page
);
}
@ApiOperation
(
value
=
"获取视频分类详情"
,
notes
=
"获取视频分类详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
)
})
@GetMapping
(
"/get/{id}"
)
@RequiresPermissions
(
"asset:type:get:id"
)
public
Map
<
String
,
Object
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
AssetType
assetType
=
assetTypeService
.
getById
(
id
);
return
getResult
(
assetType
);
}
}
}
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/CopyrightOwnerController.java
View file @
bb5a9983
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
import
cn.wisenergy.chnmuseum.party.common.enums.CopyrightOwnerTypeEnum
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
org.springframework.web.bind.annotation.RestController
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.model.Asset
;
import
cn.wisenergy.chnmuseum.party.model.CopyrightOwner
;
import
cn.wisenergy.chnmuseum.party.model.ExhibitionBoard
;
import
cn.wisenergy.chnmuseum.party.service.AssetService
;
import
cn.wisenergy.chnmuseum.party.service.CopyrightOwnerService
;
import
cn.wisenergy.chnmuseum.party.service.ExhibitionBoardService
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* <p>
* <p
re
>
* 版权方 前端控制器
* 版权方 前端控制器
* </p>
* </p
re
>
*
*
* @author Danny Lee
* @author Danny Lee
* @since 2021-03-1
6
* @since 2021-03-1
7
*/
*/
@Slf4j
@RestController
@RestController
@RequestMapping
(
"/party/copyright-owner"
)
@RequestMapping
(
"/copyrightOwner"
)
@Api
(
tags
=
{
"版权方操作接口"
})
public
class
CopyrightOwnerController
extends
BaseController
{
public
class
CopyrightOwnerController
extends
BaseController
{
@Resource
private
CopyrightOwnerService
copyrightOwnerService
;
@Resource
private
AssetService
assetService
;
@Resource
private
ExhibitionBoardService
exhibitionBoardService
;
@PostMapping
(
"/save"
)
@RequiresPermissions
(
"copyright:owner:save"
)
@ApiOperation
(
value
=
"添加版权方"
,
notes
=
"添加版权方"
)
public
Map
<
String
,
Object
>
saveCopyrightOwner
(
@Validated
(
value
=
{
Add
.
class
})
CopyrightOwner
copyrightOwner
,
@RequestParam
(
"copyrightOwnerType"
)
CopyrightOwnerTypeEnum
copyrightOwnerTypeEnum
)
{
copyrightOwner
.
setOwnerType
(
copyrightOwnerTypeEnum
.
name
());
// 保存业务节点信息
boolean
result
=
copyrightOwnerService
.
save
(
copyrightOwner
);
// 返回操作结果
if
(
result
)
{
return
getSuccessResult
();
}
else
{
// 保存失败
return
getFailResult
();
}
}
@PutMapping
(
"/update"
)
@RequiresPermissions
(
"copyright:owner:update"
)
@ApiOperation
(
value
=
"修改版权方信息"
,
notes
=
"修改版权方信息"
)
public
Map
<
String
,
Object
>
updateCopyrightOwner
(
@Validated
(
value
=
{
Update
.
class
})
CopyrightOwner
copyrightOwner
,
@RequestParam
(
"copyrightOwnerType"
)
CopyrightOwnerTypeEnum
copyrightOwnerTypeEnum
)
{
copyrightOwner
.
setOwnerType
(
copyrightOwnerTypeEnum
.
name
());
boolean
flag
=
copyrightOwnerService
.
updateById
(
copyrightOwner
);
if
(
flag
)
{
return
getSuccessResult
();
}
return
getFailResult
();
}
@DeleteMapping
(
"/delete/{id}"
)
@RequiresPermissions
(
"copyright:owner:delete"
)
@ApiOperation
(
value
=
"根据ID删除版权方"
,
notes
=
"根据ID删除版权方"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"path"
,
dataType
=
"String"
)
})
public
Map
<
String
,
Object
>
deleteCopyrightOwner
(
@PathVariable
(
"id"
)
String
id
)
{
boolean
result
=
copyrightOwnerService
.
removeById
(
id
);
LambdaUpdateWrapper
<
Asset
>
updateWrapper1
=
Wrappers
.<
Asset
>
lambdaUpdate
().
eq
(
Asset:
:
getAssetCopyrightOwnerId
,
id
);
updateWrapper1
.
set
(
Asset:
:
getAssetCopyrightOwnerId
,
null
);
boolean
result1
=
this
.
assetService
.
update
(
updateWrapper1
);
LambdaUpdateWrapper
<
ExhibitionBoard
>
updateWrapper
=
Wrappers
.<
ExhibitionBoard
>
lambdaUpdate
().
eq
(
ExhibitionBoard:
:
getCopyrightOwnerId
,
id
);
updateWrapper
.
set
(
ExhibitionBoard:
:
getCopyrightOwnerId
,
null
);
boolean
result2
=
this
.
exhibitionBoardService
.
update
(
updateWrapper
);
if
(
result
&&
result1
&&
result2
)
{
return
getSuccessResult
();
}
return
getFailResult
();
}
@GetMapping
(
"/getList"
)
@RequiresPermissions
(
"copyright:owner:list"
)
@ApiOperation
(
value
=
"获取版权方全部列表(无分页)"
,
notes
=
"获取版权方全部列表(无分页)"
)
public
Map
<
String
,
Object
>
getCopyrightOwnerList
()
{
List
<
CopyrightOwner
>
copyrightOwnerList
=
copyrightOwnerService
.
list
(
Wrappers
.<
CopyrightOwner
>
lambdaQuery
());
return
getResult
(
copyrightOwnerList
);
}
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@PostMapping
(
"/getPageList"
)
@RequiresPermissions
(
"copyright:owner:page"
)
@ApiOperation
(
value
=
"获取版权方分页列表"
,
notes
=
"获取版权方分页列表"
)
public
Map
<
String
,
Object
>
getCopyrightOwnerPageList
(
GenericPageParam
genericPageParam
)
{
LambdaQueryWrapper
<
CopyrightOwner
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
queryWrapper
.
like
(
CopyrightOwner:
:
getName
,
genericPageParam
.
getNameOrCode
());
}
// 根据创建时间区间检索
if
(
genericPageParam
.
getStartDate
()
!=
null
&&
genericPageParam
.
getEndDate
()
!=
null
)
{
queryWrapper
.
ge
(
CopyrightOwner:
:
getCreateTime
,
genericPageParam
.
getStartDate
().
atTime
(
0
,
0
,
0
))
.
le
(
CopyrightOwner:
:
getCreateTime
,
genericPageParam
.
getEndDate
().
atTime
(
23
,
59
,
59
));
}
// 设置排序规则
queryWrapper
.
orderByDesc
(
CopyrightOwner:
:
getCreateTime
);
// 设置查询内容
queryWrapper
.
select
(
CopyrightOwner:
:
getId
,
CopyrightOwner:
:
getName
,
CopyrightOwner:
:
getCreateTime
,
CopyrightOwner:
:
getUpdateTime
);
Page
<
CopyrightOwner
>
page
=
this
.
copyrightOwnerService
.
page
(
getPage
(),
queryWrapper
);
for
(
CopyrightOwner
copyrightOwner
:
page
.
getRecords
())
{
}
return
getResult
(
page
);
}
@ApiOperation
(
value
=
"获取版权方详情"
,
notes
=
"获取版权方详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
)
})
@GetMapping
(
"/get/{id}"
)
@RequiresPermissions
(
"copyright:owner:get:id"
)
public
Map
<
String
,
Object
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
CopyrightOwner
copyrightOwner
=
copyrightOwnerService
.
getById
(
id
);
return
getResult
(
copyrightOwner
);
}
}
}
src/main/resources/mapper/AssetMapper.xml
View file @
bb5a9983
...
@@ -4,16 +4,16 @@
...
@@ -4,16 +4,16 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.Asset"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.Asset"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"asset_copyright_owner_id"
property=
"assetCopyrightOwnerId"
/>
<result
column=
"asset_copyright_owner_id"
property=
"assetCopyrightOwnerId"
/>
<result
column=
"asset_type_id"
property=
"assetTypeId"
/>
<result
column=
"asset_type_id"
property=
"assetTypeId"
/>
<result
column=
"thumbnail"
property=
"thumbnail"
/>
<result
column=
"thumbnail"
property=
"thumbnail"
/>
<result
column=
"video_url"
property=
"videoUrl"
/>
<result
column=
"video_url"
property=
"videoUrl"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/AssetTypeMapper.xml
View file @
bb5a9983
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.AssetType"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.AssetType"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/BoardTalkingMapper.xml
View file @
bb5a9983
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.BoardTalking"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.BoardTalking"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"board_id"
property=
"boardId"
/>
<result
column=
"board_id"
property=
"boardId"
/>
<result
column=
"real_name"
property=
"realName"
/>
<result
column=
"real_name"
property=
"realName"
/>
<result
column=
"comment"
property=
"comment"
/>
<result
column=
"comment"
property=
"comment"
/>
<result
column=
"asset"
property=
"asset"
/>
<result
column=
"asset"
property=
"asset"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/CopyrightOwnerMapper.xml
View file @
bb5a9983
...
@@ -4,15 +4,15 @@
...
@@ -4,15 +4,15 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.CopyrightOwner"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.CopyrightOwner"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"owner_type"
property=
"ownerType"
/>
<result
column=
"owner_type"
property=
"ownerType"
/>
<result
column=
"expire_date_start"
property=
"expireDateStart"
/>
<result
column=
"expire_date_start"
property=
"expireDateStart"
/>
<result
column=
"expire_date_end"
property=
"expireDateEnd"
/>
<result
column=
"expire_date_end"
property=
"expireDateEnd"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/CopytightOwnerAssetTypeMapper.xml
View file @
bb5a9983
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.CopytightOwnerAssetType"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.CopytightOwnerAssetType"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"asset_type_id"
property=
"assetTypeId"
/>
<result
column=
"asset_type_id"
property=
"assetTypeId"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/CopytightOwnerBoardTypeMapper.xml
View file @
bb5a9983
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.CopytightOwnerBoardType"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.CopytightOwnerBoardType"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"board_type_id"
property=
"boardTypeId"
/>
<result
column=
"board_type_id"
property=
"boardTypeId"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/ExhibitionBoardCatMapper.xml
View file @
bb5a9983
...
@@ -4,17 +4,17 @@
...
@@ -4,17 +4,17 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.ExhibitionBoardCat"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.ExhibitionBoardCat"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"copyright_owner"
property=
"copyrightOwner"
/>
<result
column=
"copyright_owner"
property=
"copyrightOwner"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, name, copyright_owner,
create_time, update_time, remarks
id, name, copyright_owner,
remarks, create_time, update_time
</sql>
</sql>
</mapper>
</mapper>
src/main/resources/mapper/ExhibitionBoardMapper.xml
View file @
bb5a9983
...
@@ -4,28 +4,25 @@
...
@@ -4,28 +4,25 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.ExhibitionBoard"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.ExhibitionBoard"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"board_copyright_owner_id"
property=
"boardCopyrightOwnerId"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"exhibition_board_cat_id"
property=
"exhibitionBoardCatId"
/>
<result
column=
"exhibition_board_cat_id"
property=
"exhibitionBoardCatId"
/>
<result
column=
"board_img_url"
property=
"boardImgUrl"
/>
<result
column=
"board_img_url"
property=
"boardImgUrl"
/>
<result
column=
"board_qrcode_url"
property=
"boardQrcodeUrl"
/>
<result
column=
"board_qrcode_url"
property=
"boardQrcodeUrl"
/>
<result
column=
"introduction"
property=
"introduction"
/>
<result
column=
"introduction"
property=
"introduction"
/>
<result
column=
"asset_copyright_owner_id"
property=
"assetCopyrightOwnerId"
/>
<result
column=
"asset_type"
property=
"assetType"
/>
<result
column=
"asset_type"
property=
"assetType"
/>
<result
column=
"asset_id"
property=
"assetId"
/>
<result
column=
"asset_id"
property=
"assetId"
/>
<result
column=
"guide_audio_url"
property=
"guideAudioUrl"
/>
<result
column=
"guide_audio_url"
property=
"guideAudioUrl"
/>
<result
column=
"reference_material"
property=
"referenceMaterial"
/>
<result
column=
"reference_material"
property=
"referenceMaterial"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, name, board_copyright_owner_id, exhibition_board_cat_id, board_img_url, board_qrcode_url, introduction,
id, name, copyright_owner_id, exhibition_board_cat_id, board_img_url, board_qrcode_url, introduction, asset_type, asset_id, guide_audio_url, reference_material, create_time, update_time, audit_status
asset_copyright_owner_id, asset_type, asset_id, guide_audio_url, reference_material, create_time, update_time,
audit_status
</sql>
</sql>
</mapper>
</mapper>
src/main/resources/mapper/LearningContentBoardMapper.xml
View file @
bb5a9983
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.LearningContentBoard"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.LearningContentBoard"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"learning_content_id"
property=
"learningContentId"
/>
<result
column=
"learning_content_id"
property=
"learningContentId"
/>
<result
column=
"exhibition_board_id"
property=
"exhibitionBoardId"
/>
<result
column=
"exhibition_board_id"
property=
"exhibitionBoardId"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/LearningContentCopyrightOwnerMapper.xml
View file @
bb5a9983
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.LearningContentCopyrightOwner"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.LearningContentCopyrightOwner"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"learning_content_id"
property=
"learningContentId"
/>
<result
column=
"learning_content_id"
property=
"learningContentId"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
<result
column=
"copyright_owner_id"
property=
"copyrightOwnerId"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/LearningContentMapper.xml
View file @
bb5a9983
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.LearningContent"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.LearningContent"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"avartar"
property=
"avartar"
/>
<result
column=
"avartar"
property=
"avartar"
/>
<result
column=
"applicable_scope"
property=
"applicableScope"
/>
<result
column=
"applicable_scope"
property=
"applicableScope"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"audit_status"
property=
"auditStatus"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/RunLogMapper.xml
View file @
bb5a9983
...
@@ -4,13 +4,13 @@
...
@@ -4,13 +4,13 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.RunLog"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.RunLog"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"mac_addr"
property=
"macAddr"
/>
<result
column=
"mac_addr"
property=
"macAddr"
/>
<result
column=
"organ_id"
property=
"organId"
/>
<result
column=
"organ_id"
property=
"organId"
/>
<result
column=
"learning_content_id"
property=
"learningContentId"
/>
<result
column=
"learning_content_id"
property=
"learningContentId"
/>
<result
column=
"start_time"
property=
"startTime"
/>
<result
column=
"start_time"
property=
"startTime"
/>
<result
column=
"end_time"
property=
"endTime"
/>
<result
column=
"end_time"
property=
"endTime"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/mapper/SysLogMapper.xml
View file @
bb5a9983
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.SysLog"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.wisenergy.chnmuseum.party.model.SysLog"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"operator"
property=
"operator"
/>
<result
column=
"operator"
property=
"operator"
/>
<result
column=
"operation_type"
property=
"operationType"
/>
<result
column=
"operation_type"
property=
"operationType"
/>
<result
column=
"operation_object"
property=
"operationObject"
/>
<result
column=
"operation_object"
property=
"operationObject"
/>
<result
column=
"operation_content"
property=
"operationContent"
/>
<result
column=
"operation_content"
property=
"operationContent"
/>
<result
column=
"operation_time"
property=
"operationTime"
/>
<result
column=
"operation_time"
property=
"operationTime"
/>
<result
column=
"operation_ip"
property=
"operationIp"
/>
<result
column=
"operation_ip"
property=
"operationIp"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
...
...
src/main/resources/templates/controller.java.vm
View file @
bb5a9983
...
@@ -10,6 +10,7 @@ import ${package.Entity}.${entity};
...
@@ -10,6 +10,7 @@ import ${package.Entity}.${entity};
import
${
package
.
Service
}.${
table
.
serviceName
};
import
${
package
.
Service
}.${
table
.
serviceName
};
import
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
enums
.
AuditStatusEnum
;
import
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
enums
.
AuditStatusEnum
;
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
.
vo
.
GenericPageParam
;
import
cn
.
wisenergy
.
chnmuseum
.
party
.
common
.
vo
.
GenericPageParam
;
#
if
(${
swagger2
})
#
if
(${
swagger2
})
...
@@ -45,7 +46,7 @@ import java.util.Map;
...
@@ -45,7 +46,7 @@ import java.util.Map;
#
else
#
else
@
Controller
@
Controller
#
end
#
end
@
RequestMapping
(
"/
interface/
${table.entityPath}"
)
@
RequestMapping
(
"/${table.entityPath}"
)
@
Api
(
tags
=
{
"$!{table.comment}操作接口"
})
@
Api
(
tags
=
{
"$!{table.comment}操作接口"
})
#
if
(${
kotlin
})
#
if
(${
kotlin
})
class
${
table
.
controllerName
}#
if
(${
superControllerClass
})
:
${
superControllerClass
}()#
end
class
${
table
.
controllerName
}#
if
(${
superControllerClass
})
:
${
superControllerClass
}()#
end
...
@@ -98,7 +99,7 @@ public class ${table.controllerName} {
...
@@ -98,7 +99,7 @@ public class ${table.controllerName} {
@
RequiresPermissions
(
"$!{cfg.colonTableName}:update"
)
@
RequiresPermissions
(
"$!{cfg.colonTableName}:update"
)
#
end
#
end
@
ApiOperation
(
value
=
"修改$!{table.comment}信息"
,
notes
=
"修改$!{table.comment}信息"
)
@
ApiOperation
(
value
=
"修改$!{table.comment}信息"
,
notes
=
"修改$!{table.comment}信息"
)
public
Map
<
String
,
Object
>
update
${
entity
}(#
if
(${
cfg
.
paramValidation
})@
Validated
#
end
${
entity
}
${
cfg
.
entityObjectName
})
{
public
Map
<
String
,
Object
>
update
${
entity
}(#
if
(${
cfg
.
paramValidation
})@
Validated
(
value
=
{
Update
.
class
})
#
end
${
entity
}
${
cfg
.
entityObjectName
})
{
#
if
(${
cfg
.
generatorStrategy
}
==
'ALL'
)
#
if
(${
cfg
.
generatorStrategy
}
==
'ALL'
)
boolean
flag
=
${
table
.
entityPath
}
Service
.
update
${
entity
}(${
cfg
.
entityObjectName
});
boolean
flag
=
${
table
.
entityPath
}
Service
.
update
${
entity
}(${
cfg
.
entityObjectName
});
#
else
#
else
...
...
src/main/resources/templates/entity.java.vm
View file @
bb5a9983
...
@@ -87,7 +87,7 @@ public class ${entity} implements Serializable {
...
@@ -87,7 +87,7 @@ public class ${entity} implements Serializable {
#
elseif
(
!$null.isNull(${idType}) && "$!idType" != "")
#
elseif
(
!$null.isNull(${idType}) && "$!idType" != "")
##
设置主键注解
##
设置主键注解
@
TableId
(
value
=
"${field.name}"
,
type
=
IdType
.${
idType
})
@
TableId
(
value
=
"${field.name}"
,
type
=
IdType
.${
idType
})
@
NotNull
(
message
=
"${field.
propertyName}
不能为空"
,
groups
=
{
Update
.
class
})
@
NotNull
(
message
=
"${field.
comment}ID
不能为空"
,
groups
=
{
Update
.
class
})
##
是主键类型
##
是主键类型
#
set
($
custom_is_pk
=
true
)
#
set
($
custom_is_pk
=
true
)
#
elseif
(${
field
.
convert
})
#
elseif
(${
field
.
convert
})
...
...
src/main/resources/templates/mapper.xml.vm
View file @
bb5a9983
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#end
#end
#end
#end
#foreach($field in ${table.commonFields})##生成公共字段
#foreach($field in ${table.commonFields})##生成公共字段
<result
column=
"${field.name}"
property=
"${field.propertyName}"
/>
<result
column=
"${field.name}"
property=
"${field.propertyName}"
/>
#end
#end
#foreach($field in ${table.fields})
#foreach($field in ${table.fields})
#if(!${field.keyFlag})##生成普通字段
#if(!${field.keyFlag})##生成普通字段
...
@@ -33,19 +33,5 @@
...
@@ -33,19 +33,5 @@
#end
#end
${table.fieldNames}
${table.fieldNames}
</sql>
</sql>
#if(${cfg.generatorStrategy})
<select
id=
"get${entity}ById"
resultType=
"${cfg.queryVoPath}"
>
select
<include
refid=
"Base_Column_List"
/>
from ${table.name} where ${cfg.pkIdColumnName} = #{id}
</select>
<select
id=
"get${entity}PageList"
resultType=
"${cfg.queryVoPath}"
>
select
<include
refid=
"Base_Column_List"
/>
from ${table.name}
</select>
#end
</mapper>
</mapper>
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