String username, @RequestParam("password")
String password, @RequestParam("ftpPath")
String ftpPath, @RequestParam("ftpRefresh")
int ftpRefreshRate, @RequestParam("enable")
boolean enable) {
FtpSetting ftpSetting = new FtpSetting();
ftpSetting.setFtpIp(ftpIp);
ftpSetting.setFtpPort(ftpPort);
ftpSetting.setUsername(username);
ftpSetting.setPassword(password);
ftpSetting.setFtpPath(ftpPath);
ftpSetting.setFtpPushRate(ftpRefreshRate);
ftpSetting.setEnable(enable);
if (ftpService.isFtpAvailable(ftpSetting)) {
ftpService.setFtpSetting(ftpSetting);
} else {
errorMav.setErrorInfo("FTP不可用,请确认FTP的IP,账号密码正确");
return errorMav;