diff --git a/service/drafting.go b/service/drafting.go index 5a74c63..96ceb0e 100644 --- a/service/drafting.go +++ b/service/drafting.go @@ -63,6 +63,7 @@ func SaveAsDrafting(createId int32, oldId int32, dd *dto.DraftingDto) (*model.Dr CreatedAt: time.Now(), UpdateAt: time.Now(), Category: oldD.Category, + Type: oldD.Type, } if err = dbquery.Drafting.Save(&newD); err != nil { panic(dto.ErrorDto{Code: dto.QueryDBError, Message: err.Error()}) diff --git a/service/publishedGi.go b/service/publishedGi.go index 0f1db2b..bc8d596 100644 --- a/service/publishedGi.go +++ b/service/publishedGi.go @@ -138,7 +138,7 @@ func QueryProjectPublishedGi(id int32) []*model.PublishedGi { mids[i] = m.Mid } dp := dbquery.PublishedGi - publishedGis, _ := dp.Select(dp.ID, dp.Name, dp.Category, dp.Type).Where(dp.ID.In(mids...), dp.Status.Eq(1)).Find() + publishedGis, _ := dp.Select(dp.ID, dp.Name, dp.Category, dp.Type).Where(dp.ID.In(mids...), dp.Status.Eq(1)).Order(dp.Name).Find() return publishedGis }