|
@@ -73,11 +73,11 @@ func CheckUser(email string) (item *Email, err error) {
|
|
|
}
|
|
|
|
|
|
func (e *Email) GetByEmail(email string) (item *Email, err error) {
|
|
|
- err = global.MYSQL["rddp"].Model(e).Where("email = ? ", email).First(&item).Error
|
|
|
+ err = global.MYSQL["rddp"].Model(e).Where("email = ? AND is_deleted = 0 ", email).First(&item).Error
|
|
|
return
|
|
|
}
|
|
|
|
|
|
func (e *Email) GetByMobile(mobile, countryCode string) (item *Email, err error) {
|
|
|
- err = global.MYSQL["rddp"].Model(e).Where("mobile = ? AND country_code = ?", mobile, countryCode).First(&item).Error
|
|
|
+ err = global.MYSQL["rddp"].Model(e).Where("mobile = ? AND country_code = ? AND is_deleted = 0 ", mobile, countryCode).First(&item).Error
|
|
|
return
|
|
|
}
|