作者 yangfu

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

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