common_controller.go
986 字节
package common_controller
import (
"github.com/linmadan/egglib-go/web/beego"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/common/command"
"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)
}
func (controller *CommonController) CompanySignUp() {
commonService := service.NewCommonService(nil)
queryParm := command.CompanySignUpCommand{}
_ = controller.Unmarshal(queryParm)
data, err := commonService.CompanySignUp(&queryParm)
controller.Response(data, err)
}