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
Email Patches
Plain Diff
Browse Files
Authored by
李奇
6 years ago
Commit
8495370c52f4572287f05608284bc8b56fcbc101
1 parent
37f53a28
容错
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
apps/admin/models/wheel-surf.js
apps/api/models/wheel-surf.js
apps/admin/models/wheel-surf.js
View file @
8495370
const
_
=
require
(
'lodash'
);
const
{
Activity
}
=
require
(
'../../../db'
);
const
mysqlCli
=
global
.
yoho
.
utils
.
mysqlCli
;
...
...
@@ -75,6 +76,7 @@ class ActWheelSurfModel extends global.yoho.BaseModel {
getActConf
(
actId
)
{
return
this
.
client
.
hgetallAsync
(
`
turntable
:
$
{
actId
}
`
).
then
(
conf
=>
{
conf
=
conf
||
{};
Object
.
keys
(
conf
).
forEach
(
key
=>
{
if
(
conf
[
key
]
&&
!
_
.
isNaN
(
Number
(
conf
[
key
])))
{
conf
[
key
]
=
Number
(
conf
[
key
])
...
...
apps/api/models/wheel-surf.js
View file @
8495370
...
...
@@ -119,7 +119,6 @@ class ActWheelSurfModelRedis extends global.yoho.BaseModel {
}
}
// noinspection JSAnnotator
async
goPrize
(
obj
)
{
try
{
// 校验有效活动时间
...
...
@@ -287,7 +286,7 @@ class ActWheelSurfModelRedis extends global.yoho.BaseModel {
getPrize
=
null
;
for
(
let
item
of
prize
)
{
if
(
item
.
type
===
1
)
{
getPrize
=
item
.
dataValues
;
getPrize
=
item
;
break
;
}
}
...
...
Please
register
or
login
to post a comment