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
96aa5243
Commit
96aa5243
authored
Aug 12, 2024
by
zhangfeng
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
礼品兑换网点修改
parent
c3cfff53
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
RewardDO.java
...r/yudao/module/reward/dal/dataobject/reward/RewardDO.java
+1
-1
RewardServiceImpl.java
...yudao/module/reward/service/reward/RewardServiceImpl.java
+9
-9
RewardBackVO.java
...n/iocoder/yudao/module/reward/vo/reward/RewardBackVO.java
+1
-1
RewardCreateReqVO.java
...oder/yudao/module/reward/vo/reward/RewardCreateReqVO.java
+1
-1
RewardUpdateReqVO.java
...oder/yudao/module/reward/vo/reward/RewardUpdateReqVO.java
+1
-1
No files found.
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/dal/dataobject/reward/RewardDO.java
View file @
96aa5243
...
...
@@ -63,7 +63,7 @@ public class RewardDO extends BaseDO {
/**
* 兑换网点
*/
private
Integer
nodeId
;
private
String
nodeId
;
/**
* 已兑换次数
*/
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/service/reward/RewardServiceImpl.java
View file @
96aa5243
...
...
@@ -24,10 +24,7 @@ import org.springframework.validation.annotation.Validated;
import
javax.annotation.Resource
;
import
java.time.Instant
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
...
...
@@ -173,9 +170,8 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
.
eq
(
query
.
getPointsRequireSymbol
()
==
QuantitativeRelationSymbolEnum
.
EQ
.
getValue
(),
RewardDO:
:
getPointsRequire
,
query
.
getPointsRequire
())
.
lt
(
query
.
getPointsRequireSymbol
()
==
QuantitativeRelationSymbolEnum
.
LT
.
getValue
(),
RewardDO:
:
getPointsRequire
,
query
.
getPointsRequire
());
}
//兑换网点id,领取方式,状态
lambdaQuery
.
eqIfPresent
(
RewardDO:
:
getNodeId
,
query
.
getNodeId
())
.
eqIfPresent
(
RewardDO:
:
getPickMethod
,
query
.
getPickMethod
())
//领取方式,状态
lambdaQuery
.
eqIfPresent
(
RewardDO:
:
getPickMethod
,
query
.
getPickMethod
())
.
eqIfPresent
(
RewardDO:
:
getStatus
,
query
.
getStatus
());
//备注,模糊匹配三种语言
if
(
query
.
getRemark
()
!=
null
)
{
...
...
@@ -199,6 +195,10 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
PageResult
<
RewardDO
>
rewardDOPageResult
=
rewardMapper
.
selectPage
(
page
,
lambdaQuery
);
//校验是否过期
rewardDOPageResult
.
getList
().
forEach
(
this
::
validateExpire
);
// 过滤兑换网点
if
(
query
.
getNodeId
()
!=
null
)
{
rewardDOPageResult
.
getList
().
removeIf
(
rewardDO
->
!
Arrays
.
asList
(
rewardDO
.
getNodeId
().
split
(
","
)).
contains
(
query
.
getNodeId
().
toString
()));
}
return
rewardDOPageResult
;
}
...
...
@@ -295,9 +295,9 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
List
<
NodeRespDTO
>
nodes
=
null
;
// 如果用户没有填写国家或城市默认展示中国的礼品
if
(
user
.
getCity
()
==
null
||
user
.
getCountry
()
==
null
)
{
nodes
=
nodeApi
.
getNodesByCity
(
null
,
130L
);
nodes
=
nodeApi
.
getNodesByCity
(
null
,
130L
);
}
else
{
nodes
=
nodeApi
.
getNodesByCity
(
user
.
getCity
().
longValue
(),
null
);
nodes
=
nodeApi
.
getNodesByCity
(
user
.
getCity
().
longValue
(),
null
);
}
if
(
CollectionUtil
.
isNotEmpty
(
nodes
))
{
rewardDOLambdaQuery
.
in
(
RewardDO:
:
getNodeId
,
nodes
.
stream
().
map
(
NodeRespDTO:
:
getId
).
collect
(
Collectors
.
toList
()));
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardBackVO.java
View file @
96aa5243
...
...
@@ -58,7 +58,7 @@ public class RewardBackVO {
@ExcelProperty
(
"兑换网点"
)
@ApiModelProperty
(
value
=
"兑换网点"
,
required
=
true
)
private
Integer
nodeId
;
private
String
nodeId
;
@ExcelProperty
(
"已兑换次数"
)
@ApiModelProperty
(
value
=
"已兑换次数"
)
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardCreateReqVO.java
View file @
96aa5243
...
...
@@ -47,7 +47,7 @@ public class RewardCreateReqVO {
@ApiModelProperty
(
value
=
"兑换网点"
,
required
=
true
)
@NotNull
(
message
=
"兑换网点不能为空"
)
private
Integer
nodeId
;
private
String
nodeId
;
@ApiModelProperty
(
value
=
"剩余数量"
,
required
=
true
)
@NotNull
(
message
=
"剩余数量不能为空"
)
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardUpdateReqVO.java
View file @
96aa5243
...
...
@@ -48,7 +48,7 @@ public class RewardUpdateReqVO {
private
Integer
pointsRequire
;
@ApiModelProperty
(
value
=
"兑换网点"
)
private
Integer
nodeId
;
private
String
nodeId
;
@ApiModelProperty
(
value
=
"剩余数量"
)
@Min
(
value
=
0
)
...
...
zhangfeng
@zhangfeng
mentioned in commit
bde97df0
·
Aug 12, 2024
mentioned in commit
bde97df0
mentioned in commit bde97df0447dc331773013671f9cafeec1ae0a9b
Toggle commit list
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