Commit d61b97d8 authored by qinhaitao's avatar qinhaitao

feat: 🎸 增加出参类型校验

parent 1c93be02
......@@ -2,5 +2,5 @@
interface Iconfig {
generateVipCallBackUrl(activityId?: string): string;
}
export declare const getConfig: (context: IContext) => Iconfig;
export declare const getConfig: (context: IContext<{}>) => Iconfig;
export {};
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,mCAA6B;AAC7B,+BAAyB;AAMzB,IAAM,OAAO,GAAG;IACd,MAAM,kBAAA;IACN,IAAI,gBAAA;IACJ,IAAI,EAAE,cAAI;CACX,CAAA;AAED,aAAa;AACA,QAAA,SAAS,GAAG,UAAC,OAAiB;IACzC,IAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAA;AACvC,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,mCAA6B;AAC7B,+BAAyB;AAMzB,IAAM,OAAO,GAAG;IACd,MAAM,kBAAA;IACN,IAAI,gBAAA;IACJ,IAAI,EAAE,cAAI;CACX,CAAA;AAED,aAAa;AACA,QAAA,SAAS,GAAG,UAAC,OAAqB;IAC7C,IAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAA;AACvC,CAAC,CAAA"}
\ No newline at end of file
/** @format */
import { AwardsService } from '../service';
interface IPrizeListParams {
activityId: string;
}
interface IReceiveOjectParams {
activityId: string;
_id: string;
name: string;
phone: string;
province: string;
city: string;
area: string;
addressdetail: string;
}
interface IReceiveEnameParams {
activityId: string;
_id: string;
}
export default class AwardsController {
/**
* 我的奖品列表
*/
getMyPrizeList(context: IContext, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getMyPrizeList(context: IContext<IPrizeListParams>, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<IAwards[], true>>;
/**
* 领取实物
*/
receiveObjectPrize(context: IContext, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
receiveObjectPrize(context: IContext<IReceiveOjectParams>, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<boolean, true>>;
/**
* 权益重新领取
*/
receiveEnamePrize(context: IContext, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
receiveEnamePrize(context: IContext<IReceiveEnameParams>, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{}, true>>;
/**
* 概率抽奖
*/
drawLotteryPrize(context: IContext, { userInfo }: IControllerInfos, [awardSer]: [AwardsService]): Promise<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<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
data: {
type: number;
name: string;
};
}, true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
id: any;
type: number;
name: string;
image: string;
}, true>>;
}
export {};
......@@ -92,14 +92,10 @@ var AwardsController = /** @class */ (function () {
addressdetail: addressdetail,
name: name,
phone: phone
})
//@ts-ignore
];
})];
case 1:
result = _d.sent();
//@ts-ignore
if (result.code) {
//@ts-ignore
return [2 /*return*/, sdk_1.resultsModel.error(result)];
}
return [2 /*return*/, sdk_1.resultsModel.success(result)];
......
{"version":3,"file":"awards.controller.js","sourceRo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AA;6BACN,CAAC,EAAA;;;;KACH;IA9HD;QAHC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;0DAQzB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAChG,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;8DAmBzB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAClC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;6DAgBzB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAC5C,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;4DA+DzB;IACH,uBAAC;CAAA,AAtID,IAsIC;kBAtIoB,gBAAgB"}
\ No newline at end of file
{"version":3,"file":"awards.controller.js","sourceRoot":"","sources":["../../src/controller/awards.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAkF;AAClF,8BAAqC;AACrC,sCAA0C;AAC1C,0CAAuE;AACvE,kCAA2C;AAuB3C;IAAA;IAqIA,CAAC;IApIC;;OAEG;IAIG,yCAAc,GAApB,UAAqB,OAAmC,EAAE,EAAE,EAAE,EAA2B;YAA1B,QAAQ,QAAA;;;;;;wBAEnE,MAAM,GAEJ,OAAO,OAFH,EACE,UAAU,GAChB,OAAO,gBADS,CACT;wBACE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,uBAAa,CAAC,CAAC;;;;8DAkBzB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAClC,qBAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;QAC9B,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;6DAgBzB;IAQD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAC5C,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,uBAAa,CAAC,CAAC;;;;4DA+DzB;IACH,uBAAC;CAAA,AArID,IAqIC;kBArIoB,gBAAgB"}
\ No newline at end of file
......@@ -4,9 +4,13 @@ export default class BaseController {
/**
* 活动基本信息
*/
getActivityBaseInfoById(context: IContext, {}: {}, [baseService]: [BaseService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getActivityBaseInfoById(context: IContext<{
activityId: string;
}>, {}: {}, [baseService]: [BaseService]): Promise<IResult<IActivityInfo>>;
/**
* 获取商品列表
*/
getItemListByItemIds(context: IContext, { session }: IControllerInfos, [baseService]: [BaseService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getItemListByItemIds(context: IContext<{
itemIds: string;
}>, { session }: IControllerInfos, [baseService]: [BaseService]): Promise<IResult<ITaoBaoItems[]>>;
}
......@@ -49,7 +49,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = require("./../constants");
var decorator_1 = require("../decorator");
var sdk_1 = require("../sdk");
var utils_1 = require("../utils");
var service_1 = require("../service");
var BaseController = /** @class */ (function () {
function BaseController() {
......@@ -92,7 +91,6 @@ var BaseController = /** @class */ (function () {
return [4 /*yield*/, baseService.getItemListByIds(itemIds, session)];
case 1:
list = _c.sent();
utils_1.logger(list);
return [2 /*return*/, sdk_1.resultsModel.success(list)];
}
});
......
{"version":3,"file":"base.controller.js","sourceRoot":"","sources":["../../src/controller/base.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;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Ac"}
\ No newline at end of file
{"version":3,"file":"base.controller.js","sourceRoot":"","sources":["../../src/controller/base.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAA2C;AAC3C,0CAAoD;AAEpD,8BAAqC;AAErC,sCAAwC;AACxC;IAAA;IAuCA,CAAC;IAtCC;;OAEG;IAGG,gDAAuB,GAA7B,UACE,OAEE,EACF,EAAE,EACF,EAA4B;YAA3B,WAAW,QAAA;;;;;;wBAEJ,UAAU,GAAK,OAAO,CAAC,IAAI,WAAjB,CAAiB;wBACnC,OAAO;wBACP,IAAI,CAAC,UAAU,EAAE;4BACf,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,wBAAc,CAAiB,EAAA;yBACnF;wBAEoB,qBAAM,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,EAAA;;wBAAxD,YAAY,GAAG,SAAyC;wBAC9D,sBAAO,kBAAY,CAAC,OAAO,CAAgB,YAAY,CAAC,EAAA;;;;KACzD;IAED;;OAEG;IAGG,6CAAoB,GAA1B,UACE,OAAsC,EACtC,EAA6B,EAC7B,EAA4B;YAD1B,OAAO,aAAA;YACR,WAAW,QAAA;;;;;;wBAEJ,OAAO,GAAK,OAAO,CAAC,IAAI,QAAjB,CAAiB;wBAEnB,qBAAM,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,EAAA;;wBAA3D,IAAI,GAAG,SAAoD;wBAEjE,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;KAClC;IAhCD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;iEAgBvB;IAOD;QAFC,uBAAW,CAAC,CAAC,SAAS,CAAC,CAAC;QACxB,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;8DAWvB;IACH,qBAAC;CAAA,AAvCD,IAuCC;kBAvCoB,cAAc"}
\ No newline at end of file
......@@ -4,5 +4,5 @@ export default class Share {
/**
* 完成分享
*/
doHelp(context: IContext, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, taskService, accessService]: [UserService, TaskService, AccessService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
doHelp(context: IContext<IParams>, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, taskService, accessService]: [UserService, TaskService, AccessService]): Promise<IResult<boolean>>;
}
{"version":3,"file":"share.controller.js","sourceRoot":"","sources":["../../src/controller/share.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAA2C;AAC3C,4CAA8E;AAC9E,kDAAgD;AAEhD,8BAAqC;AACrC,kCAAmC;AACnC,sCAAoE;AAEpE;IAAA;IAyDA,CAAC;IAxDC;;OAEG;IAIG,sBAAM,GAAZ,UACE,OAAiB,EACjB,EAAqD,EACrD,EAAoF;YADlF,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;;wBAEhC,QAAQ,GAAK,OAAO,CAAC,IAAI,SAAjB,CAAiB;wBACzB,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAEQ,qBAAM,WAAW,CAAC,mBAAmB,CAAC,QAAQ,CAAC;4BACjF,iCAAiC;0BADgD;;wBAA3E,cAAc,GAAc,SAA+C;wBACjF,iCAAiC;wBACjC,IAAI,CAAC,cAAc;4BAAE,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,uBAAuB,CAAC,EAAA;wBAE5E,kBAAkB,GAAG,WAAW,CAAC,6BAA6B,CAAC,SAAS,EAAE,cAAc,CAAC,CAAA;wBAE/F,eAAe;wBACf,IAAI,kBAAkB,CAAC,IAAI,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,MAAM,KAAK,MAAM,EAAnB,CAAmB,CAAC,EAAE;4BACrD,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,2BAA2B,CAAC,EAAA;yBAClE;wBAKO,KAAK,GAAK,YAAY,MAAjB,CAAiB;wBAGX,KAAK,GACZ,CAAA,KAAK,IAAI,EAAE,CAAA,oBADC,CACD;wBAGjB,QAAQ,GAAG,WAAW,CAAC,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;wBAG3D,YAAY,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,UAAA,CAAC,IAAI,OAAA,CAAC,CAAC,CAAC,EAAH,CAAG,CAAC,CAAA;wBAEzC,KAAK,GAAG,gBAAQ,EAAE,CAAA;6BACpB,YAAY,EAAZ,wBAAY;wBACD,YAAY,GAAK,cAAc,IAAnB,CAAmB;wBAC5C,mBAAmB;wBACnB,qBAAM,WAAW,CAAC,UAAU,CAAC,YAAY,EAAE;gCACzC,IAAI,EAAE;oCACJ,qBAAqB,EAAE,KAAK;iCAC7B;gCACD,KAAK;oCACH,GAAC,cAAY,KAAK,aAAU,IAAG,EAAE,MAAM,QAAA,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE;uCAClE;6BACF,CAAC,EAAA;;wBARF,mBAAmB;wBACnB,SAOE,CAAA;;4BAGJ,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;KAClC;IAjDD;QAHC,mBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACvC,yBAAiB;QACjB,mBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;uCAkDnD;IACH,YAAC;CAAA,AAzDD,IAyDC;kBAzDoB,KAAK"}
\ No newline at end of file
{"version":3,"file":"share.controller.js","sourceRoot":"","sources":["../../src/controller/share.controller.ts"],"names":[],"mappings":";AAAA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I,OAAA,CAAC,CAAC,CAAC,EAAH,CAAG,CAAC,CAAA;wBAEzC,KAAK,GAAG,gBAAQ,EAAE,CAAA;6BACpB,YAAY,EAAZ,wBAAY;wBACD,YAAY,GAAK,cAAc,IAAnB,CAAmB;wBAC5C,mBAAmB;wBACnB,qBAAM,WAAW,CAAC,UAAU,CAAC,YAAY,EAAE;gCACzC,IAAI,EAAE;oCACJ,qBAAqB,EAAE,KAAK;iCAC7B;gCACD,KAAK;oCACH,GAAC,cAAY,KAAK,aAAU,IAAG,EAAE,MAAM,QAAA,EAAE,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE;uCAClE;6BACF,CAAC,EAAA;;wBARF,mBAAmB;wBACnB,SAOE,CAAA;;4BAGJ,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;;;;KAClC;IAjDD;QAHC,mBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACvC,yBAAiB;QACjB,mBAAQ,CAAC,CAAC,qBAAW,EAAE,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;uCAkDnD;IACH,YAAC;CAAA,AAzDD,IAyDC;kBAzDoB,KAAK"}
\ No newline at end of file
......@@ -4,5 +4,5 @@ export default class StatController {
/**
* 统计数据
*/
getStats(context: IContext): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getStats(context: IContext<IParams>): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
}
{"version":3,"file":"stat.controller.js","sourceRoot":"","sources":["../../src/controller/stat.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4BAAoE;AACpE,8BAAmF;AACnF,0CAAyC;AACzC,gCAAiC;AAEjC,cAAc;AACd;IAAA;IA+GA,CAAC;IA9GC;;OAEG;IACG,iCAAQ,GAAd,UAAe,OAAiB;;;;;;wB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,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;4BACtB;gCACE,IAAI,EAAE,6BAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,SAAI,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAG;gCACzE,IAAI,EAAE,QAAQ;6BACf;yBACF,CAAC,CAAA;wBAIW,qBAAM,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC;gCAC/C,WAAW,EAAE,MAAM;gCACnB,QAAQ,EAAE,6BAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,SAAI,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,UAAO;6BACnF,CAAC,EAAA;;wBAHE,MAAM,GAAG,SAGX;wBACF,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAA;wBACjC,IAAI,MAAM,CAAC,GAAG,EAAE;4BACd,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;yBAC1E;wBACD,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,EAAA;;;wBAEvC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAC,CAAC,CAAA;wBACxB,OAAO;wBACP,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,sCAAQ,CAAC,EAAA;;;;;KAE/D;IACH,qBAAC;AAAD,CAAC,AA/GD,IA+GC"}
\ No newline at end of file
/** @format */
import { TaskService, BaseService } from '../service';
import { ITaskInfo } from '../service/task.service';
export default class Task {
/**
* 任务列表
*/
getTaskList(context: IContext, { userInfo, vipInfo, activityInfo, session }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult>;
getTaskList(context: IContext<{
activityId: string;
}>, { userInfo, vipInfo, activityInfo, session }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<ITaskInfo[]>>;
/**
* 完成关注店铺任务
*/
doFollowTask(context: IContext, { userInfo, activityInfo }: IControllerInfos, [TaskService]: [TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
doFollowTask(context: IContext<{
activityId: string;
}>, { userInfo, activityInfo }: IControllerInfos, [TaskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 积分兑换次数
*/
doExchangeCreditsTask(context: IContext, { userInfo, activityInfo, session }: IControllerInfos, [taskService]: [TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
doExchangeCreditsTask(context: IContext<IParams>, { userInfo, activityInfo, session }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 浏览商品
*/
doBrowseGoodsTask(context: IContext, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
doBrowseGoodsTask(context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 收藏商品
*/
doCollectGoodsTask(context: IContext, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
doCollectGoodsTask(context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 浏览链接
*/
doJumpLinkTask(context: IContext, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
doJumpLinkTask(context: IContext<IParams>, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 领取任务奖励
*/
receiveTaskRewards(context: IContext, { userInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult>;
receiveTaskRewards(context: IContext<IParams>, { userInfo }: IControllerInfos, [taskService]: [TaskService]): Promise<IResult<boolean>>;
/**
* 获取收藏商品列表
*/
getCollectGoodsList(context: IContext, { session, userInfo }: IControllerInfos, [baseService, taskService]: [BaseService, TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getCollectGoodsList(context: IContext<IParams>, { session, userInfo }: IControllerInfos, [baseService, taskService]: [BaseService, TaskService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
collected: boolean;
itemId: string;
name: string;
price: string;
url: string;
image: string;
desc: string;
}[], true>>;
}
This diff is collapsed.
/** @format */
import { UserService, AccessService } from '../service';
interface IVipContext extends IContext {
data: {
activityId: string;
callbackUrl?: string;
};
interface IVipParams {
activityId: string;
callbackUrl?: string;
}
interface ILoginContext extends IContext {
data: {
activityId: string;
userNick: string;
avatar: string;
isFollow: boolean;
inviteId?: string;
};
interface ILoginParams {
activityId: string;
userNick: string;
avatar: string;
isFollow: boolean;
inviteId?: string;
}
export default class User {
/**
* 登录接口, 初始化/更新用户信息
*/
login(context: ILoginContext, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, accessService]: [UserService, AccessService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
login(context: IContext<ILoginParams>, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, accessService]: [UserService, AccessService]): Promise<IResult<{
openId: string;
}>>;
/**
* 获取会员信息
*/
getVipInfo(context: IVipContext, { session, activityUserNick }: IControllerInfos, [userService]: [UserService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getVipInfo(context: IContext<IVipParams>, { session, activityUserNick }: IControllerInfos, [userService]: [UserService]): Promise<IResult<IVipInfo>>;
}
export {};
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAuE;AAEvE,8BAAqC;AACrC,sCAAuD;AACvD,oC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IAzCD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC7D,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;qCAsBtC;IAMD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;0CAevB;IACH,WAAC;CAAA,AAjDD,IAiDC;kBAjDoB,IAAI"}
\ No newline at end of file
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAuE;AAEvE,8BAAqC;AACrC,sCAAuD;AACvD,oCAAqC;AAYrC;IAAA;IAiDA,CAAC;IAhDC;;OAEG;IAIG,oBAAK,GAAX,UACE,OAA+B,EAC/B,EAAqD,EACrD,EAA0D;YADxD,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;wBAEnB,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAElB,QAAQ,GAAK,OAAO,CAAC,IAAI,SAAjB,CAAiB;6BAE7B,CAAC,QAAQ,EAAT,wBAAS;wBACX,qBAAM,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,EAAA;;wBAArD,SAAqD,CAAA;;4BAErD,qBAAM,WAAW,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAA;;wBAAjE,SAAiE,CAAA;;;oBAGnE,UAAU;oBACV,qBAAM,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,EAAA;;wBADtD,UAAU;wBACV,SAAsD,CAAA;wBAEtD,sBAAO,kBAAY,CAAC,OAAO,CAAqB;gCAC9C,MAAM,QAAA;6BACP,CAAC,EAAA;;;;KACH;IACD;;OAEG;IAGG,yBAAU,GAAhB,UACE,OAA6B,EAC7B,EAA+C,EAC/C,EAA4B;YAD1B,OAAO,aAAA,EAAE,gBAAgB,sBAAA;YAC1B,WAAW,QAAA;;;;;;wBAEN,KAA8B,OAAO,CAAC,IAAI,EAAxC,WAAW,iBAAA,EAAE,UAAU,gBAAA,CAAiB;wBACxC,sBAAsB,GAAK,kBAAS,CAAC,OAAO,CAAC,uBAAvB,CAAuB;wBACtC,qBAAM,WAAW,CAAC,UAAU,CACzC,OAAO,EACP,gBAAgB,EAChB,WAAW,IAAI,sBAAsB,CAAC,UAAU,CAAC,CAClD,EAAA;;wBAJK,MAAM,GAAG,SAId;wBAED,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;;KACpC;IAzCD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC7D,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;qCAsBtC;IAMD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;0CAevB;IACH,WAAC;CAAA,AAjDD,IAiDC;kBAjDoB,IAAI"}
\ No newline at end of file
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/decorator/services.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,sCAAwC;AACxC,kCAAkE;AAClE,8BAAqC;AACrC,0CAAyC;AACzC,SAAe,YAAY,CAAC,OAAiB,EAAE,SAA2B;;;;;;oBAClE,WAAW,GAAG,IAAI,qBAAW,CAAC,OAAO,CAAC,CAAA;yBAExC,CAAC,SAAS,CAAC,QAAQ,EAAnB,wBAAmB;oBACJ,qBAAM,WAAW,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,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,gBAAgB,CAAC,CAAC,EAAA;;4BAAxE,GAAG,GAAG,SAAkE,CAAA;;;;4BAExE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,OAAK,CAAC,CAAA;4BAC3B,qBAAM,sBAAc,CAAC,OAAO,EAAE,SAAS,EAAE,OAAK,CAAC,QAAQ,EAAE,EAAE,OAAK,CAAC,KAAK,CAAC,EAAA;;4BAAvE,SAAuE,CAAA;4BACvE,GAAG,GAAG,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,CAAC,CAAA;;gCAEnD,sBAAO,GAAG,EAAA;;;;SACX,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
/** @format */
/** @format */
declare namespace getActivityBaseInfoById {
interface Context extends IContext {
data: {
activityId: string;
};
}
type Context = IContext<{
activityId: string;
}>;
interface Result extends IResult {
data: IActivityInfo;
}
......
/** @format */
//# sourceMappingURL=base.js.map
\ No newline at end of file
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/model/base.ts"],"names":[],"mappings":""}
\ No newline at end of file
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/model/base.ts"],"names":[],"mappings":"AAAA,cAAc"}
\ No newline at end of file
......@@ -4,9 +4,9 @@
* @format
*/
export default class UserAccessService {
context: IContext;
context: IContext<IParams>;
accessdao: IBaseDao;
constructor(context: IContext);
constructor(context: IContext<IParams>);
/**
* 增加访问记录
* @param {是否关注店铺} isFollow
......
{"version":3,"file":"access.service.js","sourceRoot":"","sources":["../../src/service/access.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAgC;AAChC,kCAAmC;AACnC,4BAAsC;AAEtC;IAGE,2BAAY,OAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,SAAS,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,mBAAc,CAAC,CAAA;IACvD,CAAC;IACD;;;OAGG;IACG,qCAAS,GAAf,UAAgB,QAAiB,EAAE,KAAc;;;;;;wBAC3C,KAAmB,IAAI,CAAC,OAAO,EAA7B,MAAM,YAAA,EAAE,IAAI,UAAA,CAAiB;wBAC7B,UAAU,GAAiC,IAAI,WAArC,EAAE,QAAQ,GAAuB,IAAI,SAA3B,EAAE,MAAM,GAAe,IAAI,OAAnB,EAAE,QAAQ,GAAK,IAAI,SAAT,CAAS;wBAE9C,qBAAM,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;gCACpC,MAAM,QAAA;gCACN,UAAU,YAAA;gCACV,QAAQ,UAAA;gCACR,MAAM,QAAA;gCACN,cAAc,EAAE,CAAC,CAAC,QAAQ;gCAC1B,QAAQ,UAAA;gCACR,QAAQ,UAAA;gCACR,KAAK,OAAA;gCACL,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;gCACtB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;gCACtB,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;gCACtB,SAAS,EAAE,gBAAQ,EAAE;6BACtB,CAAC,EAAA;4BAbF,sBAAO,SAaL,EAAA;;;;KACH;IAEK,0CAAc,GAApB;;;;;;wBACM,KAAmB,IAAI,CAAC,OAAO,EAA7B,MAAM,YAAA,EAAE,IAAI,UAAA,CAAiB;wBAC7B,UAAU,GAAK,IAAI,WAAT,CAAS;wBAClB,qBAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;gCAChC,MAAM,QAAA;gCACN,UAAU,YAAA;6BACX,CAAC,EAAA;4BAHF,sBAAO,SAGL,EAAA;;;;KACH;IACH,wBAAC;AAAD,CAAC,AAvCD,IAuCC"}
\ No newline at end of file
{"version":3,"file":"access.service.js","sourceRoot":"","sources":["../../src/service/access.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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vCD,IAuCC"}
\ No newline at end of file
......@@ -7,7 +7,7 @@ import UserService from './user.service';
export default class AwardsService extends UserService {
awardsdao: IBaseDao;
activityprizedao: IBaseDao;
constructor(context: IContext);
constructor(context: IContext<IParams>);
reduceStock(_id: string): Promise<any>;
/**
* 插入奖品记录
......
This diff is collapsed.
......@@ -4,15 +4,15 @@
* @format
*/
export default class BaseService {
context: IContext;
context: IContext<any>;
activitydao: IBaseDao;
constructor(context: IContext);
constructor(context: IContext<any>);
/**
* @desc 活动基本信息
* @param {活动id} activityId
* @returns 返回活动详情,若不存在活动,返回为null
*/
getBaseInfo(activityId: string): Promise<any>;
getBaseInfo(activityId: string): Promise<IActivityInfo>;
/**
*
* 根据itemIds获取商品列表
......
......@@ -57,9 +57,7 @@ var BaseService = /** @class */ (function () {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
console.log(process.argv[2], 'process.argv[2]');
return [4 /*yield*/, this.activitydao.findOne({ _id: activityId, deleteStatus: 1 /* NORMAL */ })];
case 0: return [4 /*yield*/, this.activitydao.findOne({ _id: activityId, deleteStatus: 1 /* NORMAL */ })];
case 1: return [2 /*return*/, _a.sent()];
}
});
......
{"version":3,"file":"base.service.js","sourceRoot":"","sources":["../../src/service/base.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAwC;AACxC,4BAA+C;AAG/C;IAGE,qBAAY,OAAiB;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,4BAAuB,CAAC,CAAA;IAClE,CAAC;IACD;;;;OAIG;IACG,iCAAW,GAAjB,UAAkB,UAAkB;;;;;wBAClC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAA;wBACxC,qBAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,gBAAwB,EAAE,CAAC,EAAA;4BAAhG,sBAAO,SAAyF,EAAA;;;;KACjG;IAED;;;;;;;;OAQG;IACG,sCAAgB,GAAtB,UAAuB,OAAe,EAAE,OAAe;;;;;;;wBAC/C,SAAS,GACb,+NAA+N,CAAA;wBAClN,qBAAM,YAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAA;;wBAAjG,MAAM,GAAG,SAAwF;wBACjG,KAAK,GAAG,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,0CAAE,IAAI,KAAI,EAAE,CAAA;wBACjC,IAAI,GAAG,KAAK,CAAC,GAAG,CACpB,UAAC,CAAuG;4BACtG,OAAO;gCACL,MAAM,EAAE,CAAC,CAAC,OAAO;gCACjB,IAAI,EAAE,CAAC,CAAC,KAAK;gCACb,KAAK,EAAE,CAAC,CAAC,KAAK;gCACd,GAAG,EAAE,CAAC,CAAC,UAAU;gCACjB,KAAK,EAAE,CAAC,CAAC,OAAO;gCAChB,IAAI,EAAE,CAAC,CAAC,IAAI;6BACb,CAAA;wBACH,CAAC,CACF,CAAA;wBACD,sBAAO,IAAI,EAAA;;;;KACZ;IACH,kBAAC;AAAD,CAAC,AA7CD,IA6CC"}
\ No newline at end of file
{"version":3,"file":"base.service.js","sourceRoot":"","sources":["../../src/service/base.service.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,8BAAwC;AACxC,4BAA+C;AAG/C;IAGE,qBAAY,OAAsB;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,WAAW,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,4BAAuB,CAAC,CAAA;IAClE,CAAC;IACD;;;;OAIG;IACG,iCAAW,GAAjB,UAAkB,UAAkB;;;;4BAC3B,qBAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,YAAY,gBAAwB,EAAE,CAAC,EAAA;4BAAhG,sBAAO,SAAyF,EAAA;;;;KACjG;IAED;;;;;;;;OAQG;IACG,sCAAgB,GAAtB,UAAuB,OAAe,EAAE,OAAe;;;;;;;wBAC/C,SAAS,GACb,+NAA+N,CAAA;wBAClN,qBAAM,YAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAA;;wBAAjG,MAAM,GAAG,SAAwF;wBACjG,KAAK,GAAG,OAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,0CAAE,IAAI,KAAI,EAAE,CAAA;wBACjC,IAAI,GAAG,KAAK,CAAC,GAAG,CACpB,UAAC,CAAuG;4BACtG,OAAO;gCACL,MAAM,EAAE,CAAC,CAAC,OAAO;gCACjB,IAAI,EAAE,CAAC,CAAC,KAAK;gCACb,KAAK,EAAE,CAAC,CAAC,KAAK;gCACd,GAAG,EAAE,CAAC,CAAC,UAAU;gCACjB,KAAK,EAAE,CAAC,CAAC,OAAO;gCAChB,IAAI,EAAE,CAAC,CAAC,IAAI;6BACb,CAAA;wBACH,CAAC,CACF,CAAA;wBACD,sBAAO,IAAI,EAAA;;;;KACZ;IACH,kBAAC;AAAD,CAAC,AA5CD,IA4CC"}
\ No newline at end of file
......@@ -4,7 +4,7 @@
* @format
*/
import UserService from './user.service';
interface ITaskInfo {
export interface ITaskInfo {
taskType?: string;
url?: string;
rewards: number;
......@@ -18,7 +18,7 @@ interface ITaskInfo {
status: number;
}
export default class TaskService extends UserService {
constructor(context: IContext);
constructor(context: IContext<IParams>);
initVipTask(userInfo: IUserInfo, vipInfo: IVipInfo, tasks: ITasks): ITaskInfo;
initOrderGoodsTask(userInfo: IUserInfo, tasks: ITasks): ITaskInfo;
initBrowseGoodsTask(userInfo: IUserInfo, tasks: ITasks): ITaskInfo;
......@@ -113,4 +113,3 @@ export default class TaskService extends UserService {
*/
updateTasks(id: string, needUpdateKeysArray: object[], userInfo: IUserInfo): Promise<false | IUserInfo>;
}
export {};
This diff is collapsed.
......@@ -6,7 +6,7 @@
import BaseService from './base.service';
declare class UserService extends BaseService {
userdao: IBaseDao;
constructor(context: IContext);
constructor(context: IContext<IParams>);
/**
* @desc 获取当前打开活动的用户详情
* @returns 若用户不存在,返回null; 用户存在,返回用户信息(object对象)
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
*
* @format
*/
export declare const getSellerSession: (context: IContext, activityId?: string) => Promise<{
export declare const getSellerSession: (context: IContext<IParams>, activityId?: string) => Promise<{
session?: undefined;
userNick?: undefined;
} | {
......
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../../src/utils/package/getSession.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAAuE;AAEvE,iCAAmC;AAEtB,QAAA,gBAAgB,GAAG,UAAO,OAAiB,EAAE,UAAmB;;;;;gBAC3E,IAAI,CAAC,UAAU,EAAE;oBACf,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAA;iBACrC;gBACG,WAAW,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,4BAAuB,CAAC,CAAA;gBACrE,SAAS,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,wBAAmB,CAAC,CAAA;gBACxC,qBAAM,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAA;;gBAArE,oBAAoB,GAAG,SAA8C;gBACzE,IAAI,CAAC,oBAAoB;oBAAE,sBAAO,EAAE,EAAA;gBAEvB,qBAAM,SAAS,CAAC,OAAO,CAAC;wBACnC,MAAM,EAAE,oBAAoB,CAAC,MAAM;qBACpC,CAAC;oBACF,2CAA2C;kBADzC;;gBAFE,MAAM,GAAG,SAEX;gBACF,2CAA2C;gBAC3C,IAAI,CAAC,MAAM;oBAAE,sBAAO,EAAE,EAAA;gBACtB,sBAAO;wBACL,OAAO,EAAE,MAAM,CAAC,WAAW;wBAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;qBAC1B,EAAA;;;KACF,CAAA"}
\ No newline at end of file
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../../src/utils/package/getSession.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAAuE;AAEvE,iCAAmC;AAEtB,QAAA,gBAAgB,GAAG,UAAO,OAA0B,EAAE,UAAmB;;;;;gBACpF,IAAI,CAAC,UAAU,EAAE;oBACf,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,CAAA;iBACrC;gBACG,WAAW,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,4BAAuB,CAAC,CAAA;gBACrE,SAAS,GAAa,IAAI,aAAO,CAAC,OAAO,EAAE,wBAAmB,CAAC,CAAA;gBACxC,qBAAM,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAA;;gBAArE,oBAAoB,GAAG,SAA8C;gBACzE,IAAI,CAAC,oBAAoB;oBAAE,sBAAO,EAAE,EAAA;gBAEvB,qBAAM,SAAS,CAAC,OAAO,CAAC;wBACnC,MAAM,EAAE,oBAAoB,CAAC,MAAM;qBACpC,CAAC;oBACF,2CAA2C;kBADzC;;gBAFE,MAAM,GAAG,SAEX;gBACF,2CAA2C;gBAC3C,IAAI,CAAC,MAAM;oBAAE,sBAAO,EAAE,EAAA;gBACtB,sBAAO;wBACL,OAAO,EAAE,MAAM,CAAC,WAAW;wBAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;qBAC1B,EAAA;;;KACF,CAAA"}
\ No newline at end of file
/** @format */
export declare const isUseVipMock: (context: IContext, userNick: string) => boolean;
export declare const isUseVipMock: (context: IContext<IParams>, userNick: string) => boolean;
{"version":3,"file":"isUseVipMock.js","sourceRoot":"","sources":["../../../src/utils/package/isUseVipMock.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,qBAAqB;AACR,QAAA,YAAY,GAAG,UAAC,OAAiB,EAAE,QAAgB;IAC9D,IAAM,SAAS,GAAG,OAAO,CAAC,GAAG,KAAK,MAAM,CAAA;IACxC,IAAM,cAAc,GAAG,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IAEpD,OAAO,SAAS,IAAI,cAAc,CAAA;AACpC,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"isUseVipMock.js","sourceRoot":"","sources":["../../../src/utils/package/isUseVipMock.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,qBAAqB;AACR,QAAA,YAAY,GAAG,UAAC,OAA0B,EAAE,QAAgB;IACvE,IAAM,SAAS,GAAG,OAAO,CAAC,GAAG,KAAK,MAAM,CAAA;IACxC,IAAM,cAAc,GAAG,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;IAEpD,OAAO,SAAS,IAAI,cAAc,CAAA;AACpC,CAAC,CAAA"}
\ No newline at end of file
export declare const logFn: (context: IContext) => void;
export declare const recordErrorLog: (context: IContext, baseInfos: IControllerInfos, errorMsg: string, stack: string) => Promise<any>;
export declare const logFn: (context: IContext<IParams>) => void;
export declare const recordErrorLog: (context: IContext<IParams>, baseInfos: IControllerInfos, errorMsg: string, stack: string) => Promise<any>;
export declare const logger: (message: any) => void;
{"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,OAAiB;;IACrC,IAAM,IAAI,GAAG,I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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
{"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,OAA0B;;IAC9C,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,OAA0B,EAC1B,SAA2B,EAC3B,QAAgB,EAChB,KAAa;;;;;;gBAEL,MAAM,GAAK,OAAO,OAAZ,CAAY;gBAClB,UAA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*} session
* @param {*} context
*/
export declare const sendTBAward: (context: IContext, session: string, document: IAwards) => Promise<IAwards | CodeType>;
export declare const sendTBAward: (context: IContext<IParams>, session: string, document: IAwards) => Promise<IAwards | CodeType>;
/**
* 发放积分
* @param {发放的积分数} credits
......@@ -14,7 +14,7 @@ export declare const sendTBAward: (context: IContext, session: string, document:
* @param {*} context
* @returns {drawStatus, remark}
*/
export declare const sendCredits: (credits: number, session: string, context: IContext) => Promise<{
export declare const sendCredits: (credits: number, session: string, context: IContext<IParams>) => Promise<{
drawStatus: number;
remark: string;
}>;
......@@ -26,7 +26,7 @@ export declare const sendCredits: (credits: number, session: string, context: IC
* @param {*} context
* @returns { drawStatus, remark }
*/
export declare const sendEname: (ename: string, uniqueId: string, session: string, context: IContext) => Promise<{
export declare const sendEname: (ename: string, uniqueId: string, session: string, context: IContext<IParams>) => Promise<{
remark: string;
drawStatus: number;
}>;
{"version":3,"file":"sendTBAward.js","sourceRoot":"","sources":["../../../src/utils/package/sendTBAward.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,6CAA0F;AAC1F,iCAAgD;AAGhD;;;;;GAKG;AACU,QAAA,WAAW,GAAG,UACzB,OAAiB,EACjB,OAAe,EACf,QAAiB;;;;;gBAEX,IAAI,GAA0B,QAAQ,KAAlC,EAAE,KAAK,GAAmB,QAAQ,MAA3B,EAAE,GAAG,GAAc,QAAQ,IAAtB,EAAE,OAAO,GAAK,QAAQ,QAAb,CAAa;gBAC5C,IAAI,CAAC,IAAI,EAAE;oBACT,sBAAO,sBAAU,CAAC,YAAY,EAAA;iBAC/B;gBACD,IAAI,IAAI,KAAK,sBAAU,CAAC,MAAM,EAAE;oBAC9B,sBAAO,QAAQ,EAAA;iBAChB;;;;gBAGC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;qBAErB,CAAA,IAAI,KAAK,sBAAU,CAAC,KAAK,CAAA,EAAz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AE;oBACP,UAAU,EAAE,EAAE;oBACd,OAAO,EAAE,EAAE;iBACZ,CAAA;;;;gBAEU,qBAAM,YAAM,CAAC,WAAW,CAAC,OAAO,EAAE;wBACzC,WAAW,EAAE,KAAK;wBAClB,WAAW,EAAE,OAAO,CAAC,MAAM;wBAC3B,SAAS,EAAE,QAAQ;wBACnB,QAAQ,EAAE,sBAAU;wBACpB,OAAO,SAAA;qBACR,CAAC,EAAA;;gBANF,MAAM,GAAG,SAMP,CAAA;;;;gBAEF,OAAO,CAAC,GAAG,CAAC,sCAAQ,EAAE,GAAC,CAAC,CAAA;gBACxB,MAAM,GAAG,GAAC,CAAA;;;gBAGR,UAAU,GAAG,CAAC,CAAA;gBACd,MAAM,GAAG,EAAE,CAAA;gBACf,IAAI,MAAM,CAAC,cAAc,EAAE;oBACzB,UAAU,GAAG,uBAAW,CAAC,OAAO,CAAA;iBACjC;qBAAM;oBACD,WAAW,GAAG,MAAM,CAAC,WAAW,CAAA;oBACpC,IACE;wBACE,wCAAwC;wBACxC,qCAAqC;wBACrC,+CAA+C;qBAChD,CAAC,QAAQ,CAAC,WAAW,CAAC,EACvB;wBACA,UAAU,GAAG,uBAAW,CAAC,KAAK,CAAA;qBAC/B;yBAAM;wBACL,UAAU,GAAG,uBAAW,CAAC,IAAI,CAAA;qBAC9B;oBACD,MAAM,GAAG,mBAAO,CAAC,WAAW,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,OAAO,IAAI,0BAAM,CAAA;iBAC7F;gBACD,sBAAO,EAAE,MAAM,QAAA,EAAE,UAAU,YAAA,EAAE,EAAA;;;KAC9B,CAAA"}
\ No newline at end of file
......@@ -14,7 +14,7 @@ const configs = {
}
// 根据服务环境获取配置
export const getConfig = (context: IContext): Iconfig => {
export const getConfig = (context: IContext<{}>): Iconfig => {
const env = context.env
return configs[env] || configs.online
}
......@@ -5,6 +5,28 @@ import { resultsModel } from '../sdk'
import { AwardsService } from '../service'
import { PRIZE_TYPE, PRIZE_DATA_TYPE, DRAW_STATUS } from '../constants'
import { getToday, logger } from '../utils'
import { CodeType } from 'taobao-mini-sdk/lib/utils/codetypes'
interface IPrizeListParams {
activityId: string
}
interface IReceiveOjectParams {
activityId: string
_id: string
name: string
phone: string
province: string
city: string
area: string
addressdetail: string
}
interface IReceiveEnameParams {
activityId: string
_id: string
}
export default class AwardsController {
/**
* 我的奖品列表
......@@ -12,13 +34,13 @@ export default class AwardsController {
@paramsCheck(['activityId'])
@userCheck({ intercept: true })
@services([AwardsService])
async getMyPrizeList(context: IContext, {}, [awardSer]: [AwardsService]) {
async getMyPrizeList(context: IContext<IPrizeListParams>, {}, [awardSer]: [AwardsService]) {
const {
openId,
data: { activityId }
} = context
let result = await awardSer.getMyPrizeList({ openId, activityId })
return resultsModel.success(result)
return resultsModel.success<Array<IAwards>>(result)
}
/**
......@@ -27,7 +49,7 @@ export default class AwardsController {
@paramsCheck(['activityId', '_id', 'name', 'phone', 'province', 'city', 'area', 'addressdetail'])
@userCheck({ intercept: true })
@services([AwardsService])
async receiveObjectPrize(context: IContext, {}, [awardSer]: [AwardsService]) {
async receiveObjectPrize(context: IContext<IReceiveOjectParams>, {}, [awardSer]: [AwardsService]) {
let { province, city, area, addressdetail, _id, name, phone, activityId } = context.data
let result = await awardSer.recieveObjectPrize(_id, {
......@@ -39,12 +61,11 @@ export default class AwardsController {
name,
phone
})
//@ts-ignore
if (result.code) {
//@ts-ignore
return resultsModel.error(result)
if ((result as CodeType).code) {
return resultsModel.error(result as CodeType)
}
return resultsModel.success(result)
return resultsModel.success<boolean>(result as true)
}
/**
......@@ -53,7 +74,7 @@ export default class AwardsController {
@paramsCheck(['activityId', '_id'])
@userCheck({ intercept: true })
@services([AwardsService])
async receiveEnamePrize(context: IContext, {}, [awardSer]: [AwardsService]) {
async receiveEnamePrize(context: IContext<IReceiveEnameParams>, {}, [awardSer]: [AwardsService]) {
let { _id, activityId } = context.data
let result = await awardSer.recieveEnamePrize(_id, activityId)
......@@ -76,7 +97,7 @@ export default class AwardsController {
@paramsCheck(['activityId', 'prizeDataType'])
@activityTimeCheck
@services([AwardsService])
async drawLotteryPrize(context: IContext, { userInfo }: IControllerInfos, [awardSer]: [AwardsService]) {
async drawLotteryPrize(context: IContext<IParams>, { userInfo }: IControllerInfos, [awardSer]: [AwardsService]) {
const { openId } = context
const { activityId, prizeDataType } = context.data
......
......@@ -12,15 +12,21 @@ export default class BaseController {
*/
@paramsCheck(['activityId'])
@services([BaseService])
async getActivityBaseInfoById(context: IContext, {}, [baseService]: [BaseService]) {
async getActivityBaseInfoById(
context: IContext<{
activityId: string
}>,
{},
[baseService]: [BaseService]
): Promise<IResult<IActivityInfo>> {
const { activityId } = context.data
// 参数校验
if (!activityId) {
return resultsModel.error(CODE_TYPES.PARAMS_ERROR, `activityId必填`)
return resultsModel.error(CODE_TYPES.PARAMS_ERROR, `activityId必填`) as IErrorResult
}
// 活动基本情况
const activityInfo = await baseService.getBaseInfo(activityId)
return resultsModel.success(activityInfo)
return resultsModel.success<IActivityInfo>(activityInfo)
}
/**
......@@ -28,11 +34,14 @@ export default class BaseController {
*/
@paramsCheck(['itemIds'])
@services([BaseService])
async getItemListByItemIds(context: IContext, { session }: IControllerInfos, [baseService]: [BaseService]) {
async getItemListByItemIds(
context: IContext<{ itemIds: string }>,
{ session }: IControllerInfos,
[baseService]: [BaseService]
): Promise<IResult<ITaoBaoItems[]>> {
const { itemIds } = context.data
const list = await baseService.getItemListByIds(itemIds, session)
logger(list)
return resultsModel.success(list)
}
......
......@@ -16,10 +16,10 @@ export default class Share {
@activityTimeCheck
@services([UserService, TaskService, AccessService])
async doHelp(
context: IContext,
context: IContext<IParams>,
{ userInfo, vipInfo, activityInfo }: IControllerInfos,
[userService, taskService, accessService]: [UserService, TaskService, AccessService]
) {
): Promise<IResult<boolean>> {
const { inviteId } = context.data
const { openId } = context
......
......@@ -10,7 +10,7 @@ export default class StatController {
/**
* 统计数据
*/
async getStats(context: IContext) {
async getStats(context: IContext<IParams>) {
const { activityId, startDay, endDay } = context.data
const userDao: IBaseDao = new BaseDao(context, USER_DB_NAME)
......
......@@ -6,6 +6,7 @@ import { paramsCheck, userCheck, activityTimeCheck, noCatch, services } from '..
import { resultsModel, TBAPIS } from '../sdk'
import { TaskService, BaseService } from '../service'
import { logger } from '../utils'
import { ITaskInfo } from '../service/task.service'
export default class Task {
/**
......@@ -16,10 +17,10 @@ export default class Task {
@activityTimeCheck
@services([TaskService])
async getTaskList(
context: IContext,
context: IContext<{ activityId: string }>,
{ userInfo, vipInfo, activityInfo, session }: IControllerInfos,
[taskService]: [TaskService]
): Promise<IResult> {
): Promise<IResult<ITaskInfo[]>> {
const { tasks, startTime } = activityInfo
// 更新user状态
......@@ -75,7 +76,11 @@ export default class Task {
@paramsCheck(['activityId'])
@activityTimeCheck
@services([TaskService])
async doFollowTask(context: IContext, { userInfo, activityInfo }: IControllerInfos, [TaskService]: [TaskService]) {
async doFollowTask(
context: IContext<{ activityId: string }>,
{ userInfo, activityInfo }: IControllerInfos,
[TaskService]: [TaskService]
): Promise<IResult<boolean>> {
let { follow } = userInfo
const { flag, newFollow } = follow
......@@ -97,10 +102,10 @@ export default class Task {
@activityTimeCheck
@services([TaskService])
async doExchangeCreditsTask(
context: IContext,
context: IContext<IParams>,
{ userInfo, activityInfo, session }: IControllerInfos,
[taskService]: [TaskService]
) {
): Promise<IResult<boolean>> {
const { credits } = context.data
const taskType = `exchangeCredits`
const {
......@@ -147,10 +152,10 @@ export default class Task {
@activityTimeCheck
@services([TaskService])
async doBrowseGoodsTask(
context: IContext,
context: IContext<IParams>,
{ userInfo, activityInfo }: IControllerInfos,
[taskService]: [TaskService]
) {
): Promise<IResult<boolean>> {
const taskType = 'browseGoods'
const { itemId } = context.data
const {
......@@ -195,10 +200,10 @@ export default class Task {
@activityTimeCheck
@services([TaskService])
async doCollectGoodsTask(
context: IContext,
context: IContext<IParams>,
{ userInfo, activityInfo }: IControllerInfos,
[taskService]: [TaskService]
) {
): Promise<IResult<boolean>> {
const taskType = 'collectGoods'
const { itemId } = context.data
const {
......@@ -242,7 +247,11 @@ export default class Task {
@userCheck({ intercept: true })
@activityTimeCheck
@services([TaskService])
async doJumpLinkTask(context: IContext, { userInfo, activityInfo }: IControllerInfos, [taskService]: [TaskService]) {
async doJumpLinkTask(
context: IContext<IParams>,
{ userInfo, activityInfo }: IControllerInfos,
[taskService]: [TaskService]
): Promise<IResult<boolean>> {
const taskType = 'jumpLink'
const {
......@@ -278,10 +287,10 @@ export default class Task {
@activityTimeCheck
@services([TaskService])
async receiveTaskRewards(
context: IContext,
context: IContext<IParams>,
{ userInfo }: IControllerInfos,
[taskService]: [TaskService]
): Promise<IResult> {
): Promise<IResult<boolean>> {
const { taskType } = context.data
const { remainTimes, _id } = userInfo
......@@ -312,7 +321,7 @@ export default class Task {
@paramsCheck(['activityId', 'itemIds'])
@services([BaseService, TaskService])
async getCollectGoodsList(
context: IContext,
context: IContext<IParams>,
{ session, userInfo }: IControllerInfos,
[baseService, taskService]: [BaseService, TaskService]
) {
......
......@@ -5,21 +5,16 @@ import { services, paramsCheck, activityTimeCheck } from '../decorator'
import { resultsModel } from '../sdk'
import { UserService, AccessService } from '../service'
import { getConfig } from '../config'
interface IVipContext extends IContext {
data: {
activityId: string
callbackUrl?: string
}
interface IVipParams {
activityId: string
callbackUrl?: string
}
interface ILoginContext extends IContext {
data: {
activityId: string
userNick: string
avatar: string
isFollow: boolean
inviteId?: string
}
interface ILoginParams {
activityId: string
userNick: string
avatar: string
isFollow: boolean
inviteId?: string
}
export default class User {
/**
......@@ -29,10 +24,10 @@ export default class User {
@activityTimeCheck
@services([UserService, AccessService])
async login(
context: ILoginContext,
context: IContext<ILoginParams>,
{ userInfo, vipInfo, activityInfo }: IControllerInfos,
[userService, accessService]: [UserService, AccessService]
) {
): Promise<IResult<{ openId: string }>> {
const { openId } = context
const { isFollow } = context.data
......@@ -46,7 +41,7 @@ export default class User {
// access表
await accessService.addAccess(isFollow, vipInfo.isVip)
return resultsModel.success({
return resultsModel.success<{ openId: string }>({
openId
})
}
......@@ -56,10 +51,10 @@ export default class User {
@paramsCheck(['activityId'])
@services([UserService])
async getVipInfo(
context: IVipContext,
context: IContext<IVipParams>,
{ session, activityUserNick }: IControllerInfos,
[userService]: [UserService]
) {
): Promise<IResult<IVipInfo>> {
const { callbackUrl, activityId } = context.data
const { generateVipCallBackUrl } = getConfig(context)
const result = await userService.getShopVip(
......
......@@ -3,7 +3,7 @@ import { UserService } from '../service'
import { getSellerSession, logFn, recordErrorLog } from '../utils'
import { resultsModel } from '../sdk'
import { CODE_TYPES } from '../constants'
async function initBaseInfo(context: IContext, baseInfos: IControllerInfos) {
async function initBaseInfo(context: IContext<IParams>, baseInfos: IControllerInfos) {
const userService = new UserService(context)
if (!baseInfos.userInfo) {
......@@ -38,7 +38,7 @@ export const services = (services: any[]) => {
delete baseInfos.noCatch
return method.apply(target, [context, baseInfos, servicesInstance])
}
let ret: IResult
let ret: IResult<any>
try {
logFn(context)
ret = await method.apply(target, [context, baseInfos, servicesInstance])
......
/** @format */
namespace getActivityBaseInfoById {
export interface Context extends IContext {
data: {
activityId: string
}
}
export interface Result extends IResult {
data: IActivityInfo
}
}
......@@ -9,9 +9,9 @@ import { getToday } from '../utils'
import { ACCESS_DB_NAME } from '../db'
export default class UserAccessService {
context: IContext
context: IContext<IParams>
accessdao: IBaseDao
constructor(context: IContext) {
constructor(context: IContext<IParams>) {
this.context = context
this.accessdao = new BaseDao(context, ACCESS_DB_NAME)
}
......
......@@ -13,7 +13,7 @@ import { sendTBAward, getSellerSession, rand, signFigures } from '../utils'
export default class AwardsService extends UserService {
awardsdao: IBaseDao
activityprizedao: IBaseDao
constructor(context: IContext) {
constructor(context: IContext<IParams>) {
super(context)
this.awardsdao = new BaseDao(context, AWARDS_DB_NAME)
this.activityprizedao = new BaseDao(context, PRIZE_CONFIG_DB_NAME)
......
......@@ -9,9 +9,9 @@ import { ACTIVITY_CONFIG_DB_NAME } from '../db'
import { ACTIVITY_STATUS } from '../constants'
export default class BaseService {
context: IContext
context: IContext<any>
activitydao: IBaseDao
constructor(context: IContext) {
constructor(context: IContext<any>) {
this.context = context
this.activitydao = new BaseDao(context, ACTIVITY_CONFIG_DB_NAME)
}
......@@ -20,8 +20,7 @@ export default class BaseService {
* @param {活动id} activityId
* @returns 返回活动详情,若不存在活动,返回为null
*/
async getBaseInfo(activityId: string) {
console.log(process.argv[2], 'process.argv[2]')
async getBaseInfo(activityId: string): Promise<IActivityInfo> {
return await this.activitydao.findOne({ _id: activityId, deleteStatus: ACTIVITY_STATUS.NORMAL })
}
......
......@@ -9,7 +9,7 @@ import UserService from './user.service'
import { getToday, getUserOrderlist, logger } from '../utils'
import { TASK_RATE_TYPE, TASK_STATUS } from '../constants'
interface ITaskInfo {
export interface ITaskInfo {
taskType?: string // 任务类型
url?: string // 链接地址
rewards: number // 任务奖励
......@@ -23,7 +23,7 @@ interface ITaskInfo {
status: number // 任务状态 1未完成 2 待领取 3 已完成
}
export default class TaskService extends UserService {
constructor(context: IContext) {
constructor(context: IContext<IParams>) {
super(context)
}
......
......@@ -12,7 +12,7 @@ import { VIP_MOCK } from '../vipMock'
class UserService extends BaseService {
userdao: IBaseDao
constructor(context: IContext) {
constructor(context: IContext<IParams>) {
super(context)
this.userdao = new BaseDao(context, USER_DB_NAME)
}
......
/** @format */
interface IContext {
interface IContext<T> {
appkey: string
sourceAppKey: string
userNick?: string
......@@ -15,9 +15,11 @@ interface IContext {
appOwnerOpenId: string
fcInvokeId: string
cloud: any
data: {
[queryParam: string]: any
}
data: T
}
interface IParams {
[params: string]: any
}
interface IControllerInfos {
......
/** @format */
interface IResult {
success: boolean
interface IErrorResult {
success: false
code: string
message?: string
data?: object[] | object | number[] | string[] | boolean | string
}
interface ISuccessResult<T> {
success: true
data?: T
}
interface ICodeType {
code: string
defaultMsg?: string
}
type IResult<T> = IErrorResult | ISuccessResult<T>
......@@ -8,7 +8,7 @@ import { SELLER_INFO_DB_NAME, ACTIVITY_CONFIG_DB_NAME } from '../../db'
import { BaseDao } from '../../sdk'
export const getSellerSession = async (context: IContext, activityId?: string) => {
export const getSellerSession = async (context: IContext<IParams>, activityId?: string) => {
if (!activityId) {
activityId = context.data.activityId
}
......
/** @format */
// 测试环境 duib2账户mock数据
export const isUseVipMock = (context: IContext, userNick: string) => {
export const isUseVipMock = (context: IContext<IParams>, userNick: string) => {
const isTestEnv = context.env === 'test'
const isDuibaAccount = userNick.startsWith('duiba2')
......
......@@ -3,7 +3,7 @@ import { BaseDao } from '../../sdk'
import { ERROR_LOG_DB_NAME } from '../../db'
import { getToday } from '../../utils'
export const logFn = (context: IContext) => {
export const logFn = (context: IContext<IParams>) => {
const data = JSON.stringify(context.data)
console.log(context)
console.log(
......@@ -16,7 +16,7 @@ export const logFn = (context: IContext) => {
// 记录错误日志
export const recordErrorLog = async (
context: IContext,
context: IContext<IParams>,
baseInfos: IControllerInfos,
errorMsg: string,
stack: string
......
......@@ -11,7 +11,7 @@ import { CodeType } from 'taobao-mini-sdk/lib/utils/codetypes'
* @param {*} context
*/
export const sendTBAward = async (
context: IContext,
context: IContext<IParams>,
session: string,
document: IAwards
): Promise<IAwards | CodeType> => {
......@@ -51,7 +51,7 @@ export const sendTBAward = async (
* @param {*} context
* @returns {drawStatus, remark}
*/
export const sendCredits = async (credits: number, session: string, context: IContext) => {
export const sendCredits = async (credits: number, session: string, context: IContext<IParams>) => {
let drawStatus = 0
let remark = ''
let result = await TBAPIS.changeCredits(context, session, {
......@@ -77,7 +77,7 @@ export const sendCredits = async (credits: number, session: string, context: ICo
* @returns { drawStatus, remark }
*/
export const sendEname = async (ename: string, uniqueId: string, session: string, context: IContext) => {
export const sendEname = async (ename: string, uniqueId: string, session: string, context: IContext<IParams>) => {
let result = {
result_success: '',
result_code: '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment