This commit is contained in:
aozhiwei 2024-11-05 11:46:16 +08:00
parent f939d653d5
commit 6a69777c87

View File

@ -1,8 +1,10 @@
package user
import (
"f5"
"main/constant"
"main/common"
"main/model"
"github.com/gin-gonic/gin"
)
@ -14,4 +16,15 @@ func (this *UserApi) Login(c *gin.Context) {
if s == nil {
return
}
user := new(model.User)
var count int64 = 0
if f5.GetApp().GetOrmDb(constant.WHEEL_DB).Table(user.TableName()).Take(user,
"mail_id = ?", "").Count(&count); count < 1 {
c.JSON(200, gin.H{
"code": 2,
"message": "mailid不存在",
})
return
}
}