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
51e6ce0d
Commit
51e6ce0d
authored
Aug 28, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
🎸
增加任务状态
parent
a19ef951
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
274 additions
and
157 deletions
+274
-157
constants.d.ts
v2.0/dist/constants.d.ts
+5
-0
constants.js
v2.0/dist/constants.js
+7
-1
constants.js.map
v2.0/dist/constants.js.map
+1
-1
task.controller.js
v2.0/dist/controller/task.controller.js
+5
-8
task.controller.js.map
v2.0/dist/controller/task.controller.js.map
+1
-1
task.service.d.ts
v2.0/dist/service/task.service.d.ts
+28
-1
task.service.js
v2.0/dist/service/task.service.js
+92
-53
task.service.js.map
v2.0/dist/service/task.service.js.map
+1
-1
logger.d.ts
v2.0/dist/utils/package/logger.d.ts
+1
-1
logger.js
v2.0/dist/utils/package/logger.js
+1
-5
logger.js.map
v2.0/dist/utils/package/logger.js.map
+1
-1
constants.ts
v2.0/src/constants.ts
+7
-0
task.controller.ts
v2.0/src/controller/task.controller.ts
+7
-7
task.service.ts
v2.0/src/service/task.service.ts
+115
-76
user.d.ts
v2.0/src/typings/user.d.ts
+1
-0
logger.ts
v2.0/src/utils/package/logger.ts
+1
-1
No files found.
v2.0/dist/constants.d.ts
View file @
51e6ce0d
...
...
@@ -191,6 +191,11 @@ export declare const TASK_RATE_TYPE: {
EVERYDAY
:
number
;
NOLIMIT
:
number
;
};
export
declare
const
TASK_STATUS
:
{
WAIT_DO
:
number
;
WAIT_RECEIVE
:
number
;
DONE
:
number
;
};
export
declare
const
PRIZE_TYPE
:
{
ENAME
:
number
;
CREDITS
:
number
;
...
...
v2.0/dist/constants.js
View file @
51e6ce0d
"use strict"
;
/** @format */
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
exports
.
SWICH_TOCK
=
exports
.
PRIZE_DATA_TYPE
=
exports
.
PRIZE_TYPE
=
exports
.
TASK_RATE_TYPE
=
exports
.
TAOBAO_SUCCESS_ORDER_STATUS
=
exports
.
C_APP_NAME
=
exports
.
DRAW_STATUS
=
exports
.
TBERROR
=
exports
.
CODE_TYPES
=
exports
.
BusinessError
=
void
0
;
exports
.
SWICH_TOCK
=
exports
.
PRIZE_DATA_TYPE
=
exports
.
PRIZE_TYPE
=
exports
.
TASK_
STATUS
=
exports
.
TASK_
RATE_TYPE
=
exports
.
TAOBAO_SUCCESS_ORDER_STATUS
=
exports
.
C_APP_NAME
=
exports
.
DRAW_STATUS
=
exports
.
TBERROR
=
exports
.
CODE_TYPES
=
exports
.
BusinessError
=
void
0
;
var
sdk_1
=
require
(
"./sdk"
);
exports
.
BusinessError
=
{
// 更新重试失败(用于并发更新)
...
...
@@ -133,6 +133,12 @@ exports.TASK_RATE_TYPE = {
EVERYDAY
:
2
,
NOLIMIT
:
3
};
//任务状态
exports
.
TASK_STATUS
=
{
WAIT_DO
:
1
,
WAIT_RECEIVE
:
2
,
DONE
:
3
// 已完成
};
// 奖品类型
exports
.
PRIZE_TYPE
=
{
ENAME
:
1
,
...
...
v2.0/dist/constants.js.map
View file @
51e6ce0d
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,6BAA0C;AAE7B,QAAA,aAAa,GAAG;IAC3B,iBAAiB;IACjB,kBAAkB,EAAE;QAClB,IAAI,EAAE,QAAQ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,MAAM,EAAE,CAAC;CACV,CAAA;AAED,OAAO;AACM,QAAA,eAAe,GAAG;IAC7B,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC,CAAC,KAAK;CACrB,CAAA;AAED,WAAW;AACX,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,mDAAY,CAAA;AACd,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
\ No newline at end of file
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,6BAA0C;AAE7B,QAAA,aAAa,GAAG;IAC3B,iBAAiB;IACjB,kBAAkB,EAAE;QAClB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,0BAAM;KACnB;IACD,QAAQ;IACR,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,sBAAsB,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,mBAAmB,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,OAAO;KACpB;IACD,UAAU;IACV,oBAAoB,EAAE;QACpB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,wDAAW;KACxB;IACD,UAAU;IACV,yBAAyB,EAAE;QACzB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,4CAAS;KACtB;IACD,QAAQ;IACR,mBAAmB,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,uBAAuB,EAAE;QACvB,IAAI,EAAE,QAAQ;QACd,UAAU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CAAC;IACV,OAAO;IACP,KAAK,EAAE,CAAC;CACT,CAAA;AAED,cAAc;AACD,QAAA,UAAU,GAAW,yBAAyB,CAAA;AAE3D,OAAO;AACM,QAAA,2BAA2B,GAAa;IACnD,wBAAwB;IACxB,uBAAuB;IACvB,0BAA0B;IAC1B,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;CACtB,CAAA;AAcD,UAAU;AACG,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC;CACX,CAAA;AAED,MAAM;AACO,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,CAAC;IACf,IAAI,EAAE,CAAC,CAAC,MAAM;CACf,CAAA;AAED,OAAO;AACM,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACV,CAAA;AAED,OAAO;AACM,QAAA,eAAe,GAAG;IAC7B,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC,CAAC,KAAK;CACrB,CAAA;AAED,WAAW;AACX,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,mDAAY,CAAA;AACd,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
\ No newline at end of file
v2.0/dist/controller/task.controller.js
View file @
51e6ce0d
...
...
@@ -61,12 +61,6 @@ var constants_1 = require("./../constants");
var
decorator_1
=
require
(
"../decorator"
);
var
sdk_1
=
require
(
"../sdk"
);
var
service_1
=
require
(
"../service"
);
// {
// "handler": "getTaskList",
// "data": {
// "activityId": "5f213791964f9706aa59b192"
// }
// }
var
Task
=
/** @class */
(
function
()
{
function
Task
()
{
}
...
...
@@ -77,14 +71,15 @@ var Task = /** @class */ (function () {
var
userInfo
=
_a
.
userInfo
,
vipInfo
=
_a
.
vipInfo
,
activityInfo
=
_a
.
activityInfo
,
session
=
_a
.
session
;
var
taskService
=
_b
[
0
];
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
tasks
,
startTime
,
updatedUserInfo
,
_c
,
_d
,
_e
,
_f
,
vipTask
,
followTask
,
orderGoodsTask
,
browseGoodsTask
,
collectGoodsTask
,
jumpLinkTask
,
invitesTask
;
var
tasks
,
startTime
,
updatedUserInfo
,
_c
,
_d
,
_e
,
_f
,
vipTask
,
followTask
,
signTask
,
orderGoodsTask
,
browseGoodsTask
,
collectGoodsTask
,
jumpLinkTask
,
invitesTask
;
return
__generator
(
this
,
function
(
_g
)
{
switch
(
_g
.
label
)
{
case
0
:
tasks
=
activityInfo
.
tasks
,
startTime
=
activityInfo
.
startTime
;
_d
=
(
_c
=
taskService
).
updateTasks
;
_e
=
[
userInfo
.
_id
];
_f
=
[
taskService
.
updateVipTaskStatus
(
userInfo
,
vipInfo
,
tasks
)];
_f
=
[
taskService
.
updateVipTask
(
userInfo
,
vipInfo
,
tasks
),
taskService
.
updateSignTask
(
userInfo
,
tasks
)];
return
[
4
/*yield*/
,
taskService
.
updateOrderGoodsTask
(
userInfo
,
tasks
,
startTime
,
session
)];
case
1
:
return
[
4
/*yield*/
,
_d
.
apply
(
_c
,
_e
.
concat
([
_f
.
concat
([
_g
.
sent
()
...
...
@@ -97,6 +92,7 @@ var Task = /** @class */ (function () {
];
vipTask
=
taskService
.
initVipTask
(
updatedUserInfo
,
vipInfo
,
tasks
);
followTask
=
taskService
.
initFollowTask
(
updatedUserInfo
,
tasks
);
signTask
=
taskService
.
initSignTask
(
updatedUserInfo
,
tasks
);
orderGoodsTask
=
taskService
.
initOrderGoodsTask
(
updatedUserInfo
,
tasks
);
browseGoodsTask
=
taskService
.
initBrowseGoodsTask
(
updatedUserInfo
,
tasks
);
collectGoodsTask
=
taskService
.
initCollectGoodsTask
(
updatedUserInfo
,
tasks
);
...
...
@@ -105,6 +101,7 @@ var Task = /** @class */ (function () {
// 积分兑换
//const exchangeCreditsTask = taskService.initExchangeCreditsTask(updatedUserInfo, tasks)
return
[
2
/*return*/
,
sdk_1
.
resultsModel
.
success
([
signTask
,
vipTask
,
followTask
,
orderGoodsTask
,
...
...
v2.0/dist/controller/task.controller.js.map
View file @
51e6ce0d
{"version":3,"file":"task.controller.js","sourceRoot":"","sources":["../../src/controller/task.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAA2D;AAC3D,0CAA2F;AAE3F,8BAA6C;AAC7C,sCAAqD;AAIrD,IAAI;AACJ,8BAA8B;AAC9B,cAAc;AACd,+CAA+C;AAC/C,MAAM;AACN,IAAI;AACJ;IAAA;IA8TA,CAAC;IA7TC;;OAEG;IAKG,0BAAW,GAAjB,UACE,OAAgB,EAChB,EAA8D,EAC9D,EAA4B;YAD1B,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA,EAAE,OAAO,aAAA;YACzC,WAAW,QAAA;;;;;;wBAEJ,KAAK,GAAgB,YAAY,MAA5B,EAAE,SAAS,GAAK,YAAY,UAAjB,CAAiB;wBAGb,KAAA,CAAA,KAAA,WAAW,CAAA,CAAC,WAAW,CAAA;8BACjD,QAAQ,CAAC,GAAG;8BAEV,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC;wBACzD,qBAAM,WAAW,CAAC,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,CAAC,EAAA;4BAJzD,qBAAM;gCAIxB,SAA2E;gCAE7E,QAAQ,GACT,EAAA;;wBAPG,eAAe,GAAG,SAOrB;wBAED,IAAI,CAAC,eAAe;4BAAE,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,UAAU,CAAC;gCAEpF,OAAO;8BAF6E;wBAG9E,OAAO,GAAG,WAAW,CAAC,WAAW,CAA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CAAC,CAAC;;;;4CAavB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;QACtC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;qDA0CvB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACrC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;iDAwCvB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACrC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;kDAwCvB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;8CA2BvB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACvC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;kDA4BvB;IAOD;QAFC,uBAAW,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;QACtC,oBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,CAAC,CAAC;;;;mDAoBpC;IACH,WAAC;CAAA,AA9TD,IA8TC;kBA9ToB,IAAI"}
\ No newline at end of file
{"version":3,"file":"task.controller.js","sourceRoot":"","sources":["../../src/controller/task.controller.ts"],"names":[],"mappings":";AAA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AC,qBAAW,CAAC,CAAC;;;;qDA0CvB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACrC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;iDAwCvB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACrC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;kDAwCvB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;8CA2BvB;IASD;QAJC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACvC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;kDA4BvB;IAOD;QAFC,uBAAW,CAAC,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;QACtC,oBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,CAAC,CAAC;;;;mDAoBpC;IACH,WAAC;CAAA,AApUD,IAoUC;kBApUoB,IAAI"}
\ No newline at end of file
v2.0/dist/service/task.service.d.ts
View file @
51e6ce0d
...
...
@@ -15,6 +15,7 @@ interface ITaskInfo {
times
?:
number
;
waitReceive
?:
number
;
title
:
string
;
status
:
number
;
}
export
default
class
TaskService
extends
UserService
{
constructor
(
context
:
Context
);
...
...
@@ -25,13 +26,27 @@ export default class TaskService extends UserService {
initJumpLinkTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
):
ITaskInfo
;
initInvitesTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
):
ITaskInfo
;
initFollowTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
):
ITaskInfo
;
initSignTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
):
ITaskInfo
;
initExchangeCreditsTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
):
ITaskInfo
;
updateVipTask
Status
(
userInfo
:
IUserInfo
,
vipInfo
:
IVipInfo
,
tasks
:
ITasks
):
{
updateVipTask
(
userInfo
:
IUserInfo
,
vipInfo
:
IVipInfo
,
tasks
:
ITasks
):
{
$set
:
{};
$inc
:
{};
$push
:
{};
};
updateOrderGoodsTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
,
activityStartTime
:
number
,
session
?:
string
):
Promise
<
{}
>
;
updateSignTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
):
{
$inc
:
{
'remainTimes.sign'
:
number
;
};
$push
:
{
[
x
:
string
]:
{
createTime
:
number
;
};
};
}
|
{
$inc
?:
undefined
;
$push
?:
undefined
;
};
/**
*更新关注店铺任务状态
*
...
...
@@ -41,6 +56,18 @@ export default class TaskService extends UserService {
* @memberof TaskService
*/
updateFollowTask
(
userInfo
:
IUserInfo
,
activityInfo
:
IActivityInfo
):
Promise
<
any
>
;
/**
*
* 根据用户和任务完成情况,设置任务状态
*
* @param {IUserInfo} useInfo
* @param {string} taskType
* @param {number} taskRateType
* @param {number} [limitTimesEverday] 每天限制次数 任务频率为每天的时候必填
* @return {taskTatus} 1未完成 2 待领取 3 已完成
* @memberof TaskService
*/
setTaskStatus
(
useInfo
:
IUserInfo
,
taskType
:
string
,
taskRateType
:
number
,
limitTimesEveryday
?:
number
):
number
;
/**
*
* 获取任务今天完成的次数
...
...
v2.0/dist/service/task.service.js
View file @
51e6ce0d
...
...
@@ -82,7 +82,7 @@ var TaskService = /** @class */ (function (_super) {
return
_super
.
call
(
this
,
context
)
||
this
;
}
TaskService
.
prototype
.
initVipTask
=
function
(
userInfo
,
vipInfo
,
tasks
)
{
var
flag
=
userInfo
.
member
.
flag
,
remainTimes
=
userInfo
.
remainTimes
;
var
remainTimes
=
userInfo
.
remainTimes
;
// 后台配置奖励
var
value
=
tasks
.
beMembership
.
value
;
return
{
...
...
@@ -91,13 +91,14 @@ var TaskService = /** @class */ (function (_super) {
url
:
vipInfo
.
url
,
rewards
:
value
,
taskRateType
:
constants_1
.
TASK_RATE_TYPE
.
FOREVER
,
waitReceive
:
remainTimes
.
member
waitReceive
:
remainTimes
.
member
,
status
:
this
.
setTaskStatus
(
userInfo
,
'member'
,
constants_1
.
TASK_RATE_TYPE
.
FOREVER
)
};
};
// 初始化下单任务
TaskService
.
prototype
.
initOrderGoodsTask
=
function
(
userInfo
,
tasks
)
{
var
_a
=
tasks
.
orderGoods
,
value
=
_a
.
value
,
itemIds
=
_a
.
itemIds
,
taskRateType
=
_a
.
taskRateType
,
times
=
_a
.
times
;
var
remainTimes
=
userInfo
.
remainTimes
,
_b
=
userInfo
.
taskInfo
,
taskInfo
=
_b
===
void
0
?
{}
:
_b
;
var
remainTimes
=
userInfo
.
remainTimes
;
var
todayCompleteTimes
=
this
.
getTodayCompleteTask
(
'orderGoods'
,
userInfo
).
todayCompleteTimes
;
var
orderGoodsCompleteList
=
this
.
getCompleteTaskByUserTaskInfo
(
'orderGoods'
,
userInfo
);
var
orderTask
=
{
...
...
@@ -109,16 +110,9 @@ var TaskService = /** @class */ (function (_super) {
times
:
times
,
todayCompleteTimes
:
todayCompleteTimes
,
completeTimes
:
orderGoodsCompleteList
.
length
,
status
:
this
.
setTaskStatus
(
userInfo
,
'orderGoods'
,
taskRateType
,
times
),
waitReceive
:
remainTimes
.
orderGoods
};
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && orderGoodsCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
return
orderTask
;
};
// 初始化浏览商品任务
...
...
@@ -136,16 +130,9 @@ var TaskService = /** @class */ (function (_super) {
waitReceive
:
remainTimes
.
browseGoods
,
todayCompleteTimes
:
todayCompleteTimes
,
completeTimes
:
browseGoodsCompleteList
.
length
,
status
:
this
.
setTaskStatus
(
userInfo
,
'browseGoods'
,
taskRateType
,
times
),
taskRateType
:
taskRateType
};
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && browseGoodsCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
return
orderTask
;
};
// 初始化收藏商品任务
...
...
@@ -163,19 +150,12 @@ var TaskService = /** @class */ (function (_super) {
waitReceive
:
remainTimes
.
collectGoods
,
todayCompleteTimes
:
todayCompleteTimes
,
completeTimes
:
completeList
.
length
,
taskRateType
:
taskRateType
taskRateType
:
taskRateType
,
status
:
this
.
setTaskStatus
(
userInfo
,
'collectGoods'
,
taskRateType
,
times
)
};
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && browseGoodsCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
return
orderTask
;
};
// 初始化
收藏商品
任务
// 初始化
跳转
任务
TaskService
.
prototype
.
initJumpLinkTask
=
function
(
userInfo
,
tasks
)
{
var
_a
=
tasks
.
jumpLink
,
value
=
_a
.
value
,
link
=
_a
.
link
,
taskRateType
=
_a
.
taskRateType
,
times
=
_a
.
times
;
var
remainTimes
=
userInfo
.
remainTimes
;
...
...
@@ -190,22 +170,15 @@ var TaskService = /** @class */ (function (_super) {
waitReceive
:
remainTimes
.
jumpLink
,
todayCompleteTimes
:
todayCompleteTimes
,
completeTimes
:
completeList
.
length
,
taskRateType
:
taskRateType
taskRateType
:
taskRateType
,
status
:
this
.
setTaskStatus
(
userInfo
,
'jumpLink'
,
taskRateType
,
times
)
};
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && browseGoodsCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
return
orderTask
;
};
// 初始化邀请任务
TaskService
.
prototype
.
initInvitesTask
=
function
(
userInfo
,
tasks
)
{
var
_a
=
tasks
.
inviteFriends
,
value
=
_a
.
value
,
taskRateType
=
_a
.
taskRateType
,
times
=
_a
.
times
;
var
remainTimes
=
userInfo
.
remainTimes
,
taskInfo
=
userInfo
.
taskInfo
;
var
remainTimes
=
userInfo
.
remainTimes
;
var
todayCompleteTimes
=
this
.
getTodayCompleteTask
(
'invites'
,
userInfo
).
todayCompleteTimes
;
var
invitesCompleteList
=
this
.
getCompleteTaskByUserTaskInfo
(
'invites'
,
userInfo
);
var
orderTask
=
{
...
...
@@ -216,16 +189,9 @@ var TaskService = /** @class */ (function (_super) {
times
:
times
,
todayCompleteTimes
:
todayCompleteTimes
,
completeTimes
:
invitesCompleteList
.
length
,
waitReceive
:
remainTimes
.
invites
};
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && invitesCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
waitReceive
:
remainTimes
.
invites
,
status
:
this
.
setTaskStatus
(
userInfo
,
'invites'
,
taskRateType
,
times
)
};
return
orderTask
;
};
// 关注店铺
...
...
@@ -239,7 +205,26 @@ var TaskService = /** @class */ (function (_super) {
rewards
:
value
,
taskRateType
:
constants_1
.
TASK_RATE_TYPE
.
FOREVER
,
waitReceive
:
remainTimes
.
follow
,
completeTimes
:
followCompleteList
.
length
completeTimes
:
followCompleteList
.
length
,
status
:
this
.
setTaskStatus
(
userInfo
,
'follow'
,
constants_1
.
TASK_RATE_TYPE
.
FOREVER
)
};
};
// 初始化签到任务
TaskService
.
prototype
.
initSignTask
=
function
(
userInfo
,
tasks
)
{
var
value
=
tasks
.
sign
.
value
;
var
remainTimes
=
userInfo
.
remainTimes
;
var
completeList
=
this
.
getCompleteTaskByUserTaskInfo
(
'sign'
,
userInfo
);
var
todayCompleteTimes
=
this
.
getTodayCompleteTask
(
'sign'
,
userInfo
).
todayCompleteTimes
;
return
{
taskType
:
"sign"
,
title
:
"
\
u6BCF
\
u65E5
\
u7B7E
\
u5230"
,
rewards
:
value
,
times
:
1
,
taskRateType
:
constants_1
.
TASK_RATE_TYPE
.
EVERYDAY
,
waitReceive
:
remainTimes
.
sign
,
completeTimes
:
completeList
.
length
,
todayCompleteTimes
:
todayCompleteTimes
,
status
:
this
.
setTaskStatus
(
userInfo
,
'sign'
,
constants_1
.
TASK_RATE_TYPE
.
EVERYDAY
)
};
};
// 积分兑换 /固定为每日限制
...
...
@@ -254,11 +239,12 @@ var TaskService = /** @class */ (function (_super) {
times
:
times
,
taskRateType
:
constants_1
.
TASK_RATE_TYPE
.
EVERYDAY
,
todayCompleteTimes
:
todayCompleteTimes
,
waitReceive
:
remainTimes
.
exchangeCredits
waitReceive
:
remainTimes
.
exchangeCredits
,
status
:
this
.
setTaskStatus
(
userInfo
,
'exchangeCredits'
,
constants_1
.
TASK_RATE_TYPE
.
EVERYDAY
)
};
};
// 根据会员状态更新
TaskService
.
prototype
.
updateVipTask
Status
=
function
(
userInfo
,
vipInfo
,
tasks
)
{
TaskService
.
prototype
.
updateVipTask
=
function
(
userInfo
,
vipInfo
,
tasks
)
{
var
member
=
userInfo
.
member
,
remainTimes
=
userInfo
.
remainTimes
,
taskInfo
=
userInfo
.
taskInfo
;
var
newMember
=
member
.
newMember
;
var
today
=
utils_1
.
getToday
();
...
...
@@ -280,13 +266,13 @@ var TaskService = /** @class */ (function (_super) {
}
return
projection
;
};
// 根据下单下单记录,更新状态
TaskService
.
prototype
.
updateOrderGoodsTask
=
function
(
userInfo
,
tasks
,
activityStartTime
,
session
)
{
return
__awaiter
(
this
,
void
0
,
void
0
,
function
()
{
var
taskInfo
,
remainTimes
,
_a
,
value
,
itemIds
,
taskRateType
,
times
,
orderGoodsCompleteList
,
todayCompleteTimes
,
today
,
orderResult
,
itemIdsArr
,
projection
,
targetOrders
;
var
_a
,
value
,
itemIds
,
taskRateType
,
times
,
orderGoodsCompleteList
,
todayCompleteTimes
,
today
,
orderResult
,
itemIdsArr
,
projection
,
targetOrders
;
return
__generator
(
this
,
function
(
_b
)
{
switch
(
_b
.
label
)
{
case
0
:
taskInfo
=
userInfo
.
taskInfo
,
remainTimes
=
userInfo
.
remainTimes
;
_a
=
tasks
.
orderGoods
,
value
=
_a
.
value
,
itemIds
=
_a
.
itemIds
,
taskRateType
=
_a
.
taskRateType
,
times
=
_a
.
times
;
orderGoodsCompleteList
=
this
.
getCompleteTaskByUserTaskInfo
(
'orderGoods'
,
userInfo
);
todayCompleteTimes
=
this
.
getTodayCompleteTask
(
'orderGoods'
,
userInfo
).
todayCompleteTimes
;
...
...
@@ -331,6 +317,26 @@ var TaskService = /** @class */ (function (_super) {
});
});
};
// 更新签到任务数据
TaskService
.
prototype
.
updateSignTask
=
function
(
userInfo
,
tasks
)
{
var
_a
;
// 获取签到奖励
var
value
=
(
tasks
||
{}).
sign
.
value
;
var
todayCompleteTimes
=
this
.
getTodayCompleteTask
(
'sign'
,
userInfo
).
todayCompleteTimes
;
var
today
=
utils_1
.
getToday
();
utils_1
.
logger
(
todayCompleteTimes
);
// 今天没有有完成记录
return
todayCompleteTimes
===
0
?
{
$inc
:
{
'remainTimes.sign'
:
value
},
$push
:
(
_a
=
{},
_a
[
"taskInfo."
+
today
+
".sign"
]
=
{
createTime
:
Date
.
now
()
},
_a
)
}
:
{};
};
/**
*更新关注店铺任务状态
*
...
...
@@ -372,6 +378,38 @@ var TaskService = /** @class */ (function (_super) {
});
});
};
/**
*
* 根据用户和任务完成情况,设置任务状态
*
* @param {IUserInfo} useInfo
* @param {string} taskType
* @param {number} taskRateType
* @param {number} [limitTimesEverday] 每天限制次数 任务频率为每天的时候必填
* @return {taskTatus} 1未完成 2 待领取 3 已完成
* @memberof TaskService
*/
TaskService
.
prototype
.
setTaskStatus
=
function
(
useInfo
,
taskType
,
taskRateType
,
limitTimesEveryday
)
{
var
_a
;
var
waitReceive
=
((
_a
=
useInfo
===
null
||
useInfo
===
void
0
?
void
0
:
useInfo
.
remainTimes
)
===
null
||
_a
===
void
0
?
void
0
:
_a
[
taskType
])
||
0
;
if
(
waitReceive
)
return
constants_1
.
TASK_STATUS
.
WAIT_RECEIVE
;
// 当天的完成次数
var
todayCompleteTimes
=
this
.
getTodayCompleteTask
(
taskType
,
useInfo
).
todayCompleteTimes
;
// 总共的完成次数
var
completeTimes
=
this
.
getCompleteTaskByUserTaskInfo
(
taskType
,
useInfo
).
length
;
switch
(
taskRateType
)
{
case
constants_1
.
TASK_RATE_TYPE
.
FOREVER
:
return
completeTimes
>
0
?
constants_1
.
TASK_STATUS
.
DONE
:
constants_1
.
TASK_STATUS
.
WAIT_DO
;
break
;
case
constants_1
.
TASK_RATE_TYPE
.
EVERYDAY
:
return
todayCompleteTimes
>=
limitTimesEveryday
?
constants_1
.
TASK_STATUS
.
DONE
:
constants_1
.
TASK_STATUS
.
WAIT_DO
;
break
;
case
constants_1
.
TASK_RATE_TYPE
.
NOLIMIT
:
return
constants_1
.
TASK_STATUS
.
WAIT_DO
;
break
;
}
};
/**
*
* 获取任务今天完成的次数
...
...
@@ -460,6 +498,7 @@ var TaskService = /** @class */ (function (_super) {
return
__generator
(
this
,
function
(
_a
)
{
switch
(
_a
.
label
)
{
case
0
:
utils_1
.
logger
(
needUpdateKeysArray
);
updateKeys
=
lodash_1
.
merge
.
apply
(
void
0
,
__spreadArrays
([{}],
needUpdateKeysArray
));
utils_1
.
logger
(
updateKeys
);
return
[
4
/*yield*/
,
this
.
updateUser
(
id
,
updateKeys
)];
...
...
v2.0/dist/service/task.service.js.map
View file @
51e6ce0d
{"version":3,"file":"task.service.js","sourceRoot":"","sources":["../../src/service/task.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAA8B;AAE9B,+CAAwC;AAExC,kCAA6D;AAC7D,0CAA6C;AAc7C;IAAyC,+BAAW;IAClD,qBAAY,OAAgB;eAC1B,kBAAM,OAAO,CAAC;IAChB,CAAC;IAED,iCAAW,GAAX,UAAY,QAAmB,EAAE,OAAiB,EAAE,KAAa;QAEnD,IAAA,IAAI,GAEZ,QAAQ,YAFI,EACd,WAAW,GACT,QAAQ,YADC,CACD;QAEZ,SAAS;QAES,IAAA,KAAK,GACnB,KAAK,mBADc,CACd;QAET,OAAO;YACL,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,0BAAM;YACb,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,0BAAc,CAAC,OAAO;YACpC,WAAW,EAAE,WAAW,CAAC,MAAM;SAChC,CAAA;IACH,CAAC;IAED,UAAU;IACV,wCAAkB,GAAlB,UAAmB,QAAmB,EAAE,KAAa;QAEjD,IAAA,KACE,KAAK,WAD4C,EAArC,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA,EAAE,KAAK,WAAE,CAC5C;QAED,IAAA,WAAW,GAAoB,QAAQ,YAA5B,EAAE,KAAkB,QAAQ,SAAb,EAAb,QAAQ,mBAAG,EAAE,KAAA,CAAa;QACvC,IAAA,kBAAkB,GAAK,IAAI,CAAC,oBAAoB,CAAC,YAAY,EAAE,QAAQ,CAAC,mBAAtD,CAAsD;QAChF,IAAM,sBAAsB,GAAa,IAAI,CAAC,6BAA6B,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;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,UAAU,CAAC,EAAA;;wBAArC,SAAqC,CAAA;wBAC9B,qBAAM,IAAI,CAAC,WAAW,EAAE,EAAA;4BAA/B,sBAAO,SAAwB,EAAA;;;;KAChC;IACH,kBAAC;AAAD,CAAC,AAxbD,CAAyC,sBAAW,GAwbnD"}
\ No newline at end of file
{"version":3,"file":"task.service.js","sourceRoot":"","sources":["../../src/service/task.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iCAA8B;AAC9B,+CAAwC;AACxC,kCAA6D;AAC7D,0CAA0D;AAe1D;IAAyC,+BAAW;IAClD,qBAAY,OAAgB;eAC1B,kBAAM,OAAO,CAAC;IAChB,CAAC;IAED,iCAAW,GAAX,UAAY,QAAmB,EAAE,OAAiB,EAAE,KAAa;QACvD,IAAA,WAAW,GAAK,QAAQ,YAAb,CAAa;QAEhC,SAAS;QAES,IAAA,KAAK,GACnB,KAAK,mBADc,CACd;QAET,OAAO;YACL,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,0BAAM;YACb,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,0BAAc,CAAC,OAAO;YACpC,WAAW,EAAE,WAAW,CAAC,MAAM;YAC/B,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,EAAE,0BAAc,CAAC,OAAO,CAAC;SACvE,CAAA;IACH,CAAC;IAED,UAAU;IACV,wCAAkB,GAAlB,UAAmB,QAAmB,EAAE,KAAa;QAEjD,IAAA,KACE,KAAK,WAD4C,EAArC,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA,EAAE,KAAK,WAAE,CAC5C;QAED,IAAA,WAAW,GAAK,QAAQ,YAAb,CAAa;QACxB,IAAA,kBAAkB,GAAK,IAAI,CAAC,oBAAoB,CAAC,YAAY,E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AheD,CAAyC,sBAAW,GAgenD"}
\ No newline at end of file
v2.0/dist/utils/package/logger.d.ts
View file @
51e6ce0d
export
declare
const
logFn
:
(
context
:
Context
)
=>
void
;
export
declare
const
recordErrorLog
:
(
context
:
Context
,
baseInfos
:
IControllerInfos
,
errorMsg
:
string
,
stack
:
string
)
=>
Promise
<
any
>
;
export
declare
const
logger
:
(
...
message
:
any
)
=>
void
;
export
declare
const
logger
:
(
message
:
any
)
=>
void
;
v2.0/dist/utils/package/logger.js
View file @
51e6ce0d
...
...
@@ -79,11 +79,7 @@ exports.recordErrorLog = function (context, baseInfos, errorMsg, stack) { return
});
});
};
// 本地mock 增加颜色辨识度
exports
.
logger
=
function
()
{
var
message
=
[];
for
(
var
_i
=
0
;
_i
<
arguments
.
length
;
_i
++
)
{
message
[
_i
]
=
arguments
[
_i
];
}
exports
.
logger
=
function
(
message
)
{
console
.
log
(
'
\
x1b[36m%s
\
x1b[0m'
,
"-------------------
\
u65E5
\
u5FD7----------------------------"
);
console
.
log
(
'
\
x1b[36m%s
\
x1b[0m'
,
JSON
.
stringify
(
message
,
null
,
2
));
console
.
log
(
'
\
x1b[36m%s
\
x1b[0m'
,
"-------------------
\
u65E5
\
u5FD7----------------------------"
);
...
...
v2.0/dist/utils/package/logger.js.map
View file @
51e6ce0d
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/package/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,iCAAmC;AACnC,+BAA4C;AAC5C,qCAAsC;AAEzB,QAAA,KAAK,GAAG,UAAC,OAAgB;;IACpC,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACpB,OAAO,CAAC,GAAG,CACT,6BAAgB,OAAO,CAAC,MAAM,IAAI,EAAE,WAClC,mBAAA,OAAO,aAA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qBAAe,EAAf,IAAe;QAAf,4BAAe;;IACpC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,6DAAmD,CAAC,CAAA;IACrF,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IAClE,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,6DAAmD,CAAC,CAAA;IAErF,+DAA+D;AACjE,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/utils/package/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,iCAAmC;AACnC,+BAA4C;AAC5C,qCAAsC;AAEzB,QAAA,KAAK,GAAG,UAAC,OAAgB;;IACpC,IAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;IACpB,OAAO,CAAC,GAAG,CACT,6BAAgB,OAAO,CAAC,MAAM,IAAI,EAAE,WAClC,mBAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,kBAClD,CACf,CAAA;IACD,OAAO,CAAC,GAAG,CAAC,wCAAkB,IAAI,iBAAc,CAAC,CAAA;AACnD,CAAC,CAAA;AAED,SAAS;AACI,QAAA,cAAc,GAAG,UAC5B,OAAgB,EAChB,SAA2B,EAC3B,QAAgB,EAChB,KAAa;;;;;;gBAEL,MAAM,GAAK,OAAO,OAAZ,CAAY;gBAClB,UAAU,GAAK,CAAA,OAAO,CAAC,IAAI,IAAI,EAAE,CAAA,WAAvB,CAAuB;gBACjC,QAAQ,GAAK,SAAS,SAAd,CAAc;gBACtB,QAAQ,GAAK,CAAA,QAAQ,IAAI,EAAE,CAAA,SAAnB,CAAmB;gBAC7B,MAAM,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,sBAAiB,CAAC,CAAA;gBAC1D,YAAY,GAAW,CAAG,OAAO,CAAC,MAAM,IAAI,EAAE,WAClD,mBAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,CAC9D,CAAA;gBACK,qBAAM,MAAM,CAAC,SAAS,CAAC;wBAC5B,MAAM,QAAA;wBACN,UAAU,YAAA;wBACV,QAAQ,UAAA;wBACR,UAAU,EAAE,KAAK;wBACjB,YAAY,cAAA;wBACZ,QAAQ,UAAA;wBACR,UAAU,EAAE,OAAO,CAAC,UAAU;wBAC9B,MAAM,EAAE,OAAO,CAAC,IAAI;wBACpB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;wBACtB,SAAS,EAAE,gBAAQ,EAAE;wBACrB,SAAS,EAAE,CAAC;qBACb,CAAC,EAAA;oBAZF,sBAAO,SAYL,EAAA;;;KACH,CAAA;AAED,iBAAiB;AACJ,QAAA,MAAM,GAAG,UAAC,OAAY;IACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,6DAAmD,CAAC,CAAA;IACrF,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;IAClE,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,6DAAmD,CAAC,CAAA;IAErF,+DAA+D;AACjE,CAAC,CAAA"}
\ No newline at end of file
v2.0/src/constants.ts
View file @
51e6ce0d
...
...
@@ -151,6 +151,13 @@ export const TASK_RATE_TYPE = {
NOLIMIT
:
3
}
//任务状态
export
const
TASK_STATUS
=
{
WAIT_DO
:
1
,
// 未完成
WAIT_RECEIVE
:
2
,
// 待领取
DONE
:
3
// 已完成
}
// 奖品类型
export
const
PRIZE_TYPE
=
{
ENAME
:
1
,
...
...
v2.0/src/controller/task.controller.ts
View file @
51e6ce0d
...
...
@@ -8,12 +8,6 @@ import { TaskService, BaseService } from '../service'
import
{
logger
}
from
'../utils'
import
{
time
}
from
'console'
// {
// "handler": "getTaskList",
// "data": {
// "activityId": "5f213791964f9706aa59b192"
// }
// }
export
default
class
Task
{
/**
* 任务列表
...
...
@@ -32,8 +26,10 @@ export default class Task {
// 更新user状态
let
updatedUserInfo
=
await
taskService
.
updateTasks
(
userInfo
.
_id
,
// 需要查询更新的任务
[
taskService
.
updateVipTaskStatus
(
userInfo
,
vipInfo
,
tasks
),
taskService
.
updateVipTask
(
userInfo
,
vipInfo
,
tasks
),
taskService
.
updateSignTask
(
userInfo
,
tasks
),
await
taskService
.
updateOrderGoodsTask
(
userInfo
,
tasks
,
startTime
,
session
)
],
userInfo
...
...
@@ -45,6 +41,9 @@ export default class Task {
const
vipTask
=
taskService
.
initVipTask
(
updatedUserInfo
,
vipInfo
,
tasks
)
// 关注店铺
const
followTask
=
taskService
.
initFollowTask
(
updatedUserInfo
,
tasks
)
// 签到任务
const
signTask
=
taskService
.
initSignTask
(
updatedUserInfo
,
tasks
)
// 下单任务
const
orderGoodsTask
=
taskService
.
initOrderGoodsTask
(
updatedUserInfo
,
tasks
)
// 浏览商品任务
...
...
@@ -60,6 +59,7 @@ export default class Task {
//const exchangeCreditsTask = taskService.initExchangeCreditsTask(updatedUserInfo, tasks)
return
resultsModel
.
success
([
signTask
,
vipTask
,
followTask
,
orderGoodsTask
,
...
...
v2.0/src/service/task.service.ts
View file @
51e6ce0d
...
...
@@ -5,23 +5,22 @@
*/
import
{
merge
}
from
'lodash'
import
{
BaseDao
}
from
'../sdk'
import
UserService
from
'./user.service'
import
{
USER_DB_NAME
}
from
'../db'
import
{
getToday
,
getUserOrderlist
,
logger
}
from
'../utils'
import
{
TASK_RATE_TYPE
}
from
'../constants'
import
{
TASK_RATE_TYPE
,
TASK_STATUS
}
from
'../constants'
interface
ITaskInfo
{
taskType
?:
string
url
?:
string
rewards
:
number
itemIds
?:
string
todayCompleteTimes
?:
number
completeTimes
?:
number
taskRateType
:
number
taskType
?:
string
// 任务类型
url
?:
string
// 链接地址
rewards
:
number
// 任务奖励
itemIds
?:
string
// 商品配置ids 商品相关任务返回
todayCompleteTimes
?:
number
// 今日完成次数
completeTimes
?:
number
// 总共完成次数
taskRateType
:
number
// 任务频率
times
?:
number
// 任务每日限制次数
waitReceive
?:
number
title
:
string
waitReceive
?:
number
// 待领取次数
title
:
string
// 任务文案
status
:
number
// 任务状态 1未完成 2 待领取 3 已完成
}
export
default
class
TaskService
extends
UserService
{
constructor
(
context
:
Context
)
{
...
...
@@ -29,10 +28,7 @@ export default class TaskService extends UserService {
}
initVipTask
(
userInfo
:
IUserInfo
,
vipInfo
:
IVipInfo
,
tasks
:
ITasks
):
ITaskInfo
{
const
{
member
:
{
flag
},
remainTimes
}
=
userInfo
const
{
remainTimes
}
=
userInfo
// 后台配置奖励
const
{
...
...
@@ -45,7 +41,8 @@ export default class TaskService extends UserService {
url
:
vipInfo
.
url
,
rewards
:
value
,
taskRateType
:
TASK_RATE_TYPE
.
FOREVER
,
waitReceive
:
remainTimes
.
member
waitReceive
:
remainTimes
.
member
,
status
:
this
.
setTaskStatus
(
userInfo
,
'member'
,
TASK_RATE_TYPE
.
FOREVER
)
}
}
...
...
@@ -55,7 +52,7 @@ export default class TaskService extends UserService {
orderGoods
:
{
value
,
itemIds
,
taskRateType
,
times
}
}
=
tasks
const
{
remainTimes
,
taskInfo
=
{}
}
=
userInfo
const
{
remainTimes
}
=
userInfo
const
{
todayCompleteTimes
}
=
this
.
getTodayCompleteTask
(
'orderGoods'
,
userInfo
)
const
orderGoodsCompleteList
:
object
[]
=
this
.
getCompleteTaskByUserTaskInfo
(
'orderGoods'
,
userInfo
)
let
orderTask
:
ITaskInfo
=
{
...
...
@@ -67,19 +64,10 @@ export default class TaskService extends UserService {
times
,
todayCompleteTimes
,
completeTimes
:
orderGoodsCompleteList
.
length
,
status
:
this
.
setTaskStatus
(
userInfo
,
'orderGoods'
,
taskRateType
,
times
),
waitReceive
:
remainTimes
.
orderGoods
}
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && orderGoodsCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
return
orderTask
}
...
...
@@ -102,18 +90,9 @@ export default class TaskService extends UserService {
waitReceive
:
remainTimes
.
browseGoods
,
todayCompleteTimes
,
completeTimes
:
browseGoodsCompleteList
.
length
,
status
:
this
.
setTaskStatus
(
userInfo
,
'browseGoods'
,
taskRateType
,
times
),
taskRateType
}
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && browseGoodsCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
return
orderTask
}
...
...
@@ -134,22 +113,13 @@ export default class TaskService extends UserService {
waitReceive
:
remainTimes
.
collectGoods
,
todayCompleteTimes
,
completeTimes
:
completeList
.
length
,
taskRateType
taskRateType
,
status
:
this
.
setTaskStatus
(
userInfo
,
'collectGoods'
,
taskRateType
,
times
)
}
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && browseGoodsCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
return
orderTask
}
// 初始化
收藏商品
任务
// 初始化
跳转
任务
initJumpLinkTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
):
ITaskInfo
{
const
{
value
,
link
,
taskRateType
,
times
}
=
tasks
.
jumpLink
...
...
@@ -166,18 +136,10 @@ export default class TaskService extends UserService {
waitReceive
:
remainTimes
.
jumpLink
,
todayCompleteTimes
,
completeTimes
:
completeList
.
length
,
taskRateType
taskRateType
,
status
:
this
.
setTaskStatus
(
userInfo
,
'jumpLink'
,
taskRateType
,
times
)
}
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && browseGoodsCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
return
orderTask
}
...
...
@@ -187,7 +149,7 @@ export default class TaskService extends UserService {
inviteFriends
:
{
value
,
taskRateType
,
times
}
}
=
tasks
const
{
remainTimes
,
taskInfo
}
=
userInfo
const
{
remainTimes
}
=
userInfo
const
{
todayCompleteTimes
}
=
this
.
getTodayCompleteTask
(
'invites'
,
userInfo
)
const
invitesCompleteList
:
object
[]
=
this
.
getCompleteTaskByUserTaskInfo
(
'invites'
,
userInfo
)
...
...
@@ -199,19 +161,10 @@ export default class TaskService extends UserService {
times
,
todayCompleteTimes
,
completeTimes
:
invitesCompleteList
.
length
,
waitReceive
:
remainTimes
.
invites
waitReceive
:
remainTimes
.
invites
,
status
:
this
.
setTaskStatus
(
userInfo
,
'invites'
,
taskRateType
,
times
)
}
// // 永久任务且已完成
// if (taskRateType === TASK_RATE_TYPE.FOREVER && invitesCompleteList.length) {
// orderTask.done = true
// }
// // 每日限制完成且完成次数达到限制
// if (taskRateType === TASK_RATE_TYPE.EVERYDAY && todayCompleteTimes >= times) {
// orderTask.done = true
// }
return
orderTask
}
...
...
@@ -230,7 +183,31 @@ export default class TaskService extends UserService {
rewards
:
value
,
taskRateType
:
TASK_RATE_TYPE
.
FOREVER
,
waitReceive
:
remainTimes
.
follow
,
completeTimes
:
followCompleteList
.
length
completeTimes
:
followCompleteList
.
length
,
status
:
this
.
setTaskStatus
(
userInfo
,
'follow'
,
TASK_RATE_TYPE
.
FOREVER
)
}
}
// 初始化签到任务
initSignTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
):
ITaskInfo
{
const
{
sign
:
{
value
}
}
=
tasks
const
{
remainTimes
}
=
userInfo
const
completeList
:
object
[]
=
this
.
getCompleteTaskByUserTaskInfo
(
'sign'
,
userInfo
)
const
{
todayCompleteTimes
}
=
this
.
getTodayCompleteTask
(
'sign'
,
userInfo
)
return
{
taskType
:
`sign`
,
title
:
`每日签到`
,
rewards
:
value
,
times
:
1
,
taskRateType
:
TASK_RATE_TYPE
.
EVERYDAY
,
waitReceive
:
remainTimes
.
sign
,
completeTimes
:
completeList
.
length
,
todayCompleteTimes
,
status
:
this
.
setTaskStatus
(
userInfo
,
'sign'
,
TASK_RATE_TYPE
.
EVERYDAY
)
}
}
...
...
@@ -249,12 +226,13 @@ export default class TaskService extends UserService {
times
,
taskRateType
:
TASK_RATE_TYPE
.
EVERYDAY
,
todayCompleteTimes
,
waitReceive
:
remainTimes
.
exchangeCredits
waitReceive
:
remainTimes
.
exchangeCredits
,
status
:
this
.
setTaskStatus
(
userInfo
,
'exchangeCredits'
,
TASK_RATE_TYPE
.
EVERYDAY
)
}
}
// 根据会员状态更新
updateVipTask
Status
(
userInfo
:
IUserInfo
,
vipInfo
:
IVipInfo
,
tasks
:
ITasks
)
{
updateVipTask
(
userInfo
:
IUserInfo
,
vipInfo
:
IVipInfo
,
tasks
:
ITasks
)
{
let
{
member
,
remainTimes
,
taskInfo
}
=
userInfo
const
{
newMember
}
=
member
...
...
@@ -285,8 +263,8 @@ export default class TaskService extends UserService {
return
projection
}
// 根据下单下单记录,更新状态
async
updateOrderGoodsTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
,
activityStartTime
:
number
,
session
?:
string
)
{
let
{
taskInfo
,
remainTimes
}
=
userInfo
const
{
orderGoods
:
{
value
,
itemIds
,
taskRateType
,
times
}
}
=
tasks
...
...
@@ -339,6 +317,32 @@ export default class TaskService extends UserService {
return
projection
}
// 更新签到任务数据
updateSignTask
(
userInfo
:
IUserInfo
,
tasks
:
ITasks
)
{
// 获取签到奖励
const
{
sign
:
{
value
}
}
=
tasks
||
{}
const
{
todayCompleteTimes
}
=
this
.
getTodayCompleteTask
(
'sign'
,
userInfo
)
const
today
=
getToday
()
logger
(
todayCompleteTimes
)
// 今天没有有完成记录
return
todayCompleteTimes
===
0
?
{
$inc
:
{
'remainTimes.sign'
:
value
},
$push
:
{
[
`taskInfo.
${
today
}
.sign`
]:
{
createTime
:
Date
.
now
()
}
}
}
:
{}
}
/**
*更新关注店铺任务状态
*
...
...
@@ -377,6 +381,40 @@ export default class TaskService extends UserService {
})
}
/**
*
* 根据用户和任务完成情况,设置任务状态
*
* @param {IUserInfo} useInfo
* @param {string} taskType
* @param {number} taskRateType
* @param {number} [limitTimesEverday] 每天限制次数 任务频率为每天的时候必填
* @return {taskTatus} 1未完成 2 待领取 3 已完成
* @memberof TaskService
*/
setTaskStatus
(
useInfo
:
IUserInfo
,
taskType
:
string
,
taskRateType
:
number
,
limitTimesEveryday
?:
number
):
number
{
const
waitReceive
=
useInfo
?.
remainTimes
?.[
taskType
]
||
0
if
(
waitReceive
)
return
TASK_STATUS
.
WAIT_RECEIVE
// 当天的完成次数
const
{
todayCompleteTimes
}
=
this
.
getTodayCompleteTask
(
taskType
,
useInfo
)
// 总共的完成次数
const
completeTimes
=
this
.
getCompleteTaskByUserTaskInfo
(
taskType
,
useInfo
).
length
switch
(
taskRateType
)
{
case
TASK_RATE_TYPE
.
FOREVER
:
return
completeTimes
>
0
?
TASK_STATUS
.
DONE
:
TASK_STATUS
.
WAIT_DO
break
case
TASK_RATE_TYPE
.
EVERYDAY
:
return
todayCompleteTimes
>=
limitTimesEveryday
?
TASK_STATUS
.
DONE
:
TASK_STATUS
.
WAIT_DO
break
case
TASK_RATE_TYPE
.
NOLIMIT
:
return
TASK_STATUS
.
WAIT_DO
break
}
}
/**
*
* 获取任务今天完成的次数
...
...
@@ -457,6 +495,7 @@ export default class TaskService extends UserService {
* @memberof TaskService
*/
async
updateTasks
(
id
:
string
,
needUpdateKeysArray
:
object
[],
userInfo
:
IUserInfo
):
Promise
<
false
|
IUserInfo
>
{
logger
(
needUpdateKeysArray
)
const
updateKeys
:
object
=
merge
({},
...
needUpdateKeysArray
)
logger
(
updateKeys
)
...
...
v2.0/src/typings/user.d.ts
View file @
51e6ce0d
...
...
@@ -27,6 +27,7 @@ interface IRemainTimesInfo {
collectGoods
?:
number
exchangeCredits
?:
number
jumpLink
?:
number
sign
?:
number
}
interface
IMemberInfo
{
...
...
v2.0/src/utils/package/logger.ts
View file @
51e6ce0d
...
...
@@ -45,7 +45,7 @@ export const recordErrorLog = async (
}
// 本地mock 增加颜色辨识度
export const logger = (
...
message: any) => {
export const logger = (message: any) => {
console.log('\x1b[36m%s\x1b[0m', `
-------------------
日志
----------------------------
`)
console.log('\x1b[36m%s\x1b[0m', JSON.stringify(message, null, 2))
console.log('\x1b[36m%s\x1b[0m', `
-------------------
日志
----------------------------
`)
...
...
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