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