You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
859 B
30 lines
859 B
2 years ago
|
package service
|
||
|
|
||
|
import (
|
||
|
"gouser/domain/model"
|
||
|
"gouser/domain/repository"
|
||
|
)
|
||
|
|
||
|
type IUserDataService interface {
|
||
|
Login(int32, string, int32, string) (*model.User, error)
|
||
|
}
|
||
|
type UserDataService struct {
|
||
|
userRepository repository.IUserRepository
|
||
|
}
|
||
|
|
||
|
func NewUserDataService(userRepository repository.IUserRepository) IUserDataService {
|
||
|
return &UserDataService{userRepository: userRepository}
|
||
|
}
|
||
|
|
||
|
//重写接口方法
|
||
|
func (u *UserDataService) Login(clientId int32, phone string, systemId int32, verificationCode string) (user *model.User, err error) {
|
||
|
|
||
|
return u.userRepository.Login(clientId, phone, systemId, verificationCode)
|
||
|
}
|
||
|
|
||
|
/* clientId, _ := strconv.Atoi(c.Request.FormValue("clientId"))
|
||
|
phone := c.Request.FormValue("phone")
|
||
|
systemId, _ := strconv.Atoi(c.Request.FormValue("systemId"))
|
||
|
verificationCode := c.Request.FormValue("verificationCode")
|
||
|
*/
|