正在显示
5 个修改的文件
包含
91 行增加
和
23 行删除
@@ -4,6 +4,7 @@ import ( | @@ -4,6 +4,7 @@ import ( | ||
4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/custommenu/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/custommenu/command" |
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/custommenu/query" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/custommenu/query" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/custommenu/service" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/custommenu/service" |
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
7 | ) | 8 | ) |
8 | 9 | ||
9 | type MenuController struct { | 10 | type MenuController struct { |
@@ -13,7 +14,10 @@ type MenuController struct { | @@ -13,7 +14,10 @@ type MenuController struct { | ||
13 | func (controller *MenuController) MenuList() { | 14 | func (controller *MenuController) MenuList() { |
14 | menuService := service.NewMenuService(nil) | 15 | menuService := service.NewMenuService(nil) |
15 | menuListQuery := &query.MenuListQuery{} | 16 | menuListQuery := &query.MenuListQuery{} |
16 | - controller.Unmarshal(menuListQuery) | 17 | + err := controller.Unmarshal(menuListQuery) |
18 | + if err != nil { | ||
19 | + log.Logger.Debug("json err:" + err.Error()) | ||
20 | + } | ||
17 | menuListQuery.Operator = controller.GetOperator() | 21 | menuListQuery.Operator = controller.GetOperator() |
18 | data, err := menuService.MenuList(menuListQuery) | 22 | data, err := menuService.MenuList(menuListQuery) |
19 | controller.Response(data, err) | 23 | controller.Response(data, err) |
@@ -22,7 +26,10 @@ func (controller *MenuController) MenuList() { | @@ -22,7 +26,10 @@ func (controller *MenuController) MenuList() { | ||
22 | func (controller *MenuController) MenuUpdate() { | 26 | func (controller *MenuController) MenuUpdate() { |
23 | menuService := service.NewMenuService(nil) | 27 | menuService := service.NewMenuService(nil) |
24 | menuUpdateQuery := &command.MenuUpdateCommand{} | 28 | menuUpdateQuery := &command.MenuUpdateCommand{} |
25 | - controller.Unmarshal(menuUpdateQuery) | 29 | + err := controller.Unmarshal(menuUpdateQuery) |
30 | + if err != nil { | ||
31 | + log.Logger.Debug("json err:" + err.Error()) | ||
32 | + } | ||
26 | menuUpdateQuery.Operator = controller.GetOperator() | 33 | menuUpdateQuery.Operator = controller.GetOperator() |
27 | data, err := menuService.MenuUpdate(menuUpdateQuery) | 34 | data, err := menuService.MenuUpdate(menuUpdateQuery) |
28 | controller.Response(data, err) | 35 | controller.Response(data, err) |
@@ -31,7 +38,10 @@ func (controller *MenuController) MenuUpdate() { | @@ -31,7 +38,10 @@ func (controller *MenuController) MenuUpdate() { | ||
31 | func (controller *MenuController) MenuFavorite() { | 38 | func (controller *MenuController) MenuFavorite() { |
32 | menuService := service.NewMenuService(nil) | 39 | menuService := service.NewMenuService(nil) |
33 | menuFavoriteCommand := &command.MenuFavoriteCommand{} | 40 | menuFavoriteCommand := &command.MenuFavoriteCommand{} |
34 | - controller.Unmarshal(menuFavoriteCommand) | 41 | + err := controller.Unmarshal(menuFavoriteCommand) |
42 | + if err != nil { | ||
43 | + log.Logger.Debug("json err:" + err.Error()) | ||
44 | + } | ||
35 | menuFavoriteCommand.Operator = controller.GetOperator() | 45 | menuFavoriteCommand.Operator = controller.GetOperator() |
36 | data, err := menuService.MenuFavorite(menuFavoriteCommand) | 46 | data, err := menuService.MenuFavorite(menuFavoriteCommand) |
37 | controller.Response(data, err) | 47 | controller.Response(data, err) |
@@ -4,6 +4,7 @@ import ( | @@ -4,6 +4,7 @@ import ( | ||
4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/command" |
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/query" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/query" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/service" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/noticesetting/service" |
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
7 | ) | 8 | ) |
8 | 9 | ||
9 | type NoticeSettingController struct { | 10 | type NoticeSettingController struct { |
@@ -13,7 +14,10 @@ type NoticeSettingController struct { | @@ -13,7 +14,10 @@ type NoticeSettingController struct { | ||
13 | func (controller *NoticeSettingController) NoticeSettingList() { | 14 | func (controller *NoticeSettingController) NoticeSettingList() { |
14 | noticeSettingService := service.NewNoticeSettingService(nil) | 15 | noticeSettingService := service.NewNoticeSettingService(nil) |
15 | noticeSettingListQuery := &query.NoticeSettingListQuery{} | 16 | noticeSettingListQuery := &query.NoticeSettingListQuery{} |
16 | - controller.Unmarshal(noticeSettingListQuery) | 17 | + err := controller.Unmarshal(noticeSettingListQuery) |
18 | + if err != nil { | ||
19 | + log.Logger.Debug("json err:" + err.Error()) | ||
20 | + } | ||
17 | noticeSettingListQuery.Operator = controller.GetOperator() | 21 | noticeSettingListQuery.Operator = controller.GetOperator() |
18 | cnt, data, err := noticeSettingService.NoticeSettingList(noticeSettingListQuery) | 22 | cnt, data, err := noticeSettingService.NoticeSettingList(noticeSettingListQuery) |
19 | controller.returnPageListData(cnt, data, err, noticeSettingListQuery.PageNumber) | 23 | controller.returnPageListData(cnt, data, err, noticeSettingListQuery.PageNumber) |
@@ -23,7 +27,10 @@ func (controller *NoticeSettingController) NoticeSettingUpdate() { | @@ -23,7 +27,10 @@ func (controller *NoticeSettingController) NoticeSettingUpdate() { | ||
23 | noticeSettingService := service.NewNoticeSettingService(nil) | 27 | noticeSettingService := service.NewNoticeSettingService(nil) |
24 | noticeSettingUpdateCommand := &command.NoticeSettingUpdateCommand{} | 28 | noticeSettingUpdateCommand := &command.NoticeSettingUpdateCommand{} |
25 | settingId := controller.GetString(":settingId") | 29 | settingId := controller.GetString(":settingId") |
26 | - controller.Unmarshal(noticeSettingUpdateCommand) | 30 | + err := controller.Unmarshal(noticeSettingUpdateCommand) |
31 | + if err != nil { | ||
32 | + log.Logger.Debug("json err:" + err.Error()) | ||
33 | + } | ||
27 | noticeSettingUpdateCommand.Operator = controller.GetOperator() | 34 | noticeSettingUpdateCommand.Operator = controller.GetOperator() |
28 | noticeSettingUpdateCommand.NoticeSettingId = settingId | 35 | noticeSettingUpdateCommand.NoticeSettingId = settingId |
29 | data, err := noticeSettingService.NoticeSettingUpdate(noticeSettingUpdateCommand) | 36 | data, err := noticeSettingService.NoticeSettingUpdate(noticeSettingUpdateCommand) |
@@ -33,7 +40,10 @@ func (controller *NoticeSettingController) NoticeSettingUpdate() { | @@ -33,7 +40,10 @@ func (controller *NoticeSettingController) NoticeSettingUpdate() { | ||
33 | func (controller *NoticeSettingController) NoticeSettingAdd() { | 40 | func (controller *NoticeSettingController) NoticeSettingAdd() { |
34 | noticeSettingService := service.NewNoticeSettingService(nil) | 41 | noticeSettingService := service.NewNoticeSettingService(nil) |
35 | noticeSettingAddCommand := &command.NoticeSettingAddCommand{} | 42 | noticeSettingAddCommand := &command.NoticeSettingAddCommand{} |
36 | - controller.Unmarshal(noticeSettingAddCommand) | 43 | + err := controller.Unmarshal(noticeSettingAddCommand) |
44 | + if err != nil { | ||
45 | + log.Logger.Debug("json err:" + err.Error()) | ||
46 | + } | ||
37 | noticeSettingAddCommand.Operator = controller.GetOperator() | 47 | noticeSettingAddCommand.Operator = controller.GetOperator() |
38 | data, err := noticeSettingService.NoticeSettingAdd(noticeSettingAddCommand) | 48 | data, err := noticeSettingService.NoticeSettingAdd(noticeSettingAddCommand) |
39 | controller.Response(data, err) | 49 | controller.Response(data, err) |
@@ -4,6 +4,7 @@ import ( | @@ -4,6 +4,7 @@ import ( | ||
4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/command" |
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/query" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/query" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/service" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/orgs/service" |
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
7 | ) | 8 | ) |
8 | 9 | ||
9 | type OrgsController struct { | 10 | type OrgsController struct { |
@@ -13,7 +14,10 @@ type OrgsController struct { | @@ -13,7 +14,10 @@ type OrgsController struct { | ||
13 | func (controller *OrgsController) OrgAdd() { | 14 | func (controller *OrgsController) OrgAdd() { |
14 | orgsService := service.NewOrgsService(nil) | 15 | orgsService := service.NewOrgsService(nil) |
15 | orgAddCommand := &command.OrgAddCommand{} | 16 | orgAddCommand := &command.OrgAddCommand{} |
16 | - controller.Unmarshal(orgAddCommand) | 17 | + err := controller.Unmarshal(orgAddCommand) |
18 | + if err != nil { | ||
19 | + log.Logger.Debug("json err:" + err.Error()) | ||
20 | + } | ||
17 | orgAddCommand.Operator = controller.GetOperator() | 21 | orgAddCommand.Operator = controller.GetOperator() |
18 | data, err := orgsService.OrgAdd(orgAddCommand) | 22 | data, err := orgsService.OrgAdd(orgAddCommand) |
19 | controller.Response(data, err) | 23 | controller.Response(data, err) |
@@ -22,7 +26,10 @@ func (controller *OrgsController) OrgAdd() { | @@ -22,7 +26,10 @@ func (controller *OrgsController) OrgAdd() { | ||
22 | func (controller *OrgsController) OrgUpdate() { | 26 | func (controller *OrgsController) OrgUpdate() { |
23 | orgsService := service.NewOrgsService(nil) | 27 | orgsService := service.NewOrgsService(nil) |
24 | orgUpdateCommand := &command.OrgUpdateCommand{} | 28 | orgUpdateCommand := &command.OrgUpdateCommand{} |
25 | - controller.Unmarshal(orgUpdateCommand) | 29 | + err := controller.Unmarshal(orgUpdateCommand) |
30 | + if err != nil { | ||
31 | + log.Logger.Debug("json err:" + err.Error()) | ||
32 | + } | ||
26 | orgId := controller.GetString(":orgId") | 33 | orgId := controller.GetString(":orgId") |
27 | orgUpdateCommand.OrgId = orgId | 34 | orgUpdateCommand.OrgId = orgId |
28 | orgUpdateCommand.Operator = controller.GetOperator() | 35 | orgUpdateCommand.Operator = controller.GetOperator() |
@@ -33,7 +40,10 @@ func (controller *OrgsController) OrgUpdate() { | @@ -33,7 +40,10 @@ func (controller *OrgsController) OrgUpdate() { | ||
33 | func (controller *OrgsController) OrgList() { | 40 | func (controller *OrgsController) OrgList() { |
34 | orgsService := service.NewOrgsService(nil) | 41 | orgsService := service.NewOrgsService(nil) |
35 | orgListQuery := &query.OrgListQuery{} | 42 | orgListQuery := &query.OrgListQuery{} |
36 | - controller.Unmarshal(orgListQuery) | 43 | + err := controller.Unmarshal(orgListQuery) |
44 | + if err != nil { | ||
45 | + log.Logger.Debug("json err:" + err.Error()) | ||
46 | + } | ||
37 | orgListQuery.Operator = controller.GetOperator() | 47 | orgListQuery.Operator = controller.GetOperator() |
38 | data, err := orgsService.OrgList(orgListQuery) | 48 | data, err := orgsService.OrgList(orgListQuery) |
39 | controller.Response(data, err) | 49 | controller.Response(data, err) |
@@ -52,7 +62,10 @@ func (controller *OrgsController) OrgGet() { | @@ -52,7 +62,10 @@ func (controller *OrgsController) OrgGet() { | ||
52 | func (controller *OrgsController) OrgEnable() { | 62 | func (controller *OrgsController) OrgEnable() { |
53 | orgsService := service.NewOrgsService(nil) | 63 | orgsService := service.NewOrgsService(nil) |
54 | orgEnableCommand := &command.OrgEnableCommand{} | 64 | orgEnableCommand := &command.OrgEnableCommand{} |
55 | - controller.Unmarshal(orgEnableCommand) | 65 | + err := controller.Unmarshal(orgEnableCommand) |
66 | + if err != nil { | ||
67 | + log.Logger.Debug("json err:" + err.Error()) | ||
68 | + } | ||
56 | orgEnableCommand.Operator = controller.GetOperator() | 69 | orgEnableCommand.Operator = controller.GetOperator() |
57 | data, err := orgsService.OrgEnable(orgEnableCommand) | 70 | data, err := orgsService.OrgEnable(orgEnableCommand) |
58 | controller.Response(data, err) | 71 | controller.Response(data, err) |
@@ -61,7 +74,10 @@ func (controller *OrgsController) OrgEnable() { | @@ -61,7 +74,10 @@ func (controller *OrgsController) OrgEnable() { | ||
61 | func (controller *OrgsController) OrgGetSubDepartment() { | 74 | func (controller *OrgsController) OrgGetSubDepartment() { |
62 | orgsService := service.NewOrgsService(nil) | 75 | orgsService := service.NewOrgsService(nil) |
63 | orgGetSubDepartmentQuery := &query.OrgGetSubDepartmentQuery{} | 76 | orgGetSubDepartmentQuery := &query.OrgGetSubDepartmentQuery{} |
64 | - controller.Unmarshal(orgGetSubDepartmentQuery) | 77 | + err := controller.Unmarshal(orgGetSubDepartmentQuery) |
78 | + if err != nil { | ||
79 | + log.Logger.Debug("json err:" + err.Error()) | ||
80 | + } | ||
65 | orgGetSubDepartmentQuery.Operator = controller.GetOperator() | 81 | orgGetSubDepartmentQuery.Operator = controller.GetOperator() |
66 | data, err := orgsService.OrgGetSubDepartment(orgGetSubDepartmentQuery) | 82 | data, err := orgsService.OrgGetSubDepartment(orgGetSubDepartmentQuery) |
67 | controller.Response(data, err) | 83 | controller.Response(data, err) |
@@ -4,6 +4,7 @@ import ( | @@ -4,6 +4,7 @@ import ( | ||
4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/roles/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/roles/command" |
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/roles/query" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/roles/query" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/roles/service" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/roles/service" |
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
7 | ) | 8 | ) |
8 | 9 | ||
9 | type RolesController struct { | 10 | type RolesController struct { |
@@ -13,7 +14,10 @@ type RolesController struct { | @@ -13,7 +14,10 @@ type RolesController struct { | ||
13 | func (controller *RolesController) RoleAdd() { | 14 | func (controller *RolesController) RoleAdd() { |
14 | rolesService := service.NewRolesService(nil) | 15 | rolesService := service.NewRolesService(nil) |
15 | roleAddCommand := &command.RoleAddCommand{} | 16 | roleAddCommand := &command.RoleAddCommand{} |
16 | - controller.Unmarshal(roleAddCommand) | 17 | + err := controller.Unmarshal(roleAddCommand) |
18 | + if err != nil { | ||
19 | + log.Logger.Debug("json err:" + err.Error()) | ||
20 | + } | ||
17 | roleAddCommand.Operator = controller.GetOperator() | 21 | roleAddCommand.Operator = controller.GetOperator() |
18 | data, err := rolesService.RoleAdd(roleAddCommand) | 22 | data, err := rolesService.RoleAdd(roleAddCommand) |
19 | controller.Response(data, err) | 23 | controller.Response(data, err) |
@@ -22,7 +26,10 @@ func (controller *RolesController) RoleAdd() { | @@ -22,7 +26,10 @@ func (controller *RolesController) RoleAdd() { | ||
22 | func (controller *RolesController) RoleUpdate() { | 26 | func (controller *RolesController) RoleUpdate() { |
23 | rolesService := service.NewRolesService(nil) | 27 | rolesService := service.NewRolesService(nil) |
24 | roleUpdateCommand := &command.RoleUpdateCommand{} | 28 | roleUpdateCommand := &command.RoleUpdateCommand{} |
25 | - controller.Unmarshal(roleUpdateCommand) | 29 | + err := controller.Unmarshal(roleUpdateCommand) |
30 | + if err != nil { | ||
31 | + log.Logger.Debug("json err:" + err.Error()) | ||
32 | + } | ||
26 | roleId := controller.GetString(":roleId") | 33 | roleId := controller.GetString(":roleId") |
27 | roleUpdateCommand.RoleId = roleId | 34 | roleUpdateCommand.RoleId = roleId |
28 | roleUpdateCommand.Operator = controller.GetOperator() | 35 | roleUpdateCommand.Operator = controller.GetOperator() |
@@ -33,7 +40,10 @@ func (controller *RolesController) RoleUpdate() { | @@ -33,7 +40,10 @@ func (controller *RolesController) RoleUpdate() { | ||
33 | func (controller *RolesController) RoleList() { | 40 | func (controller *RolesController) RoleList() { |
34 | rolesService := service.NewRolesService(nil) | 41 | rolesService := service.NewRolesService(nil) |
35 | roleListQuery := &query.RoleListQuery{} | 42 | roleListQuery := &query.RoleListQuery{} |
36 | - controller.Unmarshal(roleListQuery) | 43 | + err := controller.Unmarshal(roleListQuery) |
44 | + if err != nil { | ||
45 | + log.Logger.Debug("json err:" + err.Error()) | ||
46 | + } | ||
37 | roleListQuery.Operator = controller.GetOperator() | 47 | roleListQuery.Operator = controller.GetOperator() |
38 | cnt, data, err := rolesService.RoleList(roleListQuery) | 48 | cnt, data, err := rolesService.RoleList(roleListQuery) |
39 | controller.returnPageListData(cnt, data, err, roleListQuery.PageNumber) | 49 | controller.returnPageListData(cnt, data, err, roleListQuery.PageNumber) |
@@ -62,7 +72,10 @@ func (controller *RolesController) RoleUserInfo() { | @@ -62,7 +72,10 @@ func (controller *RolesController) RoleUserInfo() { | ||
62 | func (controller *RolesController) RoleUserAdd() { | 72 | func (controller *RolesController) RoleUserAdd() { |
63 | rolesService := service.NewRolesService(nil) | 73 | rolesService := service.NewRolesService(nil) |
64 | roleUserAddQuery := &command.RoleUserAddCommand{} | 74 | roleUserAddQuery := &command.RoleUserAddCommand{} |
65 | - controller.Unmarshal(roleUserAddQuery) | 75 | + err := controller.Unmarshal(roleUserAddQuery) |
76 | + if err != nil { | ||
77 | + log.Logger.Debug("json err:" + err.Error()) | ||
78 | + } | ||
66 | roleUserAddQuery.Operator = controller.GetOperator() | 79 | roleUserAddQuery.Operator = controller.GetOperator() |
67 | data, err := rolesService.RoleUserAdd(roleUserAddQuery) | 80 | data, err := rolesService.RoleUserAdd(roleUserAddQuery) |
68 | controller.Response(data, err) | 81 | controller.Response(data, err) |
@@ -71,7 +84,10 @@ func (controller *RolesController) RoleUserAdd() { | @@ -71,7 +84,10 @@ func (controller *RolesController) RoleUserAdd() { | ||
71 | func (controller *RolesController) RoleUserDelete() { | 84 | func (controller *RolesController) RoleUserDelete() { |
72 | rolesService := service.NewRolesService(nil) | 85 | rolesService := service.NewRolesService(nil) |
73 | roleUserDeleteQuery := &command.RoleUserDeleteCommand{} | 86 | roleUserDeleteQuery := &command.RoleUserDeleteCommand{} |
74 | - controller.Unmarshal(roleUserDeleteQuery) | 87 | + err := controller.Unmarshal(roleUserDeleteQuery) |
88 | + if err != nil { | ||
89 | + log.Logger.Debug("json err:" + err.Error()) | ||
90 | + } | ||
75 | roleUserDeleteQuery.Operator = controller.GetOperator() | 91 | roleUserDeleteQuery.Operator = controller.GetOperator() |
76 | data, err := rolesService.RoleUserDelete(roleUserDeleteQuery) | 92 | data, err := rolesService.RoleUserDelete(roleUserDeleteQuery) |
77 | controller.Response(data, err) | 93 | controller.Response(data, err) |
@@ -91,7 +107,10 @@ func (controller *RolesController) RoleMenuBeforeEdit() { | @@ -91,7 +107,10 @@ func (controller *RolesController) RoleMenuBeforeEdit() { | ||
91 | rolesService := service.NewRolesService(nil) | 107 | rolesService := service.NewRolesService(nil) |
92 | roleMenuBeforeEditQuery := &query.RoleMenuBeforeEditQuery{} | 108 | roleMenuBeforeEditQuery := &query.RoleMenuBeforeEditQuery{} |
93 | roleMenuBeforeEditQuery.Operator = controller.GetOperator() | 109 | roleMenuBeforeEditQuery.Operator = controller.GetOperator() |
94 | - controller.Unmarshal(roleMenuBeforeEditQuery) | 110 | + err := controller.Unmarshal(roleMenuBeforeEditQuery) |
111 | + if err != nil { | ||
112 | + log.Logger.Debug("json err:" + err.Error()) | ||
113 | + } | ||
95 | roleId := controller.GetString(":roleId") | 114 | roleId := controller.GetString(":roleId") |
96 | roleMenuBeforeEditQuery.RoleId = roleId | 115 | roleMenuBeforeEditQuery.RoleId = roleId |
97 | data, err := rolesService.RoleMenuBeforeEdit(roleMenuBeforeEditQuery) | 116 | data, err := rolesService.RoleMenuBeforeEdit(roleMenuBeforeEditQuery) |
@@ -101,7 +120,10 @@ func (controller *RolesController) RoleMenuBeforeEdit() { | @@ -101,7 +120,10 @@ func (controller *RolesController) RoleMenuBeforeEdit() { | ||
101 | func (controller *RolesController) RoleMenuEdit() { | 120 | func (controller *RolesController) RoleMenuEdit() { |
102 | rolesService := service.NewRolesService(nil) | 121 | rolesService := service.NewRolesService(nil) |
103 | roleMenuEditQuery := &command.RoleMenuEditCommand{} | 122 | roleMenuEditQuery := &command.RoleMenuEditCommand{} |
104 | - controller.Unmarshal(roleMenuEditQuery) | 123 | + err := controller.Unmarshal(roleMenuEditQuery) |
124 | + if err != nil { | ||
125 | + log.Logger.Debug("json err:" + err.Error()) | ||
126 | + } | ||
105 | roleId := controller.GetString(":roleId") | 127 | roleId := controller.GetString(":roleId") |
106 | roleMenuEditQuery.RoleId = roleId | 128 | roleMenuEditQuery.RoleId = roleId |
107 | roleMenuEditQuery.Operator = controller.GetOperator() | 129 | roleMenuEditQuery.Operator = controller.GetOperator() |
@@ -112,7 +134,10 @@ func (controller *RolesController) RoleMenuEdit() { | @@ -112,7 +134,10 @@ func (controller *RolesController) RoleMenuEdit() { | ||
112 | func (controller *RolesController) RoleDelete() { | 134 | func (controller *RolesController) RoleDelete() { |
113 | rolesService := service.NewRolesService(nil) | 135 | rolesService := service.NewRolesService(nil) |
114 | roleRemoveCommand := &command.RoleRemoveCommand{} | 136 | roleRemoveCommand := &command.RoleRemoveCommand{} |
115 | - controller.Unmarshal(roleRemoveCommand) | 137 | + err := controller.Unmarshal(roleRemoveCommand) |
138 | + if err != nil { | ||
139 | + log.Logger.Debug("json err:" + err.Error()) | ||
140 | + } | ||
116 | roleRemoveCommand.Operator = controller.GetOperator() | 141 | roleRemoveCommand.Operator = controller.GetOperator() |
117 | data, err := rolesService.RoleRemove(roleRemoveCommand) | 142 | data, err := rolesService.RoleRemove(roleRemoveCommand) |
118 | controller.Response(data, err) | 143 | controller.Response(data, err) |
@@ -4,6 +4,7 @@ import ( | @@ -4,6 +4,7 @@ import ( | ||
4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/systemsetting/command" | 4 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/systemsetting/command" |
5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/systemsetting/query" | 5 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/systemsetting/query" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/systemsetting/service" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/systemsetting/service" |
7 | + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | ||
7 | ) | 8 | ) |
8 | 9 | ||
9 | type SystemSettingController struct { | 10 | type SystemSettingController struct { |
@@ -12,17 +13,20 @@ type SystemSettingController struct { | @@ -12,17 +13,20 @@ type SystemSettingController struct { | ||
12 | 13 | ||
13 | func (controller SystemSettingController) SystemSettingSearch() { | 14 | func (controller SystemSettingController) SystemSettingSearch() { |
14 | systemSettingService := service.NewSystemSettingService(nil) | 15 | systemSettingService := service.NewSystemSettingService(nil) |
15 | - q := &query.SettingListQuery{ | 16 | + settingListQuery := &query.SettingListQuery{ |
16 | Operator: controller.GetOperator(), | 17 | Operator: controller.GetOperator(), |
17 | } | 18 | } |
18 | - data, err := systemSettingService.GetSystemSettingList(q) | 19 | + data, err := systemSettingService.GetSystemSettingList(settingListQuery) |
19 | controller.Response(data, err) | 20 | controller.Response(data, err) |
20 | } | 21 | } |
21 | 22 | ||
22 | func (controller SystemSettingController) SystemSettingGet() { | 23 | func (controller SystemSettingController) SystemSettingGet() { |
23 | systemSettingService := service.NewSystemSettingService(nil) | 24 | systemSettingService := service.NewSystemSettingService(nil) |
24 | q := &query.SettingGetQuery{} | 25 | q := &query.SettingGetQuery{} |
25 | - controller.Unmarshal(q) | 26 | + err := controller.Unmarshal(q) |
27 | + if err != nil { | ||
28 | + log.Logger.Debug("json err:" + err.Error()) | ||
29 | + } | ||
26 | q.Operator = controller.GetOperator() | 30 | q.Operator = controller.GetOperator() |
27 | data, err := systemSettingService.GetSystemSetting(q) | 31 | data, err := systemSettingService.GetSystemSetting(q) |
28 | controller.Response(data, err) | 32 | controller.Response(data, err) |
@@ -32,7 +36,10 @@ func (controller SystemSettingController) SystemSettingGet() { | @@ -32,7 +36,10 @@ func (controller SystemSettingController) SystemSettingGet() { | ||
32 | func (controller SystemSettingController) SystemSettingUpdate() { | 36 | func (controller SystemSettingController) SystemSettingUpdate() { |
33 | systemSettingService := service.NewSystemSettingService(nil) | 37 | systemSettingService := service.NewSystemSettingService(nil) |
34 | q := &command.SettingUpdateCommand{} | 38 | q := &command.SettingUpdateCommand{} |
35 | - controller.Unmarshal(q) | 39 | + err := controller.Unmarshal(q) |
40 | + if err != nil { | ||
41 | + log.Logger.Debug("json err:" + err.Error()) | ||
42 | + } | ||
36 | q.Operator = controller.GetOperator() | 43 | q.Operator = controller.GetOperator() |
37 | data, err := systemSettingService.SystemSettingUpdate(q) | 44 | data, err := systemSettingService.SystemSettingUpdate(q) |
38 | controller.Response(data, err) | 45 | controller.Response(data, err) |
-
请 注册 或 登录 后发表评论