Archived
增加服务之间拷贝配置的API(开源版本只有定义,没有完全实现)
This commit is contained in:
@@ -732,32 +732,6 @@ func (this *HTTPWebDAO) UpdateWebStat(tx *dbs.Tx, webId int64, statJSON []byte)
|
||||
return this.NotifyUpdate(tx, webId)
|
||||
}
|
||||
|
||||
// CopyWebStats 拷贝统计配置
|
||||
func (this *HTTPWebDAO) CopyWebStats(tx *dbs.Tx, fromWebId int64, toWebIds []int64) error {
|
||||
if fromWebId <= 0 || len(toWebIds) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
statJSON, err := this.Query(tx).
|
||||
Pk(fromWebId).
|
||||
Result("stat").
|
||||
FindJSONCol()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 暂时不处理
|
||||
if len(statJSON) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return this.Query(tx).
|
||||
Pk(toWebIds).
|
||||
Reuse(false).
|
||||
Set("stat", statJSON).
|
||||
UpdateQuickly()
|
||||
}
|
||||
|
||||
// UpdateWebCache 更改缓存配置
|
||||
func (this *HTTPWebDAO) UpdateWebCache(tx *dbs.Tx, webId int64, cacheJSON []byte) error {
|
||||
if webId <= 0 {
|
||||
@@ -1182,8 +1156,6 @@ func (this *HTTPWebDAO) UpdateWebHostRedirects(tx *dbs.Tx, webId int64, hostRedi
|
||||
return this.NotifyUpdate(tx, webId)
|
||||
}
|
||||
|
||||
// 通用设置
|
||||
|
||||
// FindWebHostRedirects 查找主机跳转
|
||||
func (this *HTTPWebDAO) FindWebHostRedirects(tx *dbs.Tx, webId int64) ([]byte, error) {
|
||||
col, err := this.Query(tx).
|
||||
|
||||
Reference in New Issue
Block a user