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
8a65fd7b
Commit
8a65fd7b
authored
Aug 07, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/feature_member_score' into dev
parents
e8cd74aa
12f7c412
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
160 additions
and
59 deletions
+160
-59
ErrorCodeConstants.java
...iocoder/yudao/module/member/enums/ErrorCodeConstants.java
+4
-4
ScoreRuleServiceImpl.java
...module/member/service/scoreRule/ScoreRuleServiceImpl.java
+35
-33
ErrorCodeConstants.java
...iocoder/yudao/module/reward/enums/ErrorCodeConstants.java
+2
-2
AppRedeemRewardController.java
...ward/controller/app/redeem/AppRedeemRewardController.java
+15
-6
AppRewardRedeemDetailReqVO.java
.../controller/app/redeem/vo/AppRewardRedeemDetailReqVO.java
+15
-0
AppRewardRedeemDetailRespVO.java
...controller/app/redeem/vo/AppRewardRedeemDetailRespVO.java
+52
-0
AppRewardRedeemListRespVO.java
...d/controller/app/redeem/vo/AppRewardRedeemListRespVO.java
+1
-2
AppRewardRedeemReqVO.java
...reward/controller/app/redeem/vo/AppRewardRedeemReqVO.java
+15
-0
RewardRedeemPageRespVO.java
...yudao/module/reward/vo/reward/RewardRedeemPageRespVO.java
+7
-0
RewardRedeemMapper.xml
...ard-impl/src/main/resources/mapper/RewardRedeemMapper.xml
+2
-0
messages_en.properties
yudao-server/src/main/resources/i18n/messages_en.properties
+6
-6
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+6
-6
No files found.
yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java
View file @
8a65fd7b
...
...
@@ -53,10 +53,10 @@ public interface ErrorCodeConstants {
ErrorCode
SCORE_OPERATE_IDEMPOTENT_ERROR
=
new
ErrorCode
(
1004008009
,
"score.operate.idempotent.error"
);
ErrorCode
SCORE_RULE_NOT_EXISTS
=
new
ErrorCode
(
1004008010
,
"score.rule.not.exists"
);
ErrorCode
SCORE_RULE_DELETE_ERROR
=
new
ErrorCode
(
1004008011
,
"score.rule.delete.error
:{}
"
);
ErrorCode
SCORE_RULE_UPDATE_ERROR
=
new
ErrorCode
(
1004008012
,
"score.rule.update.error
:{}
"
);
ErrorCode
SCORE_RULE_FIELD_ERROR
=
new
ErrorCode
(
1004008013
,
"score.rule.field.error
:{}
"
);
ErrorCode
SCORE_RULE_DELETE_ERROR
=
new
ErrorCode
(
1004008011
,
"score.rule.delete.error"
);
ErrorCode
SCORE_RULE_UPDATE_ERROR
=
new
ErrorCode
(
1004008012
,
"score.rule.update.error"
);
ErrorCode
SCORE_RULE_FIELD_ERROR
=
new
ErrorCode
(
1004008013
,
"score.rule.field.error"
);
ErrorCode
USER_ADDRESS_NOT_EXISTS
=
new
ErrorCode
(
1004008014
,
"user.address.not.exists"
);
ErrorCode
USER_ADDRESS_FIELD_ERROR
=
new
ErrorCode
(
1004008015
,
"user.address.field.error
:{}
"
);
ErrorCode
USER_ADDRESS_FIELD_ERROR
=
new
ErrorCode
(
1004008015
,
"user.address.field.error"
);
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/scoreRule/ScoreRuleServiceImpl.java
View file @
8a65fd7b
This diff is collapsed.
Click to expand it.
yudao-module-reward/yudao-module-reward-api/src/main/java/cn/iocoder/yudao/module/reward/enums/ErrorCodeConstants.java
View file @
8a65fd7b
...
...
@@ -17,10 +17,10 @@ public interface ErrorCodeConstants {
ErrorCode
REWARD_STATUS_NOT_ALLOW_UPDATE
=
new
ErrorCode
(
1001011010
,
"reward.status.not.allow.update"
);
ErrorCode
REWARD_STATUS_NOT_ALLOW_ENABLE
=
new
ErrorCode
(
1001011011
,
"reward.status.not.allow.enable"
);
ErrorCode
REWARD_NOT_ENABLE
=
new
ErrorCode
(
1001011012
,
"reward.not.enable"
);
ErrorCode
REWARD_SCORE_NOT_ENOUGH
=
new
ErrorCode
(
1001011013
,
"reward.score.not.enough
:{}
"
);
ErrorCode
REWARD_SCORE_NOT_ENOUGH
=
new
ErrorCode
(
1001011013
,
"reward.score.not.enough"
);
ErrorCode
REWARD_COUNT_NOT_ENOUGH
=
new
ErrorCode
(
1001011014
,
"reward.count.not.enough"
);
ErrorCode
REWARD_REDEEM_COUNT_NOT_ALLOW
=
new
ErrorCode
(
1001011016
,
"reward.redeem.count.not.allow"
);
ErrorCode
REWARD_REDEEM_ALLOW_COUNT_ERROR
=
new
ErrorCode
(
1001011017
,
"reward.redeem.allow.count.error
:{}
"
);
ErrorCode
REWARD_REDEEM_ALLOW_COUNT_ERROR
=
new
ErrorCode
(
1001011017
,
"reward.redeem.allow.count.error"
);
ErrorCode
REWARD_REDEEM_NOT_EXIST
=
new
ErrorCode
(
1001011018
,
"reward.redeem.not.exist"
);
ErrorCode
REWARD_REDEEM_STATUS_ERROR
=
new
ErrorCode
(
1001011019
,
"reward.redeem.status.error"
);
ErrorCode
REWARD_REDEEM_VERIFY_NO_PARAM
=
new
ErrorCode
(
1001011020
,
"reward.redeem.verify.no.param"
);
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/app/redeem/AppRedeemRewardController.java
View file @
8a65fd7b
...
...
@@ -4,13 +4,15 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
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.RedeemRewardRespDTO
;
import
cn.iocoder.yudao.module.reward.controller.app.redeem.vo.AppRewardRedeemDetailReqVO
;
import
cn.iocoder.yudao.module.reward.controller.app.redeem.vo.AppRewardRedeemDetailRespVO
;
import
cn.iocoder.yudao.module.reward.controller.app.redeem.vo.AppRewardRedeemListRespVO
;
import
cn.iocoder.yudao.module.reward.controller.app.redeem.vo.AppRewardRedeemReqVO
;
import
cn.iocoder.yudao.module.reward.service.redeem.RewardRedeemService
;
import
cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemBaseVO
;
import
cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemPageRespVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.
security.access.prepost.PreAuthorize
;
import
org.springframework.
beans.BeanUtils
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -19,7 +21,6 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
...
...
@@ -38,15 +39,23 @@ public class AppRedeemRewardController {
@PostMapping
(
"record/list"
)
@ApiOperation
(
"兑换记录列表"
)
//@PreAuthenticated
public
CommonResult
<
List
<
AppRewardRedeemListRespVO
>>
recordList
(
@Valid
@RequestBody
RewardRedeemBase
VO
request
)
{
public
CommonResult
<
List
<
AppRewardRedeemListRespVO
>>
recordList
(
@Valid
@RequestBody
AppRewardRedeemReq
VO
request
)
{
return
success
(
rewardRedeemService
.
recordList
(
request
.
getMemberId
()));
}
@PostMapping
(
"record/detail"
)
@ApiOperation
(
"兑换详情"
)
//@PreAuthenticated
public
CommonResult
<
RewardRedeemPageRespVO
>
detail
(
@Valid
@RequestBody
RewardRedeemBaseVO
request
)
{
return
success
(
rewardRedeemService
.
detail
(
request
.
getId
()));
public
CommonResult
<
AppRewardRedeemDetailRespVO
>
detail
(
@Valid
@RequestBody
AppRewardRedeemDetailReqVO
request
)
{
RewardRedeemPageRespVO
detail
=
rewardRedeemService
.
detail
(
request
.
getRedeemId
());
if
(
detail
!=
null
)
{
AppRewardRedeemDetailRespVO
appRewardRedeemDetailRespVO
=
new
AppRewardRedeemDetailRespVO
();
BeanUtils
.
copyProperties
(
detail
,
appRewardRedeemDetailRespVO
);
return
success
(
appRewardRedeemDetailRespVO
);
}
return
null
;
}
@PostMapping
(
"/single"
)
@ApiOperation
(
"兑换礼品"
)
//@PreAuthenticated
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/app/redeem/vo/AppRewardRedeemDetailReqVO.java
0 → 100644
View file @
8a65fd7b
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
controller
.
app
.
redeem
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
@Data
@ApiModel
(
"客户端 - 礼品兑换记录详情 req VO"
)
public
class
AppRewardRedeemDetailReqVO
{
@ApiModelProperty
(
value
=
"兑换记录id"
)
@NotNull
(
message
=
"兑换记录id不能为空"
)
private
Long
redeemId
;
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/app/redeem/vo/AppRewardRedeemDetailRespVO.java
0 → 100644
View file @
8a65fd7b
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
controller
.
app
.
redeem
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@Data
@ApiModel
(
"客户端 - 礼品兑换记录详情 resp VO"
)
public
class
AppRewardRedeemDetailRespVO
{
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"会员id"
)
private
Long
memberId
;
@ApiModelProperty
(
value
=
"礼品id"
)
private
Long
rewardId
;
@ApiModelProperty
(
value
=
"兑换状态"
)
private
Integer
status
;
@ApiModelProperty
(
value
=
"兑换积分"
)
private
Integer
totalCount
;
@ApiModelProperty
(
value
=
"礼品名称(中文)"
)
private
String
rewardTitleZh
;
@ApiModelProperty
(
value
=
"礼品名称(英文)"
)
private
String
rewardTitleEn
;
@ApiModelProperty
(
value
=
"兑换数量"
)
private
Integer
rewardCount
;
@ApiModelProperty
(
value
=
"活动开始日期"
)
private
Date
startTime
;
@ApiModelProperty
(
value
=
"活动结束日期"
)
private
Date
endTime
;
@ApiModelProperty
(
value
=
"兑换方式"
)
private
Integer
redeemType
;
@ApiModelProperty
(
value
=
"兑换网点(中文)"
)
private
String
nodeTitleZh
;
@ApiModelProperty
(
value
=
"兑换网点(英文)"
)
private
String
nodeTitleEn
;
@ApiModelProperty
(
value
=
"收件人姓名"
)
private
String
recipientName
;
@ApiModelProperty
(
value
=
"收件人电话"
)
private
String
recipientPhoneNum
;
@ApiModelProperty
(
value
=
"收件人地址"
)
private
String
recipientAddress
;
@ApiModelProperty
(
value
=
"快递日期"
)
private
Date
expressDate
;
@ApiModelProperty
(
value
=
"快递公司名称"
)
private
String
courierCompanyName
;
@ApiModelProperty
(
value
=
"快递单号"
)
private
String
expressNo
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/app/redeem/vo/AppRewardRedeemListRespVO.java
View file @
8a65fd7b
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
controller
.
app
.
redeem
.
vo
;
import
cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemBaseVO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -14,7 +13,7 @@ import java.util.Date;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
@ApiModel
(
"客户端 - 礼品兑换记录列表 VO"
)
@ApiModel
(
"客户端 - 礼品兑换记录列表
resp
VO"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/app/redeem/vo/AppRewardRedeemReqVO.java
0 → 100644
View file @
8a65fd7b
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
controller
.
app
.
redeem
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
@Data
@ApiModel
(
"客户端 - 礼品兑换记录列表 req VO"
)
public
class
AppRewardRedeemReqVO
{
@ApiModelProperty
(
value
=
"会员id"
)
@NotNull
(
message
=
"会员id不能为空"
)
private
Long
memberId
;
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardRedeemPageRespVO.java
View file @
8a65fd7b
...
...
@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
@Data
@ApiModel
(
"管理后台 - 礼品兑换记录分页结果 VO"
)
@EqualsAndHashCode
(
callSuper
=
true
)
...
...
@@ -40,4 +42,9 @@ public class RewardRedeemPageRespVO extends RewardRedeemBaseVO {
private
Integer
holdScore
;
private
Integer
pointsRequire
;
@ApiModelProperty
(
value
=
"活动开始日期"
)
private
Date
startTime
;
@ApiModelProperty
(
value
=
"活动结束日期"
)
private
Date
endTime
;
}
yudao-module-reward/yudao-module-reward-impl/src/main/resources/mapper/RewardRedeemMapper.xml
View file @
8a65fd7b
...
...
@@ -41,6 +41,8 @@
select
mus.hold_score as holdScore,
er.points_require as pointsRequire,
er.start_time as startTime,
er.end_time as endTime,
<include
refid=
"columns"
/>
from ecw_reward_redeem err
left join ecw_reward er on err.reward_id = er.id
...
...
yudao-server/src/main/resources/i18n/messages_en.properties
View file @
8a65fd7b
...
...
@@ -1022,10 +1022,10 @@ reward.pick.method.not.allow = pick method not allow
reward.status.not.allow.update
=
reward status not allow update
reward.status.not.allow.enable
=
reward status not allow enable
reward.not.enable
=
reward is not enable
reward.score.not.enough
=
user score not enough
reward.score.not.enough
=
user score not enough
:{}
reward.count.not.enough
=
reward count not enough
reward.redeem.count.not.allow
=
bulk redemption is limited to a maximum of 10 pieces at a time
reward.redeem.allow.count.error
=
the number of redemptions allowed by the individual has been exceeded
reward.redeem.allow.count.error
=
the number of redemptions allowed by the individual has been exceeded
:{}
redeem.import.max.count
=
allow maximum number of imports is {}
dict.unknown.error
=
Not in dict {0}: {1}
...
...
@@ -1038,9 +1038,9 @@ level.bound.range.conflict = score range exist conflict
score.operate.idempotent.error
=
idempotent key conflict
score.rule.not.exists
=
score rule not exists
score.rule.field.error
=
score rule field error
score.rule.update.error
=
score rule update error
score.rule.delete.error
=
score rule delete error
score.rule.field.error
=
score rule field error
:{}
score.rule.update.error
=
score rule update error
:{}
score.rule.delete.error
=
score rule delete error
:{}
user.address.not.exists
=
user address not exists
user.address.field.error
=
user address field error
\ No newline at end of file
user.address.field.error
=
user address field error:{}
\ No newline at end of file
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
8a65fd7b
...
...
@@ -1018,10 +1018,10 @@ reward.pick.method.not.allow = \u793C\u54C1\u9886\u53D6\u65B9\u5F0F\u4E0D\u652F\
reward.status.not.allow.update
=
\u
793C
\u
54C1
\u
72B6
\u6001\u
64CD
\u
4F5C
\u
4E0D
\u
7B26
\u5408\u
89C4
\u5219
reward.status.not.allow.enable
=
\u
793C
\u
54C1
\u
4E0D
\u5141\u
8BB8
\u
542F
\u7528
reward.not.enable
=
\u
793C
\u
54C1
\u
672A
\u
542F
\u7528
reward.score.not.enough
=
\u
79EF
\u5206\u
4E0D
\u
8DB3
reward.score.not.enough
=
\u
79EF
\u5206\u
4E0D
\u
8DB3
\u
FF1A{}
reward.count.not.enough
=
\u
793C
\u
54C1
\u6570\u
91CF
\u
4E0D
\u
8DB3
reward.redeem.count.not.allow
=
\u6279\u
91CF
\u5151\u6362\u
6BCF
\u
6B21
\u6700\u
591A
\u5341\u6761
reward.redeem.allow.count.error
=
\u
5DF2
\u
8D85
\u
51FA
\u
4E2A
\u
4EBA
\u5141\u
8BB8
\u5151\u6362\u
6B21
\u6570
reward.redeem.allow.count.error
=
\u
5DF2
\u
8D85
\u
51FA
\u
4E2A
\u
4EBA
\u5141\u
8BB8
\u5151\u6362\u
6B21
\u6570
\u
FF1A{}
get.lock.failed
=
\u
670D
\u
52A1
\u
7E41
\u
5FD9
\u
FF0C
\u
8BF7
\u
7A0D
\u
540E
\u
91CD
\u
8BD5
reward.redeem.not.exist
=
\u
793C
\u
54C1
\u5151\u6362\u
8BB0
\u
5F55
\u
4E0D
\u
5B58
\u5728
...
...
@@ -1040,9 +1040,9 @@ level.bound.range.conflict = \u79EF\u5206\u8303\u56F4\u5B58\u5728\u51B2\u7A81
score.operate.idempotent.error
=
\u
5E42
\u
7B49key
\u
51B2
\u
7A81
score.rule.not.exists
=
\u
79EF
\u5206\u
89C4
\u5219\u
4E0D
\u
5B58
\u5728
score.rule.field.error
=
\u
79EF
\u5206\u
89C4
\u5219\u
5B57
\u
6BB5
\u9519\u
8BEF
score.rule.update.error
=
\u
79EF
\u5206\u
89C4
\u5219\u
66F4
\u
65B0
\u5931\u
8D25
score.rule.delete.error
=
\u
79EF
\u5206\u
89C4
\u5219\u5220\u9664\u5931\u
8D25
score.rule.field.error
=
\u
79EF
\u5206\u
89C4
\u5219\u
5B57
\u
6BB5
\u9519\u
8BEF
\u
FF1A{}
score.rule.update.error
=
\u
79EF
\u5206\u
89C4
\u5219\u
66F4
\u
65B0
\u5931\u
8D25
\u
FF1A{}
score.rule.delete.error
=
\u
79EF
\u5206\u
89C4
\u5219\u5220\u9664\u5931\u
8D25
\u
FF1A{}
user.address.not.exists
=
\u7528\u6237\u5730\u5740\u
4E0D
\u
5B58
\u5728
user.address.field.error
=
\u7528\u6237\u5730\u5740\u
5B57
\u
6BB5
\u9519\u
8BEF
\ No newline at end of file
user.address.field.error
=
\u7528\u6237\u5730\u5740\u
5B57
\u
6BB5
\u9519\u
8BEF
\u
FF1A{}
\ No newline at end of file
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