login_access_controller.go
1.7 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 controllers
import (
"github.com/linmadan/egglib-go/web/beego"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/loginAccess/query"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/application/loginAccess/service"
)
type LoginAccessController struct {
beego.BaseController
}
func (controller *LoginAccessController) LoginByAccount() {
loginAccessService := service.NewLoginAccessService(nil)
loginByAccountQuery := &query.LoginByAccountQuery{}
data, err := loginAccessService.LoginByAccount(loginByAccountQuery)
controller.Response(data, err)
}
func (controller *LoginAccessController) LoginBySmsCode() {
loginAccessService := service.NewLoginAccessService(nil)
loginBySmsCodeQuery := &query.LoginBySmsCodeQuery{}
data, err := loginAccessService.LoginBySmsCode(loginBySmsCodeQuery)
controller.Response(data, err)
}
func (controller *LoginAccessController) LoginByScanQrcode() {
loginAccessService := service.NewLoginAccessService(nil)
loginByScanQrcodeQuery := &query.LoginByScanQrcodeQuery{}
data, err := loginAccessService.LoginByScanQrcode(loginByScanQrcodeQuery)
controller.Response(data, err)
}
func (controller *LoginAccessController) GetQrcodeForLogin() {
loginAccessService := service.NewLoginAccessService(nil)
getQrcodeForLoginQuery := &query.GetQrcodeForLoginQuery{}
data, err := loginAccessService.GetQrcodeForLogin(getQrcodeForLoginQuery)
controller.Response(data, err)
}
func (controller *LoginAccessController) LoginInfoByAuthCode() {
loginAccessService := service.NewLoginAccessService(nil)
loginInfoByAuthCodeQuery := &query.LoginInfoByAuthCodeQuery{}
data, err := loginAccessService.LoginInfoByAuthCode(loginInfoByAuthCodeQuery)
controller.Response(data, err)
}