商店:不需要后台了,删除一部分后台相关的

This commit is contained in:
luying
2021-09-16 19:25:47 +08:00
parent fd6d2ac2e3
commit 063d46e4db
3 changed files with 14 additions and 60 deletions

View File

@@ -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;
// }
}