Commit 52cdaffc authored by qinhaitao's avatar qinhaitao

fix: 🐛 bug

parent 1a5a151e
......@@ -8,8 +8,9 @@ var configs = {
online: online_1.default,
test: test_1.default
};
exports.getConfig = function (context) {
var getConfig = function (context) {
var env = context.env;
return configs[env] || configs.online;
};
exports.getConfig = getConfig;
//# sourceMappingURL=index.js.map
\ 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;AAOzB,IAAM,OAAO,GAAG;IACd,MAAM,kBAAA;IACN,IAAI,gBAAA;CACL,CAAA;AAEY,QAAA,SAAS,GAAG,UAAC,OAAgB;IACxC,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;AAOzB,IAAM,OAAO,GAAG;IACd,MAAM,kBAAA;IACN,IAAI,gBAAA;CACL,CAAA;AAEM,IAAM,SAAS,GAAG,UAAC,OAAgB;IACxC,IAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;IACvB,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAA;AACvC,CAAC,CAAA;AAHY,QAAA,SAAS,aAGrB"}
\ No newline at end of file
......@@ -215,6 +215,7 @@ export declare const errorCode: {
export declare const B_APP_NAME: string;
export declare const GOODSINFO = "detail_url,approve_status,num_iid,title,nick,type,cid,pic_url,num,props,valid_thru,list_time,price,has_discount,has_invoice,has_warranty,has_showcase,modified,delist_time,postage_id,seller_cids,outer_id,sold_quantity";
export declare const EIGHT_HOURS: number;
export declare const SEVEN_DAYS: number;
export declare const _48_HOURS: number;
export declare const DELETE_STATUS: {
EXIST: number;
......
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.STOCK_TYPE = exports.SHIP_STATUS = exports.TEMPLATE_INFO = exports.APP_SUB_CODE = exports.PASS_URL_LIST = exports.TASK_CHECK_TYPE = exports.TASK_TYPE_TEXT = exports.DELETE_STATUS = exports._48_HOURS = exports.EIGHT_HOURS = exports.GOODSINFO = exports.B_APP_NAME = exports.errorCode = exports.CODE_TYPES = exports.PRIZE_TYPE = exports.LOGGER_TYPE = exports.DRAW_STATUS = exports.OPEN_PRIZE_STATUS = exports.BusinessError = void 0;
exports.STOCK_TYPE = exports.SHIP_STATUS = exports.TEMPLATE_INFO = exports.APP_SUB_CODE = exports.PASS_URL_LIST = exports.TASK_CHECK_TYPE = exports.TASK_TYPE_TEXT = exports.DELETE_STATUS = exports._48_HOURS = exports.SEVEN_DAYS = exports.EIGHT_HOURS = exports.GOODSINFO = exports.B_APP_NAME = exports.errorCode = exports.CODE_TYPES = exports.PRIZE_TYPE = exports.LOGGER_TYPE = exports.DRAW_STATUS = exports.OPEN_PRIZE_STATUS = exports.BusinessError = void 0;
var sdk_1 = require("./sdk");
exports.BusinessError = {
// 更新重试失败(用于并发更新)
......@@ -162,6 +162,7 @@ exports.errorCode = {
exports.B_APP_NAME = 'promotioncenter-<%=bizCode%>';
exports.GOODSINFO = 'detail_url,approve_status,num_iid,title,nick,type,cid,pic_url,num,props,valid_thru,list_time,price,has_discount,has_invoice,has_warranty,has_showcase,modified,delist_time,postage_id,seller_cids,outer_id,sold_quantity';
exports.EIGHT_HOURS = 60 * 60 * 8 * 1000;
exports.SEVEN_DAYS = 7 * 24 * 60 * 60 * 1000;
exports._48_HOURS = 48 * 60 * 60 * 1000;
exports.DELETE_STATUS = {
EXIST: 1,
......
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,6BAA0C;AAE7B,QAAA,aAAa,GAAG;IAC3B,iBAAiB;IAC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BAAqB,CAAA;AAE5C,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,gBAAgB;IAC7B,gBAAgB,EAAE,OAAO;CAC1B,CAAA;AAED,MAAM;AACO,QAAA,WAAW,GAAG;IACzB,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;CACZ,CAAA;AAEY,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE,CAAC;IACR,QAAQ,EAAC,CAAC;CACX,CAAA"}
\ 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,cAAc;IACd,uBAAuB,EAAE;QACvB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,aAAa;KAC1B;IACD,QAAQ;IACR,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,OAAO;KACpB;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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,aAAa;IACb,eAAe;IACf,YAAY;IACZ,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,OAAO;IACP,WAAW;IACX,WAAW;IACX,cAAc;IACd,eAAe;IACf,UAAU;IACV,cAAc;IACd,cAAc;IACd,cAAc;IACd,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,WAAW;IACX,OAAO;IACP,WAAW;IACX,gBAAgB;IAChB,mBAAmB;IACnB,WAAW;IACX,aAAa;IACb,aAAa;IACb,iBAAiB;IACjB,WAAW;IACX,WAAW;IACX,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,WAAW;CACZ,CAAA;AAED,gBAAgB;AACH,QAAA,YAAY,GAAW,qBAAqB,CAAA;AAE5C,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE,cAAc;IACvB,WAAW,EAAE,gBAAgB;IAC7B,gBAAgB,EAAE,OAAO;CAC1B,CAAA;AAED,MAAM;AACO,QAAA,WAAW,GAAG;IACzB,UAAU,EAAE,CAAC;IACb,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;CACZ,CAAA;AAEY,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE,CAAC;IACR,QAAQ,EAAC,CAAC;CACX,CAAA"}
\ No newline at end of file
......@@ -4,13 +4,22 @@ export default class ActivityController {
/**
* 活动基本信息
*/
getActivityList(context: Context, {}: {}, [activityconfigService]: [ActivityconfigService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getActivityList(context: Context, {}: {}, [activityconfigService]: [ActivityconfigService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
list: any;
total: any;
pageSize: number;
pageNo: number;
}, true>>;
/**
* 活动详情
*/
getActivityDetail(context: Context, {}: {}, [activityconfigService]: [ActivityconfigService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getActivityDetail(context: Context, {}: {}, [activityconfigService]: [ActivityconfigService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
/**
* 删除活动
*/
delActivity(context: Context, {}: {}, [activityconfigService]: [ActivityconfigService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
delActivity(context: Context, {}: {}, [activityconfigService]: [ActivityconfigService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<false, true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<true, true>>;
/**
* 复制活动
*/
createCopyActivity(context: Context, {}: {}, [activityconfigService]: [ActivityconfigService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
}
......@@ -56,6 +56,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var constants_1 = require("./../constants");
var decorator_1 = require("../decorator");
......@@ -139,6 +150,49 @@ var ActivityController = /** @class */ (function () {
});
});
};
/**
* 复制活动
*/
ActivityController.prototype.createCopyActivity = function (context, _a, _b) {
var activityconfigService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var activityId, result, _c, _id, rest, prizeInfoList, createResult, e_1;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
activityId = context.data.activityId;
_d.label = 1;
case 1:
_d.trys.push([1, 4, , 5]);
return [4 /*yield*/, activityconfigService.getActivityInfoByActivityId(activityId)];
case 2:
result = _d.sent();
if (!result)
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR, "获取活动信息失败")];
_c = result.baseConfig, _id = _c._id, rest = __rest(_c, ["_id"]);
prizeInfoList = result.prizeConfig.map(function (v) {
delete v._id;
return v;
});
return [4 /*yield*/, activityconfigService.saveNewActivity(__assign(__assign({}, rest), { title: rest.title + '副本', startTime: Date.now() + constants_1.EIGHT_HOURS, endTime: Date.now() + constants_1.EIGHT_HOURS + constants_1.SEVEN_DAYS }), prizeInfoList, context.openId)];
case 3:
createResult = _d.sent();
if (createResult) {
return [2 /*return*/, sdk_1.resultsModel.success(createResult)];
}
else {
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR, "复制活动失败")];
}
return [3 /*break*/, 5];
case 4:
e_1 = _d.sent();
console.log(e_1);
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR, '复制活动失败')];
case 5: return [2 /*return*/];
}
});
});
};
__decorate([
decorator_1.services([service_1.ActivityconfigService]),
__metadata("design:type", Function),
......@@ -159,6 +213,13 @@ var ActivityController = /** @class */ (function () {
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], ActivityController.prototype, "delActivity", null);
__decorate([
decorator_1.paramsCheck(['activityId']),
decorator_1.services([service_1.ActivityconfigService]),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object, Array]),
__metadata("design:returntype", Promise)
], ActivityController.prototype, "createCopyActivity", null);
return ActivityController;
}());
exports.default = ActivityController;
......
{"version":3,"file":"activity.controller.js","sourceRoot":"","sources":["../../src/controller/activity.controller.ts"],"names":[],"mappings":";AAAA,cAAc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AAC,WAAW,CAAC,CAAA;wBAE/D,YAAY,uBACd,UAAU,YAAA,IACP,UAAU,GACV,MAAM,CACV,CAAA;wBACD,sBAAO,kBAAY,CAAC,OAAO,CAAC,YAAY,CAAC,EAAA;;;;KAC1C;IAED;;OAEG;IAGG,wCAAW,GAAjB,UAAkB,OAAgB,EAAE,EAAE,EAAE,EAAgD;YAA/C,qBAAqB,QAAA;;;;;;wBACpD,UAAU,GAAK,OAAO,CAAC,IAAI,WAAjB,CAAiB;wBAEtB,qBAAM,qBAAqB,CAAC,0BAA0B,CAAC,UAAU,CAAC,EAAA;;wBAA3E,MAAM,GAAG,SAAkE;wBACzE,aAAa,GAAY,MAAM,KAAK,CAAC,IAAI,MAAM,CAAA;wBACrD,IAAI,aAAa,EAAE;4BACjB,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;yBAClC;6BAAM;4BACL,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAA;yBAC7D;;;;;KACF;IAvDD;QADC,oBAAQ,CAAC,CAAC,+BAAqB,CAAC,CAAC;;;;6DAejC;IAOD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,+BAAqB,CAAC,CAAC;;;;+DAkBjC;IAOD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,+BAAqB,CAAC,CAAC;;;;yDAWjC;IACH,yBAAC;CAAA,AA7DD,IA6DC;kBA7DoB,kBAAkB"}
\ No newline at end of file
{"version":3,"file":"activity.controller.js","sourceRoot":"","sources":["../../src/controller/activity.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAAoE;AACpE,0CAAoD;AACpD,8BAAqC;AACrC,sCAAkD;AAElD;IA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AG,EAAE,GAAG,uBAAW,EACnC,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,uBAAW,GAAG,sBAAU,KAE9C,aAAa,EACb,OAAO,CAAC,MAAM,CACf,EAAA;;wBARG,YAAY,GAAG,SAQlB;wBACD,IAAI,YAAY,EAAE;4BAChB,sBAAO,kBAAY,CAAC,OAAO,CAAC,YAAY,CAAC,EAAC;yBAC3C;6BAAM;4BACL,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAC;yBAC9D;;;;wBAED,OAAO,CAAC,GAAG,CAAC,GAAC,CAAC,CAAC;wBACf,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAA;;;;;KAE/D;IAlGD;QADC,oBAAQ,CAAC,CAAC,+BAAqB,CAAC,CAAC;;;;6DAejC;IAOD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,+BAAqB,CAAC,CAAC;;;;+DAkBjC;IAOD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,+BAAqB,CAAC,CAAC;;;;yDAWjC;IAOD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,+BAAqB,CAAC,CAAC;;;;gEAqCjC;IACH,yBAAC;CAAA,AAxGD,IAwGC;kBAxGoB,kBAAkB"}
\ No newline at end of file
......@@ -6,20 +6,35 @@ export default class BaseController {
*/
findWinnerInfoList(context: Context, { session }: {
session: any;
}, [awardsService]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [awardsService]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<false, true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
list: any;
total: any;
message: string;
pageNo: number;
pageSize: number;
}, true>>;
getAwardsList(context: Context, { session }: {
session: any;
}, [awardsService]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<false, true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
list: any;
total: any;
message: string;
pageNo: number;
pageSize: number;
}, true>>;
/**
* 导出活动中奖名单
*/
exportAwardsList(context: Context, { session }: {
session: any;
}, [awardsService]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
exportAwardsInfoBySearch(context: Context, { session }: {
session: any;
}, [awardsService]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
findWinnerInfoListBySearch(context: Context, { session }: {
session: any;
}, [awardsService]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [awardsService]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
/**
* 导入发货
*/
downloadFile(context: Context, { session }: {
session: any;
}, [awardsService]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [awardsService]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
total: number;
data: any;
}, true>>;
}
......@@ -3,5 +3,5 @@ export default class RuleController {
/**
* 生成活动规则
*/
generateRule(context: Context, {}: {}): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
generateRule(context: Context, {}: {}): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<string, true>>;
}
......@@ -10,5 +10,5 @@ export default class ActivitSaveController {
/**
* 保存活动
*/
saveActivityInfo(context: ISaveActivityContext, {}: {}, [activityconfigService]: [ActivityconfigService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
saveActivityInfo(context: ISaveActivityContext, {}: {}, [activityconfigService]: [ActivityconfigService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<false, true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<true, true>>;
}
......@@ -56,6 +56,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
......@@ -79,22 +90,20 @@ var ActivitSaveController = /** @class */ (function () {
ActivitSaveController.prototype.saveActivityInfo = function (context, _a, _b) {
var activityconfigService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var _c, _d, title, _e, activityId, startTime, endTime, _f, tasks, rule, prizeList, openId, baseData, allPrizeList, result, result, _g, bothIds, deleteIds, prizeResult;
var _c, _d, title, _e, activityId, startTime, endTime, _f, tasks, rule, prizeList, data, openId, baseData, allPrizeList, result, result, _g, bothIds, deleteIds, prizeResult;
return __generator(this, function (_h) {
switch (_h.label) {
case 0:
_c = context.data, _d = _c.title, title = _d === void 0 ? '' : _d, _e = _c.activityId, activityId = _e === void 0 ? '' : _e, startTime = _c.startTime, endTime = _c.endTime, _f = _c.tasks, tasks = _f === void 0 ? {} : _f, rule = _c.rule, prizeList = _c.prizeList;
_c = context.data, _d = _c.title, title = _d === void 0 ? '' : _d, _e = _c.activityId, activityId = _e === void 0 ? '' : _e, startTime = _c.startTime, endTime = _c.endTime, _f = _c.tasks, tasks = _f === void 0 ? {} : _f, rule = _c.rule, prizeList = _c.prizeList, data = __rest(_c, ["title", "activityId", "startTime", "endTime", "tasks", "rule", "prizeList"]);
openId = context.openId;
baseData = {
title: title,
baseData = __assign(__assign({ title: title,
startTime: startTime,
endTime: endTime,
rule: rule,
openId: openId,
tasks: tasks,
tasks: tasks }, data), {
// 奖品过期时间, 根据需求领奖是否有过期时间
awardReceiveExpiredTime: endTime + constants_1._48_HOURS
};
awardReceiveExpiredTime: endTime + constants_1._48_HOURS });
allPrizeList = __spreadArrays(prizeList.map(function (v, i) { return (__assign(__assign({}, v), { level: i + 1 })); }));
if (!!activityId) return [3 /*break*/, 2];
return [4 /*yield*/, activityconfigService.saveNewActivity(baseData, allPrizeList, openId)];
......@@ -107,7 +116,7 @@ var ActivitSaveController = /** @class */ (function () {
console.log(result, '保存活动失败');
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR, '保存活动失败')];
}
return [3 /*break*/, 7];
return [3 /*break*/, 9];
case 2: return [4 /*yield*/, activityconfigService.updateBaseConfigInfo(activityId, baseData)
// 找到更新的和删除的奖品id
];
......@@ -118,19 +127,22 @@ var ActivitSaveController = /** @class */ (function () {
];
case 4:
_g = _h.sent(), bothIds = _g.bothIds, deleteIds = _g.deleteIds;
return [4 /*yield*/, activityconfigService.deletePrizeByIds(deleteIds)
// 添加和更新奖品
];
if (!(deleteIds === null || deleteIds === void 0 ? void 0 : deleteIds.length)) return [3 /*break*/, 6];
return [4 /*yield*/, activityconfigService.deletePrizeByIds(deleteIds)];
case 5:
// 将删除的奖品逻辑删除
result = _h.sent();
return [4 /*yield*/, activityconfigService.insertAndUpdatePrize(activityId, allPrizeList, bothIds)];
_h.label = 6;
case 6:
if (!(allPrizeList === null || allPrizeList === void 0 ? void 0 : allPrizeList.length)) return [3 /*break*/, 8];
return [4 /*yield*/, activityconfigService.insertAndUpdatePrize(activityId, allPrizeList, bothIds)];
case 7:
prizeResult = _h.sent();
if (prizeResult.failed.length) {
console.log(prizeResult.failed, '更新奖品失败');
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR, '保存活动失败')];
}
_h.label = 8;
case 8:
if (result || result === 0) {
return [2 /*return*/, sdk_1.resultsModel.success(true)];
}
......@@ -138,8 +150,8 @@ var ActivitSaveController = /** @class */ (function () {
console.log(result, '保存活动失败');
return [2 /*return*/, sdk_1.resultsModel.error(constants_1.CODE_TYPES.SYSTEM_ERROR, '保存活动失败')];
}
_h.label = 7;
case 7: return [2 /*return*/];
_h.label = 9;
case 9: return [2 /*return*/];
}
});
});
......
{"version":3,"file":"save.controller.js","sourceRoot":"","sources":["../../src/controller/save.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAAsD;AACtD,0CAAoE;AACpE,8BAAqC;AACrC,sCAAkD;AAClD,sDAAkD;AAgBlD;IAAA;IAoEA,CAAC;IAnEC;;OAEG;IACH,mEAAmE;IAG7D,gDAAgB,GAAtB,UAAuB,OAA6B,EAAE,EAAE,EAAE,EAAgD;YAA/C,qBAAqB,QAAA;;;;;;wBAC1E,KAAmF,OAAO,CAAC,IAAI,EAA7F,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EAAE,kBAAe,EAAf,UAAU,mBAAG,EAAE,KAAA,EAAE,SAAS,eAAA,EAAE,OAAO,aAAA,EAAE,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EAAE,IAAI,UAAA,EAAE,SAAS,eAAA,CAAiB;wBAC3F,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAGpB,QAAQ,GAAsB;4BAClC,KAAK,OAAA;4BACL,SAAS,WAAA;4BACT,OAAO,SAAA;4BACP,IAAI,MAAA;4BACJ,MAAM,QAAA;4BACN,KAAK,OAAA;4BACL,wBAAwB;4BACxB,uBAA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C,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;4BACzC,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAA;yBAC7D;wBAED,IAAI,MAAM,IAAI,MAAM,KAAK,CAAC,EAAE;4BAC1B,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;yBAClC;6BAAM;4BACL,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;4BAC7B,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAA;yBAC7D;;;;;;KAEJ;IA5DD;QAFC,0BAAc,CAAC,yBAAU,CAAC;QAC1B,oBAAQ,CAAC,CAAC,+BAAqB,CAAC,CAAC;;;;iEA6DjC;IACH,4BAAC;CAAA,AApED,IAoEC;kBApEoB,qBAAqB"}
\ No newline at end of file
{"version":3,"file":"save.controller.js","sourceRoot":"","sources":["../../src/controller/save.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,4CAAsD;AACtD,0CAAoE;AACpE,8BAAqC;AACrC,sCAAkD;AAClD,sDAAkD;AAgBlD;IAAA;IA+EA,CAAC;IA9EC;;OAEG;IACH,mEAAmE;IAG7D,gDAAgB,GAAtB,UAAuB,OAA6B,EAAE,EAAG,EAAE,EAAgD;YAA/C,qBAAqB,QAAA;;;;;;wBAC3E,KAOA,OAAO,CAAC,IAAI,EANd,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EACV,kBAAe,EAAf,UAAU,mBAAG,EAAE,KAAA,EACf,SAAS,eAAA,EAAE,OAAO,aAAA,EAClB,aAAU,EAAV,KAAK,mBAAG,EAAE,KAAA,EAAE,IAAI,UAAA,EAChB,SAAS,eAAA,EACN,IAAI,cANL,6EAO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AA;;wBAAhE,MAAM,GAAG,SAAuD,CAAA;;;8BAG9D,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM;wBAEF,qBAAM,qBAAqB,CAAC,oBAAoB,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO,CAAC,EAAA;;wBAAjG,WAAW,GAAG,SAAmF;wBACvG,IAAI,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE;4BAC7B,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;4BACzC,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAA;yBAC7D;;;wBAGH,IAAI,MAAM,IAAI,MAAM,KAAK,CAAC,EAAE;4BAC1B,sBAAO,kBAAY,CAAC,OAAO,CAAC,IAAI,CAAC,EAAA;yBAClC;6BAAM;4BACL,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;4BAC7B,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,EAAA;yBAC7D;;;;;;KAEJ;IAvED;QAFC,0BAAc,CAAC,yBAAU,CAAC;QAC1B,oBAAQ,CAAC,CAAC,+BAAqB,CAAC,CAAC;;;;iEAwEjC;IACH,4BAAC;CAAA,AA/ED,IA+EC;kBA/EoB,qBAAqB"}
\ No newline at end of file
......@@ -4,6 +4,8 @@ export default class BaseController {
/**
* 保存授权信息
*/
sellerSave(context: Context, {}: {}, [sellerService]: [SellerService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
sellerSaasSave(context: Context, {}: {}, [sellerService, taobaoTopService, InstanceService]: [SellerService, TaobaoTopService, InstanceService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
sellerSave(context: Context, {}: {}, [sellerService]: [SellerService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
sellerSaasSave(context: Context, {}: {}, [sellerService, taobaoTopService, InstanceService]: [SellerService, TaobaoTopService, InstanceService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
deadline: any;
}, true>>;
}
......@@ -6,17 +6,26 @@ export default class BaseController {
*/
findItemListByStatus(context: Context, { session }: {
session: any;
}, [taobaoTopService]: [TaobaoTopService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [taobaoTopService]: [TaobaoTopService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
pageNo: number;
pageSize: number;
totalPages: number;
totalCount: any;
list: any;
}, true>>;
/**
* 通过状态获取top商品列表
*/
findItemListByIds(context: Context, { session }: {
session: any;
}, [taobaoTopService]: [TaobaoTopService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [taobaoTopService]: [TaobaoTopService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
list: any;
totalCount: any;
}, true>>;
/**
* 通过ename获取权益信息
*/
queryBenefitByEname(context: Context, { session }: {
session: any;
}, [taobaoTopService]: [TaobaoTopService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [taobaoTopService]: [TaobaoTopService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
}
......@@ -15,7 +15,7 @@ exports.paramsCheck = void 0;
/** @format */
var sdk_1 = require("../sdk");
var constants_1 = require("../constants");
exports.paramsCheck = function (params) {
var paramsCheck = function (params) {
return function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
......@@ -34,4 +34,5 @@ exports.paramsCheck = function (params) {
};
};
};
exports.paramsCheck = paramsCheck;
//# sourceMappingURL=check.js.map
\ No newline at end of file
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/decorator/check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,cAAc;AACd,8BAAqC;AACrC,0CAAyC;AAC5B,QAAA,WAAW,GAAG,UAAC,MAAgB;IAC1C,OAAO,UAAU,MAAc,EAAE,IAAY,EAAE,UAA8B;QAC3E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;QAE/B,UAAU,CAAC,KAAK,GAAG;YAAU,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAClC,IAAA,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;YACtC,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;gBACvB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;oBAAE,OAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,iBAAK,KAAK,iBAAI,CAAC,CAAA;aAClG;YACD,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,eAAO,SAAS,EAAG,CAAC,CAAA;QAC1D,CAAC,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/decorator/check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,cAAc;AACd,8BAAqC;AACrC,0CAAyC;AAClC,IAAM,WAAW,GAAG,UAAC,MAAgB;IAC1C,OAAO,UAAU,MAAc,EAAE,IAAY,EAAE,UAA8B;QAC3E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;QAE/B,UAAU,CAAC,KAAK,GAAG;YAAU,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;YAClC,IAAA,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;YACtC,IAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACtC,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;gBACvB,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC;oBAAE,OAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,iBAAK,KAAK,iBAAI,CAAC,CAAA;aAClG;YACD,OAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,eAAO,SAAS,EAAG,CAAC,CAAA;QAC1D,CAAC,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA;AAdY,QAAA,WAAW,eAcvB"}
\ No newline at end of file
......@@ -49,7 +49,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.noCatch = void 0;
exports.noCatch = function (target, name, descriptor) {
var noCatch = function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
var args = [];
......@@ -65,4 +65,5 @@ exports.noCatch = function (target, name, descriptor) {
});
};
};
exports.noCatch = noCatch;
//# sourceMappingURL=noCatch.js.map
\ No newline at end of file
{"version":3,"file":"noCatch.js","sourceRoot":"","sources":["../../src/decorator/noCatch.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,QAAA,OAAO,GAAG,UAAC,MAAW,EAAE,IAAY,EAAE,UAA8B;IAC/E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;IAC/B,UAAU,CAAC,KAAK,GAAG;QAAgB,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;;;;gBACxC,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;gBACtC,sBAAO,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,wBAAO,SAAS,KAAE,OAAO,EAAE,IAAI,IAAG,CAAC,EAAA;;;KACtE,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"noCatch.js","sourceRoot":"","sources":["../../src/decorator/noCatch.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEP,IAAM,OAAO,GAAG,UAAC,MAAW,EAAE,IAAY,EAAE,UAA8B;IAC/E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;IAC/B,UAAU,CAAC,KAAK,GAAG;QAAgB,cAAc;aAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;YAAd,yBAAc;;;;;gBACxC,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;gBACtC,sBAAO,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,wBAAO,SAAS,KAAE,OAAO,EAAE,IAAI,IAAG,CAAC,EAAA;;;KACtE,CAAA;AACH,CAAC,CAAA;AANY,QAAA,OAAO,WAMnB"}
\ No newline at end of file
......@@ -59,7 +59,7 @@ function initBaseInfo(context, baseInfos) {
});
});
}
exports.services = function (services) {
var services = function (services) {
return function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
......@@ -108,4 +108,5 @@ exports.services = function (services) {
};
};
};
exports.services = services;
//# sourceMappingURL=services.js.map
\ No newline at end of file
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/decorator/services.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,kCAAiD;AACjD,8BAAqC;AACrC,0CAAyC;AACzC,sCAA6C;AAC7C,SAAe,YAAY,CAAC,OAAgB,EAAE,SAA2B;;;;;;yBACnE,CAAC,SAAS,CAAC,OAAO,EAAlB,wBAAkB;oBAEA,qBAAM,IAAI,0BAAgB,CAAC,OAAO,CAAC,CAAC,sBAAsB,EAAE,EAAA;;oBAAxE,OAAO,GAAK,CAAA,SAA4D,CAAA,QAAjE;oBACf,SAAS,CAAC,OAAO,GAAG,OAAO,CAAA;;wBAG7B,sBAAO,SAAS,EAAA;;;;CACjB;AAEY,QAAA,QAAQ,GAAG,UAAC,QAAe;IACtC,OAAO,UAAC,MAAc,EAAE,IAAY,EAAE,UAA8B;QAClE,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;QAE/B,UAAU,CAAC,KAAK,GAAG;;YAAgB,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;;;;;;4BAC1C,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;4BAC9B,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,IAAI,CAAC,CAAC,OAAO,CAAC,EAAd,CAAc,CAAC,CAAA;4BACtB,qBAAM,YAAY,CAAC,OAAO,EAAE,SAAS,CAAC;gCAC1E,mCAAmC;8BADuC;;4BAApE,SAAS,GAAqB,SAAsC;4BAC1E,mCAAmC;4BACnC,IAAI,SAAS,CAAC,OAAO,EAAE;gCACrB,OAAO,SAAS,CAAC,OAAO,CAAA;gCACxB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K,CACtB,sBAAU,CAAC,YAAY,EACvB,CAAG,mBAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,0CAAE,SAAS,0CAAE,OAAO,0CAAE,OAAO,KAAI,OAAO,CAAC,OAAO,8BAAM,CACxE,CAAA;;gCAEH,sBAAO,GAAG,EAAA;;;;SACX,CAAA;IACH,CAAC,CAAA;AACH,CAAC,CAAA;AA5BY,QAAA,QAAQ,YA4BpB"}
\ No newline at end of file
......@@ -52,7 +52,7 @@ exports.paramsValidate = void 0;
var sdk_1 = require("../sdk");
var constants_1 = require("../constants");
var async_validator_1 = require("async-validator");
exports.paramsValidate = function (validators) {
var paramsValidate = function (validators) {
return function (target, name, descriptor) {
var method = descriptor.value;
descriptor.value = function () {
......@@ -80,6 +80,7 @@ exports.paramsValidate = function (validators) {
};
};
};
exports.paramsValidate = paramsValidate;
var validateParams = function (validators, data) {
var validator = new async_validator_1.default(validators);
return new Promise(function (resolve) {
......
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/decorator/validate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,8BAAqC;AACrC,0CAAyC;AACzC,mDAA+C;AAElC,QAAA,cAAc,GAAG,UAAC,UAAiB;IAC9C,OAAO,UAAU,MAAc,EAAE,IAAY,EAAE,UAA8B;QAC3E,IAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAA;QAE/B,UAAU,CAAC,KAAK,GAAG;;YAAgB,cAAc;iBAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;gBAAd,yBAAc;;;;;;;4BACxC,OAAO,GAAoB,IAAI,GAAxB,EAAE,KAAkB,IAAI,GAAR,EAAd,SAAS,mBAAG,EAAE,KAAA,CAAQ;4BAEnB,qBAAM,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,EAAA;;4BAAzD,MAAM,GAAK,CAAA,SAA8C,CAAA,OAAn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C,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
\ No newline at end of file
/** @format */
declare const _default: {
getActivityList: (context: Context, {}: {}, [activityconfigService]: [import("./service").ActivityconfigService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getActivityDetail: (context: Context, {}: {}, [activityconfigService]: [import("./service").ActivityconfigService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
delActivity: (context: Context, {}: {}, [activityconfigService]: [import("./service").ActivityconfigService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
saveActivityInfo: (context: import("./controller/save.controller").ISaveActivityContext, {}: {}, [activityconfigService]: [import("./service").ActivityconfigService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
sellerSave: (context: Context, {}: {}, [sellerService]: [import("./service").SellerService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getActivityList: (context: Context, {}: {}, [activityconfigService]: [import("./service").ActivityconfigService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
list: any;
total: any;
pageSize: number;
pageNo: number;
}, true>>;
getActivityDetail: (context: Context, {}: {}, [activityconfigService]: [import("./service").ActivityconfigService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
delActivity: (context: Context, {}: {}, [activityconfigService]: [import("./service").ActivityconfigService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<false, true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<true, true>>;
saveActivityInfo: (context: import("./controller/save.controller").ISaveActivityContext, {}: {}, [activityconfigService]: [import("./service").ActivityconfigService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<false, true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<true, true>>;
sellerSave: (context: Context, {}: {}, [sellerService]: [import("./service").SellerService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
findWinnerInfoList: (context: Context, { session }: {
session: any;
}, [awardsService]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [awardsService]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<false, true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
list: any;
total: any;
message: string;
pageNo: number;
pageSize: number;
}, true>>;
exportAwardsList: (context: Context, { session }: {
session: any;
}, [awardsService]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
findWinnerInfoListBySearch: (context: Context, { session }: {
session: any;
}, [awardsService]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [awardsService]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
downloadFile: (context: Context, { session }: {
session: any;
}, [awardsService]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
exportAwardsInfoBySearch: (context: Context, { session }: {
session: any;
}, [awardsService]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [awardsService]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
total: number;
data: any;
}, true>>;
findItemListByStatus: (context: Context, { session }: {
session: any;
}, [taobaoTopService]: [import("./service").TaobaoTopService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [taobaoTopService]: [import("./service").TaobaoTopService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
pageNo: number;
pageSize: number;
totalPages: number;
totalCount: any;
list: any;
}, true>>;
findItemListByIds: (context: Context, { session }: {
session: any;
}, [taobaoTopService]: [import("./service").TaobaoTopService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [taobaoTopService]: [import("./service").TaobaoTopService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
list: any;
totalCount: any;
}, true>>;
queryBenefitByEname: (context: Context, { session }: {
session: any;
}, [taobaoTopService]: [import("./service").TaobaoTopService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}, [taobaoTopService]: [import("./service").TaobaoTopService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
createCopyActivity: (context: Context, {}: {}, [activityconfigService]: [import("./service").ActivityconfigService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
getAwardsList: (context: Context, { session }: {
session: any;
}, [awardsService]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<false, true> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
list: any;
total: any;
message: string;
pageNo: number;
pageSize: number;
}, true>>;
};
export default _default;
......@@ -7,9 +7,9 @@ var awards_controller_1 = require("./controller/awards.controller");
var rule_controller_1 = require("./controller/rule.controller");
var taobaoItem_controller_1 = require("./controller/taobaoItem.controller");
var save_controller_1 = require("./controller/save.controller");
var _a = new activity_controller_1.default(), getActivityList = _a.getActivityList, getActivityDetail = _a.getActivityDetail, delActivity = _a.delActivity;
var _a = new activity_controller_1.default(), getActivityList = _a.getActivityList, getActivityDetail = _a.getActivityDetail, delActivity = _a.delActivity, createCopyActivity = _a.createCopyActivity;
var _b = new seller_controller_1.default(), sellerSaasSave = _b.sellerSaasSave, sellerSave = _b.sellerSave;
var _c = new awards_controller_1.default(), findWinnerInfoList = _c.findWinnerInfoList, exportAwardsList = _c.exportAwardsList, findWinnerInfoListBySearch = _c.findWinnerInfoListBySearch, downloadFile = _c.downloadFile, exportAwardsInfoBySearch = _c.exportAwardsInfoBySearch;
var _c = new awards_controller_1.default(), findWinnerInfoList = _c.findWinnerInfoList, exportAwardsList = _c.exportAwardsList, getAwardsList = _c.getAwardsList, downloadFile = _c.downloadFile;
var generateRule = new rule_controller_1.default().generateRule;
var _d = new taobaoItem_controller_1.default(), findItemListByStatus = _d.findItemListByStatus, findItemListByIds = _d.findItemListByIds, queryBenefitByEname = _d.queryBenefitByEname;
var saveActivityInfo = new save_controller_1.default().saveActivityInfo;
......@@ -21,11 +21,11 @@ exports.default = {
sellerSave: sellerSave,
findWinnerInfoList: findWinnerInfoList,
exportAwardsList: exportAwardsList,
findWinnerInfoListBySearch: findWinnerInfoListBySearch,
downloadFile: downloadFile,
exportAwardsInfoBySearch: exportAwardsInfoBySearch,
findItemListByStatus: findItemListByStatus,
findItemListByIds: findItemListByIds,
queryBenefitByEname: queryBenefitByEname
queryBenefitByEname: queryBenefitByEname,
createCopyActivity: createCopyActivity,
getAwardsList: getAwardsList
};
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,wEAAiE;AACjE,oEAA6D;AAC7D,oEAA6D;AAC7D,gEAAyD;AACzD,4EAAqE;AACrE,gEAAyD;AAEnD,IAAA,KAAsD,IAAI,6BAAkB,EAAE,EAA5E,eAAe,qBAAA,EAAE,iBAAiB,uBAAA,EAAE,WAAW,iBAA6B,CAAA;AAC9E,IAAA,KAAiC,IAAI,2BAAgB,EAAE,EAArD,cAAc,oBAAA,EAAE,UAAU,gBAA2B,CAAA;AACvD,IAAA,KAMF,I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C,IAAA,KAAmE,IAAI,+BAAoB,EAAE,EAA3F,oBAAoB,0BAAA,EAAE,iBAAiB,uBAAA,EAAE,mBAAmB,yBAA+B,CAAA;AAC3F,IAAA,gBAAgB,GAAK,IAAI,yBAAc,EAAE,iBAAzB,CAAyB;AAEjD,kBAAe;IACb,eAAe,iBAAA;IACf,iBAAiB,mBAAA;IACjB,WAAW,aAAA;IACX,gBAAgB,kBAAA;IAChB,UAAU,YAAA;IACV,kBAAkB,oBAAA;IAClB,gBAAgB,kBAAA;IAChB,YAAY,cAAA;IACZ,oBAAoB,sBAAA;IACpB,iBAAiB,mBAAA;IACjB,mBAAmB,qBAAA;IACnB,kBAAkB,oBAAA;IAClB,aAAa,eAAA;CACd,CAAA"}
\ No newline at end of file
......@@ -45,8 +45,6 @@ export default class ActivityConfigService {
* @returns
* @memberof ActivityConfigService
*/
formatPrizeConfig(prizeConfig: Array<IActivityPrize>): {
prizeList: IActivityPrize[];
};
formatPrizeConfig(prizeConfig: Array<IActivityPrize>): {};
setPrizeProbalityRange(prizes: IActivityPrize[]): IActivityPrize[];
}
......@@ -247,11 +247,7 @@ var ActivityConfigService = /** @class */ (function () {
return [4 /*yield*/, this.activityconfigPrizeDao.update({
_id: id
}, {
$set: {
data: data,
updateTime: Date.now(),
deleteStatus: constants_1.DELETE_STATUS.EXIST
}
$set: __assign(__assign({}, data), { updateTime: Date.now(), deleteStatus: constants_1.DELETE_STATUS.EXIST })
})];
case 1: return [2 /*return*/, _a.sent()];
}
......@@ -584,10 +580,28 @@ var ActivityConfigService = /** @class */ (function () {
* @memberof ActivityConfigService
*/
ActivityConfigService.prototype.formatPrizeConfig = function (prizeConfig) {
return {
// level 根据level排序
prizeList: prizeConfig.sort(function (a, b) { return a.level - b.level; })
};
var prizeList = prizeConfig.sort(function (a, b) { return a.level - b.level; });
var poolConfig = % -JSON.stringify(formatPrize) % >
// 取出奖池
let, prizeData = {};
poolConfig.forEach(function (item) {
prizeData[item.key] = prizeList.filter(function (prize) {
return +item.prizeDataType == +prize.prizeDataType;
});
});
// 过滤奖池条件
poolConfig.forEach(function (item) {
var _a;
if ((_a = item.conditionKeys) === null || _a === void 0 ? void 0 : _a.length) {
item.conditionKeys.forEach(function (condition) {
prizeData[item.key] = prizeData[item.key].filter(function (prize) {
return prize[condition.key] == condition.value;
});
});
}
});
return prizeData;
};
// 概率奖品配置 properiodfrom properiodto
ActivityConfigService.prototype.setPrizeProbalityRange = function (prizes) {
......
/** @format */
export default class AwardsService {
context: Context;
awardsdao: IBaseDao;
awardsDao: IBaseDao;
constructor(context: Context);
addWaitAwardsList(list: any): Promise<boolean>;
getAwardslistByActivityId(activityId: string, pageNo?: number, pageSize?: number): Promise<any>;
getAwardslistCount(activityId: string): Promise<any>;
getUserPrizeByActivityId(activityId: string, pageNo: number, pageSize: number, prizeId: string, userNick: string, timeStart: number, timeEnd: number, shipStatus: number, type: number): Promise<any>;
getTotalObjectCount(activityId: string, prizeId: string, userNick: string, timeStart: number, timeEnd: number, shipStatus: number, type: number): Promise<any>;
setUserShipStatus(activityId: string, prizeId: string, shipCompany: string, shipNum: number | string): Promise<any>;
setUserShipStatus(activityId: any, prizeId: any, shipCompany: any, shipNum: any): Promise<any>;
getAwardListByActivityId({ activityId, title, pageNo, pageSize, prizeId, userNick, type, prizeDataType, shipStatus, startTime, endTime, isExport }: {
activityId?: string;
title?: string;
pageNo?: number;
pageSize?: number;
prizeId?: any;
userNick?: string;
type?: any;
prizeDataType?: any;
shipStatus?: any;
startTime?: any;
endTime?: any;
isExport?: boolean;
}): Promise<false | {
list: any;
total: any;
message: string;
pageNo: number;
pageSize: number;
}>;
}
{"version":3,"file":"awards.service.js","sourceRoot":"","sources":["../../src/service/awards.service.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,UAAU;AAEV,8BAAgC;AAChC,4BAAsC;AAEtC,0CAAuD;AACvD;IAGE,uBAAY,OAAgB;QA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AAC,CAAA;wBACd,IAAI,WAAW,IAAI,OAAO,EAAE;4BAC1B,MAAM,GAAG,uBAAW,CAAC,QAAQ,CAAA;yBAC9B;6BAAM;4BACL,MAAM,GAAG,uBAAW,CAAC,OAAO,CAAA;yBAC7B;6BACG,CAAA,MAAM,IAAI,uBAAW,CAAC,QAAQ,CAAA,EAA9B,wBAA8B;wBACzB,qBAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAChC;gCACE,UAAU,YAAA;gCACV,GAAG,EAAE,OAAO;gCACZ,UAAU,EAAE,uBAAW,CAAC,OAAO;6BAChC,EACD;gCACE,IAAI,EAAE;oCACJ,WAAW,aAAA;oCACX,OAAO,SAAA;oCACP,UAAU,EAAE,uBAAW,CAAC,QAAQ;iCACjC;6BACF,CACF,EAAA;4BAbD,sBAAO,SAaN,EAAA;4BAED,sBAAO,CAAC,EAAA;;;;KAEX;IACH,oBAAC;AAAD,CAAC,AA1JD,IA0JC"}
\ No newline at end of file
{"version":3,"file":"awards.service.js","sourceRoot":"","sources":["../../src/service/awards.service.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,UAAU;AAEV,8BAAgC;AAChC,4BAAsC;AAEtC,0CAAmE;AACnE;IAGE,uBAAY,OAAgB;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,aAAO,CAAC,OAAO,EAAE,mBAAc,CAAC,CAAA;IACvD,CAAC;IAED,aAAa;IACP,yCAAiB,GAAvB,UAAwB,IAAI;;;;;;wBAC1B,IAAI,CAAC,IAAI,CAAC,MAAM;4BAAE,sBAAO,IAAI,EAAA;wBAC7B,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,UAAA,CAAC;4BACf,6BACK,CAAC,KACJ,UAAU,EAAE,uBAAW,CAAC,SAAS,EACjC,OAAO,EAAE,EAAE,IACZ;wBACH,CAAC,CAAC,CAAA;;;;wBAEA,qBAAM,IAAI,CAAC,SAAS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ErC,KAAK,GAAG,EAAE,UAAU,YAAA,EAAE,CAAA;wBAC5B,aAAa;wBACb,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;4BAAE,KAAK,CAAC,IAAI,GAAG,GAAG,CAAA;wBACvB,qBAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE;gCAC5C,KAAK,EAAE,QAAQ;gCACf,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,QAAQ;gCAC7B,IAAI,EAAE;oCACJ,KAAK,EAAE,CAAC,CAAC;oCACT,QAAQ,EAAE,CAAC,CAAC;iCACb;6BACF,CAAC,EAAA;;wBAPI,IAAI,GAAG,SAOX;wBACY,qBAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAA;;wBAAzC,KAAK,GAAG,SAAiC;wBAC/C,sBAAO;gCACL,IAAI,MAAA;gCACJ,KAAK,OAAA;gCACL,OAAO,EAAE,IAAI;gCACb,MAAM,QAAA;gCACN,QAAQ,UAAA;6BACT,EAAA;;;;KACF;IACH,oBAAC;AAAD,CAAC,AAzHD,IAyHC"}
\ No newline at end of file
......@@ -12,15 +12,24 @@ export default class ActivityTopService {
getAccessTokenByOpenId(): Promise<{
session: any;
}>;
getItemListByIds(itemIds: string, seesion: string): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getPrizeByEname(session: string, ename: string): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getShopId(): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
getItemListByIds(itemIds: string, seesion: string): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
list: any;
totalCount: any;
}, true>>;
getPrizeByEname(session: string, ename: string): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
getShopId(): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, true>>;
getItemListByStatus(session: string, { approveStatus, title, pageNo, pageSize }: {
approveStatus?: string;
title?: string;
pageNo?: number;
pageSize?: number;
}): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result>;
}): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<any, false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
pageNo: number;
pageSize: number;
totalPages: number;
totalCount: any;
list: any;
}, true>>;
getTemplateInstantiate(): Promise<any>;
pushOnlineInstance(instanceInfo: {
app_id: any;
......
......@@ -110,7 +110,7 @@ var ActivityTopService = /** @class */ (function () {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, sdk_1.TBAPIS.getItemListByItemIds(this.context, seesion, itemIds, { fields: constants_1.GOODSINFO })];
return [4 /*yield*/, sdk_1.TBAPIS.getItemListByItemIds(this.context, itemIds, { fields: constants_1.GOODSINFO })];
case 1:
result = _a.sent();
if (result) {
......@@ -154,7 +154,7 @@ var ActivityTopService = /** @class */ (function () {
// sellerConfig = await this.getAccessTokenByOpenId()
// ename = this.context.data.ename
console.log(session, 'session');
return [4 /*yield*/, sdk_1.TBAPIS.getPrizeByEname(this.context, session, ename, constants_1.B_APP_NAME)];
return [4 /*yield*/, sdk_1.TBAPIS.getPrizeByEname(this.context, ename, constants_1.B_APP_NAME)];
case 1:
benefitData = _c.sent();
console.log(benefitData, benefitData.result, 'benefitData.result.');
......@@ -193,7 +193,7 @@ var ActivityTopService = /** @class */ (function () {
case 2:
_a.trys.push([2, 4, , 5]);
return [4 /*yield*/, sdk_1.TBAPIS.getShopInfo(this.context, {
session: sellerInfo.session,
// session: sellerInfo.session,
fields: 'sid,title,pic_path'
})];
case 3:
......@@ -336,7 +336,8 @@ var ActivityTopService = /** @class */ (function () {
data: {
article_code: constants_1.APP_SUB_CODE,
nick: nick
}
},
autoSession: true
})];
case 1:
res = _a.sent();
......
......@@ -13,7 +13,7 @@ var __assign = (this && this.__assign) || function () {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.exportHandlers = void 0;
exports.exportHandlers = function (controllers) {
var exportHandlers = function (controllers) {
var handlersMapper = controllers
.map(function (controller) {
var controllerInstance = new controller();
......@@ -28,4 +28,5 @@ exports.exportHandlers = function (controllers) {
}, {});
return handlersMapper;
};
exports.exportHandlers = exportHandlers;
//# sourceMappingURL=exportHandlers.js.map
\ No newline at end of file
{"version":3,"file":"exportHandlers.js","sourceRoot":"","sources":["../../src/utils/exportHandlers.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;AAED,QAAA,cAAc,GAAG,UAAC,WAAkB;IAC/C,IAAM,cAAc,GAAG,WAAW;SAC/B,GAAG,CAAC,UAAA,UAAU;QACb,IAAM,kBAAkB,GAAG,IAAI,UAAU,EAAE,CAAA;QAC3C,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAC/F,UAAA,CAAC,IAAI,OAAA,CAAC,KAAK,aAAa,EAAnB,CAAmB,CACzB,CAAA;QACD,OAAO,YAAY,CAAC,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;;YACvC,6BACK,IAAI,gBACN,OAAO,IAAG,kBAAkB,CAAC,OAAO,CAAC,OACvC;QACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC,CAAC;SACD,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;QACpB,6BACK,OAAO,GACP,IAAI,EACR;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"exportHandlers.js","sourceRoot":"","sources":["../../src/utils/exportHandlers.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;AAEP,IAAM,cAAc,GAAG,UAAC,WAAkB;IAC/C,IAAM,cAAc,GAAG,WAAW;SAC/B,GAAG,CAAC,UAAA,UAAU;QACb,IAAM,kBAAkB,GAAG,IAAI,UAAU,EAAE,CAAA;QAC3C,IAAM,YAAY,GAAG,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAC/F,UAAA,CAAC,IAAI,OAAA,CAAC,KAAK,aAAa,EAAnB,CAAmB,CACzB,CAAA;QACD,OAAO,YAAY,CAAC,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;;YACvC,6BACK,IAAI,gBACN,OAAO,IAAG,kBAAkB,CAAC,OAAO,CAAC,OACvC;QACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,CAAC,CAAC;SACD,MAAM,CAAC,UAAC,IAAI,EAAE,OAAO;QACpB,6BACK,OAAO,GACP,IAAI,EACR;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IACR,OAAO,cAAc,CAAA;AACvB,CAAC,CAAA;AArBY,QAAA,cAAc,kBAqB1B"}
\ No newline at end of file
......@@ -2,7 +2,7 @@
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getConsumerSeller = void 0;
exports.getConsumerSeller = function (_a) {
var getConsumerSeller = function (_a) {
var accessToken = _a.accessToken, openId = _a.openId;
return {
// timestamp: formatTime(new Date(), "yyyy-MM-dd hh:mm:ss"),
......@@ -13,4 +13,5 @@ exports.getConsumerSeller = function (_a) {
// REST_URL: 'http://gw.api.taobao.com/router/rest'
};
};
exports.getConsumerSeller = getConsumerSeller;
//# sourceMappingURL=getSeller.js.map
\ No newline at end of file
{"version":3,"file":"getSeller.js","sourceRoot":"","sources":["../../src/utils/getSeller.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAED,QAAA,iBAAiB,GAAG,UAAC,EAAuB;QAArB,WAAW,iBAAA,EAAE,MAAM,YAAA;IACrD,OAAO;QACL,4DAA4D;QAC5D,OAAO,EAAE,MAAM;QACf,oBAAoB;QACpB,uBAAuB;QACvB,OAAO,EAAE,WAAW;QACpB,mDAAmD;KACpD,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
{"version":3,"file":"getSeller.js","sourceRoot":"","sources":["../../src/utils/getSeller.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEP,IAAM,iBAAiB,GAAG,UAAC,EAAuB;QAArB,WAAW,iBAAA,EAAE,MAAM,YAAA;IACrD,OAAO;QACL,4DAA4D;QAC5D,OAAO,EAAE,MAAM;QACf,oBAAoB;QACpB,uBAAuB;QACvB,OAAO,EAAE,WAAW;QACpB,mDAAmD;KACpD,CAAA;AACH,CAAC,CAAA;AATY,QAAA,iBAAiB,qBAS7B"}
\ No newline at end of file
......@@ -41,15 +41,16 @@ exports.recordErrorLog = exports.logger = void 0;
var sdk_1 = require("../sdk");
var db_1 = require("../db");
var utils_1 = require("../utils");
exports.logger = function (context) {
var logger = function (context) {
var _a, _b, _c;
var data = JSON.stringify(context.data);
console.log(context);
console.log("---------\u51FD\u6570: " + (context.fcName || '') + "." + (((_c = (_b = (_a = context === null || context === void 0 ? void 0 : context.cloud) === null || _a === void 0 ? void 0 : _a.dataspace) === null || _b === void 0 ? void 0 : _b.context) === null || _c === void 0 ? void 0 : _c.handler) || context.handler) + "------------");
console.log("---------\u8BF7\u6C42\u53C2\u6570: " + data + "------------");
};
exports.logger = logger;
// 记录错误日志
exports.recordErrorLog = function (context, baseInfos, errorMsg, stack) { return __awaiter(void 0, void 0, void 0, function () {
var recordErrorLog = function (context, baseInfos, errorMsg, stack) { return __awaiter(void 0, void 0, void 0, function () {
var openId, userNick, activityId, logdao, functionName;
var _a, _b, _c;
return __generator(this, function (_d) {
......@@ -76,4 +77,5 @@ exports.recordErrorLog = function (context, baseInfos, errorMsg, stack) { return
}
});
}); };
exports.recordErrorLog = recordErrorLog;
//# sourceMappingURL=logger.js.map
\ No newline at end of file
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;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A,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;AAzBY,QAAA,cAAc,kBAyB1B"}
\ No newline at end of file
......@@ -11,7 +11,7 @@ function MathRand() {
}
exports.MathRand = MathRand;
//小数相乘
exports.signFigures = function (num, rank) {
var signFigures = function (num, rank) {
if (rank === void 0) { rank = 6; }
if (!num)
return 0;
......@@ -30,4 +30,5 @@ exports.signFigures = function (num, rank) {
}
return ans * sign;
};
exports.signFigures = signFigures;
//# sourceMappingURL=math.js.map
\ No newline at end of file
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../src/utils/math.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,SAAgB,QAAQ;IACtB,IAAI,GAAG,GAAG,EAAE,CAAA;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1B,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAA;KACtC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC;AAND,4BAMC;AAED,MAAM;AACO,QAAA,WAAW,GAAG,UAAU,GAAG,EAAE,IAAQ;IAAR,qBAAA,EAA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,OAAO,CAAC,CAAC;IACnB,IAAM,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC,IAAM,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC;IAC1B,IAAM,IAAI,GAAG,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACvD,IAAI,GAAG,CAAC;IACR,IAAI,IAAI,GAAG,CAAC,EAAE;QACZ,GAAG,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;KACxC;SAAM,IAAI,IAAI,GAAG,CAAC,EAAE;QACnB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC;KACtD;SAAM;QACL,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;KAC1B;IACD,OAAO,GAAG,GAAG,IAAI,CAAC;AACpB,CAAC,CAAC;AAdW,QAAA,WAAW,eActB"}
\ No newline at end of file
......@@ -4,10 +4,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.formatTime = exports.isNewDay = exports.getToday = void 0;
var sdk_1 = require("../sdk");
// 获取今天的时间
exports.getToday = function () {
var getToday = function () {
console.log(sdk_1.transformBeijingDate(Date.now()));
return sdk_1.dateFormatter(sdk_1.transformBeijingDate(Date.now()), 'yyyy/MM/dd');
};
exports.getToday = getToday;
/**
* 传入时间戳(毫秒)
* 根据时间戳转换成number型日期进行差值结算,比如:2020318-2020317
......@@ -20,7 +21,7 @@ function isNewDay(time) {
return nowdateNum - dateNum > 0;
}
exports.isNewDay = isNewDay;
exports.formatTime = function (thisDate, fmt) {
var formatTime = function (thisDate, fmt) {
if (fmt === void 0) { fmt = 'yyyy-MM-dd hh:mm:ss'; }
var o = {
'M+': thisDate.getMonth() + 1,
......@@ -38,4 +39,5 @@ exports.formatTime = function (thisDate, fmt) {
fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
return fmt;
};
exports.formatTime = formatTime;
//# sourceMappingURL=time.js.map
\ No newline at end of file
{"version":3,"file":"time.js","sourceRoot":"","sources":["../../src/utils/time.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,8BAA4D;AAE5D,UAAU;AACG,QAAA,QAAQ,GAAG;IACtB,OAAO,CAAC,GAAG,CAAC,0BAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;IAC7C,OAAO,mBAAa,CAAC,0BAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,EAAE,YAAY,CAAC,CAAA;AACtE,CAAC,CAAA;AAED;;;GAGG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,IAAI,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAA;IACzB,IAAI,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;IAEtF,IAAI,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAA;IAClC,IAAI,UAAU,GAAG,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;IAClG,OAAO,UAAU,GAAG,OAAO,GAAG,CAAC,CAAA;AACjC,CAAC;AAPD,4BAOC;AAEY,QAAA,UAAU,GAAG,UAAC,QAAc,EAAE,GAAmC;IAAnC,oBAAA,EAAA,2BAAmC;IAC5E,I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,EAAE;QAC3B,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;QAC/C,CAAC,EAAE,QAAQ,CAAC,eAAe,EAAE;KAC9B,CAAA;IACD,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAC9G,KAAK,IAAI,CAAC,IAAI,CAAC;QACb,IAAI,IAAI,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YACrC,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IACzG,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAfY,QAAA,UAAU,cAetB"}
\ No newline at end of file
......@@ -90,6 +90,21 @@ export default class BaseController {
async exportAwardsList(context: Context, { session }, [awardsService]: [AwardsService]) {
let { cloud } = context
const { list = [], title } = context.data
let res = []
let { success, data, message } = await this.getAwardsList(context, { session }, [awardsService])
const { list: awwardList = [], total } = data || {}
res = [...res, ...awwardList]
while (total > res.length) {
context.data.pageNo++
let { success, data, message } = await this.getAwardsList(context, { session }, [awardsService])
const { list: awwardList = [] } = data || {}
if (success) {
res = [...res, ...awwardList]
} else {
}
}
console.log(list, '导出报表')
let xlsxData = [
[
......@@ -108,7 +123,7 @@ export default class BaseController {
'物流单号'
]
]
list.forEach((v, index, arr) => {
res.forEach((v, index, arr) => {
let prizeDataType = '/';
let prizeType = '/';
let shipTxt = '/';
......
......@@ -23,6 +23,13 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
"@types/bson@*":
version "4.0.3"
resolved "https://registry.npm.taobao.org/@types/bson/download/@types/bson-4.0.3.tgz#30889d2ffde6262abbe38659364c631454999fbf"
integrity sha1-MIidL/3mJiq744ZZNkxjFFSZn78=
dependencies:
"@types/node" "*"
"@types/color-name@^1.1.1":
version "1.1.1"
resolved "https://registry.npm.taobao.org/@types/color-name/download/@types/color-name-1.1.1.tgz?cache=0&sync_timestamp=1596837707987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fcolor-name%2Fdownload%2F%40types%2Fcolor-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
......@@ -38,6 +45,19 @@
resolved "https://registry.npm.taobao.org/@types/json-schema/download/@types/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd"
integrity sha1-3M5EMOZLRDuolF8CkPtWStW6xt0=
"@types/mongodb@^3.5.26":
version "3.6.3"
resolved "https://registry.npm.taobao.org/@types/mongodb/download/@types/mongodb-3.6.3.tgz?cache=0&sync_timestamp=1607472387049&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fmongodb%2Fdownload%2F%40types%2Fmongodb-3.6.3.tgz#5655af409d9e32d5d5ae9a653abf3e5f9c83eb7a"
integrity sha1-VlWvQJ2eMtXVrpplOr8+X5yD63o=
dependencies:
"@types/bson" "*"
"@types/node" "*"
"@types/node@*":
version "14.14.13"
resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-14.14.13.tgz?cache=0&sync_timestamp=1607858277219&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.14.13.tgz#9e425079799322113ae8477297ae6ef51b8e0cdf"
integrity sha1-nkJQeXmTIhE66Edyl65u9RuODN8=
"@types/node@^14.6.0":
version "14.6.0"
resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-14.6.0.tgz?cache=0&sync_timestamp=1597673176468&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499"
......@@ -867,10 +887,12 @@ table@^5.2.3:
slice-ansi "^2.1.0"
string-width "^3.0.0"
taobao-mini-sdk@0.1.6:
version "0.1.6"
resolved "https://registry.npm.taobao.org/taobao-mini-sdk/download/taobao-mini-sdk-0.1.6.tgz#cc20f10879a1b872a7358d24efc426fda104fce7"
integrity sha1-zCDxCHmhuHKnNY0k78Qm/aEE/Oc=
taobao-mini-sdk@0.2.4:
version "0.2.4"
resolved "https://registry.npm.taobao.org/taobao-mini-sdk/download/taobao-mini-sdk-0.2.4.tgz#5074718bd4135263adbabbf30d8c6b44a0da1d9a"
integrity sha1-UHRxi9QTUmOturvzDYxrRKDaHZo=
dependencies:
"@types/mongodb" "^3.5.26"
text-table@^0.2.0:
version "0.2.0"
......
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