|
|
|
@ -6,6 +6,8 @@ import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.base.user.ManagedUser;
|
|
|
|
@ -25,7 +27,7 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(name="배치실행",value="/superUser/executeBatch.do")
|
|
|
|
|
@RequestMapping(name="배치 수동 실행",value="/superUser/executeBatch.do")
|
|
|
|
|
public ModelAndView executeBatch(String batch) {
|
|
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
|
|
|
|
@ -54,7 +56,7 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(name="파일 현황 조회",value="/superUser/getFileTree.do")
|
|
|
|
|
@RequestMapping(name="서버 파일 현황 조회",value="/superUser/getFileTree.do")
|
|
|
|
|
public ModelAndView getFileTree() throws Exception {
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
@ -63,4 +65,38 @@ public class UserController extends cokr.xit.base.user.web.UserController<Manage
|
|
|
|
|
mav.addObject("tree", tree);
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(name="최고관리자 서버 폴더 생성", value="/superUser/createDirectory.do")
|
|
|
|
|
public ModelAndView createDirectory(@RequestParam(value="directories[]") String... directories) throws Exception {
|
|
|
|
|
|
|
|
|
|
boolean saved = false;
|
|
|
|
|
|
|
|
|
|
String path = String.join(File.separator, directories);
|
|
|
|
|
File newDir = new File(path);
|
|
|
|
|
saved = newDir.mkdir();
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
mav.setViewName("jsonView");
|
|
|
|
|
mav.addObject("saved", saved);
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping(name="최고관리자 서버 파일 추가", value="/superUser/importFile.do")
|
|
|
|
|
public ModelAndView importFile(MultipartFile newFile, @RequestParam(value="directories[]") String... directories) throws Exception {
|
|
|
|
|
|
|
|
|
|
boolean saved = false;
|
|
|
|
|
|
|
|
|
|
String path = String.join(File.separator, directories);
|
|
|
|
|
path = path + File.separator + newFile.getOriginalFilename();
|
|
|
|
|
|
|
|
|
|
File file = new File(path);
|
|
|
|
|
newFile.transferTo(file);
|
|
|
|
|
|
|
|
|
|
saved = file.exists();
|
|
|
|
|
|
|
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
mav.setViewName("jsonView");
|
|
|
|
|
mav.addObject("saved", saved);
|
|
|
|
|
return mav;
|
|
|
|
|
}
|
|
|
|
|
}
|