fix: 更新数据库表名引用及配置

This commit is contained in:
2026-03-27 11:10:11 +08:00
parent b9ed1b2492
commit 70b8cf0316
12 changed files with 141 additions and 192 deletions

View File

@@ -154,14 +154,14 @@ func (d *location) DeleteByWarehouseId(ctx context.Context, warehouseId string)
// CountStockDetailsByLocationId 统计库位上的库存明细数量(用于删除前检查)
func (d *location) CountStockDetailsByLocationId(ctx context.Context, locationId string) (count int64, err error) {
filter := bson.M{"locationId": locationId}
count, err = mongo.DB().Count(ctx, filter, public.StockDetailsCollection)
count, err = mongo.DB().Count(ctx, filter, public.TableNameStockDetails)
return
}
// CountStockBatchByLocationId 统计库位上的批次库存数量(用于删除前检查)
func (d *location) CountStockBatchByLocationId(ctx context.Context, locationId string) (count int64, err error) {
filter := bson.M{"locationId": locationId}
count, err = mongo.DB().Count(ctx, filter, public.StockBatchCollection)
count, err = mongo.DB().Count(ctx, filter, public.TableNameStockBatch)
return
}