Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
7b20bfe6
Commit
7b20bfe6
authored
Jul 24, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature-reward:礼品分页列表请求方式改为post
parent
3b73581d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
18 deletions
+55
-18
RewardConvert.java
...der/yudao/module/reward/convert/reward/RewardConvert.java
+7
-0
RewardStatusReqVO.java
...oder/yudao/module/reward/vo/reward/RewardStatusReqVO.java
+19
-0
RewardController.java
...dule/reward/controller/admin/reward/RewardController.java
+29
-18
No files found.
yudao-module-reward/yudao-module-reward-api/src/main/java/cn/iocoder/yudao/module/reward/convert/reward/RewardConvert.java
View file @
7b20bfe6
...
...
@@ -51,4 +51,11 @@ public interface RewardConvert {
* @return
*/
PageResult
<
RewardBackVO
>
convertPage
(
PageResult
<
RewardDO
>
page
);
/***
* 更新礼品状态VO转实体
* @param bean
* @return
*/
RewardDO
convertStatusReqVO
(
RewardStatusReqVO
bean
);
}
yudao-module-reward/yudao-module-reward-api/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardStatusReqVO.java
0 → 100644
View file @
7b20bfe6
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
vo
.
reward
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
@Data
@ApiModel
(
"管理后台 - 礼品状态更新 VO"
)
public
class
RewardStatusReqVO
{
@ApiModelProperty
(
value
=
""
,
required
=
true
)
@NotNull
(
message
=
"不能为空"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"礼品状态(1已启用,2未启用,3已关闭,4已过期)"
)
@NotNull
(
message
=
"礼品状态不能为空"
)
private
Integer
status
;
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/admin/reward/RewardController.java
View file @
7b20bfe6
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
controller
.
admin
.
reward
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.annotations.*
;
import
javax.validation.constraints.*
;
import
javax.validation.*
;
import
javax.servlet.http.*
;
import
java.util.*
;
import
java.io.IOException
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.*;
import
cn.iocoder.yudao.module.reward.vo.reward.*
;
import
cn.iocoder.yudao.module.reward.dal.dataobject.reward.RewardDO
;
import
cn.iocoder.yudao.module.reward.convert.reward.RewardConvert
;
import
cn.iocoder.yudao.module.reward.dal.dataobject.reward.RewardDO
;
import
cn.iocoder.yudao.module.reward.service.reward.RewardService
;
import
cn.iocoder.yudao.module.reward.vo.reward.*
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.io.IOException
;
import
java.util.Collection
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
@Validated
@RestController
...
...
@@ -73,14 +76,22 @@ public class RewardController {
return
success
(
RewardConvert
.
INSTANCE
.
convertList
(
list
));
}
@
Ge
tMapping
(
"/page"
)
@
Pos
tMapping
(
"/page"
)
@ApiOperation
(
"获得礼品分页"
)
//@PreAuthorize("@ss.hasPermission('reward::query')")
public
CommonResult
<
PageResult
<
RewardBackVO
>>
getPage
(
@Valid
RewardQueryVO
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
RewardBackVO
>>
getPage
(
@Valid
@RequestBody
RewardQueryVO
query
,
PageVO
page
)
{
PageResult
<
RewardDO
>
pageResult
=
rewardService
.
getPage
(
query
,
page
);
return
success
(
RewardConvert
.
INSTANCE
.
convertPage
(
pageResult
));
}
@PostMapping
(
"/status"
)
@ApiOperation
(
"礼品状态变更"
)
//@PreAuthorize("@ss.hasPermission('reward::query')")
public
CommonResult
<
Boolean
>
updateStatus
(
@Valid
@RequestBody
RewardStatusReqVO
statusVO
)
{
rewardService
.
updateById
(
RewardConvert
.
INSTANCE
.
convertStatusReqVO
(
statusVO
));
return
success
(
true
);
}
@GetMapping
(
"/export-excel"
)
@ApiOperation
(
"导出礼品 Excel"
)
//@PreAuthorize("@ss.hasPermission('reward::export')")
...
...
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