...
|
...
|
@@ -154,7 +154,7 @@ func UpdateCompanyData(data ModuleCompanytData) error { |
|
|
if data.User.Id != oldAdminData.Id {
|
|
|
//更新公司主管理员
|
|
|
oldAdminData.AdminType = models.USERCOMPANY_ADMIN_SUBSET
|
|
|
err = models.UpdateUserCompanyById(oldAdminData, []string{"ChargeStatus"}, o)
|
|
|
err = models.UpdateUserCompanyById(oldAdminData, []string{"AdminType"}, o)
|
|
|
if err != nil {
|
|
|
o.Rollback()
|
|
|
log.Error("去除旧的主管理员失败:user_company_id=%d,err:%s", oldAdminData.Id, err)
|
...
|
...
|
@@ -168,7 +168,7 @@ func UpdateCompanyData(data ModuleCompanytData) error { |
|
|
return errors.New("获取新的主管理员")
|
|
|
}
|
|
|
newAdminData.AdminType = models.USERCOMPANY_ADMIN_MAIN
|
|
|
err = models.UpdateUserCompanyById(newAdminData, []string{"ChargeStatus"}, o)
|
|
|
err = models.UpdateUserCompanyById(newAdminData, []string{"AdminType"}, o)
|
|
|
if err != nil {
|
|
|
o.Rollback()
|
|
|
log.Error("变更更主管理员失败:user_company_id=%d,err:%s", newAdminData.Id, err)
|
...
|
...
|
|