|
@@ -692,6 +692,14 @@ public class OrgController extends ControllerSupport {
|
|
@PostMapping("importLogo/{orgId}")
|
|
@PostMapping("importLogo/{orgId}")
|
|
public void importLogo(@PathVariable Long orgId, HttpServletRequest request,
|
|
public void importLogo(@PathVariable Long orgId, HttpServletRequest request,
|
|
@RequestParam CommonsMultipartFile file) throws IOException {
|
|
@RequestParam CommonsMultipartFile file) throws IOException {
|
|
|
|
+
|
|
|
|
+ OrgEntity orgEntity = orgRepo.findOne(orgId);
|
|
|
|
+ if (null == orgEntity) {
|
|
|
|
+ throw new StatusException("B-140002", "orgEntity is null");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ validateRootOrgIsolation(orgEntity.getRootId());
|
|
|
|
+
|
|
String schoolLogoPath = PropertiesUtil.getString(PropKeys.SCHOOL_LOGO_PATH);
|
|
String schoolLogoPath = PropertiesUtil.getString(PropKeys.SCHOOL_LOGO_PATH);
|
|
if (StringUtils.isBlank(schoolLogoPath)) {
|
|
if (StringUtils.isBlank(schoolLogoPath)) {
|
|
FileUtils.forceMkdir(new File(schoolLogoPath));
|
|
FileUtils.forceMkdir(new File(schoolLogoPath));
|