hongze 10 months ago
parent
commit
c30a3dec7d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      models/overseas_custom/custom.go

+ 2 - 2
models/overseas_custom/custom.go

@@ -147,14 +147,14 @@ func (obj *Custom) GetOverseasCompany() (list []*Custom, err error) {
 
 func (obj *Custom) UpdateEnglishCompanyOverseasStatus(companyId int, companyStatus string) (err error) {
 	o := orm.NewOrmUsingDB("rddp")
-	sql := ` UPDATE english_company SET overseas_status=? WHERE company_id=? `
+	sql := ` UPDATE english_company SET overseas_status=? WHERE company_id=? AND overseas_status<>'正式' `
 	_, err = o.Raw(sql, companyStatus, companyId).Exec()
 	return
 }
 
 func (obj *Custom) UpdateCompanyOverseasStatus(companyId int, companyStatus string) (err error) {
 	o := orm.NewOrm()
-	sql := ` UPDATE company SET overseas_status=? WHERE company_id=? `
+	sql := ` UPDATE company SET overseas_status=? WHERE company_id=? AND overseas_status<>'正式' `
 	_, err = o.Raw(sql, companyStatus, companyId).Exec()
 	return
 }