ziwen 1 year ago
parent
commit
fbf98bf6e6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      models/english_report_email/email.go

+ 2 - 2
models/english_report_email/email.go

@@ -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
 }