common_controller.go
1.1 KB
package controllers
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)
queryParam := &query.GetDictionaryByCodeQuery{}
_ = controller.Unmarshal(queryParam)
data, err := commonService.GetDictionaryByCode(queryParam)
controller.Response(data, err)
}
func (controller *CommonController) LatestVersionInfo() {
commonService := service.NewCommonService(nil)
queryParam := &query.GetDictionaryByCodeQuery{}
_ = controller.Unmarshal(queryParam)
data, err := commonService.LatestVersionInfo()
controller.Response(data, err)
}
func (controller *CommonController) AppSharing() {
commonService := service.NewCommonService(nil)
queryParam := &query.GetDictionaryByCodeQuery{}
_ = controller.Unmarshal(queryParam)
data, err := commonService.AppSharing()
controller.Response(data, err)
}