Browse Source

忘记密码

lining 5 years ago
parent
commit
9fb88df515
1 changed files with 21 additions and 0 deletions
  1. 21 0
      src/dashoo.cn/backend/api/controllers/register/oilcorporateinfo.go

+ 21 - 0
src/dashoo.cn/backend/api/controllers/register/oilcorporateinfo.go

@@ -701,6 +701,27 @@ func (this *OilCorporateInfoController) GetCode() {
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
 	} else {
+		var entity supplier.OilSupplier
+		svcRegister.GetEntity(&entity, "SupplierName='" + sPerson.Realname + "'")
+		if entity.Id == 0 {
+			if mobile != sPerson.Telephone {
+				errinfo.Message = "请输入联系人手机号!"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+				return
+			}
+		} else {
+			if mobile != entity.Mobile {
+				errinfo.Message = "请输入联系人手机号!"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+				return
+			}
+		}
+
+
 		//生成一个随机数
 		randomNumber := fmt.Sprintf("%06v", rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(1000000))
 		//将数据存入