活动:支付添加错误码返回
This commit is contained in:
@@ -386,6 +386,8 @@ export const STATUS = {
|
||||
ORDER_ERROR: { code: 70006, simStr: '订单错误' },
|
||||
PRICE_ERROR: { code: 70007, simStr: '价格错误' },
|
||||
NO_PAY: { code: 70008, simStr: '未支付' },
|
||||
NO_MOTHLY_TICKET_REWARD: { code: 70009, simStr: '没有可领取的月卡奖励' }
|
||||
NO_MOTHLY_TICKET_REWARD: { code: 70009, simStr: '没有可领取的月卡奖励' },
|
||||
ACTIVITY_TYPE_ERROR: { code: 70010, simStr: '活动类型错误' },
|
||||
ACTIVITY_NO_PRODUCT: { code: 70011, simStr: '活动数据错误' }
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export default class Activity_Pop_Up_Shop extends BaseModel {
|
||||
@prop({ required: true })
|
||||
isBuy: boolean; // 是否购买
|
||||
|
||||
//购买奖励的记录
|
||||
//购买记录
|
||||
public static async addRecord(serverId: number, activityId: number, roleId: string, id: number) {
|
||||
let nowDate = new Date();
|
||||
let result: ActivityPopUpShopModelType = await ActivityPopUpShopModel.findOneAndUpdate({
|
||||
|
||||
@@ -34,7 +34,7 @@ export default class Activity_Sign_In extends BaseModel {
|
||||
records.push(record)
|
||||
}
|
||||
let result: ActivitySignInModelType = await ActivitySignInModel.findOneAndUpdate({ roleId, activityId, roundIndex },
|
||||
{ $push: { records: { $each: records } } }, { new: true }).lean(true);
|
||||
{ $push: { records: { $each: records } } }, { upsert: true, new: true }).lean(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user