Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-activity-platform
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
邱骏
7 years ago
Commit
96b7083d5cc3025a774059976794dedf3e366284
2 parents
09663527
42c6be7c
Merge remote-tracking branch 'origin/hotfix/zeroCache' into feature/yohood
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
apps/activity/models/zero-buy.js
apps/activity/models/zero-buy.js
View file @
96b7083
...
...
@@ -13,8 +13,8 @@ const TABLE_ACT_PRIZE_PRODUCT_CONTENT = 'act_prize_product_content';
const
TABLE_ACT_PRIZE_PRODUCT_USER
=
'act_prize_product_user'
;
const
MINUTE_TIMES
=
60
;
const
PRODUCT_CACHE_TIMES
=
MINUTE_TIMES
*
5
;
// 商品(列表&详情)缓存时间
const
RECENT_CODE_CACHE_TIME
=
MINUTE_TIMES
;
// 最近获取记录缓存时间
const
PRODUCT_CACHE_TIMES
=
MINUTE_TIMES
/
6
;
// 商品(列表&详情)缓存时间
const
RECENT_CODE_CACHE_TIME
=
MINUTE_TIMES
/
12
;
// 最近获取记录缓存时间
const
MAX_JOIN_TIMES
=
5
;
// 最大活动参与次数
const
MAX_RECOMEND_NUM
=
10
;
// 最大推荐活动数目
const
PAGE_SIZE
=
10
;
...
...
@@ -303,7 +303,7 @@ module.exports = class extends global.yoho.BaseModel {
let
info
=
await
Promise
.
all
([
mysqlCli
.
query
(
`
select
*
from
$
{
TABLE_ACT_PRIZE_PRODUCT
}
where
id
=
:
actPrizeId
limit
1
;
`
,
{
actPrizeId
},
{
cache
:
MINUTE_TIMES
/
2
}),
where
id
=
:
actPrizeId
limit
1
;
`
,
{
actPrizeId
},
{
cache
:
PRODUCT_CACHE_TIMES
}),
this
.
getUserJoinNum
(
actPrizeId
,
true
).
then
(
result
=>
{
return
result
.
data
;
})
...
...
Please
register
or
login
to post a comment