记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
董敬伟
liquidnet-bus-v1
Commits
bf8643af
Commit
bf8643af
authored
Apr 25, 2022
by
wanglele
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兑换码相关
parent
e1683add
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
GoblinNftExCodeMapper.xml
...liquidnet.service.goblin.mapper/GoblinNftExCodeMapper.xml
+11
-10
GoblinNftExCodeServiceImpl.java
...tform/service/impl/goblin/GoblinNftExCodeServiceImpl.java
+4
-3
No files found.
liquidnet-bus-do/liquidnet-service-goblin-do/src/main/resources/com.liquidnet.service.goblin.mapper/GoblinNftExCodeMapper.xml
View file @
bf8643af
...
...
@@ -8,7 +8,7 @@
<result
column=
"code"
property=
"code"
jdbcType=
"VARCHAR"
/>
<result
column=
"sku_id"
property=
"skuId"
jdbcType=
"VARCHAR"
/>
<result
column=
"box_sku_id"
property=
"boxSkuId"
jdbcType=
"VARCHAR"
/>
<result
column=
"state"
property=
"state"
jdbcType=
"INTEGER"
/>
<result
column=
"state"
property=
"state"
jdbcType=
"INTEGER"
/>
<result
column=
"redeem_uid"
property=
"redeemUid"
jdbcType=
"VARCHAR"
/>
<result
column=
"redeem_at"
property=
"redeemAt"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"admin_uid"
property=
"adminUid"
jdbcType=
"VARCHAR"
/>
...
...
@@ -17,7 +17,7 @@
</resultMap>
<select
id=
"selectByIds"
resultMap=
"BeseResult"
>
select code_id,activity_id,state from goblin_nft_ex_code
select code_id,activity_id,state
,code
from goblin_nft_ex_code
where code_id in
<foreach
collection=
"codeIds.split(',')"
item=
"codeId"
open=
"("
separator=
","
close=
")"
>
#{codeId,jdbcType=VARCHAR}
...
...
@@ -25,7 +25,7 @@
</select>
<select
id=
"selectGoblinNftCodeByCode"
resultMap=
"BeseResult"
>
select code_id,
activity_id,code,
box_sku_id
select code_id,
activity_id, code,
box_sku_id
</select>
<insert
id=
"addGoblinNftExCodes"
>
...
...
@@ -45,12 +45,13 @@
</insert>
<update
id=
"updateCodes"
>
<foreach
collection=
"goblinNftExCodes"
item=
"goblinNftExCode"
open=
""
close=
""
separator=
";"
>
update goblin_nft_ex_code
<set>
state = #{goblinNftExCode.state} and updated_at = #{goblinNftExCode.updatedAt}
</set>
where code_id = #{goblinNftExCode.codeId}
update goblin_nft_ex_code
<set>
state = 3 , updated_at = now()
</set>
where code_id in
<foreach
collection=
"goblinNftExCodes"
item=
"goblinNftExCode"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{goblinNftExCode.codeId}
</foreach>
</update>
...
...
@@ -61,7 +62,7 @@
<if
test=
"code != null and code != ''"
>
and code = #{code,jdbcType=VARCHAR}
</if>
<if
test=
"activityId != null and activityId !=
null
"
>
<if
test=
"activityId != null and activityId !=
''
"
>
and activity_id = #{activityId,jdbcType=VARCHAR}
</if>
<if
test=
"state != null"
>
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/service/impl/goblin/GoblinNftExCodeServiceImpl.java
View file @
bf8643af
...
...
@@ -4,8 +4,10 @@ import com.alibaba.excel.EasyExcel;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.alibaba.excel.write.metadata.style.WriteCellStyle
;
import
com.alibaba.excel.write.style.HorizontalCellStyleStrategy
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.goblin.dto.vo.GoblinNftExActivityVo
;
import
com.liquidnet.service.goblin.dto.vo.GoblinNftExCodeVo
;
...
...
@@ -30,6 +32,7 @@ import java.io.OutputStream;
import
java.net.URLEncoder
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -139,8 +142,6 @@ public class GoblinNftExCodeServiceImpl implements IGoblinNftExCodeService {
@Override
public
Boolean
defDrivLoseCode
(
String
codeIds
)
{
LocalDateTime
now
=
LocalDateTime
.
now
();
// 获取兑换码
List
<
GoblinNftExCode
>
goblinNftExCodes
=
goblinNftExCodeMapper
.
selectByIds
(
codeIds
);
...
...
@@ -151,7 +152,7 @@ public class GoblinNftExCodeServiceImpl implements IGoblinNftExCodeService {
// redis 主动失效
codes
.
add
(
goblinNftExCode
.
getCode
());
goblinNftExCode
.
setState
(
3
);
goblinNftExCode
.
setUpdatedAt
(
now
);
goblinNftExCode
.
setUpdatedAt
(
LocalDateTime
.
now
()
);
String
skuId
=
""
;
if
(
StringUtil
.
isNotBlank
(
goblinNftExCode
.
getSkuId
()))
{
...
...
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