package data_api import ( "context" "gd_management/apis" "gd_management/common.in/utils" "gd_management/errors" "github.com/astaxie/beego/orm" "go.uber.org/zap" ) func DataApiRemoveBaseApi(ctx context.Context, req *apis.ManagementDataApiRemoveBaseApiReq, reply *apis.ManagementDataApiRemoveBaseApiReply) error { if req.DataApiBaseApiId == 0 { return errors.ArgsError } o := orm.NewOrm() _, err := o.Delete(&apis.ManagementDataApiBaseApi{Id: req.DataApiBaseApiId}) if err != nil { l.Error("mysql", zap.String("sql", "delete from t_gd_child_data_api"), zap.String("fileds", utils.MarshalJsonString(req)), zap.String("error", err.Error())) return errors.DataBaseError } return nil }