Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
c1eeb980
Commit
c1eeb980
authored
Aug 25, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 类型
parent
977a236f
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
18 deletions
+37
-18
check.js
v2.0/dist/decorator/check.js
+3
-2
check.js.map
v2.0/dist/decorator/check.js.map
+1
-1
awards.service.d.ts
v2.0/dist/service/awards.service.d.ts
+9
-9
awards.service.js.map
v2.0/dist/service/awards.service.js.map
+1
-1
check.ts
v2.0/src/decorator/check.ts
+0
-1
awards.service.ts
v2.0/src/service/awards.service.ts
+23
-4
No files found.
v2.0/dist/decorator/check.js
View file @
c1eeb980
...
@@ -148,10 +148,11 @@ exports.activityTimeCheck = function (target, name, descriptor) {
...
@@ -148,10 +148,11 @@ exports.activityTimeCheck = function (target, name, descriptor) {
if
(
!
activityId
)
if
(
!
activityId
)
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
error
(
constants_1
.
CODE_TYPES
.
PARAMS_ERROR
,
"
\
u7F3A
\
u5C11
\
u6D3B
\
u52A8id"
)];
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
error
(
constants_1
.
CODE_TYPES
.
PARAMS_ERROR
,
"
\
u7F3A
\
u5C11
\
u6D3B
\
u52A8id"
)];
baseService
=
new
service_1
.
BaseService
(
context
);
baseService
=
new
service_1
.
BaseService
(
context
);
return
[
4
/*yield*/
,
baseService
.
getBaseInfo
(
activityId
)];
return
[
4
/*yield*/
,
baseService
.
getBaseInfo
(
activityId
)
// 活动不存在
];
case
1
:
case
1
:
activityInfo
=
_b
.
sent
();
activityInfo
=
_b
.
sent
();
console
.
log
(
activityInfo
,
'activityInfo'
);
// 活动不存在
// 活动不存在
if
(
!
activityInfo
)
{
if
(
!
activityInfo
)
{
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
error
(
constants_1
.
CODE_TYPES
.
ERROR_NO_ACTIVITY
)];
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
error
(
constants_1
.
CODE_TYPES
.
ERROR_NO_ACTIVITY
)];
...
...
v2.0/dist/decorator/check.js.map
View file @
c1eeb980
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/decorator/check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,8BAAqC;AACrC,0CAAyC;AACzC,sCAAqD;AACrD,kCAA2C;AAE9B,QAAA,WAAW,GAAG,UAAC,MAAgB;IAC1C,OAAO,UAAU,MAAc,EAAE,IAAY,EAAE,UAA8B;QAC3E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;QAE/B,UAAU,CAAC,KAAK,GAAG;YAAU,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAClC,IAAA,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;YACtC,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,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K,CAAC,sBAAU,CAAC,mBAAmB,EAAE,gCAAO,CAAC,EAAA;yBACnE;wBACD,sBAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,wBAAO,SAAS,KAAE,YAAY,cAAA,IAAG,CAAC,EAAA;;;;KACvE,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
\ No newline at end of file
v2.0/dist/service/awards.service.d.ts
View file @
c1eeb980
...
@@ -27,16 +27,16 @@ export default class AwardsService extends UserService {
...
@@ -27,16 +27,16 @@ export default class AwardsService extends UserService {
openId
:
any
;
openId
:
any
;
activityId
:
any
;
activityId
:
any
;
}):
Promise
<
any
>
;
}):
Promise
<
any
>
;
recieveObjectPrize
(
_id
:
any
,
{
activityId
,
province
,
city
,
area
,
addressdetail
,
name
,
phone
}:
{
recieveObjectPrize
(
_id
:
string
,
{
activityId
,
province
,
city
,
area
,
addressdetail
,
name
,
phone
}:
{
activityId
:
any
;
activityId
:
string
;
province
:
any
;
province
:
string
;
city
:
any
;
city
:
string
;
area
:
any
;
area
:
string
;
addressdetail
:
any
;
addressdetail
:
string
;
name
:
any
;
name
:
string
;
phone
:
any
;
phone
:
string
|
number
;
}):
Promise
<
true
|
import
(
"taobao-mini-sdk/lib/utils/codetypes"
).
CodeType
>
;
}):
Promise
<
true
|
import
(
"taobao-mini-sdk/lib/utils/codetypes"
).
CodeType
>
;
recieveEnamePrize
(
_id
:
any
,
activityId
:
any
):
Promise
<
{}
>
;
recieveEnamePrize
(
_id
:
any
,
activityId
:
string
):
Promise
<
{}
>
;
/**
/**
* 获取活动配置项奖品
* 获取活动配置项奖品
* @param {*} _id
* @param {*} _id
...
...
v2.0/dist/service/awards.service.js.map
View file @
c1eeb980
This diff is collapsed.
Click to expand it.
v2.0/src/decorator/check.ts
View file @
c1eeb980
...
@@ -63,7 +63,6 @@ export const activityTimeCheck = (target: any, name: string, descriptor: Propert
...
@@ -63,7 +63,6 @@ export const activityTimeCheck = (target: any, name: string, descriptor: Propert
// 活动基本情况
// 活动基本情况
const
activityInfo
=
await
baseService
.
getBaseInfo
(
activityId
)
const
activityInfo
=
await
baseService
.
getBaseInfo
(
activityId
)
console
.
log
(
activityInfo
,
'activityInfo'
)
// 活动不存在
// 活动不存在
if
(
!
activityInfo
)
{
if
(
!
activityInfo
)
{
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_NO_ACTIVITY
)
return
resultsModel
.
error
(
CODE_TYPES
.
ERROR_NO_ACTIVITY
)
...
...
v2.0/src/service/awards.service.ts
View file @
c1eeb980
...
@@ -8,7 +8,7 @@ import { BaseDao } from '../sdk'
...
@@ -8,7 +8,7 @@ import { BaseDao } from '../sdk'
import
UserService
from
'./user.service'
import
UserService
from
'./user.service'
import
{
CODE_TYPES
,
DRAW_STATUS
,
PRIZE_TYPE
,
ACTIVITY_STATUS
}
from
'../constants'
import
{
CODE_TYPES
,
DRAW_STATUS
,
PRIZE_TYPE
,
ACTIVITY_STATUS
}
from
'../constants'
import
{
AWARDS_DB_NAME
,
PRIZE_CONFIG_DB_NAME
}
from
'../db'
import
{
AWARDS_DB_NAME
,
PRIZE_CONFIG_DB_NAME
}
from
'../db'
import
{
sendTBAward
,
getSellerSession
,
rand
,
signFigures
}
from
'../utils'
import
{
sendTBAward
,
getSellerSession
}
from
'../utils'
export
default
class
AwardsService
extends
UserService
{
export
default
class
AwardsService
extends
UserService
{
awardsdao
:
IBaseDao
awardsdao
:
IBaseDao
...
@@ -114,7 +114,7 @@ export default class AwardsService extends UserService {
...
@@ -114,7 +114,7 @@ export default class AwardsService extends UserService {
// 若有过期时间,且已过期
// 若有过期时间,且已过期
if
(
awardReceiveExpiredTime
)
{
if
(
awardReceiveExpiredTime
)
{
let
currentTime
=
Date
.
now
()
let
currentTime
=
Date
.
now
()
myprizeList
.
map
(
v
=>
{
myprizeList
.
map
(
(
v
:
{
drawStatus
:
number
;
remark
:
string
;
expiredTime
:
any
})
=>
{
if
(
currentTime
>
awardReceiveExpiredTime
)
{
if
(
currentTime
>
awardReceiveExpiredTime
)
{
if
([
DRAW_STATUS
.
WAITAWARD
,
DRAW_STATUS
.
RETRY
].
includes
(
v
.
drawStatus
))
{
if
([
DRAW_STATUS
.
WAITAWARD
,
DRAW_STATUS
.
RETRY
].
includes
(
v
.
drawStatus
))
{
v
.
drawStatus
=
DRAW_STATUS
.
EXPIRED
v
.
drawStatus
=
DRAW_STATUS
.
EXPIRED
...
@@ -128,7 +128,26 @@ export default class AwardsService extends UserService {
...
@@ -128,7 +128,26 @@ export default class AwardsService extends UserService {
}
}
// 领取实物
// 领取实物
async
recieveObjectPrize
(
_id
,
{
activityId
,
province
,
city
,
area
,
addressdetail
,
name
,
phone
})
{
async
recieveObjectPrize
(
_id
:
string
,
{
activityId
,
province
,
city
,
area
,
addressdetail
,
name
,
phone
}:
{
activityId
:
string
province
:
string
city
:
string
area
:
string
addressdetail
:
string
name
:
string
phone
:
string
|
number
}
)
{
// 若有过期时间,且已过期
// 若有过期时间,且已过期
let
{
awardReceiveExpiredTime
}
=
await
this
.
getBaseInfo
(
activityId
)
let
{
awardReceiveExpiredTime
}
=
await
this
.
getBaseInfo
(
activityId
)
if
(
awardReceiveExpiredTime
&&
Date
.
now
()
>
awardReceiveExpiredTime
)
{
if
(
awardReceiveExpiredTime
&&
Date
.
now
()
>
awardReceiveExpiredTime
)
{
...
@@ -173,7 +192,7 @@ export default class AwardsService extends UserService {
...
@@ -173,7 +192,7 @@ export default class AwardsService extends UserService {
}
}
// 发放淘宝权益(奖品数据已插入到awards_info表,且状态drawStatus 为1或者6)
// 发放淘宝权益(奖品数据已插入到awards_info表,且状态drawStatus 为1或者6)
async
recieveEnamePrize
(
_id
,
activityId
)
{
async
recieveEnamePrize
(
_id
:
any
,
activityId
:
string
)
{
// 若有过期时间,且已过期
// 若有过期时间,且已过期
let
{
awardReceiveExpiredTime
}
=
await
this
.
getBaseInfo
(
activityId
)
let
{
awardReceiveExpiredTime
}
=
await
this
.
getBaseInfo
(
activityId
)
if
(
awardReceiveExpiredTime
&&
Date
.
now
()
>
awardReceiveExpiredTime
)
{
if
(
awardReceiveExpiredTime
&&
Date
.
now
()
>
awardReceiveExpiredTime
)
{
...
...
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