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
98a29230
Commit
98a29230
authored
Oct 28, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix(reward): 兑换信息导入修改
parent
d07969fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
RewardRedeemServiceImpl.java
...module/reward/service/redeem/RewardRedeemServiceImpl.java
+5
-14
No files found.
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/service/redeem/RewardRedeemServiceImpl.java
View file @
98a29230
...
@@ -260,8 +260,7 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
...
@@ -260,8 +260,7 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
}
}
List
<
RewardRedeemDO
>
saveDataList
=
dataList
.
stream
().
map
(
data
->
{
List
<
RewardRedeemDO
>
saveDataList
=
dataList
.
stream
().
map
(
data
->
{
RewardRedeemDO
rewardRedeemDO
=
new
RewardRedeemDO
();
RewardRedeemDO
rewardRedeemDO
=
rewardRedeemMapper
.
selectOne
(
RewardRedeemDO:
:
getRedemptionNumber
,
data
.
getId
());
rewardRedeemDO
.
setId
(
Long
.
parseLong
(
data
.
getId
()));
DictDataRespDTO
redeemTypeDict
=
DictFrameworkUtils
.
parseDictDataFromCacheWithMultiLang
(
"way_of_receiving"
,
data
.
getRedeemType
());
DictDataRespDTO
redeemTypeDict
=
DictFrameworkUtils
.
parseDictDataFromCacheWithMultiLang
(
"way_of_receiving"
,
data
.
getRedeemType
());
rewardRedeemDO
.
setRedeemType
(
Integer
.
parseInt
(
redeemTypeDict
.
getValue
()));
rewardRedeemDO
.
setRedeemType
(
Integer
.
parseInt
(
redeemTypeDict
.
getValue
()));
rewardRedeemDO
.
setExpenses
(
data
.
getExpenses
());
rewardRedeemDO
.
setExpenses
(
data
.
getExpenses
());
...
@@ -362,25 +361,18 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
...
@@ -362,25 +361,18 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
Map
<
String
,
CurrencyRespDTO
>
titleEnCurrencyMap
,
Map
<
String
,
CurrencyRespDTO
>
titleEnCurrencyMap
,
Map
<
String
,
ExpressRespDTO
>
nameExpressMap
)
{
Map
<
String
,
ExpressRespDTO
>
nameExpressMap
)
{
LambdaQueryWrapper
<
RewardRedeemDO
>
wrapper
=
Wrappers
.
lambdaQuery
();
LambdaQueryWrapper
<
RewardRedeemDO
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
in
(
RewardRedeemDO:
:
get
Id
,
dataList
.
stream
().
map
(
RedeemInfoImportExcelVO:
:
getId
).
collect
(
Collectors
.
toSet
()));
wrapper
.
in
(
RewardRedeemDO:
:
get
RedemptionNumber
,
dataList
.
stream
().
map
(
RedeemInfoImportExcelVO:
:
getId
).
collect
(
Collectors
.
toSet
()));
Map
<
Lo
ng
,
RewardRedeemDO
>
idRewardRedeemDOMap
=
rewardRedeemMapper
.
selectList
(
wrapper
).
stream
()
Map
<
Stri
ng
,
RewardRedeemDO
>
idRewardRedeemDOMap
=
rewardRedeemMapper
.
selectList
(
wrapper
).
stream
()
.
collect
(
Collectors
.
toMap
(
RewardRedeemDO:
:
get
Id
,
Function
.
identity
(),
(
c1
,
c2
)
->
c1
));
.
collect
(
Collectors
.
toMap
(
RewardRedeemDO:
:
get
RedemptionNumber
,
Function
.
identity
(),
(
c1
,
c2
)
->
c1
));
Map
<
String
,
String
>
failedInfoMap
=
new
HashMap
<>();
Map
<
String
,
String
>
failedInfoMap
=
new
HashMap
<>();
dataList
.
forEach
(
data
->
{
dataList
.
forEach
(
data
->
{
long
id
;
try
{
id
=
Long
.
parseLong
(
data
.
getId
());
}
catch
(
Exception
e
)
{
failedInfoMap
.
put
(
data
.
getId
()
==
null
?
""
:
data
.
getId
(),
I18nMessage
.
getMessage
(
"reward.redeem.not.exist"
));
return
;
}
try
{
try
{
DateUtil
.
parse
(
data
.
getExpressDate
(),
NORM_DATETIME_PATTERN
);
DateUtil
.
parse
(
data
.
getExpressDate
(),
NORM_DATETIME_PATTERN
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
failedInfoMap
.
put
(
data
.
getId
()
==
null
?
""
:
data
.
getId
(),
I18nMessage
.
getMessage
(
"date.format.error"
));
failedInfoMap
.
put
(
data
.
getId
()
==
null
?
""
:
data
.
getId
(),
I18nMessage
.
getMessage
(
"date.format.error"
));
return
;
return
;
}
}
RewardRedeemDO
rewardRedeemDO
=
idRewardRedeemDOMap
.
get
(
id
);
RewardRedeemDO
rewardRedeemDO
=
idRewardRedeemDOMap
.
get
(
data
.
getId
()
);
if
(
rewardRedeemDO
==
null
)
{
if
(
rewardRedeemDO
==
null
)
{
failedInfoMap
.
put
(
data
.
getId
()
==
null
?
""
:
data
.
getId
(),
I18nMessage
.
getMessage
(
"reward.redeem.not.exist"
));
failedInfoMap
.
put
(
data
.
getId
()
==
null
?
""
:
data
.
getId
(),
I18nMessage
.
getMessage
(
"reward.redeem.not.exist"
));
return
;
return
;
...
@@ -408,7 +400,6 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
...
@@ -408,7 +400,6 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
return
;
return
;
}
}
if
(!
canVerify
(
RewardRedeemVerifyDTO
.
builder
()
if
(!
canVerify
(
RewardRedeemVerifyDTO
.
builder
()
.
id
(
Long
.
parseLong
(
data
.
getId
()))
.
redeemType
(
Integer
.
parseInt
(
redeemTypeDict
.
getValue
()))
.
redeemType
(
Integer
.
parseInt
(
redeemTypeDict
.
getValue
()))
.
status
(
rewardRedeemDO
.
getStatus
())
.
status
(
rewardRedeemDO
.
getStatus
())
.
expense
(
data
.
getExpenses
())
.
expense
(
data
.
getExpenses
())
...
...
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