作者 yangfu

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

... ... @@ -147,9 +147,9 @@ type ChanceExampleResponse struct {
/*提交机会*/
type ChanceSubmitRequest struct {
Id int64 `json:"id"` // = 0添加 >0 草稿编号(发布成功,从草稿箱删除调)
AuditTemplateId int64 `json:"auditTemplateId" valid:"Required"`
Content string `json:"content"`
Id int64 `json:"id"` // = 0添加 >0 草稿编号(发布成功,从草稿箱删除调)
AuditTemplateId int64 `json:"auditTemplateId" valid:"Required"`
//Content string `json:"content"`
FormList []*Form `json:"formList" valid:"Required"`
SelfChecks SelfChecks `json:"selfChecks"`
Speechs []Speech `json:"speechs"`
... ... @@ -164,7 +164,7 @@ type ChanceSubmitResponse struct {
type ChanceUpdateRequest struct {
Id int64 `json:"id"` // = 0添加 >0 编辑
//AuditTemplateId int64 `json:"auditTemplateId" valid:"Required"`
Content string `json:"content"`
//Content string `json:"content"`
FormList []*Form `json:"formList" valid:"Required"`
Speechs []Speech `json:"speechs"`
Pictures []Picture `json:"pictures"`
... ...
... ... @@ -557,6 +557,7 @@ func setChanceAutoPass(header *protocol.RequestHeader, chance *models.Chance, or
chance.ApproveTime = time.Now()
chance.ReviewStatus = protocol.ReviewStatusPass
chance.PublishStatus = protocol.PublicToCompany
chance.Code, _ = agg.GetChanceCode(chance.Id, chance.ChanceTypeId, chance.AuditTemplateId)
msgData := protocol.MsgData{Score: &approveData.Score}
//发送给机会提交人
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
go agg.BulkInsertSelfChecks(header, chance.Id, chance.Id, request.SelfChecks, true, protocol.TypeSubmit)
}
updateMap["AuditTemplateConfig"] = common.AssertJson(auditConfig)
updateMap["Content"] = request.Content
//updateMap["Content"] = request.Content
updateMap["SourceContent"] = common.AssertJson(request.FormList)
updateMap["UpdateAt"] = time.Now()
... ...