...
|
...
|
@@ -944,22 +944,24 @@ func (ptr *QuerySetService) Copy(ctx *domain.Context, querySetId int, t string, |
|
|
}
|
|
|
|
|
|
// 调用底层的组装sql
|
|
|
formulasGenerateResponse, err := ByteCore.FormulasGenerate(domain.ReqFormulasGenerate{
|
|
|
_, err = ByteCore.FormulasGenerate(domain.ReqFormulasGenerate{
|
|
|
QuerySet: qs,
|
|
|
Table: copyTable,
|
|
|
QueryComponents: qs.QueryComponents,
|
|
|
QuerySetService: ptr,
|
|
|
Context: ctx,
|
|
|
})
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
if len(formulasGenerateResponse.FormulaName) > 0 && formulasGenerateResponse.FormulaName != table.SQLName {
|
|
|
//if len(formulasGenerateResponse.FormulaName) > 0 && formulasGenerateResponse.FormulaName != table.SQLName {
|
|
|
//copyTable.SQLName = formulasGenerateResponse.FormulaName
|
|
|
//tableRepository, _ := repository.NewTableRepository(ptr.transactionContext)
|
|
|
//copyTable, err = tableRepository.Save(copyTable)
|
|
|
//if err != nil {
|
|
|
// return nil, err
|
|
|
//}
|
|
|
}
|
|
|
//}
|
|
|
copy.QuerySetInfo.BindTableId = copyTable.TableId
|
|
|
}
|
|
|
copy, err = querySetRepository.Save(copy)
|
...
|
...
|
|