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
3bd3d696
Commit
3bd3d696
authored
Sep 15, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:
💄
dist update
parent
a1cf0621
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
90 additions
and
6 deletions
+90
-6
awards.controller.d.ts
v2.0/dist/controller/awards.controller.d.ts
+2
-2
stat.controller.d.ts
v2.0/dist/controller/stat.controller.d.ts
+1
-1
index.d.ts
v2.0/dist/index.d.ts
+2
-2
user.service.d.ts
v2.0/dist/service/user.service.d.ts
+13
-0
user.service.js
v2.0/dist/service/user.service.js
+71
-0
user.service.js.map
v2.0/dist/service/user.service.js.map
+1
-1
No files found.
v2.0/dist/controller/awards.controller.d.ts
View file @
3bd3d696
...
@@ -32,11 +32,11 @@ export default class AwardsController {
...
@@ -32,11 +32,11 @@ export default class AwardsController {
/**
/**
* 权益重新领取
* 权益重新领取
*/
*/
receiveEnamePrize
(
context
:
IContext
<
IReceiveEnameParams
>
,
{}:
{},
[
awardSer
]:
[
AwardsService
]):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
CodeType
|
IAwards
,
true
>>
;
receiveEnamePrize
(
context
:
IContext
<
IReceiveEnameParams
>
,
{}:
{},
[
awardSer
]:
[
AwardsService
]):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
CodeType
|
IAwards
,
true
>>
;
/**
/**
* 概率抽奖
* 概率抽奖
*/
*/
drawLotteryPrize
(
context
:
IContext
<
IParams
>
,
{
userInfo
}:
IControllerInfos
,
[
awardSer
]:
[
AwardsService
]):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
{
drawLotteryPrize
(
context
:
IContext
<
IParams
>
,
{
userInfo
}:
IControllerInfos
,
[
awardSer
]:
[
AwardsService
]):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
{
data
:
{
data
:
{
type
:
number
;
type
:
number
;
name
:
string
;
name
:
string
;
...
...
v2.0/dist/controller/stat.controller.d.ts
View file @
3bd3d696
...
@@ -18,5 +18,5 @@ export default class StatController {
...
@@ -18,5 +18,5 @@ export default class StatController {
/**
/**
* 统计数据
* 统计数据
*/
*/
getStats
(
context
:
IContext
<
IGetStatsParams
>
):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
,
true
>>
;
getStats
(
context
:
IContext
<
IGetStatsParams
>
):
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
,
true
>>
;
}
}
v2.0/dist/index.d.ts
View file @
3bd3d696
...
@@ -15,8 +15,8 @@ declare const _default: {
...
@@ -15,8 +15,8 @@ declare const _default: {
list
:
IAwards
[];
list
:
IAwards
[];
}
>>
;
}
>>
;
receiveObjectPrize
:
(
context
:
IContext
<
import
(
"./controller/awards.controller"
).
IReceiveOjectParams
>
,
{}:
{},
[
awardSer
]:
[
import
(
"./service"
).
AwardsService
])
=>
Promise
<
IResult
<
boolean
>>
;
receiveObjectPrize
:
(
context
:
IContext
<
import
(
"./controller/awards.controller"
).
IReceiveOjectParams
>
,
{}:
{},
[
awardSer
]:
[
import
(
"./service"
).
AwardsService
])
=>
Promise
<
IResult
<
boolean
>>
;
receiveEnamePrize
:
(
context
:
IContext
<
import
(
"./controller/awards.controller"
).
IReceiveEnameParams
>
,
{}:
{},
[
awardSer
]:
[
import
(
"./service"
).
AwardsService
])
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
import
(
"taobao-mini-sdk/lib/utils/codetypes"
).
CodeType
|
IAwards
,
true
>>
;
receiveEnamePrize
:
(
context
:
IContext
<
import
(
"./controller/awards.controller"
).
IReceiveEnameParams
>
,
{}:
{},
[
awardSer
]:
[
import
(
"./service"
).
AwardsService
])
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
import
(
"taobao-mini-sdk/lib/utils/codetypes"
).
CodeType
|
IAwards
,
true
>>
;
doHelp
:
(
context
:
IContext
<
IParams
>
,
{
userInfo
,
vipInfo
,
activityInfo
}:
IControllerInfos
,
[
userService
,
taskService
,
accessService
]:
[
import
(
"./service/user.service"
).
default
,
import
(
"./service"
).
TaskService
,
import
(
"./service"
).
AccessService
])
=>
Promise
<
IResult
<
boolean
>>
;
doHelp
:
(
context
:
IContext
<
IParams
>
,
{
userInfo
,
vipInfo
,
activityInfo
}:
IControllerInfos
,
[
userService
,
taskService
,
accessService
]:
[
import
(
"./service/user.service"
).
default
,
import
(
"./service"
).
TaskService
,
import
(
"./service"
).
AccessService
])
=>
Promise
<
IResult
<
boolean
>>
;
getStats
:
(
context
:
IContext
<
import
(
"./controller/stat.controller"
).
IGetStatsParams
>
)
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
object
[]
|
number
[]
|
string
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
,
true
>>
;
getStats
:
(
context
:
IContext
<
import
(
"./controller/stat.controller"
).
IGetStatsParams
>
)
=>
Promise
<
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
string
|
boolean
|
object
|
string
[]
|
object
[]
|
number
[],
false
>
|
import
(
"taobao-mini-sdk/lib/utils/resultmodel"
).
Result
<
any
,
true
>>
;
};
};
export
default
_default
;
export
default
_default
;
v2.0/dist/service/user.service.d.ts
View file @
3bd3d696
...
@@ -42,6 +42,19 @@ declare class UserService extends BaseService {
...
@@ -42,6 +42,19 @@ declare class UserService extends BaseService {
* @returns 若更新成功,返回为1; 若更新失败,返回为 0 或系统直接报错
* @returns 若更新成功,返回为1; 若更新失败,返回为 0 或系统直接报错
*/
*/
updateUser
(
_id
:
string
,
projection
:
IUpdateQuery
):
Promise
<
any
>
;
updateUser
(
_id
:
string
,
projection
:
IUpdateQuery
):
Promise
<
any
>
;
/**
* @desc 排行榜
* @param {查询条件} match
* @param {排序规则} sort
* @param {查询条数} limit
*/
getRank
(
match
:
Object
,
sort
:
Object
,
limit
:
number
):
Promise
<
any
>
;
/**
* @desc 获取我的排名
* @param {查询条件} match
* @param {排序规则} sort
*/
getMyRank
(
match
:
Object
,
sort
:
Object
):
Promise
<
any
>
;
/**
/**
* updateUser projection 格式化
* updateUser projection 格式化
*
*
...
...
v2.0/dist/service/user.service.js
View file @
3bd3d696
...
@@ -290,6 +290,77 @@ var UserService = /** @class */ (function (_super) {
...
@@ -290,6 +290,77 @@ var UserService = /** @class */ (function (_super) {
});
});
});
});
};
};
/**
* @desc 排行榜
* @param {查询条件} match
* @param {排序规则} sort
* @param {查询条数} limit
*/
UserService
.
prototype
.
getRank
=
function
(
match
,
sort
,
limit
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
data
,
activityId
;
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
data
=
this
.
context
.
data
;
activityId
=
data
.
activityId
;
return
[
4
/*yield*/
,
this
.
userdao
.
aggregate
([
{
$match
:
__assign
(
__assign
({},
match
),
{
activityId
:
activityId
})
},
{
$sort
:
sort
},
{
$group
:
{
_id
:
null
,
table
:
{
$push
:
'$$ROOT'
}
}
},
{
$unwind
:
{
path
:
'$table'
,
includeArrayIndex
:
'no'
}
},
{
$project
:
{
_id
:
0
,
openId
:
'$table.openId'
,
userNick
:
'$table.userNick'
,
no
:
{
$add
:
[
'$no'
,
1
]
}
}
},
{
$limit
:
limit
}
])];
case
1
:
return
[
2
/*return*/
,
_a
.
sent
()];
}
});
});
};
/**
* @desc 获取我的排名
* @param {查询条件} match
* @param {排序规则} sort
*/
UserService
.
prototype
.
getMyRank
=
function
(
match
,
sort
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
_a
,
openId
,
data
,
activityId
;
return
__generator
(
this
,
function
(
_b
)
{
switch
(
_b
.
label
)
{
case
0
:
_a
=
this
.
context
,
openId
=
_a
.
openId
,
data
=
_a
.
data
;
activityId
=
data
.
activityId
;
return
[
4
/*yield*/
,
this
.
userdao
.
aggregate
([
{
$match
:
__assign
(
__assign
({},
match
),
{
activityId
:
activityId
})
},
{
$sort
:
sort
},
{
$group
:
{
_id
:
null
,
table
:
{
$push
:
'$$ROOT'
}
}
},
{
$unwind
:
{
path
:
'$table'
,
includeArrayIndex
:
'no'
}
},
{
$project
:
{
_id
:
0
,
openId
:
'$table.openId'
,
userNick
:
'$table.userNick'
,
no
:
{
$add
:
[
'$no'
,
1
]
}
}
},
{
$match
:
{
openId
:
openId
}
}
])];
case
1
:
return
[
2
/*return*/
,
_b
.
sent
()];
}
});
});
};
/**
/**
* updateUser projection 格式化
* updateUser projection 格式化
*
*
...
...
v2.0/dist/service/user.service.js.map
View file @
3bd3d696
This diff is collapsed.
Click to expand it.
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