system_setting_controller.go.go 1.3 KB
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"
)

type SystemSettingController struct {
	baseController
}

func (controller SystemSettingController) SystemSettingSearch() {
	systemSettingService := service.NewSystemSettingService(nil)
	q := &query.SettingListQuery{
		Operator: controller.GetOperator(),
	}
	data, err := systemSettingService.GetSystemSettingList(q)
	controller.Response(data, err)
}

func (controller SystemSettingController) SystemSettingGet() {
	systemSettingService := service.NewSystemSettingService(nil)
	q := &query.SettingGetQuery{}
	controller.Unmarshal(q)
	q.Operator = controller.GetOperator()
	data, err := systemSettingService.GetSystemSetting(q)
	controller.Response(data, err)

}

func (controller SystemSettingController) SystemSettingUpdate() {
	systemSettingService := service.NewSystemSettingService(nil)
	q := &command.SettingUpdateCommand{}
	controller.Unmarshal(q)
	q.Operator = controller.GetOperator()
	data, err := systemSettingService.SystemSettingUpdate(q)
	controller.Response(data, err)
}