|
|
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/api/admin/organization")
|
|
|
@@ -104,7 +105,7 @@ public class AdminOrganizationController extends BaseApiController{
|
|
|
ParamUtils.getParamName(in,bindingResult.getFieldError().getField())));
|
|
|
return res;
|
|
|
}
|
|
|
- if (in.getId() ==in.getSuperId()){
|
|
|
+ if (Objects.equals(in.getId(), in.getSuperId())){
|
|
|
res.getError().add(buildError("不能设置自己为上级"));
|
|
|
return res;
|
|
|
}
|