记得上下班打卡 | 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
893dbc55
Commit
893dbc55
authored
Apr 25, 2025
by
wangyifan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_fudai_20250418' into container
parents
e5c25d06
8145d802
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
395 additions
and
84 deletions
+395
-84
KylinRedisConst.java
...com/liquidnet/service/kylin/constant/KylinRedisConst.java
+8
-0
KylinLuckyBagVo.java
...a/com/liquidnet/service/kylin/dto/vo/KylinLuckyBagVo.java
+20
-1
IFeishuBotService.java
...om/liquidnet/service/kylin/service/IFeishuBotService.java
+7
-0
IKylinLuckyBagService.java
...iquidnet/service/kylin/service/IKylinLuckyBagService.java
+1
-3
RedisKeyExpireConst.java
.../liquidnet/service/base/constant/RedisKeyExpireConst.java
+6
-0
KylinLuckyBag.java
...ava/com/liquidnet/service/kylin/entity/KylinLuckyBag.java
+7
-18
KylinLuckyBagActivity.java
...liquidnet/service/kylin/entity/KylinLuckyBagActivity.java
+7
-9
KylinRewardUser.java
...a/com/liquidnet/service/kylin/entity/KylinRewardUser.java
+2
-2
KylinRewardUserMapper.java
...liquidnet/service/kylin/mapper/KylinRewardUserMapper.java
+7
-0
KylinLuckyBagController.java
...net/service/kylin/controller/KylinLuckyBagController.java
+2
-37
FeishuBotServiceImpl.java
...dnet/service/kylin/service/impl/FeishuBotServiceImpl.java
+27
-0
KylinLuckyBagServiceImpl.java
.../service/kylin/service/impl/KylinLuckyBagServiceImpl.java
+210
-10
DataUtils.java
...ain/java/com/liquidnet/service/kylin/utils/DataUtils.java
+91
-4
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/constant/KylinRedisConst.java
View file @
893dbc55
...
@@ -120,4 +120,12 @@ public class KylinRedisConst {
...
@@ -120,4 +120,12 @@ public class KylinRedisConst {
public
static
final
String
ORDER_AR_CODE
=
"kylin:ar:order:"
;
//$key + $orderId
public
static
final
String
ORDER_AR_CODE
=
"kylin:ar:order:"
;
//$key + $orderId
/**
* 福袋相关
*/
// 福袋活动
public
static
final
String
LUCKY_BAG_ACTIVITY
=
"kylin:luckybag:activity"
;
public
static
final
String
LUCKY_BAG
=
"kylin:luckybag"
;
public
static
final
String
LUCKY_BAG_CODE_LOCK
=
"kylin:luckybag:code:lock:"
;
}
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/KylinLuckyBagVo.java
View file @
893dbc55
...
@@ -2,10 +2,13 @@ package com.liquidnet.service.kylin.dto.vo;
...
@@ -2,10 +2,13 @@ package com.liquidnet.service.kylin.dto.vo;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
@Data
@Data
...
@@ -20,6 +23,7 @@ public class KylinLuckyBagVo implements Serializable {
...
@@ -20,6 +23,7 @@ public class KylinLuckyBagVo implements Serializable {
@Data
@Data
@ApiModel
(
value
=
"福袋活动VO"
)
@ApiModel
(
value
=
"福袋活动VO"
)
@AllArgsConstructor
public
static
class
LuckyBagActivityVo
{
public
static
class
LuckyBagActivityVo
{
@ApiModelProperty
(
value
=
"活动ID"
)
@ApiModelProperty
(
value
=
"活动ID"
)
...
@@ -52,6 +56,21 @@ public class KylinLuckyBagVo implements Serializable {
...
@@ -52,6 +56,21 @@ public class KylinLuckyBagVo implements Serializable {
private
int
status
;
private
int
status
;
@ApiModelProperty
(
value
=
"兑换码"
)
@ApiModelProperty
(
value
=
"兑换码"
)
private
List
<
String
>
rewardCodeList
;
private
Set
<
String
>
rewardCodeList
;
}
public
static
KylinLuckyBagVo
of
(
List
<
LuckyBagVo
>
luckyBagVoList
,
List
<
LuckyBagActivityVo
>
luckyBagActivityVoList
){
KylinLuckyBagVo
kylinLuckyBagVo
=
new
KylinLuckyBagVo
();
kylinLuckyBagVo
.
setLuckyBagVoList
(
luckyBagVoList
);
kylinLuckyBagVo
.
setLuckyBagActivityVoList
(
luckyBagActivityVoList
);
return
kylinLuckyBagVo
;
}
public
static
KylinLuckyBagVo
ofEmpty
(){
KylinLuckyBagVo
kylinLuckyBagVo
=
new
KylinLuckyBagVo
();
kylinLuckyBagVo
.
setLuckyBagVoList
(
Collections
.
emptyList
());
kylinLuckyBagVo
.
setLuckyBagActivityVoList
(
Collections
.
emptyList
());
return
kylinLuckyBagVo
;
}
}
}
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/service/IFeishuBotService.java
0 → 100644
View file @
893dbc55
package
com
.
liquidnet
.
service
.
kylin
.
service
;
public
interface
IFeishuBotService
{
void
sendTextMessage
(
String
text
);
}
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/service/IKylinLuckyBagService.java
View file @
893dbc55
...
@@ -2,8 +2,6 @@ package com.liquidnet.service.kylin.service;
...
@@ -2,8 +2,6 @@ package com.liquidnet.service.kylin.service;
import
com.liquidnet.service.kylin.dto.vo.KylinLuckyBagVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinLuckyBagVo
;
import
java.util.List
;
public
interface
IKylinLuckyBagService
{
public
interface
IKylinLuckyBagService
{
List
<
KylinLuckyBagVo
>
getLuckyBagBenefits
ByOrderId
(
String
orderId
);
KylinLuckyBagVo
getLuckyBag
ByOrderId
(
String
orderId
);
}
}
liquidnet-bus-common/liquidnet-common-service-base/src/main/java/com/liquidnet/service/base/constant/RedisKeyExpireConst.java
View file @
893dbc55
...
@@ -37,4 +37,10 @@ public class RedisKeyExpireConst {
...
@@ -37,4 +37,10 @@ public class RedisKeyExpireConst {
// sweet:user:service:openId 过期时间30天
// sweet:user:service:openId 过期时间30天
public
static
final
long
SWEET_USER_SERVICE_OPENID_EXPIRE
=
30
*
24
*
60
*
60
;
public
static
final
long
SWEET_USER_SERVICE_OPENID_EXPIRE
=
30
*
24
*
60
*
60
;
// kylin:luckybag:activity 过期时间30天
public
static
final
long
KYLIN_LUCKY_BAG_ACTIVITY_EXPIRE
=
30
*
24
*
60
*
60
;
// kylin:luckybag 过期时间30天
public
static
final
long
KYLIN_LUCKY_BAG_EXPIRE
=
30
*
24
*
60
*
60
;
}
}
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/entity/KylinLuckyBag.java
View file @
893dbc55
...
@@ -40,44 +40,33 @@ public class KylinLuckyBag implements Serializable, Cloneable{
...
@@ -40,44 +40,33 @@ public class KylinLuckyBag implements Serializable, Cloneable{
/**
/**
* 所属品牌ID
* 所属品牌ID
*/
*/
private
String
brand
_i
d
;
private
String
brand
I
d
;
/**
/**
* 所属演出ID
* 所属演出ID
*/
*/
private
String
performance
s_i
d
;
private
String
performance
I
d
;
/**
/**
* 所属场次ID
* 所属场次ID
*/
*/
private
String
ticket
_times_i
d
;
private
String
ticket
TimesI
d
;
/**
/**
* 所属票种ID
* 所属票种ID
*/
*/
private
String
tickets_id
;
private
String
ticketsId
;
/**
* 上线开始时间
*/
private
String
onlineStartTime
;
/**
/**
*
上线结束时间
*
状态: 1-可用, 0-不可用
*/
*/
private
String
onlineEndTim
e
;
private
Integer
stat
e
;
/**
/**
* 福袋发放时间
* 福袋发放时间
*/
*/
private
String
send_time
;
private
String
sendTime
;
/**
* 状态: 1-可用, 0-不可用
*/
private
Integer
state
;
/**
/**
* 创建时间
* 创建时间
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/entity/KylinLuckyBagActivity.java
View file @
893dbc55
...
@@ -39,24 +39,22 @@ public class KylinLuckyBagActivity implements Serializable, Cloneable{
...
@@ -39,24 +39,22 @@ public class KylinLuckyBagActivity implements Serializable, Cloneable{
/**
/**
* 跳转地址
* 跳转地址
*/
*/
private
String
target_url
;
private
String
targetUrl
;
/**
/**
*
上线开始时间
*
所属演出ID
*/
*/
private
String
onlineStartTime
;
private
String
performanceId
;
/**
/**
*
上线结束时间
*
状态: 1-可用, 0-不可用
*/
*/
private
String
onlineEndTime
;
private
Integer
state
;
/**
/**
*
状态: 1-可用, 0-不可用
*
排序(越大越靠前)
*/
*/
private
Integer
s
tate
;
private
Integer
s
ort
;
/**
/**
* 创建时间
* 创建时间
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/entity/Kylin
UserReward
.java
→
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/entity/Kylin
RewardUser
.java
View file @
893dbc55
...
@@ -14,7 +14,7 @@ import java.time.LocalDateTime;
...
@@ -14,7 +14,7 @@ import java.time.LocalDateTime;
*/
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
Kylin
UserReward
implements
Serializable
,
Cloneable
{
public
class
Kylin
RewardUser
implements
Serializable
,
Cloneable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -47,7 +47,7 @@ public class KylinUserReward implements Serializable, Cloneable{
...
@@ -47,7 +47,7 @@ public class KylinUserReward implements Serializable, Cloneable{
private
String
code
;
private
String
code
;
/**
/**
* 状态 0不可用 1可用
2删除
* 状态 0不可用 1可用
*/
*/
private
Integer
state
;
private
Integer
state
;
...
...
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/mapper/Kylin
UserReward
Mapper.java
→
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/java/com/liquidnet/service/kylin/mapper/Kylin
RewardUser
Mapper.java
View file @
893dbc55
package
com
.
liquidnet
.
service
.
kylin
.
mapper
;
package
com
.
liquidnet
.
service
.
kylin
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.liquidnet.service.kylin.entity.Kylin
UserReward
;
import
com.liquidnet.service.kylin.entity.Kylin
RewardUser
;
public
interface
Kylin
UserRewardMapper
extends
BaseMapper
<
KylinUserReward
>
{
public
interface
Kylin
RewardUserMapper
extends
BaseMapper
<
KylinRewardUser
>
{
}
}
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinLuckyBagController.java
View file @
893dbc55
package
com
.
liquidnet
.
service
.
kylin
.
controller
;
package
com
.
liquidnet
.
service
.
kylin
.
controller
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.dto.vo.KylinLuckyBagVo
;
import
com.liquidnet.service.kylin.dto.vo.KylinLuckyBagVo
;
import
com.liquidnet.service.kylin.service.IKylinLuckyBagService
;
import
com.liquidnet.service.kylin.service.IKylinLuckyBagService
;
...
@@ -13,8 +12,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -13,8 +12,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
@Api
(
tags
=
"前端-获取福袋相关"
)
@Api
(
tags
=
"前端-获取福袋相关"
)
@RestController
@RestController
@RequestMapping
(
"/luckyBag"
)
@RequestMapping
(
"/luckyBag"
)
...
@@ -27,39 +24,7 @@ public class KylinLuckyBagController {
...
@@ -27,39 +24,7 @@ public class KylinLuckyBagController {
@GetMapping
(
""
)
@GetMapping
(
""
)
@ApiOperation
(
"获取福袋权益列表"
)
@ApiOperation
(
"获取福袋权益列表"
)
public
ResponseDto
<
KylinLuckyBagVo
>
getLuckyBagBenefitsByOrderId
(
@RequestParam
(
value
=
"orderId"
)
String
orderId
)
{
public
ResponseDto
<
KylinLuckyBagVo
>
getLuckyBagByOrderId
(
@RequestParam
(
value
=
"orderId"
)
String
orderId
)
{
return
ResponseDto
.
success
(
benefitsService
.
getLuckyBagByOrderId
(
orderId
));
String
jsonObj
=
"{\n"
+
" \"luckyBagVoList\": [\n"
+
" {\n"
+
" \"luckyBagId\": \"bag001\",\n"
+
" \"name\": \"蛋仔派对专属皮肤\",\n"
+
" \"introduction\": \"1. 每个观演人对应发放一张兑换券/n 2. 兑换券为虚拟商品,一旦丢失或泄露,可能被他人使用,请妥善保管/n 3. 兑换码有效期至[具体日期],请及时使用。\",\n"
+
" \"status\": 1,\n"
+
" \"rewardCodeList\": [\n"
+
" \"CODE123\",\n"
+
" \"CODE456\"\n"
+
" ]\n"
+
" },\n"
+
" {\n"
+
" \"luckyBagId\": \"bag002\",\n"
+
" \"name\": \"蛋仔派对新地图\",\n"
+
" \"introduction\": \"未解锁的福袋,快来领取吧!\",\n"
+
" \"status\": 0,\n"
+
" \"rewardCodeList\": []\n"
+
" }\n"
+
" ],\n"
+
" \"luckyBagActivityVoList\": [\n"
+
" {\n"
+
" \"luckyBagActivityId\": \"activity002\",\n"
+
" \"name\": \"本单权益\",\n"
+
" \"detail\": \"福袋活动详情\",\n"
+
" \"targetUrl\": \"https://baidu.com\"\n"
+
" }\n"
+
" ]\n"
+
"}"
;
return
ResponseDto
.
success
(
JsonUtils
.
fromJson
(
jsonObj
,
KylinLuckyBagVo
.
class
));
// return ResponseDto.success(benefitsService.getLuckyBagBenefitsByOrderId(orderId));
}
}
}
}
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/FeishuBotServiceImpl.java
0 → 100644
View file @
893dbc55
package
com
.
liquidnet
.
service
.
kylin
.
service
.
impl
;
import
com.liquidnet.commons.lang.util.HttpUtil
;
import
com.liquidnet.commons.lang.util.JsonUtils
;
import
com.liquidnet.service.kylin.service.IFeishuBotService
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.Map
;
@Service
public
class
FeishuBotServiceImpl
implements
IFeishuBotService
{
@Override
public
void
sendTextMessage
(
String
text
)
{
HashMap
<
String
,
Object
>
textMap
=
new
HashMap
<>();
textMap
.
put
(
"text"
,
text
);
Map
<
String
,
Object
>
bodyMap
=
new
HashMap
<>();
bodyMap
.
put
(
"msg_type"
,
"text"
);
bodyMap
.
put
(
"content"
,
textMap
);
HttpUtil
.
postJson
(
"https://open.feishu.cn/open-apis/bot/v2/hook/6315d096-5947-4bbb-9c34-90808dd91555"
,
JsonUtils
.
toJson
(
bodyMap
));
}
}
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinLuckyBagServiceImpl.java
View file @
893dbc55
This diff is collapsed.
Click to expand it.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/DataUtils.java
View file @
893dbc55
package
com
.
liquidnet
.
service
.
kylin
.
utils
;
package
com
.
liquidnet
.
service
.
kylin
.
utils
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.common.cache.redis.util.RedisUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.commons.lang.util.DateUtil
;
import
com.liquidnet.service.adam.constant.AdamRedisConst
;
import
com.liquidnet.service.adam.constant.AdamRedisConst
;
import
com.liquidnet.service.adam.dto.vo.AdamMemberVo
;
import
com.liquidnet.service.adam.dto.vo.AdamUserMemberVo
;
import
com.liquidnet.service.adam.dto.vo.AdamUserMemberVo
;
import
com.liquidnet.service.base.constant.RedisKeyExpireConst
;
import
com.liquidnet.service.base.constant.RedisKeyExpireConst
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
import
com.liquidnet.service.goblin.constant.GoblinRedisConst
;
...
@@ -26,9 +27,10 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketExpressModuleVo;
...
@@ -26,9 +27,10 @@ import com.liquidnet.service.kylin.dto.vo.partner.KylinTicketExpressModuleVo;
import
com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo
;
import
com.liquidnet.service.kylin.dto.vo.partner.KylinTicketPartnerVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.KylinOrderListVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.KylinOrderRefundsVo
;
import
com.liquidnet.service.kylin.dto.vo.returns.NoticeKylinPerformanceVo
;
import
com.liquidnet.service.kylin.entity.*
;
import
com.liquidnet.service.kylin.entity.KylinOrderCoupons
;
import
com.liquidnet.service.kylin.mapper.KylinLuckyBagActivityMapper
;
import
com.liquidnet.service.kylin.entity.KylinRecommendActive
;
import
com.liquidnet.service.kylin.mapper.KylinLuckyBagMapper
;
import
com.liquidnet.service.kylin.mapper.KylinRewardUserMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.PageRequest
;
...
@@ -56,6 +58,12 @@ public class DataUtils {
...
@@ -56,6 +58,12 @@ public class DataUtils {
private
RedisUtil
redisUtil
;
private
RedisUtil
redisUtil
;
@Autowired
@Autowired
GoblinRedisUtils
goblinRedisUtils
;
GoblinRedisUtils
goblinRedisUtils
;
@Autowired
private
KylinLuckyBagActivityMapper
kylinLuckyBagActivityMapper
;
@Autowired
private
KylinLuckyBagMapper
kylinLuckyBagMapper
;
@Autowired
private
KylinRewardUserMapper
kylinRewardUserMapper
;
/**
/**
...
@@ -1603,4 +1611,83 @@ public class DataUtils {
...
@@ -1603,4 +1611,83 @@ public class DataUtils {
KylinTicketPartnerVo
.
class
,
KylinTicketPartnerVo
.
class
,
KylinTicketPartnerVo
.
class
.
getSimpleName
());
KylinTicketPartnerVo
.
class
.
getSimpleName
());
}
}
/**
* 获取福袋活动列表
* @return
*/
public
List
<
KylinLuckyBagActivity
>
getKylinLuckyBagActivityList
(){
String
redisKey
=
KylinRedisConst
.
LUCKY_BAG_ACTIVITY
;
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
// 从数据库查询 状态为可用的
LambdaQueryWrapper
<
KylinLuckyBagActivity
>
lambdaQueryWrapper
=
new
QueryWrapper
<
KylinLuckyBagActivity
>()
.
lambda
()
.
eq
(
KylinLuckyBagActivity:
:
getState
,
1
)
.
orderByDesc
(
KylinLuckyBagActivity:
:
getSort
);
List
<
KylinLuckyBagActivity
>
bagActivities
=
kylinLuckyBagActivityMapper
.
selectList
(
lambdaQueryWrapper
);
setKylinLuckyBagActivityList
(
bagActivities
);
return
bagActivities
;
}
else
{
return
(
List
<
KylinLuckyBagActivity
>)
obj
;
}
}
public
void
setKylinLuckyBagActivityList
(
List
<
KylinLuckyBagActivity
>
activities
){
String
redisKey
=
KylinRedisConst
.
LUCKY_BAG_ACTIVITY
;
redisUtil
.
set
(
redisKey
,
activities
,
RedisKeyExpireConst
.
KYLIN_LUCKY_BAG_ACTIVITY_EXPIRE
);
}
public
void
delKylinLuckyBagActivityList
(){
String
redisKey
=
KylinRedisConst
.
LUCKY_BAG_ACTIVITY
;
redisUtil
.
del
(
redisKey
);
}
/**
* 获取福袋列表
* @return
*/
public
List
<
KylinLuckyBag
>
getKylinLuckyBagList
(){
String
redisKey
=
KylinRedisConst
.
LUCKY_BAG
;
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
// 从数据库查询 状态为可用的
LambdaQueryWrapper
<
KylinLuckyBag
>
lambdaQueryWrapper
=
new
QueryWrapper
<
KylinLuckyBag
>()
.
lambda
()
.
eq
(
KylinLuckyBag:
:
getState
,
1
);
List
<
KylinLuckyBag
>
bagActivities
=
kylinLuckyBagMapper
.
selectList
(
lambdaQueryWrapper
);
setKylinLuckyBagList
(
bagActivities
);
return
bagActivities
;
}
else
{
return
(
List
<
KylinLuckyBag
>)
obj
;
}
}
public
void
setKylinLuckyBagList
(
List
<
KylinLuckyBag
>
activities
){
String
redisKey
=
KylinRedisConst
.
LUCKY_BAG
;
redisUtil
.
set
(
redisKey
,
activities
,
RedisKeyExpireConst
.
KYLIN_LUCKY_BAG_EXPIRE
);
}
public
void
delKylinLuckyBagList
(){
String
redisKey
=
KylinRedisConst
.
LUCKY_BAG
;
redisUtil
.
del
(
redisKey
);
}
/**
* 获取用户领取兑换码
*
* @param orderId
* @param uid
* @return
*/
public
List
<
KylinRewardUser
>
getKylinRewardUserList
(
String
orderId
,
String
uid
,
String
luckyBagId
)
{
LambdaQueryWrapper
<
KylinRewardUser
>
lambdaQueryWrapper
=
new
QueryWrapper
<
KylinRewardUser
>().
lambda
()
.
eq
(
KylinRewardUser:
:
getUid
,
uid
)
.
eq
(
KylinRewardUser:
:
getOrderId
,
orderId
)
.
eq
(
KylinRewardUser:
:
getLuckyBagId
,
luckyBagId
)
.
eq
(
KylinRewardUser:
:
getState
,
1
);
return
kylinRewardUserMapper
.
selectList
(
lambdaQueryWrapper
);
}
}
}
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