Commit 074c21f3 authored by qinhaitao's avatar qinhaitao

perf: ️ addressDetail

parent cc986442
...@@ -12,7 +12,7 @@ export interface IReceiveOjectParams { ...@@ -12,7 +12,7 @@ export interface IReceiveOjectParams {
province: string; province: string;
city: string; city: string;
area: string; area: string;
addressdetail: string; addressDetail: string;
} }
export interface IReceiveEnameParams { export interface IReceiveEnameParams {
activityId: string; activityId: string;
...@@ -32,11 +32,11 @@ export default class AwardsController { ...@@ -32,11 +32,11 @@ export default class AwardsController {
/** /**
* 权益重新领取 * 权益重新领取
*/ */
receiveEnamePrize(context: IContext<IReceiveEnameParams>, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | string[] | object[] | number[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<CodeType | IAwards, true>>; receiveEnamePrize(context: IContext<IReceiveEnameParams>, {}: {}, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | object[] | number[] | string[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<IAwards | CodeType, true>>;
/** /**
* 概率抽奖 * 概率抽奖
*/ */
drawLotteryPrize(context: IContext<IParams>, { userInfo }: IControllerInfos, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | string[] | object[] | number[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{ drawLotteryPrize(context: IContext<IParams>, { userInfo }: IControllerInfos, [awardSer]: [AwardsService]): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | object[] | number[] | string[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<{
data: { data: {
type: number; type: number;
name: string; name: string;
......
...@@ -81,17 +81,17 @@ var AwardsController = /** @class */ (function () { ...@@ -81,17 +81,17 @@ var AwardsController = /** @class */ (function () {
AwardsController.prototype.receiveObjectPrize = function (context, _a, _b) { AwardsController.prototype.receiveObjectPrize = function (context, _a, _b) {
var awardSer = _b[0]; var awardSer = _b[0];
return __awaiter(this, void 0, void 0, function () { return __awaiter(this, void 0, void 0, function () {
var _c, province, city, area, addressdetail, id, name, phone, activityId, result; var _c, province, city, area, addressDetail, id, name, phone, activityId, result;
return __generator(this, function (_d) { return __generator(this, function (_d) {
switch (_d.label) { switch (_d.label) {
case 0: case 0:
_c = context.data, province = _c.province, city = _c.city, area = _c.area, addressdetail = _c.addressdetail, id = _c.id, name = _c.name, phone = _c.phone, activityId = _c.activityId; _c = context.data, province = _c.province, city = _c.city, area = _c.area, addressDetail = _c.addressDetail, id = _c.id, name = _c.name, phone = _c.phone, activityId = _c.activityId;
return [4 /*yield*/, awardSer.recieveObjectPrize(id, { return [4 /*yield*/, awardSer.recieveObjectPrize(id, {
activityId: activityId, activityId: activityId,
province: province, province: province,
city: city, city: city,
area: area, area: area,
addressdetail: addressdetail, addressDetail: addressDetail,
name: name, name: name,
phone: phone phone: phone
})]; })];
...@@ -214,7 +214,7 @@ var AwardsController = /** @class */ (function () { ...@@ -214,7 +214,7 @@ var AwardsController = /** @class */ (function () {
__metadata("design:returntype", Promise) __metadata("design:returntype", Promise)
], AwardsController.prototype, "getMyPrizeList", null); ], AwardsController.prototype, "getMyPrizeList", null);
__decorate([ __decorate([
decorator_1.paramsCheck(['activityId', 'id', 'name', 'phone', 'province', 'city', 'area', 'addressdetail']), decorator_1.paramsCheck(['activityId', 'id', 'name', 'phone', 'province', 'city', 'area', 'addressDetail']),
decorator_1.userCheck({ intercept: true }), decorator_1.userCheck({ intercept: true }),
decorator_1.services([service_1.AwardsService]), decorator_1.services([service_1.AwardsService]),
__metadata("design:type", Function), __metadata("design:type", Function),
......
...@@ -18,5 +18,5 @@ export default class StatController { ...@@ -18,5 +18,5 @@ export default class StatController {
/** /**
* 统计数据 * 统计数据
*/ */
getStats(context: IContext<IGetStatsParams>): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | string[] | number[] | object[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any[], true>>; getStats(context: IContext<IGetStatsParams>): Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | object[] | number[] | string[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any[], true>>;
} }
...@@ -15,8 +15,8 @@ declare const _default: { ...@@ -15,8 +15,8 @@ declare const _default: {
list: IAwards[]; list: IAwards[];
}>>; }>>;
receiveObjectPrize: (context: IContext<import("./controller/awards.controller").IReceiveOjectParams>, {}: {}, [awardSer]: [import("./service").AwardsService]) => Promise<IResult<boolean>>; receiveObjectPrize: (context: IContext<import("./controller/awards.controller").IReceiveOjectParams>, {}: {}, [awardSer]: [import("./service").AwardsService]) => Promise<IResult<boolean>>;
receiveEnamePrize: (context: IContext<import("./controller/awards.controller").IReceiveEnameParams>, {}: {}, [awardSer]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | string[] | object[] | number[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<import("taobao-mini-sdk/lib/utils/codetypes").CodeType | IAwards, true>>; receiveEnamePrize: (context: IContext<import("./controller/awards.controller").IReceiveEnameParams>, {}: {}, [awardSer]: [import("./service").AwardsService]) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | object[] | number[] | string[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<IAwards | import("taobao-mini-sdk/lib/utils/codetypes").CodeType, true>>;
doHelp: (context: IContext<IParams>, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, taskService, accessService]: [import("./service/user.service").default, import("./service").TaskService, import("./service").AccessService]) => Promise<IResult<boolean>>; doHelp: (context: IContext<IParams>, { userInfo, vipInfo, activityInfo }: IControllerInfos, [userService, taskService, accessService]: [import("./service/user.service").default, import("./service").TaskService, import("./service").AccessService]) => Promise<IResult<boolean>>;
getStats: (context: IContext<import("./controller/stat.controller").IGetStatsParams>) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | string[] | object[] | number[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any[], true>>; getStats: (context: IContext<import("./controller/stat.controller").IGetStatsParams>) => Promise<import("taobao-mini-sdk/lib/utils/resultmodel").Result<string | boolean | object | object[] | number[] | string[], false> | import("taobao-mini-sdk/lib/utils/resultmodel").Result<any[], true>>;
}; };
export default _default; export default _default;
...@@ -19,7 +19,7 @@ export default class AwardsService extends UserService { ...@@ -19,7 +19,7 @@ export default class AwardsService extends UserService {
* 发放奖品 * 发放奖品
* @param {*} document * @param {*} document
*/ */
sendAward(document: IAwards): Promise<CodeType | IAwards>; sendAward(document: IAwards): Promise<IAwards | CodeType>;
/** /**
* 我的奖品 * 我的奖品
* @param {*} param0 * @param {*} param0
...@@ -28,16 +28,16 @@ export default class AwardsService extends UserService { ...@@ -28,16 +28,16 @@ export default class AwardsService extends UserService {
openId: string; openId: string;
activityId: string; activityId: string;
}): Promise<Array<IAwards>>; }): Promise<Array<IAwards>>;
recieveObjectPrize(_id: string, { activityId, province, city, area, addressdetail, name, phone }: { recieveObjectPrize(_id: string, { activityId, province, city, area, addressDetail, name, phone }: {
activityId: string; activityId: string;
province: string; province: string;
city: string; city: string;
area: string; area: string;
addressdetail: string; addressDetail: string;
name: string; name: string;
phone: string | number; phone: string | number;
}): Promise<true | CodeType>; }): Promise<true | CodeType>;
recieveEnamePrize(_id: string, activityId: string): Promise<CodeType | IAwards>; recieveEnamePrize(_id: string, activityId: string): Promise<IAwards | CodeType>;
getPrizeConfig(query: { getPrizeConfig(query: {
activityId: string; activityId: string;
[queryParam: string]: any; [queryParam: string]: any;
......
...@@ -250,7 +250,7 @@ var AwardsService = /** @class */ (function (_super) { ...@@ -250,7 +250,7 @@ var AwardsService = /** @class */ (function (_super) {
}; };
// 领取实物 // 领取实物
AwardsService.prototype.recieveObjectPrize = function (_id, _a) { AwardsService.prototype.recieveObjectPrize = function (_id, _a) {
var activityId = _a.activityId, province = _a.province, city = _a.city, area = _a.area, addressdetail = _a.addressdetail, name = _a.name, phone = _a.phone; var activityId = _a.activityId, province = _a.province, city = _a.city, area = _a.area, addressDetail = _a.addressDetail, name = _a.name, phone = _a.phone;
return __awaiter(this, void 0, void 0, function () { return __awaiter(this, void 0, void 0, function () {
var awardReceiveExpiredTime, award, result, e_3; var awardReceiveExpiredTime, award, result, e_3;
return __generator(this, function (_b) { return __generator(this, function (_b) {
...@@ -288,7 +288,7 @@ var AwardsService = /** @class */ (function (_super) { ...@@ -288,7 +288,7 @@ var AwardsService = /** @class */ (function (_super) {
province: province, province: province,
city: city, city: city,
area: area, area: area,
addressdetail: addressdetail, addressDetail: addressDetail,
receiveTime: Date.now(), receiveTime: Date.now(),
updateTime: Date.now() updateTime: Date.now()
} }
......
...@@ -19,7 +19,7 @@ export interface IReceiveOjectParams { ...@@ -19,7 +19,7 @@ export interface IReceiveOjectParams {
province: string province: string
city: string city: string
area: string area: string
addressdetail: string addressDetail: string
} }
export interface IReceiveEnameParams { export interface IReceiveEnameParams {
...@@ -52,7 +52,7 @@ export default class AwardsController { ...@@ -52,7 +52,7 @@ export default class AwardsController {
/** /**
* 领取实物 * 领取实物
*/ */
@paramsCheck(['activityId', 'id', 'name', 'phone', 'province', 'city', 'area', 'addressdetail']) @paramsCheck(['activityId', 'id', 'name', 'phone', 'province', 'city', 'area', 'addressDetail'])
@userCheck({ intercept: true }) @userCheck({ intercept: true })
@services([AwardsService]) @services([AwardsService])
async receiveObjectPrize( async receiveObjectPrize(
...@@ -60,14 +60,14 @@ export default class AwardsController { ...@@ -60,14 +60,14 @@ export default class AwardsController {
{}, {},
[awardSer]: [AwardsService] [awardSer]: [AwardsService]
): Promise<IResult<boolean>> { ): Promise<IResult<boolean>> {
let { province, city, area, addressdetail, id, name, phone, activityId } = context.data let { province, city, area, addressDetail, id, name, phone, activityId } = context.data
let result = await awardSer.recieveObjectPrize(id, { let result = await awardSer.recieveObjectPrize(id, {
activityId, activityId,
province, province,
city, city,
area, area,
addressdetail, addressDetail,
name, name,
phone phone
}) })
......
...@@ -167,7 +167,7 @@ export default class AwardsService extends UserService { ...@@ -167,7 +167,7 @@ export default class AwardsService extends UserService {
province, province,
city, city,
area, area,
addressdetail, addressDetail,
name, name,
phone phone
}: { }: {
...@@ -175,7 +175,7 @@ export default class AwardsService extends UserService { ...@@ -175,7 +175,7 @@ export default class AwardsService extends UserService {
province: string province: string
city: string city: string
area: string area: string
addressdetail: string addressDetail: string
name: string name: string
phone: string | number phone: string | number
} }
...@@ -210,7 +210,7 @@ export default class AwardsService extends UserService { ...@@ -210,7 +210,7 @@ export default class AwardsService extends UserService {
province, province,
city, city,
area, area,
addressdetail, addressDetail,
receiveTime: Date.now(), receiveTime: Date.now(),
updateTime: Date.now() updateTime: Date.now()
} }
......
...@@ -14,7 +14,7 @@ interface IAwards { ...@@ -14,7 +14,7 @@ interface IAwards {
receiveName?: string receiveName?: string
userNick?: string userNick?: string
phone?: string phone?: string
address?: string addressDetail?: string
provice?: string provice?: string
city?: string city?: string
area?: string area?: string
......
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