作者 tangxuhui

修正消息返回格式

@@ -51,10 +51,12 @@ func (noticePersonalService *NoticePersonalService) AgreeJoinCreationProject(agr @@ -51,10 +51,12 @@ func (noticePersonalService *NoticePersonalService) AgreeJoinCreationProject(agr
51 } 51 }
52 if len(settings) == 0 { 52 if len(settings) == 0 {
53 //未设置消息模板 53 //未设置消息模板
54 - return "未设置对应的消息模板", nil 54 + txt := map[string]string{"content": "未设置对应的消息模板"}
  55 + return txt, nil
55 } 56 }
56 if settings[0].IsPush == domain.NoticeSettingIsNotPush { 57 if settings[0].IsPush == domain.NoticeSettingIsNotPush {
57 - return "消息是否推送已设为否", nil 58 + txt := map[string]string{"content": "消息是否推送已设为否"}
  59 + return txt, nil
58 } 60 }
59 noticeContent := settings[0].Content 61 noticeContent := settings[0].Content
60 tpl, err := template.New("AgreeJoinCreationProject").Parse(noticeContent) 62 tpl, err := template.New("AgreeJoinCreationProject").Parse(noticeContent)
@@ -196,10 +198,12 @@ func (noticePersonalService *NoticePersonalService) InformExpectedDividends(info @@ -196,10 +198,12 @@ func (noticePersonalService *NoticePersonalService) InformExpectedDividends(info
196 } 198 }
197 if len(settings) == 0 { 199 if len(settings) == 0 {
198 //未设置消息模板 200 //未设置消息模板
199 - return "未设置对应的消息模板", nil 201 + txt := map[string]string{"content": "未设置对应的消息模板"}
  202 + return txt, nil
200 } 203 }
201 if settings[0].IsPush == domain.NoticeSettingIsNotPush { 204 if settings[0].IsPush == domain.NoticeSettingIsNotPush {
202 - return "消息是否推送已设为否", nil 205 + txt := map[string]string{"content": "消息是否推送已设为否"}
  206 + return txt, nil
203 } 207 }
204 // Param01_04_01 = "param01_04_01" //分红预算消息-共创项目编号 208 // Param01_04_01 = "param01_04_01" //分红预算消息-共创项目编号
205 // Param01_04_02 = "param01_04_02" //分红预算消息-共创项目名称 209 // Param01_04_02 = "param01_04_02" //分红预算消息-共创项目名称
@@ -302,10 +306,12 @@ func (noticePersonalService *NoticePersonalService) InformJoinCreationContract(i @@ -302,10 +306,12 @@ func (noticePersonalService *NoticePersonalService) InformJoinCreationContract(i
302 } 306 }
303 if len(settings) == 0 { 307 if len(settings) == 0 {
304 //未设置消息模板 308 //未设置消息模板
305 - return "未设置对应的消息模板", nil 309 + txt := map[string]string{"content": "未设置对应的消息模板"}
  310 + return txt, nil
306 } 311 }
307 if settings[0].IsPush == domain.NoticeSettingIsNotPush { 312 if settings[0].IsPush == domain.NoticeSettingIsNotPush {
308 - return "消息是否推送已设为否", nil 313 + txt := map[string]string{"content": "消息是否推送已设为否"}
  314 + return txt, nil
309 } 315 }
310 noticeContent := settings[0].Content 316 noticeContent := settings[0].Content
311 tpl, err := template.New("InformJoinCreationContract").Parse(noticeContent) 317 tpl, err := template.New("InformJoinCreationContract").Parse(noticeContent)
@@ -402,10 +408,12 @@ func (noticePersonalService *NoticePersonalService) RefuseJoinCreationProject(re @@ -402,10 +408,12 @@ func (noticePersonalService *NoticePersonalService) RefuseJoinCreationProject(re
402 } 408 }
403 if len(settings) == 0 { 409 if len(settings) == 0 {
404 //未设置消息模板 410 //未设置消息模板
405 - return "未设置对应的消息模板", nil 411 + txt := map[string]string{"content": "未设置对应的消息模板"}
  412 + return txt, nil
406 } 413 }
407 if settings[0].IsPush == domain.NoticeSettingIsNotPush { 414 if settings[0].IsPush == domain.NoticeSettingIsNotPush {
408 - return "消息是否推送已设为否", nil 415 + txt := map[string]string{"content": "消息是否推送已设为否"}
  416 + return txt, nil
409 } 417 }
410 // Param01_02_01 = "param01_02_01" //共创申请拒绝-共创项目编号 418 // Param01_02_01 = "param01_02_01" //共创申请拒绝-共创项目编号
411 // Param01_02_02 = "param01_02_02" //共创申请拒绝-共创项目名称 419 // Param01_02_02 = "param01_02_02" //共创申请拒绝-共创项目名称
@@ -495,10 +503,12 @@ func (noticePersonalService *NoticePersonalService) CreditAccountEstimate(credit @@ -495,10 +503,12 @@ func (noticePersonalService *NoticePersonalService) CreditAccountEstimate(credit
495 } 503 }
496 if len(settings) == 0 { 504 if len(settings) == 0 {
497 //未设置消息模板 505 //未设置消息模板
498 - return "未找到对应的消息模板", nil 506 + txt := map[string]string{"content": "未设置对应的消息模板"}
  507 + return txt, nil
499 } 508 }
500 if settings[0].IsPush == domain.NoticeSettingIsNotPush { 509 if settings[0].IsPush == domain.NoticeSettingIsNotPush {
501 - return "消息是否推送已设为否", nil 510 + txt := map[string]string{"content": "消息是否推送已设为否"}
  511 + return txt, nil
502 } 512 }
503 // Param01_05_01 = "param01_05_01" //账期结算消息-账期结算单号 513 // Param01_05_01 = "param01_05_01" //账期结算消息-账期结算单号
504 // Param01_05_02 = "param01_05_02" //账期结算消息-结算金额 514 // Param01_05_02 = "param01_05_02" //账期结算消息-结算金额
@@ -591,10 +601,12 @@ func (noticePersonalService *NoticePersonalService) CreditAccountPayment(creditA @@ -591,10 +601,12 @@ func (noticePersonalService *NoticePersonalService) CreditAccountPayment(creditA
591 } 601 }
592 if len(settings) == 0 { 602 if len(settings) == 0 {
593 //未设置消息模板 603 //未设置消息模板
594 - return "未找到对应的消息模板", nil 604 + txt := map[string]string{"content": "未设置对应的消息模板"}
  605 + return txt, nil
595 } 606 }
596 if settings[0].IsPush == domain.NoticeSettingIsNotPush { 607 if settings[0].IsPush == domain.NoticeSettingIsNotPush {
597 - return "消息是否推送已设为否", nil 608 + txt := map[string]string{"content": "消息是否推送已设为否"}
  609 + return txt, nil
598 } 610 }
599 // Param01_06_01 = "param01_06_01" //支付消息-账期结算单号 611 // Param01_06_01 = "param01_06_01" //支付消息-账期结算单号
600 // Param01_06_02 = "param01_06_02" //支付消息-结算金额 612 // Param01_06_02 = "param01_06_02" //支付消息-结算金额