guest.go 694 字节
Newer Older
E
eoLinker API Management 已提交
1 2 3
package account

import (
Y
Your Name 已提交
4
	console_sqlite3 "github.com/eolinker/goku-api-gateway/server/dao/console-sqlite3"
E
eoLinker API Management 已提交
5 6
)

Y
Your Name 已提交
7
//Login 登录
E
eoLinker API Management 已提交
8
func Login(loginCall, loginPassword string) (bool, int) {
Y
Your Name 已提交
9
	return console_sqlite3.Login(loginCall, loginPassword)
E
eoLinker API Management 已提交
10 11 12

}

Y
Your Name 已提交
13
//CheckLogin 检查用户是否登录
E
eoLinker API Management 已提交
14
func CheckLogin(userToken string, userID int) bool {
Y
Your Name 已提交
15
	return console_sqlite3.CheckLogin(userToken, userID)
E
eoLinker API Management 已提交
16 17
}

Y
Your Name 已提交
18
//Register 用户注册
E
eoLinker API Management 已提交
19
func Register(loginCall, loginPassword string) bool {
Y
Your Name 已提交
20
	return console_sqlite3.Register(loginCall, loginPassword)
E
eoLinker API Management 已提交
21 22
}

Y
Your Name 已提交
23
//CheckSuperAdminCount 获取超级管理员数量
Y
Your Name 已提交
24
func CheckSuperAdminCount() (int, error) {
Y
Your Name 已提交
25
	b, err := console_sqlite3.CheckSuperAdminCount()
Y
Your Name 已提交
26 27
	return b, err
}