fix: 更新数据库表名引用及配置
This commit is contained in:
@@ -26,7 +26,7 @@ func (d *stockDetails) BatchInsert(ctx context.Context, req []*dto.CreateSockDet
|
||||
if err = gconv.Structs(req, &res); err != nil {
|
||||
return
|
||||
}
|
||||
r, err := gfdb.DB(ctx).Model(ctx, public.StockDetailsCollection).Data(res).Save()
|
||||
r, err := gfdb.DB(ctx).Model(ctx, public.TableNameStockDetails).Data(res).Save()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -34,7 +34,7 @@ func (d *stockDetails) BatchInsert(ctx context.Context, req []*dto.CreateSockDet
|
||||
}
|
||||
|
||||
func (d *stockDetails) Delete(ctx context.Context, req []dto.DeleteSockDetailsReq) (rows int64, err error) {
|
||||
r, err := gfdb.DB(ctx).Model(ctx, public.StockDetailsCollection).Where(entity.StockDetailsCol.Id, &req).Delete()
|
||||
r, err := gfdb.DB(ctx).Model(ctx, public.TableNameStockDetails).Where(entity.StockDetailsCol.Id, &req).Delete()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -62,7 +62,7 @@ func (d *stockDetails) List(ctx context.Context, req *dto.GetSockDetailsReq, fie
|
||||
|
||||
// buildListFilter 构建列表查询的过滤条件
|
||||
func (d *stockDetails) buildListFilter(ctx context.Context, req *dto.GetSockDetailsReq) *gdb.Model {
|
||||
model := gfdb.DB(ctx).Model(ctx, public.StockDetailsCollection).Model
|
||||
model := gfdb.DB(ctx).Model(ctx, public.TableNameStockDetails).Model
|
||||
model.Where(entity.StockDetailsCol.Id, req.Id)
|
||||
model.Where(entity.StockDetailsCol.AssetId, req.AssetId)
|
||||
model.Where(entity.StockDetailsCol.AssetSkuId, req.AssetSkuId)
|
||||
|
||||
Reference in New Issue
Block a user