正在显示
4 个修改的文件
包含
26 行增加
和
12 行删除
1 | package controllers | 1 | package controllers |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "github.com/linmadan/egglib-go/web/beego" | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/dictionary/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/dictionary/command" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/dictionary/query" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/dictionary/query" |
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/dictionary/service" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/dictionary/service" |
8 | ) | 7 | ) |
9 | 8 | ||
10 | type DictionaryController struct { | 9 | type DictionaryController struct { |
11 | - beego.BaseController | 10 | + baseController |
12 | } | 11 | } |
13 | 12 | ||
14 | func (controller *DictionaryController) returnPageListData(count int64, data interface{}, err error, pageNumber int) { | 13 | func (controller *DictionaryController) returnPageListData(count int64, data interface{}, err error, pageNumber int) { |
1 | package controllers | 1 | package controllers |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "github.com/linmadan/egglib-go/web/beego" | ||
5 | "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" |
6 | "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" |
7 | "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" |
8 | ) | 7 | ) |
9 | 8 | ||
10 | type NoticePersonalController struct { | 9 | type NoticePersonalController struct { |
11 | - beego.BaseController | 10 | + baseController |
12 | } | 11 | } |
13 | 12 | ||
14 | func (controller *NoticePersonalController) GetNoticePersonalList() { | 13 | func (controller *NoticePersonalController) GetNoticePersonalList() { |
1 | package controllers | 1 | package controllers |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "github.com/linmadan/egglib-go/web/beego" | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticeSetting/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticeSetting/command" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticeSetting/query" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticeSetting/query" |
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticeSetting/service" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/noticeSetting/service" |
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/domain" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/domain" |
8 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/log" | ||
9 | ) | 9 | ) |
10 | 10 | ||
11 | type NoticeSettingController struct { | 11 | type NoticeSettingController struct { |
12 | - beego.BaseController | 12 | + baseController |
13 | } | 13 | } |
14 | 14 | ||
15 | func (controller *NoticeSettingController) UpdateNoticeSetting() { | 15 | func (controller *NoticeSettingController) UpdateNoticeSetting() { |
16 | noticeSettingService := service.NewNoticeSettingService(nil) | 16 | noticeSettingService := service.NewNoticeSettingService(nil) |
17 | updateNoticeSettingCommand := &command.UpdateNoticeSettingCommand{} | 17 | updateNoticeSettingCommand := &command.UpdateNoticeSettingCommand{} |
18 | - controller.Unmarshal(updateNoticeSettingCommand) | 18 | + err := controller.Unmarshal(updateNoticeSettingCommand) |
19 | + if err != nil { | ||
20 | + log.Logger.Debug(err.Error()) | ||
21 | + } | ||
19 | Id, _ := controller.GetInt64(":settingId") | 22 | Id, _ := controller.GetInt64(":settingId") |
20 | updateNoticeSettingCommand.NoticeSettingId = Id | 23 | updateNoticeSettingCommand.NoticeSettingId = Id |
24 | + // updateNoticeSettingCommand.CompanyId = controller.GetCompanyId() | ||
21 | data, err := noticeSettingService.UpdateNoticeSetting(updateNoticeSettingCommand) | 25 | data, err := noticeSettingService.UpdateNoticeSetting(updateNoticeSettingCommand) |
22 | controller.Response(data, err) | 26 | controller.Response(data, err) |
23 | } | 27 | } |
@@ -34,7 +38,11 @@ func (controller *NoticeSettingController) GetNoticeSetting() { | @@ -34,7 +38,11 @@ func (controller *NoticeSettingController) GetNoticeSetting() { | ||
34 | func (controller *NoticeSettingController) ListNoticeSetting() { | 38 | func (controller *NoticeSettingController) ListNoticeSetting() { |
35 | noticeSettingService := service.NewNoticeSettingService(nil) | 39 | noticeSettingService := service.NewNoticeSettingService(nil) |
36 | listNoticeSettingQuery := &query.ListNoticeSettingQuery{} | 40 | listNoticeSettingQuery := &query.ListNoticeSettingQuery{} |
37 | - controller.Unmarshal(listNoticeSettingQuery) | 41 | + err := controller.Unmarshal(listNoticeSettingQuery) |
42 | + if err != nil { | ||
43 | + log.Logger.Debug(err.Error()) | ||
44 | + } | ||
45 | + // listNoticeSettingQuery.CompanyId = controller.GetCompanyId() | ||
38 | count, listdata, err := noticeSettingService.ListNoticeSetting(listNoticeSettingQuery) | 46 | count, listdata, err := noticeSettingService.ListNoticeSetting(listNoticeSettingQuery) |
39 | data := map[string]interface{}{ | 47 | data := map[string]interface{}{ |
40 | "noticeSettings": listdata, | 48 | "noticeSettings": listdata, |
@@ -46,7 +54,10 @@ func (controller *NoticeSettingController) ListNoticeSetting() { | @@ -46,7 +54,10 @@ func (controller *NoticeSettingController) ListNoticeSetting() { | ||
46 | func (controller *NoticeSettingController) AddNoticeSetting() { | 54 | func (controller *NoticeSettingController) AddNoticeSetting() { |
47 | noticeSettingService := service.NewNoticeSettingService(nil) | 55 | noticeSettingService := service.NewNoticeSettingService(nil) |
48 | addNoticeSettingCommand := &command.AddNoticeSettingCommand{} | 56 | addNoticeSettingCommand := &command.AddNoticeSettingCommand{} |
49 | - controller.Unmarshal(addNoticeSettingCommand) | 57 | + err := controller.Unmarshal(addNoticeSettingCommand) |
58 | + if err != nil { | ||
59 | + log.Logger.Debug(err.Error()) | ||
60 | + } | ||
50 | data, err := noticeSettingService.AddNoticeSetting(addNoticeSettingCommand) | 61 | data, err := noticeSettingService.AddNoticeSetting(addNoticeSettingCommand) |
51 | controller.Response(data, err) | 62 | controller.Response(data, err) |
52 | } | 63 | } |
1 | package controllers | 1 | package controllers |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | - "github.com/linmadan/egglib-go/web/beego" | ||
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/systemSetting/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/systemSetting/command" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/systemSetting/query" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/systemSetting/query" |
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/systemSetting/service" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-basic/pkg/application/systemSetting/service" |
@@ -9,13 +8,17 @@ import ( | @@ -9,13 +8,17 @@ import ( | ||
9 | ) | 8 | ) |
10 | 9 | ||
11 | type SystemSettingController struct { | 10 | type SystemSettingController struct { |
12 | - beego.BaseController | 11 | + baseController |
13 | } | 12 | } |
14 | 13 | ||
15 | func (controller *SystemSettingController) UpdateSystemSetting() { | 14 | func (controller *SystemSettingController) UpdateSystemSetting() { |
16 | systemSettingService := service.NewSystemSettingService(nil) | 15 | systemSettingService := service.NewSystemSettingService(nil) |
17 | updateSystemSettingCommand := &command.UpdateSystemSettingCommand{} | 16 | updateSystemSettingCommand := &command.UpdateSystemSettingCommand{} |
18 | - controller.Unmarshal(updateSystemSettingCommand) | 17 | + err := controller.Unmarshal(updateSystemSettingCommand) |
18 | + if err != nil { | ||
19 | + log.Logger.Debug(err.Error()) | ||
20 | + } | ||
21 | + // updateSystemSettingCommand.CompanyId = controller.GetCompanyId() | ||
19 | data, err := systemSettingService.UpdateSystemSetting(updateSystemSettingCommand) | 22 | data, err := systemSettingService.UpdateSystemSetting(updateSystemSettingCommand) |
20 | controller.Response(data, err) | 23 | controller.Response(data, err) |
21 | } | 24 | } |
@@ -27,6 +30,7 @@ func (controller *SystemSettingController) GetSystemSetting() { | @@ -27,6 +30,7 @@ func (controller *SystemSettingController) GetSystemSetting() { | ||
27 | if err != nil { | 30 | if err != nil { |
28 | log.Logger.Debug(err.Error()) | 31 | log.Logger.Debug(err.Error()) |
29 | } | 32 | } |
33 | + // getSystemSettingQuery.CompanyId = controller.GetCompanyId() | ||
30 | data, err := systemSettingService.GetSystemSetting(getSystemSettingQuery) | 34 | data, err := systemSettingService.GetSystemSetting(getSystemSettingQuery) |
31 | controller.Response(data, err) | 35 | controller.Response(data, err) |
32 | } | 36 | } |
@@ -34,6 +38,7 @@ func (controller *SystemSettingController) GetSystemSetting() { | @@ -34,6 +38,7 @@ func (controller *SystemSettingController) GetSystemSetting() { | ||
34 | func (controller *SystemSettingController) ListSystemSetting() { | 38 | func (controller *SystemSettingController) ListSystemSetting() { |
35 | systemSettingService := service.NewSystemSettingService(nil) | 39 | systemSettingService := service.NewSystemSettingService(nil) |
36 | listSystemSettingQuery := &query.ListSystemSettingQuery{} | 40 | listSystemSettingQuery := &query.ListSystemSettingQuery{} |
41 | + // listSystemSettingQuery.CompanyId = controller.GetCompanyId() | ||
37 | data, err := systemSettingService.ListSystemSetting(listSystemSettingQuery) | 42 | data, err := systemSettingService.ListSystemSetting(listSystemSettingQuery) |
38 | controller.Response(data, err) | 43 | controller.Response(data, err) |
39 | } | 44 | } |
-
请 注册 或 登录 后发表评论