mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
Merge branch 'feature/openapi' into 'main'
Feature/openapi See merge request apipark/APIPark!160
This commit is contained in:
+9
-7
@@ -533,6 +533,7 @@ func (i *imlProviderModule) UpdateProviderConfig(ctx context.Context, id string,
|
||||
DefaultLLM: &input.DefaultLLM,
|
||||
Config: &input.Config,
|
||||
Priority: input.Priority,
|
||||
Status: &status,
|
||||
}
|
||||
_, err = i.aiKeyService.DefaultKey(ctx, id)
|
||||
if err != nil {
|
||||
@@ -558,17 +559,18 @@ func (i *imlProviderModule) UpdateProviderConfig(ctx context.Context, id string,
|
||||
return err
|
||||
}
|
||||
|
||||
if input.Enable != nil {
|
||||
status = 0
|
||||
if *input.Enable {
|
||||
status = 1
|
||||
}
|
||||
pInfo.Status = &status
|
||||
}
|
||||
//if input.Enable != nil {
|
||||
// status = 0
|
||||
// if *input.Enable {
|
||||
// status = 1
|
||||
// }
|
||||
// pInfo.Status = &status
|
||||
//}
|
||||
err = i.providerService.Save(ctx, id, pInfo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if *pInfo.Status == 0 {
|
||||
return i.syncGateway(ctx, cluster.DefaultClusterID, []*gateway.DynamicRelease{
|
||||
{
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ type Doc struct {
|
||||
Id int64 `gorm:"column:id;type:BIGINT(20);AUTO_INCREMENT;NOT NULL;comment:id;primary_key;comment:主键ID;"`
|
||||
UUID string `gorm:"type:varchar(36);not null;column:uuid;uniqueIndex:uuid;comment:UUID;"`
|
||||
Service string `gorm:"size:36;not null;column:service;comment:服务;index:service"`
|
||||
Content string `gorm:"type:text;null;column:content;comment:文档内容"`
|
||||
Content string `gorm:"type:longtext;null;column:content;comment:文档内容"`
|
||||
Updater string `gorm:"size:36;not null;column:updater;comment:更新人;index:updater" aovalue:"updater"`
|
||||
UpdateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP;column:update_at;comment:更新时间"`
|
||||
APICount int64 `gorm:"type:int(11);not null;column:api_count;comment:接口数量"`
|
||||
|
||||
@@ -7,7 +7,7 @@ type Commit[H any] struct {
|
||||
UUID string `gorm:"size:36;not null;column:uuid;comment:uuid;uniqueIndex:uuid;"`
|
||||
Target string `gorm:"column:target;type:varchar(36);NOT NULL;comment:目标id;index:target;"`
|
||||
Key string `gorm:"size:50;not null;column:key;comment:类型;index:key;"`
|
||||
Data *H `gorm:"type:text;not null;column:data;comment:数据;charset=utf8mb4;serializer:json"`
|
||||
Data *H `gorm:"type:longtext;not null;column:data;comment:数据;charset=utf8mb4;serializer:json"`
|
||||
CreateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP;column:create_at;comment:创建时间"`
|
||||
Operator string `gorm:"size:36;not null;column:operator;comment:操作人;index:operator;"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user