main
耿阳 2 years ago
parent 5690a6697c
commit 7b7fe93567

@ -168,7 +168,7 @@ func ExistPayApproval(in *approval.CreateRequest) bool {
//
subQuery1 := DB.Model(&Approval{}).Where(&Approval{SubmitterID: in.SubmitterID, Type: TypeBundlePayPrice}).
Where("status in (?)",[]uint64{StatusDoing,StatusOk}).
Where("status in (?)", []uint64{StatusDoing, StatusOk}).
Select("id")
DB.Model(&BundlePayPrice{}).Where("approval_id in (?)", subQuery1).Where(&BundlePayPrice{ShowUid: in.BundlePayPrice.ShowUid}).Count(&count)
@ -532,7 +532,9 @@ func MyAllWorkApprovals(in *approval.ListRequest) ([]*Approval, int64) {
Preload("BundlePayPrice").
Preload("ApprovalType.ApprovalTypeGroup").
Preload("ExhibitionReward.ApprovalExhibitions").
Preload("ApprovalWorkFlows").
Preload("ApprovalWorkFlows", func(db *gorm.DB) *gorm.DB {
return db.Order("level asc")
}).
Preload("Exhibition.ApprovalExhibitions")
//我未阅读的和我未操作的
@ -680,7 +682,9 @@ func MySubmitApprovals(in *approval.ListRequest) ([]*Approval, int64) {
Preload("Work.ApprovalWorks").
Preload("Bundle").
Preload("BundlePayPrice").
Preload("ApprovalWorkFlows").
Preload("ApprovalWorkFlows", func(db *gorm.DB) *gorm.DB {
return db.Order("level asc")
}).
Preload("ExhibitionReward.ApprovalExhibitions").
Preload("ApprovalType.ApprovalTypeGroup").
Preload("Exhibition.ApprovalExhibitions")

Loading…
Cancel
Save