作者 tangxuhui

数据结构调整

@@ -14,14 +14,14 @@ type GetNoticePersonalListQuery struct { @@ -14,14 +14,14 @@ type GetNoticePersonalListQuery struct {
14 // 每页限制数量 默认20 14 // 每页限制数量 默认20
15 PageIndex int64 `json:"pageIndex"` 15 PageIndex int64 `json:"pageIndex"`
16 // 是否是已读 16 // 是否是已读
17 - IsRead int64 `json:"isRead"`  
18 -  
19 - CompanyId int64 `json:"companyId"`  
20 - OrgId int64 `json:"orgId"` 17 + IsRead int64 `json:"isRead"`
  18 + UserBaseId int64 `json:"userBaseId"`
  19 + CompanyId int64 `json:"companyId"`
  20 + OrgId int64 `json:"orgId"`
21 } 21 }
22 22
23 func (getNoticePersonalListQuery *GetNoticePersonalListQuery) Valid(validation *validation.Validation) { 23 func (getNoticePersonalListQuery *GetNoticePersonalListQuery) Valid(validation *validation.Validation) {
24 - validation.SetError("CustomValid", "未实现的自定义认证") 24 +
25 } 25 }
26 26
27 func (getNoticePersonalListQuery *GetNoticePersonalListQuery) ValidateQuery() error { 27 func (getNoticePersonalListQuery *GetNoticePersonalListQuery) ValidateQuery() error {
@@ -74,10 +74,6 @@ func (noticePersonalService *NoticePersonalService) AgreeJoinCreationProject(agr @@ -74,10 +74,6 @@ func (noticePersonalService *NoticePersonalService) AgreeJoinCreationProject(agr
74 extendData := map[string]interface{}{ 74 extendData := map[string]interface{}{
75 "creationProjectId": agreeJoinCreationProjectCommand.CreationProjectId, 75 "creationProjectId": agreeJoinCreationProjectCommand.CreationProjectId,
76 } 76 }
77 - noticeAction, err := domain.GetNoticeModuleAction(domain.Module01, domain.Action01_01)  
78 - if err != nil {  
79 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
80 - }  
81 extendStr, _ := json.Marshal(extendData) 77 extendStr, _ := json.Marshal(extendData)
82 noticePersonal := domain.NoticePersonal{ 78 noticePersonal := domain.NoticePersonal{
83 CreatedAt: time.Now(), 79 CreatedAt: time.Now(),
@@ -91,7 +87,6 @@ func (noticePersonalService *NoticePersonalService) AgreeJoinCreationProject(agr @@ -91,7 +87,6 @@ func (noticePersonalService *NoticePersonalService) AgreeJoinCreationProject(agr
91 UserBaseId: agreeJoinCreationProjectCommand.UserBaseId, 87 UserBaseId: agreeJoinCreationProjectCommand.UserBaseId,
92 OrgId: agreeJoinCreationProjectCommand.OrgId, 88 OrgId: agreeJoinCreationProjectCommand.OrgId,
93 UserId: agreeJoinCreationProjectCommand.UserId, 89 UserId: agreeJoinCreationProjectCommand.UserId,
94 - MsgType: noticeAction.MsgType,  
95 } 90 }
96 var noticePersonalRepository domain.NoticePersonalRepository 91 var noticePersonalRepository domain.NoticePersonalRepository
97 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{ 92 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{
@@ -153,6 +148,9 @@ func (noticePersonalService *NoticePersonalService) GetNoticePersonalList(getNot @@ -153,6 +148,9 @@ func (noticePersonalService *NoticePersonalService) GetNoticePersonalList(getNot
153 if getNoticePersonalListQuery.IsRead > 0 { 148 if getNoticePersonalListQuery.IsRead > 0 {
154 queryOption["isRead"] = getNoticePersonalListQuery.IsRead 149 queryOption["isRead"] = getNoticePersonalListQuery.IsRead
155 } 150 }
  151 + if getNoticePersonalListQuery.UserBaseId > 0 {
  152 + queryOption["userBaseId"] = getNoticePersonalListQuery.UserBaseId
  153 + }
156 cnt, noticeList, err := noticePersonalRepository.Find(queryOption) 154 cnt, noticeList, err := noticePersonalRepository.Find(queryOption)
157 if err != nil { 155 if err != nil {
158 return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 156 return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
@@ -160,6 +158,7 @@ func (noticePersonalService *NoticePersonalService) GetNoticePersonalList(getNot @@ -160,6 +158,7 @@ func (noticePersonalService *NoticePersonalService) GetNoticePersonalList(getNot
160 if err := transactionContext.CommitTransaction(); err != nil { 158 if err := transactionContext.CommitTransaction(); err != nil {
161 return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 159 return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
162 } 160 }
  161 +
163 return cnt, noticeList, nil 162 return cnt, noticeList, nil
164 } 163 }
165 164
@@ -230,10 +229,6 @@ func (noticePersonalService *NoticePersonalService) InformExpectedDividends(info @@ -230,10 +229,6 @@ func (noticePersonalService *NoticePersonalService) InformExpectedDividends(info
230 "creationContractId": informExpectedDividendsCommand.CreationContractId, 229 "creationContractId": informExpectedDividendsCommand.CreationContractId,
231 "dividendsEstimateId": informExpectedDividendsCommand.DividendsEstimateId, 230 "dividendsEstimateId": informExpectedDividendsCommand.DividendsEstimateId,
232 } 231 }
233 - noticeAction, err := domain.GetNoticeModuleAction(domain.Module01, domain.Action01_01)  
234 - if err != nil {  
235 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
236 - }  
237 extendStr, _ := json.Marshal(extendData) 232 extendStr, _ := json.Marshal(extendData)
238 noticePersonal := domain.NoticePersonal{ 233 noticePersonal := domain.NoticePersonal{
239 CreatedAt: time.Now(), 234 CreatedAt: time.Now(),
@@ -247,7 +242,6 @@ func (noticePersonalService *NoticePersonalService) InformExpectedDividends(info @@ -247,7 +242,6 @@ func (noticePersonalService *NoticePersonalService) InformExpectedDividends(info
247 UserBaseId: informExpectedDividendsCommand.UserBaseId, 242 UserBaseId: informExpectedDividendsCommand.UserBaseId,
248 OrgId: informExpectedDividendsCommand.OrgId, 243 OrgId: informExpectedDividendsCommand.OrgId,
249 UserId: informExpectedDividendsCommand.UserId, 244 UserId: informExpectedDividendsCommand.UserId,
250 - MsgType: noticeAction.MsgType,  
251 } 245 }
252 var noticePersonalRepository domain.NoticePersonalRepository 246 var noticePersonalRepository domain.NoticePersonalRepository
253 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{ 247 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{
@@ -328,10 +322,6 @@ func (noticePersonalService *NoticePersonalService) InformJoinCreationContract(i @@ -328,10 +322,6 @@ func (noticePersonalService *NoticePersonalService) InformJoinCreationContract(i
328 } 322 }
329 extendData := map[string]interface{}{} 323 extendData := map[string]interface{}{}
330 extendStr, _ := json.Marshal(extendData) 324 extendStr, _ := json.Marshal(extendData)
331 - noticeAction, err := domain.GetNoticeModuleAction(domain.Module01, domain.Action01_01)  
332 - if err != nil {  
333 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
334 - }  
335 noticePersonal := domain.NoticePersonal{ 325 noticePersonal := domain.NoticePersonal{
336 CreatedAt: time.Now(), 326 CreatedAt: time.Now(),
337 UpdatedAt: time.Now(), 327 UpdatedAt: time.Now(),
@@ -344,7 +334,6 @@ func (noticePersonalService *NoticePersonalService) InformJoinCreationContract(i @@ -344,7 +334,6 @@ func (noticePersonalService *NoticePersonalService) InformJoinCreationContract(i
344 UserBaseId: informJoinCreationContractCommand.UserBaseId, 334 UserBaseId: informJoinCreationContractCommand.UserBaseId,
345 OrgId: informJoinCreationContractCommand.OrgId, 335 OrgId: informJoinCreationContractCommand.OrgId,
346 UserId: informJoinCreationContractCommand.UserId, 336 UserId: informJoinCreationContractCommand.UserId,
347 - MsgType: noticeAction.MsgType,  
348 } 337 }
349 var noticePersonalRepository domain.NoticePersonalRepository 338 var noticePersonalRepository domain.NoticePersonalRepository
350 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{ 339 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{
@@ -424,10 +413,6 @@ func (noticePersonalService *NoticePersonalService) RefuseJoinCreationProject(re @@ -424,10 +413,6 @@ func (noticePersonalService *NoticePersonalService) RefuseJoinCreationProject(re
424 "creationProjectId": refuseJoinCreationProjectCommand.CreationProjectId, 413 "creationProjectId": refuseJoinCreationProjectCommand.CreationProjectId,
425 } 414 }
426 extendStr, _ := json.Marshal(extendData) 415 extendStr, _ := json.Marshal(extendData)
427 - noticeAction, err := domain.GetNoticeModuleAction(domain.Module01, domain.Action01_01)  
428 - if err != nil {  
429 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
430 - }  
431 noticePersonal := domain.NoticePersonal{ 416 noticePersonal := domain.NoticePersonal{
432 CreatedAt: time.Now(), 417 CreatedAt: time.Now(),
433 UpdatedAt: time.Now(), 418 UpdatedAt: time.Now(),
@@ -440,7 +425,6 @@ func (noticePersonalService *NoticePersonalService) RefuseJoinCreationProject(re @@ -440,7 +425,6 @@ func (noticePersonalService *NoticePersonalService) RefuseJoinCreationProject(re
440 UserBaseId: refuseJoinCreationProjectCommand.UserBaseId, 425 UserBaseId: refuseJoinCreationProjectCommand.UserBaseId,
441 OrgId: refuseJoinCreationProjectCommand.OrgId, 426 OrgId: refuseJoinCreationProjectCommand.OrgId,
442 UserId: refuseJoinCreationProjectCommand.UserId, 427 UserId: refuseJoinCreationProjectCommand.UserId,
443 - MsgType: noticeAction.MsgType,  
444 } 428 }
445 var noticePersonalRepository domain.NoticePersonalRepository 429 var noticePersonalRepository domain.NoticePersonalRepository
446 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{ 430 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{
@@ -523,10 +507,6 @@ func (noticePersonalService *NoticePersonalService) CreditAccountEstimate(credit @@ -523,10 +507,6 @@ func (noticePersonalService *NoticePersonalService) CreditAccountEstimate(credit
523 "dividendsEstimateId": creditAccountEstimateCommand.DividendsEstimateId, 507 "dividendsEstimateId": creditAccountEstimateCommand.DividendsEstimateId,
524 } 508 }
525 extendStr, _ := json.Marshal(extendData) 509 extendStr, _ := json.Marshal(extendData)
526 - noticeAction, err := domain.GetNoticeModuleAction(domain.Module01, domain.Action01_01)  
527 - if err != nil {  
528 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
529 - }  
530 noticePersonal := domain.NoticePersonal{ 510 noticePersonal := domain.NoticePersonal{
531 CreatedAt: time.Now(), 511 CreatedAt: time.Now(),
532 UpdatedAt: time.Now(), 512 UpdatedAt: time.Now(),
@@ -539,7 +519,6 @@ func (noticePersonalService *NoticePersonalService) CreditAccountEstimate(credit @@ -539,7 +519,6 @@ func (noticePersonalService *NoticePersonalService) CreditAccountEstimate(credit
539 UserBaseId: creditAccountEstimateCommand.UserBaseId, 519 UserBaseId: creditAccountEstimateCommand.UserBaseId,
540 OrgId: creditAccountEstimateCommand.OrgId, 520 OrgId: creditAccountEstimateCommand.OrgId,
541 UserId: creditAccountEstimateCommand.UserId, 521 UserId: creditAccountEstimateCommand.UserId,
542 - MsgType: noticeAction.MsgType,  
543 } 522 }
544 var noticePersonalRepository domain.NoticePersonalRepository 523 var noticePersonalRepository domain.NoticePersonalRepository
545 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{ 524 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{
@@ -621,10 +600,6 @@ func (noticePersonalService *NoticePersonalService) CreditAccountPayment(creditA @@ -621,10 +600,6 @@ func (noticePersonalService *NoticePersonalService) CreditAccountPayment(creditA
621 "creditAccountId": creditAccountPaymentCommand.CreditAccountId, 600 "creditAccountId": creditAccountPaymentCommand.CreditAccountId,
622 } 601 }
623 extendStr, _ := json.Marshal(extendData) 602 extendStr, _ := json.Marshal(extendData)
624 - noticeAction, err := domain.GetNoticeModuleAction(domain.Module01, domain.Action01_01)  
625 - if err != nil {  
626 - return nil, application.ThrowError(application.ARG_ERROR, err.Error())  
627 - }  
628 noticePersonal := domain.NoticePersonal{ 603 noticePersonal := domain.NoticePersonal{
629 CreatedAt: time.Now(), 604 CreatedAt: time.Now(),
630 UpdatedAt: time.Now(), 605 UpdatedAt: time.Now(),
@@ -637,7 +612,6 @@ func (noticePersonalService *NoticePersonalService) CreditAccountPayment(creditA @@ -637,7 +612,6 @@ func (noticePersonalService *NoticePersonalService) CreditAccountPayment(creditA
637 UserBaseId: creditAccountPaymentCommand.UserBaseId, 612 UserBaseId: creditAccountPaymentCommand.UserBaseId,
638 OrgId: creditAccountPaymentCommand.OrgId, 613 OrgId: creditAccountPaymentCommand.OrgId,
639 UserId: creditAccountPaymentCommand.UserId, 614 UserId: creditAccountPaymentCommand.UserId,
640 - MsgType: noticeAction.MsgType,  
641 } 615 }
642 var noticePersonalRepository domain.NoticePersonalRepository 616 var noticePersonalRepository domain.NoticePersonalRepository
643 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{ 617 if value, err := factory.CreateNoticePersonalRepository(map[string]interface{}{
@@ -35,8 +35,6 @@ type NoticePersonal struct { @@ -35,8 +35,6 @@ type NoticePersonal struct {
35 OrgId int64 `json:"orgId"` 35 OrgId int64 `json:"orgId"`
36 // 接收方用户id 36 // 接收方用户id
37 UserId int64 `json:"userId"` 37 UserId int64 `json:"userId"`
38 - //app端使用  
39 - MsgType int `json:"msg_type"`  
40 } 38 }
41 39
42 type NoticePersonalRepository interface { 40 type NoticePersonalRepository interface {
@@ -10,10 +10,9 @@ type NoticeModule struct { @@ -10,10 +10,9 @@ type NoticeModule struct {
10 10
11 //NoticeModuleAction 业务环节 11 //NoticeModuleAction 业务环节
12 type NoticeModuleAction struct { 12 type NoticeModuleAction struct {
13 - ModuleCode string `json:"module_code"`  
14 - ActionCode string `json:"action_Code"` 13 + ModuleCode string `json:"moduleCode"`
  14 + ActionCode string `json:"actionCode"`
15 Name string `json:"name"` 15 Name string `json:"name"`
16 - MsgType int `json:"msgType"`  
17 } 16 }
18 17
19 // 编排消息需要的变量 18 // 编排消息需要的变量
@@ -136,13 +135,13 @@ var noticeModuleList = []NoticeModule{ @@ -136,13 +135,13 @@ var noticeModuleList = []NoticeModule{
136 135
137 //noticeModuleActionList 业务环节列表 136 //noticeModuleActionList 业务环节列表
138 var noticeModuleActionList = []NoticeModuleAction{ 137 var noticeModuleActionList = []NoticeModuleAction{
139 - {ModuleCode: Module00, ActionCode: Action00_01, Name: "系统消息", MsgType: 0},  
140 - {ModuleCode: Module01, ActionCode: Action01_01, Name: "共创申请通过", MsgType: 0},  
141 - {ModuleCode: Module01, ActionCode: Action01_02, Name: "共创申请拒绝", MsgType: 0},  
142 - {ModuleCode: Module01, ActionCode: Action01_03, Name: "共创确认", MsgType: 0},  
143 - {ModuleCode: Module01, ActionCode: Action01_04, Name: "分红预算消息", MsgType: 0},  
144 - {ModuleCode: Module01, ActionCode: Action01_05, Name: "账期结算消息", MsgType: 0},  
145 - {ModuleCode: Module01, ActionCode: Action01_06, Name: "支付消息", MsgType: 0}, 138 + {ModuleCode: Module00, ActionCode: Action00_01, Name: "系统消息"},
  139 + {ModuleCode: Module01, ActionCode: Action01_01, Name: "共创申请通过"},
  140 + {ModuleCode: Module01, ActionCode: Action01_02, Name: "共创申请拒绝"},
  141 + {ModuleCode: Module01, ActionCode: Action01_03, Name: "共创确认"},
  142 + {ModuleCode: Module01, ActionCode: Action01_04, Name: "分红预算消息"},
  143 + {ModuleCode: Module01, ActionCode: Action01_05, Name: "账期结算消息"},
  144 + {ModuleCode: Module01, ActionCode: Action01_06, Name: "支付消息"},
146 } 145 }
147 146
148 //noticeSettingParamList 业务变量列表 147 //noticeSettingParamList 业务变量列表
@@ -156,6 +156,7 @@ func (repository *NoticePersonalRepository) Find(queryOptions map[string]interfa @@ -156,6 +156,7 @@ func (repository *NoticePersonalRepository) Find(queryOptions map[string]interfa
156 query.SetWhereByQueryOption("notice_personal.org_id", "orgId") 156 query.SetWhereByQueryOption("notice_personal.org_id", "orgId")
157 query.SetWhereByQueryOption("notice_personal.company_id", "companyId") 157 query.SetWhereByQueryOption("notice_personal.company_id", "companyId")
158 query.SetWhereByQueryOption("notice_personal.is_read", "isRead") 158 query.SetWhereByQueryOption("notice_personal.is_read", "isRead")
  159 + query.SetWhereByQueryOption("notice_personal.user_base_id", "userBaseId")
159 if count, err := query.SelectAndCount(); err != nil { 160 if count, err := query.SelectAndCount(); err != nil {
160 return 0, noticePersonals, err 161 return 0, noticePersonals, err
161 } else { 162 } else {
@@ -4,6 +4,7 @@ import ( @@ -4,6 +4,7 @@ import (
4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/command" 4 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/command"
5 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/query" 5 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/query"
6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/service" 6 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticePersonal/service"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/log"
7 ) 8 )
8 9
9 type NoticePersonalController struct { 10 type NoticePersonalController struct {
@@ -13,6 +14,10 @@ type NoticePersonalController struct { @@ -13,6 +14,10 @@ type NoticePersonalController struct {
13 func (controller *NoticePersonalController) GetNoticePersonalList() { 14 func (controller *NoticePersonalController) GetNoticePersonalList() {
14 noticePersonalService := service.NewNoticePersonalService(nil) 15 noticePersonalService := service.NewNoticePersonalService(nil)
15 getNoticePersonalListQuery := &query.GetNoticePersonalListQuery{} 16 getNoticePersonalListQuery := &query.GetNoticePersonalListQuery{}
  17 + err := controller.Unmarshal(getNoticePersonalListQuery)
  18 + if err != nil {
  19 + log.Logger.Debug("json err:" + err.Error())
  20 + }
16 cnt, list, err := noticePersonalService.GetNoticePersonalList(getNoticePersonalListQuery) 21 cnt, list, err := noticePersonalService.GetNoticePersonalList(getNoticePersonalListQuery)
17 data := map[string]interface{}{ 22 data := map[string]interface{}{
18 "count": cnt, 23 "count": cnt,
@@ -24,7 +29,10 @@ func (controller *NoticePersonalController) GetNoticePersonalList() { @@ -24,7 +29,10 @@ func (controller *NoticePersonalController) GetNoticePersonalList() {
24 func (controller *NoticePersonalController) AgreeJoinCreationProject() { 29 func (controller *NoticePersonalController) AgreeJoinCreationProject() {
25 noticePersonalService := service.NewNoticePersonalService(nil) 30 noticePersonalService := service.NewNoticePersonalService(nil)
26 agreeJoinCreationProjectCommand := &command.AgreeJoinCreationProjectCommand{} 31 agreeJoinCreationProjectCommand := &command.AgreeJoinCreationProjectCommand{}
27 - controller.Unmarshal(agreeJoinCreationProjectCommand) 32 + err := controller.Unmarshal(agreeJoinCreationProjectCommand)
  33 + if err != nil {
  34 + log.Logger.Debug("json err:" + err.Error())
  35 + }
28 data, err := noticePersonalService.AgreeJoinCreationProject(agreeJoinCreationProjectCommand) 36 data, err := noticePersonalService.AgreeJoinCreationProject(agreeJoinCreationProjectCommand)
29 controller.Response(data, err) 37 controller.Response(data, err)
30 } 38 }
@@ -32,7 +40,10 @@ func (controller *NoticePersonalController) AgreeJoinCreationProject() { @@ -32,7 +40,10 @@ func (controller *NoticePersonalController) AgreeJoinCreationProject() {
32 func (controller *NoticePersonalController) InformExpectedDividends() { 40 func (controller *NoticePersonalController) InformExpectedDividends() {
33 noticePersonalService := service.NewNoticePersonalService(nil) 41 noticePersonalService := service.NewNoticePersonalService(nil)
34 informExpectedDividendsCommand := &command.InformExpectedDividendsCommand{} 42 informExpectedDividendsCommand := &command.InformExpectedDividendsCommand{}
35 - controller.Unmarshal(informExpectedDividendsCommand) 43 + err := controller.Unmarshal(informExpectedDividendsCommand)
  44 + if err != nil {
  45 + log.Logger.Debug("json err:" + err.Error())
  46 + }
36 data, err := noticePersonalService.InformExpectedDividends(informExpectedDividendsCommand) 47 data, err := noticePersonalService.InformExpectedDividends(informExpectedDividendsCommand)
37 controller.Response(data, err) 48 controller.Response(data, err)
38 } 49 }
@@ -40,7 +51,10 @@ func (controller *NoticePersonalController) InformExpectedDividends() { @@ -40,7 +51,10 @@ func (controller *NoticePersonalController) InformExpectedDividends() {
40 func (controller *NoticePersonalController) RefuseJoinCreationProject() { 51 func (controller *NoticePersonalController) RefuseJoinCreationProject() {
41 noticePersonalService := service.NewNoticePersonalService(nil) 52 noticePersonalService := service.NewNoticePersonalService(nil)
42 refuseJoinCreationProjectCommand := &command.RefuseJoinCreationProjectCommand{} 53 refuseJoinCreationProjectCommand := &command.RefuseJoinCreationProjectCommand{}
43 - controller.Unmarshal(refuseJoinCreationProjectCommand) 54 + err := controller.Unmarshal(refuseJoinCreationProjectCommand)
  55 + if err != nil {
  56 + log.Logger.Debug("json err:" + err.Error())
  57 + }
44 data, err := noticePersonalService.RefuseJoinCreationProject(refuseJoinCreationProjectCommand) 58 data, err := noticePersonalService.RefuseJoinCreationProject(refuseJoinCreationProjectCommand)
45 controller.Response(data, err) 59 controller.Response(data, err)
46 } 60 }
@@ -48,7 +62,10 @@ func (controller *NoticePersonalController) RefuseJoinCreationProject() { @@ -48,7 +62,10 @@ func (controller *NoticePersonalController) RefuseJoinCreationProject() {
48 func (controller *NoticePersonalController) InformJoinCreationContract() { 62 func (controller *NoticePersonalController) InformJoinCreationContract() {
49 noticePersonalService := service.NewNoticePersonalService(nil) 63 noticePersonalService := service.NewNoticePersonalService(nil)
50 informJoinCreationContractCommand := &command.InformJoinCreationContractCommand{} 64 informJoinCreationContractCommand := &command.InformJoinCreationContractCommand{}
51 - controller.Unmarshal(informJoinCreationContractCommand) 65 + err := controller.Unmarshal(informJoinCreationContractCommand)
  66 + if err != nil {
  67 + log.Logger.Debug("json err:" + err.Error())
  68 + }
52 data, err := noticePersonalService.InformJoinCreationContract(informJoinCreationContractCommand) 69 data, err := noticePersonalService.InformJoinCreationContract(informJoinCreationContractCommand)
53 controller.Response(data, err) 70 controller.Response(data, err)
54 } 71 }
@@ -56,7 +73,10 @@ func (controller *NoticePersonalController) InformJoinCreationContract() { @@ -56,7 +73,10 @@ func (controller *NoticePersonalController) InformJoinCreationContract() {
56 func (controller *NoticePersonalController) CreditAccountEstimate() { 73 func (controller *NoticePersonalController) CreditAccountEstimate() {
57 noticePersonalService := service.NewNoticePersonalService(nil) 74 noticePersonalService := service.NewNoticePersonalService(nil)
58 creditAccountEstimateCommand := &command.CreditAccountEstimateCommand{} 75 creditAccountEstimateCommand := &command.CreditAccountEstimateCommand{}
59 - controller.Unmarshal(creditAccountEstimateCommand) 76 + err := controller.Unmarshal(creditAccountEstimateCommand)
  77 + if err != nil {
  78 + log.Logger.Debug("json err:" + err.Error())
  79 + }
60 data, err := noticePersonalService.CreditAccountEstimate(creditAccountEstimateCommand) 80 data, err := noticePersonalService.CreditAccountEstimate(creditAccountEstimateCommand)
61 controller.Response(data, err) 81 controller.Response(data, err)
62 } 82 }
@@ -64,7 +84,10 @@ func (controller *NoticePersonalController) CreditAccountEstimate() { @@ -64,7 +84,10 @@ func (controller *NoticePersonalController) CreditAccountEstimate() {
64 func (controller *NoticePersonalController) CreditAccountPayment() { 84 func (controller *NoticePersonalController) CreditAccountPayment() {
65 noticePersonalService := service.NewNoticePersonalService(nil) 85 noticePersonalService := service.NewNoticePersonalService(nil)
66 creditAccountPaymentCommand := &command.CreditAccountPaymentCommand{} 86 creditAccountPaymentCommand := &command.CreditAccountPaymentCommand{}
67 - controller.Unmarshal(creditAccountPaymentCommand) 87 + err := controller.Unmarshal(creditAccountPaymentCommand)
  88 + if err != nil {
  89 + log.Logger.Debug("json err:" + err.Error())
  90 + }
68 data, err := noticePersonalService.CreditAccountPayment(creditAccountPaymentCommand) 91 data, err := noticePersonalService.CreditAccountPayment(creditAccountPaymentCommand)
69 controller.Response(data, err) 92 controller.Response(data, err)
70 } 93 }
@@ -72,7 +95,10 @@ func (controller *NoticePersonalController) CreditAccountPayment() { @@ -72,7 +95,10 @@ func (controller *NoticePersonalController) CreditAccountPayment() {
72 func (controller *NoticePersonalController) ReadNotice() { 95 func (controller *NoticePersonalController) ReadNotice() {
73 noticePersonalService := service.NewNoticePersonalService(nil) 96 noticePersonalService := service.NewNoticePersonalService(nil)
74 readNoticeCommand := &command.ReadNoticeCommand{} 97 readNoticeCommand := &command.ReadNoticeCommand{}
75 - controller.Unmarshal(readNoticeCommand) 98 + err := controller.Unmarshal(readNoticeCommand)
  99 + if err != nil {
  100 + log.Logger.Debug("json err:" + err.Error())
  101 + }
76 data, err := noticePersonalService.ReadNotice(readNoticeCommand) 102 data, err := noticePersonalService.ReadNotice(readNoticeCommand)
77 controller.Response(data, err) 103 controller.Response(data, err)
78 } 104 }
@@ -6,7 +6,7 @@ import ( @@ -6,7 +6,7 @@ import (
6 ) 6 )
7 7
8 func init() { 8 func init() {
9 - web.Router("/notice-personal/", &controllers.NoticePersonalController{}, "Post:GetNoticePersonalList") 9 + web.Router("/notice-personal/search", &controllers.NoticePersonalController{}, "Post:GetNoticePersonalList")
10 web.Router("/notice-personal/read", &controllers.NoticePersonalController{}, "Post:ReadNotice") 10 web.Router("/notice-personal/read", &controllers.NoticePersonalController{}, "Post:ReadNotice")
11 web.Router("/notice-personal/agree-join-creation-project", &controllers.NoticePersonalController{}, "Post:AgreeJoinCreationProject") 11 web.Router("/notice-personal/agree-join-creation-project", &controllers.NoticePersonalController{}, "Post:AgreeJoinCreationProject")
12 web.Router("/notice-personal/inform-expected-dividends", &controllers.NoticePersonalController{}, "Post:InformExpectedDividends") 12 web.Router("/notice-personal/inform-expected-dividends", &controllers.NoticePersonalController{}, "Post:InformExpectedDividends")