作者 yangfu

Merge remote-tracking branch 'origin/test' into dev

@@ -149,7 +149,7 @@ type ChanceExampleResponse struct { @@ -149,7 +149,7 @@ type ChanceExampleResponse struct {
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"`
154 SelfChecks SelfChecks `json:"selfChecks"` 154 SelfChecks SelfChecks `json:"selfChecks"`
155 Speechs []Speech `json:"speechs"` 155 Speechs []Speech `json:"speechs"`
@@ -164,7 +164,7 @@ type ChanceSubmitResponse struct { @@ -164,7 +164,7 @@ type ChanceSubmitResponse struct {
164 type ChanceUpdateRequest struct { 164 type ChanceUpdateRequest struct {
165 Id int64 `json:"id"` // = 0添加 >0 编辑 165 Id int64 `json:"id"` // = 0添加 >0 编辑
166 //AuditTemplateId int64 `json:"auditTemplateId" valid:"Required"` 166 //AuditTemplateId int64 `json:"auditTemplateId" valid:"Required"`
167 - Content string `json:"content"` 167 + //Content string `json:"content"`
168 FormList []*Form `json:"formList" valid:"Required"` 168 FormList []*Form `json:"formList" valid:"Required"`
169 Speechs []Speech `json:"speechs"` 169 Speechs []Speech `json:"speechs"`
170 Pictures []Picture `json:"pictures"` 170 Pictures []Picture `json:"pictures"`
@@ -557,6 +557,7 @@ func setChanceAutoPass(header *protocol.RequestHeader, chance *models.Chance, or @@ -557,6 +557,7 @@ func setChanceAutoPass(header *protocol.RequestHeader, chance *models.Chance, or
557 chance.ApproveTime = time.Now() 557 chance.ApproveTime = time.Now()
558 chance.ReviewStatus = protocol.ReviewStatusPass 558 chance.ReviewStatus = protocol.ReviewStatusPass
559 chance.PublishStatus = protocol.PublicToCompany 559 chance.PublishStatus = protocol.PublicToCompany
  560 + chance.Code, _ = agg.GetChanceCode(chance.Id, chance.ChanceTypeId, chance.AuditTemplateId)
560 msgData := protocol.MsgData{Score: &approveData.Score} 561 msgData := protocol.MsgData{Score: &approveData.Score}
561 //发送给机会提交人 562 //发送给机会提交人
562 if err = agg.SendApproveMsgByFormat(header, chance.UserId, chance.Id, fmt.Sprintf(agg.MessageApproveAutoPass, chanceType.Name), msgData); err != nil { 563 if err = agg.SendApproveMsgByFormat(header, chance.UserId, chance.Id, fmt.Sprintf(agg.MessageApproveAutoPass, chanceType.Name), msgData); err != nil {
@@ -769,7 +770,7 @@ func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdate @@ -769,7 +770,7 @@ func ChanceUpdate(header *protocol.RequestHeader, request *protocol.ChanceUpdate
769 go agg.BulkInsertSelfChecks(header, chance.Id, chance.Id, request.SelfChecks, true, protocol.TypeSubmit) 770 go agg.BulkInsertSelfChecks(header, chance.Id, chance.Id, request.SelfChecks, true, protocol.TypeSubmit)
770 } 771 }
771 updateMap["AuditTemplateConfig"] = common.AssertJson(auditConfig) 772 updateMap["AuditTemplateConfig"] = common.AssertJson(auditConfig)
772 - updateMap["Content"] = request.Content 773 + //updateMap["Content"] = request.Content
773 updateMap["SourceContent"] = common.AssertJson(request.FormList) 774 updateMap["SourceContent"] = common.AssertJson(request.FormList)
774 updateMap["UpdateAt"] = time.Now() 775 updateMap["UpdateAt"] = time.Now()
775 776