123456789101112131415161718192021 |
- // Copyright 2019 getensh.com. All rights reserved.
- // Use of this source code is governed by getensh.com.
- package data_api
- import (
- "gd_management/apis"
- "github.com/astaxie/beego/orm"
- )
- func InitProviderRelation() {
- o := orm.NewOrm()
- count, _ := o.QueryTable("t_gd_data_api_provider_api_relation").Count()
- if count > 0 {
- return
- }
- tabs := []apis.ManagementDataApiBaseApi{}
- o.QueryTable("t_gd_child_data_api").All(&tabs)
- for _, v := range tabs {
- insertDataApiProviderRelation(v.Id, v.ApiId)
- }
- }
|