活动:糜家商队
This commit is contained in:
@@ -19,16 +19,12 @@ export default class Activity_Self_Service_Shop extends BaseModel {
|
||||
@prop({ required: true })
|
||||
index: number; // 第几个货架从1开始
|
||||
@prop({ required: true })
|
||||
price: number; //购买价格
|
||||
@prop({ required: true })
|
||||
priceType: number; //1.虚拟货币,2.RMB
|
||||
@prop({ required: true })
|
||||
goods: string; // 商品信息
|
||||
|
||||
//添加购买记录
|
||||
public static async addBuyRecord(serverId: number, activityId: number, roleId: string, roundIndex: number, index: number, price: number, priceType: number, goods: string) {
|
||||
public static async addBuyRecord(serverId: number, activityId: number, roleId: string, roundIndex: number, index: number, goods: string) {
|
||||
await ActivitySelfServiceShopModel.insertMany([
|
||||
{ serverId, roleId, activityId, roundIndex, index, price, priceType, goods }
|
||||
{ serverId, roleId, activityId, roundIndex, index, goods }
|
||||
])
|
||||
}
|
||||
|
||||
@@ -45,8 +41,8 @@ export default class Activity_Self_Service_Shop extends BaseModel {
|
||||
}
|
||||
|
||||
//查询购买价格类型的数据
|
||||
public static async findDataByPriceType(serverId: number, activityId: number, roleId: string, roundIndex: number, priceType: number, lean = true) {
|
||||
let result: ActivitySelfServiceShopModelType[] = await ActivitySelfServiceShopModel.find({ serverId, roleId, activityId, priceType, roundIndex }).lean(lean);
|
||||
public static async findDataByPriceType(serverId: number, activityId: number, roleId: string, roundIndex: number, lean = true) {
|
||||
let result: ActivitySelfServiceShopModelType[] = await ActivitySelfServiceShopModel.find({ serverId, roleId, activityId, roundIndex }).lean(lean);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user