|
|
|
|
@ -2,9 +2,11 @@ package com.flossom.system.controller;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
import com.flossom.common.core.domain.entity.SiteInfo;
|
|
|
|
|
import com.flossom.common.core.utils.StringUtils;
|
|
|
|
|
import com.flossom.common.core.utils.poi.ExcelUtil;
|
|
|
|
|
import com.flossom.common.core.web.controller.BaseController;
|
|
|
|
|
import com.flossom.common.core.web.domain.AjaxResult;
|
|
|
|
|
@ -12,7 +14,9 @@ import com.flossom.common.core.web.page.TableDataInfo;
|
|
|
|
|
import com.flossom.common.log.annotation.Log;
|
|
|
|
|
import com.flossom.common.log.enums.BusinessType;
|
|
|
|
|
import com.flossom.common.security.annotation.RequiresPermissions;
|
|
|
|
|
import org.apache.commons.compress.utils.Lists;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
|
@ -45,6 +49,27 @@ public class SiteInfoController extends BaseController
|
|
|
|
|
{
|
|
|
|
|
startPage();
|
|
|
|
|
List<SiteInfo> list = siteInfoService.selectSiteInfoList(siteInfo);
|
|
|
|
|
for(SiteInfo site : list) {
|
|
|
|
|
if (StringUtils.isNotEmpty(site.getPushTimer())) {
|
|
|
|
|
List<String> timeList = Lists.newArrayList();
|
|
|
|
|
String[] pushTimer = site.getPushTimer().split(",");
|
|
|
|
|
if(pushTimer.length > 0) {
|
|
|
|
|
for (int i=0;i< pushTimer.length;i++) {
|
|
|
|
|
String time = pushTimer[i];
|
|
|
|
|
if ("1".equals(time)) {
|
|
|
|
|
timeList.add("日");
|
|
|
|
|
} else {
|
|
|
|
|
int tureDate = Integer.valueOf(time) - 1 ;
|
|
|
|
|
timeList.add(String.valueOf(tureDate));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!CollectionUtils.isEmpty(timeList)) {
|
|
|
|
|
String collect = timeList.stream().map(String::valueOf).collect(Collectors.joining(","));
|
|
|
|
|
site.setPushTimer(collect);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return getDataTable(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|