作者 yangfu

修改 提交机会同时删除草稿箱

@@ -147,7 +147,7 @@ type ChanceExampleResponse struct { @@ -147,7 +147,7 @@ type ChanceExampleResponse struct {
147 147
148 /*提交机会*/ 148 /*提交机会*/
149 type ChanceSubmitRequest struct { 149 type ChanceSubmitRequest struct {
150 - Id int64 `json:"id"` // = 0添加 >0 编辑 150 + Id int64 `json:"id"` // = 0添加 >0 草稿编号(发布成功,从草稿箱删除调)
151 AuditTemplateId int64 `json:"auditTemplateId" valid:"Required"` 151 AuditTemplateId int64 `json:"auditTemplateId" valid:"Required"`
152 Content string `json:"content"` 152 Content string `json:"content"`
153 FormList []*Form `json:"formList" valid:"Required"` 153 FormList []*Form `json:"formList" valid:"Required"`
@@ -533,7 +533,7 @@ func ChanceSubmit(header *protocol.RequestHeader, request *protocol.ChanceSubmit @@ -533,7 +533,7 @@ func ChanceSubmit(header *protocol.RequestHeader, request *protocol.ChanceSubmit
533 go agg.BulkInsertSelfChecks(header, chance.Id, chance.Id, request.SelfChecks, false, protocol.TypeSubmit) 533 go agg.BulkInsertSelfChecks(header, chance.Id, chance.Id, request.SelfChecks, false, protocol.TypeSubmit)
534 orm.Commit() 534 orm.Commit()
535 if request.Id > 0 { 535 if request.Id > 0 {
536 - if e := utils.ExecuteSQLWithOrmer(orm, models.DeleteChanceDraft, header.UserId, request.Id); e != nil { 536 + if e := utils.ExecuteSQLWithOrmer(orm, fmt.Sprintf(models.DeleteChanceDraft, header.UserId, request.Id)); e != nil {
537 log.Error("删除草稿箱异常:", e) 537 log.Error("删除草稿箱异常:", e)
538 } 538 }
539 } 539 }