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
b9d47982
Commit
b9d47982
authored
Aug 09, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口幂等
parent
9f3e916f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
3 deletions
+13
-3
ScoreRuleController.java
...ember/controller/admin/scoreRule/ScoreRuleController.java
+3
-3
MemberUserScoreController.java
...controller/admin/userScore/MemberUserScoreController.java
+2
-0
UserAddressController.java
.../member/controller/app/address/UserAddressController.java
+2
-0
RedeemRewardController.java
...eward/controller/admin/redeem/RedeemRewardController.java
+3
-0
RewardController.java
...dule/reward/controller/admin/reward/RewardController.java
+3
-0
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/admin/scoreRule/ScoreRuleController.java
View file @
b9d47982
...
@@ -3,10 +3,9 @@ package cn.iocoder.yudao.module.member.controller.admin.scoreRule;
...
@@ -3,10 +3,9 @@ package cn.iocoder.yudao.module.member.controller.admin.scoreRule;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.module.depository.service.warehouse.WarehouseService
;
import
cn.iocoder.yudao.module.depository.vo.warehouse.WarehouseTreeRegionVO
;
import
cn.iocoder.yudao.module.member.api.ScoreProducerApi
;
import
cn.iocoder.yudao.module.member.api.ScoreProducerApi
;
import
cn.iocoder.yudao.module.member.convert.scoreRule.ScoreRuleConvert
;
import
cn.iocoder.yudao.module.member.convert.scoreRule.ScoreRuleConvert
;
import
cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO
;
import
cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO
;
...
@@ -16,7 +15,6 @@ import cn.iocoder.yudao.module.member.vo.scoreRule.*;
...
@@ -16,7 +15,6 @@ import cn.iocoder.yudao.module.member.vo.scoreRule.*;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.collections4.ListUtils
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
...
@@ -49,6 +47,7 @@ public class ScoreRuleController {
...
@@ -49,6 +47,7 @@ public class ScoreRuleController {
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建积分规则"
)
@ApiOperation
(
"创建积分规则"
)
@Idempotent
(
timeout
=
3
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:create')"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:create')"
)
public
CommonResult
<
Long
>
createScoreRule
(
@Valid
@RequestBody
ScoreRuleCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
createScoreRule
(
@Valid
@RequestBody
ScoreRuleCreateReqVO
createReqVO
)
{
return
success
(
scoreRuleService
.
createScoreRule
(
createReqVO
));
return
success
(
scoreRuleService
.
createScoreRule
(
createReqVO
));
...
@@ -105,6 +104,7 @@ public class ScoreRuleController {
...
@@ -105,6 +104,7 @@ public class ScoreRuleController {
@PostMapping
(
"/copy"
)
@PostMapping
(
"/copy"
)
@ApiOperation
(
"复制规则"
)
@ApiOperation
(
"复制规则"
)
@Idempotent
(
timeout
=
3
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:create')"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:create')"
)
public
CommonResult
<
Long
>
copyScoreRule
(
@Valid
@RequestBody
IdReqVo
idReqVo
)
{
public
CommonResult
<
Long
>
copyScoreRule
(
@Valid
@RequestBody
IdReqVo
idReqVo
)
{
return
success
(
scoreRuleService
.
copyScoreRule
(
idReqVo
.
getId
()));
return
success
(
scoreRuleService
.
copyScoreRule
(
idReqVo
.
getId
()));
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/admin/userScore/MemberUserScoreController.java
View file @
b9d47982
...
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.member.controller.admin.userScore;
...
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.member.controller.admin.userScore;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.module.member.api.score.MemberUserScoreApiImpl
;
import
cn.iocoder.yudao.module.member.api.score.MemberUserScoreApiImpl
;
import
cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreBatchOperateReqDTO
;
import
cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreBatchOperateReqDTO
;
import
cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreOperateRespDTO
;
import
cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreOperateRespDTO
;
...
@@ -50,6 +51,7 @@ public class MemberUserScoreController {
...
@@ -50,6 +51,7 @@ public class MemberUserScoreController {
@PostMapping
(
"/operate"
)
@PostMapping
(
"/operate"
)
@ApiOperation
(
"操作积分"
)
@ApiOperation
(
"操作积分"
)
@Idempotent
(
timeout
=
5
)
@PreAuthorize
(
"@ss.hasPermission('member:user-score:operate')"
)
@PreAuthorize
(
"@ss.hasPermission('member:user-score:operate')"
)
public
CommonResult
<
Boolean
>
operate
(
@Valid
@RequestBody
MemberUserScoreOperateQueryVO
query
)
{
public
CommonResult
<
Boolean
>
operate
(
@Valid
@RequestBody
MemberUserScoreOperateQueryVO
query
)
{
Map
<
String
,
Object
>
extParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
extParam
=
new
HashMap
<>();
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/address/UserAddressController.java
View file @
b9d47982
package
cn
.
iocoder
.
yudao
.
module
.
member
.
controller
.
app
.
address
;
package
cn
.
iocoder
.
yudao
.
module
.
member
.
controller
.
app
.
address
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.module.member.convert.address.UserAddressConvert
;
import
cn.iocoder.yudao.module.member.convert.address.UserAddressConvert
;
import
cn.iocoder.yudao.module.member.dal.dataobject.address.UserAddressDO
;
import
cn.iocoder.yudao.module.member.dal.dataobject.address.UserAddressDO
;
import
cn.iocoder.yudao.module.member.service.address.UserAddressService
;
import
cn.iocoder.yudao.module.member.service.address.UserAddressService
;
...
@@ -30,6 +31,7 @@ public class UserAddressController {
...
@@ -30,6 +31,7 @@ public class UserAddressController {
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建会员收货地址"
)
@ApiOperation
(
"创建会员收货地址"
)
@Idempotent
(
timeout
=
5
)
//@PreAuthenticated
//@PreAuthenticated
public
CommonResult
<
Long
>
createUserAddress
(
@Valid
@RequestBody
UserAddressCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
createUserAddress
(
@Valid
@RequestBody
UserAddressCreateReqVO
createReqVO
)
{
return
success
(
userAddressService
.
createUserAddress
(
createReqVO
));
return
success
(
userAddressService
.
createUserAddress
(
createReqVO
));
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/admin/redeem/RedeemRewardController.java
View file @
b9d47982
...
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.reward.controller.admin.redeem;
...
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.reward.controller.admin.redeem;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.module.reward.api.reward.RedeemRewardApi
;
import
cn.iocoder.yudao.module.reward.api.reward.RedeemRewardApi
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardReqVO
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardReqVO
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardRespDTO
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardRespDTO
;
...
@@ -124,6 +125,7 @@ public class RedeemRewardController {
...
@@ -124,6 +125,7 @@ public class RedeemRewardController {
@PostMapping
(
"/single"
)
@PostMapping
(
"/single"
)
@ApiOperation
(
"兑换礼品"
)
@ApiOperation
(
"兑换礼品"
)
@Idempotent
(
timeout
=
5
)
@PreAuthorize
(
"@ss.hasPermission('ecw:giftManagement:exchange')"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:giftManagement:exchange')"
)
public
CommonResult
<
Boolean
>
redeemReward
(
@Valid
@RequestBody
RedeemRewardReqVO
redeemRewardReqVO
)
{
public
CommonResult
<
Boolean
>
redeemReward
(
@Valid
@RequestBody
RedeemRewardReqVO
redeemRewardReqVO
)
{
return
success
(
redeemRewardApi
.
redeemReward
(
redeemRewardReqVO
));
return
success
(
redeemRewardApi
.
redeemReward
(
redeemRewardReqVO
));
...
@@ -131,6 +133,7 @@ public class RedeemRewardController {
...
@@ -131,6 +133,7 @@ public class RedeemRewardController {
@PostMapping
(
"/batch"
)
@PostMapping
(
"/batch"
)
@ApiOperation
(
"批量兑换礼品"
)
@ApiOperation
(
"批量兑换礼品"
)
@Idempotent
(
timeout
=
5
)
@PreAuthorize
(
"@ss.hasPermission('ecw:giftManagement:exchange')"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:giftManagement:exchange')"
)
public
CommonResult
<
List
<
RedeemRewardRespDTO
>>
redeemRewards
(
@Valid
@RequestBody
List
<
RedeemRewardReqVO
>
redeemRewardReqVOList
)
{
public
CommonResult
<
List
<
RedeemRewardRespDTO
>>
redeemRewards
(
@Valid
@RequestBody
List
<
RedeemRewardReqVO
>
redeemRewardReqVOList
)
{
return
success
(
redeemRewardApi
.
redeemRewards
(
redeemRewardReqVOList
));
return
success
(
redeemRewardApi
.
redeemRewards
(
redeemRewardReqVOList
));
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/admin/reward/RewardController.java
View file @
b9d47982
...
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.reward.controller.admin.reward;
...
@@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.reward.controller.admin.reward;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.module.reward.convert.reward.RewardConvert
;
import
cn.iocoder.yudao.module.reward.convert.reward.RewardConvert
;
...
@@ -38,6 +39,7 @@ public class RewardController {
...
@@ -38,6 +39,7 @@ public class RewardController {
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建礼品"
)
@ApiOperation
(
"创建礼品"
)
@Idempotent
(
timeout
=
3
)
@PreAuthorize
(
"@ss.hasPermission('ecw:giftManagement:add')"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:giftManagement:add')"
)
public
CommonResult
<
Long
>
create
(
@Valid
@RequestBody
RewardCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
create
(
@Valid
@RequestBody
RewardCreateReqVO
createReqVO
)
{
return
success
(
rewardService
.
create
(
createReqVO
));
return
success
(
rewardService
.
create
(
createReqVO
));
...
@@ -99,6 +101,7 @@ public class RewardController {
...
@@ -99,6 +101,7 @@ public class RewardController {
@PostMapping
(
"/copy/{id}"
)
@PostMapping
(
"/copy/{id}"
)
@ApiOperation
(
"复制礼品"
)
@ApiOperation
(
"复制礼品"
)
@Idempotent
(
timeout
=
3
)
@PreAuthorize
(
"@ss.hasPermission('ecw:giftManagement:copy')"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:giftManagement:copy')"
)
public
CommonResult
<
Long
>
copyReward
(
@NotNull
@PathVariable
Long
id
)
{
public
CommonResult
<
Long
>
copyReward
(
@NotNull
@PathVariable
Long
id
)
{
return
success
(
rewardService
.
copyReward
(
id
));
return
success
(
rewardService
.
copyReward
(
id
));
...
...
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