商店:不需要后台了,删除一部分后台相关的
This commit is contained in:
@@ -18,15 +18,15 @@ export default class DicShopList extends BaseModel {
|
||||
@prop({ required: true, default: [], _id: false, type: () => ShopItem })
|
||||
items: ShopItem[]; // 商店id dic_zyz_shopList内的id
|
||||
|
||||
public static async findByShopId(shopId: number) {
|
||||
const rec: DicShopListType = await DicShopListModel.findOne({ shopId }).lean();
|
||||
return rec;
|
||||
}
|
||||
// public static async findByShopId(shopId: number) {
|
||||
// const rec: DicShopListType = await DicShopListModel.findOne({ shopId }).lean();
|
||||
// return rec;
|
||||
// }
|
||||
|
||||
public static async createShop(shopId: number, useJson: boolean, item: ShopItem) {
|
||||
const rec: DicShopListType = await DicShopListModel.findOneAndUpdate({ shopId }, { useJson, $push: { items: item } }, { new: true, upsert: true }).lean();
|
||||
return rec;
|
||||
}
|
||||
// public static async createShop(shopId: number, useJson: boolean, item: ShopItem) {
|
||||
// const rec: DicShopListType = await DicShopListModel.findOneAndUpdate({ shopId }, { useJson, $push: { items: item } }, { new: true, upsert: true }).lean();
|
||||
// return rec;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user