Commit 074c21f3 authored by qinhaitao's avatar qinhaitao

perf: ️ addressDetail

parent cc986442
......@@ -12,7 +12,7 @@ export interface IReceiveOjectParams {
province: string;
city: string;
area: string;
addressdetail: string;
addressDetail: string;
}
export interface IReceiveEnameParams {
activityId: string;
......@@ -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: {
type: number;
name: string;
......
......@@ -81,17 +81,17 @@ var AwardsController = /** @class */ (function () {
AwardsController.prototype.receiveObjectPrize = function (context, _a, _b) {
var awardSer = _b[0];
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) {
switch (_d.label) {
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, {
activityId: activityId,
province: province,
city: city,
area: area,
addressdetail: addressdetail,
addressDetail: addressDetail,
name: name,
phone: phone
})];
......@@ -214,7 +214,7 @@ var AwardsController = /** @class */ (function () {
__metadata("design:returntype", Promise)
], AwardsController.prototype, "getMyPrizeList", null);
__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.services([service_1.AwardsService]),
__metadata("design:type", Function),
......
......@@ -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: {
list: IAwards[];
}>>;
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>>;
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;
......@@ -19,7 +19,7 @@ export default class AwardsService extends UserService {
* 发放奖品
* @param {*} document
*/
sendAward(document: IAwards): Promise<CodeType | IAwards>;
sendAward(document: IAwards): Promise<IAwards | CodeType>;
/**
* 我的奖品
* @param {*} param0
......@@ -28,16 +28,16 @@ export default class AwardsService extends UserService {
openId: string;
activityId: string;
}): 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;
province: string;
city: string;
area: string;
addressdetail: string;
addressDetail: string;
name: string;
phone: string | number;
}): Promise<true | CodeType>;
recieveEnamePrize(_id: string, activityId: string): Promise<CodeType | IAwards>;
recieveEnamePrize(_id: string, activityId: string): Promise<IAwards | CodeType>;
getPrizeConfig(query: {
activityId: string;
[queryParam: string]: any;
......
......@@ -250,7 +250,7 @@ var AwardsService = /** @class */ (function (_super) {
};
// 领取实物
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 () {
var awardReceiveExpiredTime, award, result, e_3;
return __generator(this, function (_b) {
......@@ -288,7 +288,7 @@ var AwardsService = /** @class */ (function (_super) {
province: province,
city: city,
area: area,
addressdetail: addressdetail,
addressDetail: addressDetail,
receiveTime: Date.now(),
updateTime: Date.now()
}
......
......@@ -19,7 +19,7 @@ export interface IReceiveOjectParams {
province: string
city: string
area: string
addressdetail: string
addressDetail: string
}
export interface IReceiveEnameParams {
......@@ -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 })
@services([AwardsService])
async receiveObjectPrize(
......@@ -60,14 +60,14 @@ export default class AwardsController {
{},
[awardSer]: [AwardsService]
): 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, {
activityId,
province,
city,
area,
addressdetail,
addressDetail,
name,
phone
})
......
......@@ -167,7 +167,7 @@ export default class AwardsService extends UserService {
province,
city,
area,
addressdetail,
addressDetail,
name,
phone
}: {
......@@ -175,7 +175,7 @@ export default class AwardsService extends UserService {
province: string
city: string
area: string
addressdetail: string
addressDetail: string
name: string
phone: string | number
}
......@@ -210,7 +210,7 @@ export default class AwardsService extends UserService {
province,
city,
area,
addressdetail,
addressDetail,
receiveTime: Date.now(),
updateTime: Date.now()
}
......
......@@ -14,7 +14,7 @@ interface IAwards {
receiveName?: string
userNick?: string
phone?: string
address?: string
addressDetail?: string
provice?: string
city?: 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