system_setting_controller.go.go
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package web_client
import (
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/systemsetting/command"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/systemsetting/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/web/systemsetting/service"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log"
)
type SystemSettingController struct {
baseController
}
func (controller SystemSettingController) SystemSettingSearch() {
systemSettingService := service.NewSystemSettingService(nil)
settingListQuery := &query.SettingListQuery{
Operator: controller.GetOperator(),
}
data, err := systemSettingService.GetSystemSettingList(settingListQuery)
controller.Response(data, err)
}
func (controller SystemSettingController) SystemSettingGet() {
systemSettingService := service.NewSystemSettingService(nil)
q := &query.SettingGetQuery{}
err := controller.Unmarshal(q)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
q.Operator = controller.GetOperator()
data, err := systemSettingService.GetSystemSetting(q)
controller.Response(data, err)
}
func (controller SystemSettingController) SystemSettingUpdate() {
systemSettingService := service.NewSystemSettingService(nil)
q := &command.SettingUpdateCommand{}
err := controller.Unmarshal(q)
if err != nil {
log.Logger.Debug("json err:" + err.Error())
}
q.Operator = controller.GetOperator()
data, err := systemSettingService.SystemSettingUpdate(q)
controller.Response(data, err)
}