Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lingxi-lxy-yanshou
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
后端-黄柯铭
lingxi-lxy-yanshou
Commits
e7533ba2
Commit
e7533ba2
authored
Aug 06, 2021
by
fhj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模板服务 -> 活动页需求
parent
b1bea796
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
179 additions
and
0 deletions
+179
-0
ActivityPageWebController.java
...ate/service/controller/web/ActivityPageWebController.java
+62
-0
ActivityPage.java
.../platform/template/service/entity/adorn/ActivityPage.java
+71
-0
SaveActivityPageDTO.java
...m/template/service/model/dto/web/SaveActivityPageDTO.java
+10
-0
ActivityPageQO.java
...xi/platform/template/service/model/qo/ActivityPageQO.java
+4
-0
ActivityPageRepository.java
...m/template/service/repository/ActivityPageRepository.java
+11
-0
ActivityPageWebService.java
.../template/service/service/web/ActivityPageWebService.java
+21
-0
No files found.
platform-template-service/src/main/java/com/ssy/lingxi/platform/template/service/controller/web/ActivityPageWebController.java
0 → 100644
View file @
e7533ba2
package
com
.
ssy
.
lingxi
.
platform
.
template
.
service
.
controller
.
web
;
import
com.ssy.lingxi.common.controller.BaseController
;
import
com.ssy.lingxi.common.response.PageData
;
import
com.ssy.lingxi.common.response.Wrapper
;
import
com.ssy.lingxi.platform.template.service.entity.adorn.ActivityPage
;
import
com.ssy.lingxi.platform.template.service.model.dto.common.IdDTO
;
import
com.ssy.lingxi.platform.template.service.model.dto.web.SaveActivityPageDTO
;
import
com.ssy.lingxi.platform.template.service.model.qo.ActivityPageQO
;
import
com.ssy.lingxi.platform.template.service.service.web.ActivityPageWebService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
/**
* @menu web - 活动页
* @author fhj
* @version 2.0.0
* @date 2021/04/15
*/
@Api
(
tags
=
"web - SEO"
)
@RestController
@RequestMapping
(
"/template/web/activityPage"
)
public
class
ActivityPageWebController
extends
BaseController
{
@Resource
private
ActivityPageWebService
activityPageWebService
;
@ApiOperation
(
value
=
"列表"
)
@GetMapping
(
"/page"
)
public
Wrapper
<
PageData
<
ActivityPage
>>
page
(
@Valid
ActivityPageQO
qo
)
{
return
activityPageWebService
.
page
(
qo
);
}
@ApiOperation
(
value
=
"详情"
)
@GetMapping
(
value
=
"/get"
)
public
Wrapper
<
ActivityPage
>
get
(
@Valid
IdDTO
dto
)
{
return
activityPageWebService
.
get
(
dto
);
}
@ApiOperation
(
value
=
"新增"
)
@PostMapping
(
value
=
"/add"
)
public
Wrapper
<
Void
>
add
(
@RequestBody
@Validated
({
SaveActivityPageDTO
.
Add
.
class
})
SaveActivityPageDTO
dto
)
{
return
activityPageWebService
.
add
(
dto
,
getSysUser
());
}
@ApiOperation
(
value
=
"修改"
)
@PostMapping
(
value
=
"/update"
)
public
Wrapper
<
Void
>
update
(
@RequestBody
@Validated
({
SaveActivityPageDTO
.
Update
.
class
})
SaveActivityPageDTO
dto
)
{
return
activityPageWebService
.
update
(
dto
,
getSysUser
());
}
@ApiOperation
(
value
=
"删除"
)
@PostMapping
(
value
=
"/delete"
)
public
Wrapper
<
Void
>
delete
(
@RequestBody
@Valid
IdDTO
dto
)
{
return
activityPageWebService
.
delete
(
dto
,
getSysUser
());
}
}
platform-template-service/src/main/java/com/ssy/lingxi/platform/template/service/entity/adorn/ActivityPage.java
0 → 100644
View file @
e7533ba2
package
com
.
ssy
.
lingxi
.
platform
.
template
.
service
.
entity
.
adorn
;
import
com.ssy.lingxi.platform.template.service.handler.convert.JpaJsonToJsonObjectConverter
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.*
;
import
java.util.Map
;
/**
* 活动页 - DO
* @author fhj
* @date 2021/08/05
* @version 2.0.0
*/
@Data
@Entity
@Table
(
schema
=
"public"
,
name
=
"pt_activity_page"
)
public
class
ActivityPage
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
SEQUENCE
,
generator
=
"activity_page_seq"
)
@SequenceGenerator
(
sequenceName
=
"pt_activity_page_seq"
,
name
=
"activity_page_seq"
,
allocationSize
=
1
)
@ApiModelProperty
(
value
=
"ID"
)
private
Long
id
;
@Column
(
columnDefinition
=
"varchar(64)"
)
@ApiModelProperty
(
value
=
"活动页名称"
)
private
String
name
;
@Column
(
columnDefinition
=
"int8"
)
@ApiModelProperty
(
value
=
"开始时间"
)
private
Long
startTime
;
@Column
(
columnDefinition
=
"int8"
)
@ApiModelProperty
(
value
=
"结束时间"
)
private
Long
endTime
;
@Column
(
columnDefinition
=
"int2"
)
@ApiModelProperty
(
value
=
"适用环境: 1.WEB 2.H5 3.小程序 4.APP"
)
private
Integer
environment
;
@Column
(
columnDefinition
=
"int8"
)
@ApiModelProperty
(
value
=
"活动模板ID"
)
private
Long
templateId
;
@Column
(
columnDefinition
=
"varchar(20)"
)
@ApiModelProperty
(
value
=
"活动模板名称"
)
private
String
templateName
;
@Column
(
columnDefinition
=
"int8"
)
@ApiModelProperty
(
value
=
"商城ID"
)
private
Long
shopId
;
@Column
(
columnDefinition
=
"varchar(20)"
)
@ApiModelProperty
(
value
=
"商城名称"
)
private
String
shopName
;
@Column
(
columnDefinition
=
"int2"
)
@ApiModelProperty
(
value
=
"状态: 1.待上线 2.已上线 3.进行中 4.已下线 5.已结束"
)
private
Integer
status
;
@Convert
(
converter
=
JpaJsonToJsonObjectConverter
.
class
)
@Column
(
columnDefinition
=
"jsonb"
)
@ApiModelProperty
(
value
=
"装修内容"
)
private
Map
<
String
,
Object
>
adornContent
;
@Column
(
columnDefinition
=
"int8"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Long
createTime
=
System
.
currentTimeMillis
();
}
platform-template-service/src/main/java/com/ssy/lingxi/platform/template/service/model/dto/web/SaveActivityPageDTO.java
0 → 100644
View file @
e7533ba2
package
com
.
ssy
.
lingxi
.
platform
.
template
.
service
.
model
.
dto
.
web
;
public
class
SaveActivityPageDTO
{
public
interface
Add
{
}
public
interface
Update
{
}
}
platform-template-service/src/main/java/com/ssy/lingxi/platform/template/service/model/qo/ActivityPageQO.java
0 → 100644
View file @
e7533ba2
package
com
.
ssy
.
lingxi
.
platform
.
template
.
service
.
model
.
qo
;
public
class
ActivityPageQO
{
}
platform-template-service/src/main/java/com/ssy/lingxi/platform/template/service/repository/ActivityPageRepository.java
0 → 100644
View file @
e7533ba2
package
com
.
ssy
.
lingxi
.
platform
.
template
.
service
.
repository
;
import
com.ssy.lingxi.platform.template.service.entity.adorn.ActivityPage
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.stereotype.Repository
;
@Repository
public
interface
ActivityPageRepository
extends
JpaRepository
<
ActivityPage
,
Long
>
{
}
platform-template-service/src/main/java/com/ssy/lingxi/platform/template/service/service/web/ActivityPageWebService.java
0 → 100644
View file @
e7533ba2
package
com
.
ssy
.
lingxi
.
platform
.
template
.
service
.
service
.
web
;
import
com.ssy.lingxi.common.model.dto.UserLoginCacheDTO
;
import
com.ssy.lingxi.common.response.PageData
;
import
com.ssy.lingxi.common.response.Wrapper
;
import
com.ssy.lingxi.platform.template.service.entity.adorn.ActivityPage
;
import
com.ssy.lingxi.platform.template.service.model.dto.common.IdDTO
;
import
com.ssy.lingxi.platform.template.service.model.dto.web.SaveActivityPageDTO
;
import
com.ssy.lingxi.platform.template.service.model.qo.ActivityPageQO
;
public
interface
ActivityPageWebService
{
Wrapper
<
PageData
<
ActivityPage
>>
page
(
ActivityPageQO
qo
);
Wrapper
<
ActivityPage
>
get
(
IdDTO
dto
);
Wrapper
<
Void
>
add
(
SaveActivityPageDTO
dto
,
UserLoginCacheDTO
sysUser
);
Wrapper
<
Void
>
update
(
SaveActivityPageDTO
dto
,
UserLoginCacheDTO
sysUser
);
Wrapper
<
Void
>
delete
(
IdDTO
dto
,
UserLoginCacheDTO
sysUser
);
}
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