临时添加混拨配置创建功能
This commit is contained in:
@@ -33,3 +33,16 @@ func UpdateConfigs(tx *gorm.DB, configs []model.ConfigUpdate) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func CreateConfigs(tx *gorm.DB, configs []model.ConfigCreate) error {
|
||||
if len(configs) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
err := tx.CreateInBatches(&configs, 500).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user