【删除信息,删除关联关系】
This commit is contained in:
parent
232d1cd0f4
commit
d79a79a132
|
@ -95,8 +95,10 @@ func PublishFormDraft(req *publishedGi.PublishReqDto, user *model.User) {
|
|||
}
|
||||
|
||||
func DeletePublishedGiById(id int) {
|
||||
dbquery.PublishedGi.Debug().Where(dbquery.PublishedGi.ID.Eq(int32(id))).UpdateColumn(dbquery.PublishedGi.Status, 0)
|
||||
mid := int32(id)
|
||||
dbquery.PublishedGi.Debug().Where(dbquery.PublishedGi.ID.Eq(mid)).UpdateColumn(dbquery.PublishedGi.Status, 0)
|
||||
memory.DeleteMapVerifyStructure(int32(id)) // 移除内存中的发布信息
|
||||
dbquery.ProjectPublishLink.Where(dbquery.ProjectPublishLink.Mid.In(mid)).Delete()
|
||||
}
|
||||
|
||||
func SaveAsDraftingFromPublish(id int32, user *model.User, name string) {
|
||||
|
|
|
@ -163,7 +163,9 @@ func UpdateTrainSize(id int32, td *dto.TrainSizeDto) bool {
|
|||
|
||||
// 删除列车尺寸
|
||||
func DeleteTrainSizeById(id int) {
|
||||
_, _ = dbquery.TrainSize.Debug().Where(dbquery.TrainSize.ID.Eq(int32(id))).Delete()
|
||||
sid := int32(id)
|
||||
_, _ = dbquery.TrainSize.Debug().Where(dbquery.TrainSize.ID.Eq(sid)).Delete()
|
||||
dbquery.ProjectTrainSizeLink.Where(dbquery.ProjectTrainSizeLink.Sid.Eq(sid)).Delete()
|
||||
}
|
||||
|
||||
func QueryProjectTrainSize(id int32) []*model.TrainSize {
|
||||
|
|
Loading…
Reference in New Issue