...
|
...
|
@@ -49,7 +49,7 @@ func (repository *ProjectModuleRepository) Remove(ProjectModule *domain.ProjectM |
|
|
func (repository *ProjectModuleRepository) FindOne(queryOptions map[string]interface{}) (*domain.ProjectModule, error) {
|
|
|
tx := repository.transactionContext.PgTx
|
|
|
ProjectModuleModel := new(models.ProjectModule)
|
|
|
query := NewQuery(tx.Model(ProjectModuleModel), queryOptions)
|
|
|
query := NewQuery(tx.Model(ProjectModuleModel).Relation("ProjectModuleVersion"), queryOptions)
|
|
|
query.SetWhere("id = ?", "id")
|
|
|
query.SetWhere("project_key = ?", "projectKey")
|
|
|
if err := query.First(); err != nil {
|
...
|
...
|
@@ -65,7 +65,7 @@ func (repository *ProjectModuleRepository) Find(queryOptions map[string]interfac |
|
|
tx := repository.transactionContext.PgTx
|
|
|
var ProjectModuleModels []*models.ProjectModule
|
|
|
ProjectModules := make([]*domain.ProjectModule, 0)
|
|
|
query := NewQuery(tx.Model(&ProjectModuleModels), queryOptions).
|
|
|
query := NewQuery(tx.Model(&ProjectModuleModels).Relation("ProjectModuleVersion"), queryOptions).
|
|
|
SetOrder("create_time", "sortByCreateTime").
|
|
|
SetOrder("update_time", "sortByUpdateTime")
|
|
|
var err error
|
...
|
...
|
|