common_controller.go 616 字节
package common_controller

import (
	"github.com/linmadan/egglib-go/web/beego"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/query"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/service"
)

type CommonController struct {
	beego.BaseController
}

func (controller *CommonController) GetDictionaryByCode() {
	commonService := service.NewCommonService(nil)
	queryParm := query.GetDictionaryByCodeQuery{}
	_ = controller.Unmarshal(queryParm)
	data, err := commonService.GetDictionaryByCode(&queryParm)
	controller.Response(data, err)
}