|
@@ -12,7 +12,6 @@ import com.keao.edu.user.dto.TenantInfoDto;
|
|
import com.keao.edu.user.entity.TenantInfo;
|
|
import com.keao.edu.user.entity.TenantInfo;
|
|
import com.keao.edu.user.service.TenantInfoService;
|
|
import com.keao.edu.user.service.TenantInfoService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -57,10 +56,14 @@ public class TenantInfoController extends BaseController {
|
|
@ApiOperation("更新机构")
|
|
@ApiOperation("更新机构")
|
|
@PostMapping(value = "/update")
|
|
@PostMapping(value = "/update")
|
|
public HttpResponseResult update(@RequestBody TenantInfoDto tenantInfo) {
|
|
public HttpResponseResult update(@RequestBody TenantInfoDto tenantInfo) {
|
|
- String tenantId = TenantContextHolder.getTenantId();
|
|
|
|
- if(StringUtils.isNotEmpty(tenantId)){
|
|
|
|
- tenantInfo.setId(Integer.parseInt(tenantId));
|
|
|
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
+ if(!sysUser.getIsSuperAdmin()){
|
|
|
|
+ String tenantId = TenantContextHolder.getTenantId();
|
|
|
|
+ if(StringUtils.isNotEmpty(tenantId)){
|
|
|
|
+ tenantInfo.setId(Integer.parseInt(tenantId));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
tenantInfo.setUpdateTime(new Date());
|
|
tenantInfo.setUpdateTime(new Date());
|
|
tenantInfoService.updateTenant(tenantInfo);
|
|
tenantInfoService.updateTenant(tenantInfo);
|
|
return succeed();
|
|
return succeed();
|