Commit 5af57a7b by 陶光胜

Merge branch 'developer' into 'master'

Developer

See merge request !27
parents d9182131 d8ce25f6
...@@ -192,7 +192,6 @@ public interface TabSysMenuMapper { ...@@ -192,7 +192,6 @@ public interface TabSysMenuMapper {
* @return java.util.List<com.gic.auth.entity.TabSysMenu> * @return java.util.List<com.gic.auth.entity.TabSysMenu>
* @throws * @throws
*/ */
@Deprecated
List<TabSysMenu> selectByProjectList(@Param("projectList") List<String> projectList); List<TabSysMenu> selectByProjectList(@Param("projectList") List<String> projectList);
/** /**
......
...@@ -694,7 +694,7 @@ public class MenuApiServiceImpl implements MenuApiService { ...@@ -694,7 +694,7 @@ public class MenuApiServiceImpl implements MenuApiService {
@Override @Override
public ServiceResponse<Map<String, String>> getGicDefaultVersion() { public ServiceResponse<Map<String, String>> getGicDefaultVersion() {
Map<String, String> map = new HashMap<>(16); Map<String, String> map = new HashMap<>(16);
ServiceResponse<List<ServePropDTO>> versionListResult = serveApiService.listServePropByGICDefaultAPP(); ServiceResponse<List<ServePropDTO>> versionListResult = serveApiService.listServePropByGICDefaultApp();
if (versionListResult.isSuccess()) { if (versionListResult.isSuccess()) {
List<ServePropDTO> versionList = versionListResult.getResult(); List<ServePropDTO> versionList = versionListResult.getResult();
if (CollectionUtils.isNotEmpty(versionList)) { if (CollectionUtils.isNotEmpty(versionList)) {
......
...@@ -384,9 +384,9 @@ public class ResourceApiServiceImpl implements ResourceApiService { ...@@ -384,9 +384,9 @@ public class ResourceApiServiceImpl implements ResourceApiService {
if (CollectionUtils.isNotEmpty(result)) { if (CollectionUtils.isNotEmpty(result)) {
defaultResource.setStoreIdList(result); defaultResource.setStoreIdList(result);
} }
List<Integer> result2 = storeWidgetApiService.listStoreInfoIdByStoreWidgetId(user.getEnterpriseId(), orderResourceContentDTO.getStoreWidgetId()).getResult(); List<Integer> resultTemp = storeWidgetApiService.listStoreInfoIdByStoreWidgetId(user.getEnterpriseId(), orderResourceContentDTO.getStoreWidgetId()).getResult();
if (CollectionUtils.isNotEmpty(result2)) { if (CollectionUtils.isNotEmpty(resultTemp)) {
defaultResource.setStoreInfoIdList(result2); defaultResource.setStoreInfoIdList(resultTemp);
} }
} else if (OrderResourceChannelEnum.DAMO_MALL.getCode().equals(orderResourceContentDTO.getChannel())) { } else if (OrderResourceChannelEnum.DAMO_MALL.getCode().equals(orderResourceContentDTO.getChannel())) {
defaultResource.setShopIdList(orderResourceContentDTO.getStoreContent()); defaultResource.setShopIdList(orderResourceContentDTO.getStoreContent());
......
...@@ -12,7 +12,6 @@ import com.gic.auth.qo.MenuListQO; ...@@ -12,7 +12,6 @@ import com.gic.auth.qo.MenuListQO;
import com.gic.auth.service.CollaboratorApiService; import com.gic.auth.service.CollaboratorApiService;
import com.gic.auth.service.MenuApiService; import com.gic.auth.service.MenuApiService;
import com.gic.auth.web.vo.CollaboratorDetailVO; import com.gic.auth.web.vo.CollaboratorDetailVO;
import com.gic.auth.web.vo.TestObj;
import com.gic.commons.util.DateUtil; import com.gic.commons.util.DateUtil;
import com.gic.commons.webapi.reponse.RestResponse; import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.download.utils.*; import com.gic.download.utils.*;
...@@ -85,51 +84,7 @@ public class CollaboratorController extends DownloadUtils{ ...@@ -85,51 +84,7 @@ public class CollaboratorController extends DownloadUtils{
Integer reportId = DataDownloadUtils.createDownloadReport(report); Integer reportId = DataDownloadUtils.createDownloadReport(report);
//临时路径 //临时路径
String path = request.getSession().getServletContext().getRealPath("/excel/csv/collaborator/file/"); String path = request.getSession().getServletContext().getRealPath("/excel/csv/collaborator/file/");
//异步生成文件并上传到腾讯云
ExecutorPoolSingleton.getInstance().executeTask(new Runnable() {
@Override
public void run() {
List<Map<String, Object>> dataList = new ArrayList<>();
Map<String, Object> map1 = new HashMap<>(8);
map1.put("test1", "test1");
map1.put("2", new TestObj("域名2门店1-1", "域名2门店2-1"));
map1.put("3", new TestObj("域名3门店1-1", "域名3门店2-1"));
dataList.add(map1);
Map<String, Object> map2 = new HashMap<>(8);
map2.put("test1", "test2");
map2.put("2", new TestObj("域名2门店1-2", "域名2门店2-2"));
map2.put("3", new TestObj("域名3门店1-2", "域名3门店2-2"));
dataList.add(map2);
DownloadDataLoader<Map<String, Object>> loader = new DownloadDataLoader<Map<String, Object>>() {
@Override
protected List<Map<String, Object>> getDownloadData(Integer pageNum) throws Exception {
params.setCurrentPage(pageNum);
if (PAGE_NUM_TEST.equals(pageNum)) {
//第二页结束test
return null;
}
return dataList;
}
};
LinkedHashMap<String, List<String>> headerList = new LinkedHashMap<>();
headerList.put("测试1", null);
headerList.put("域名2", Arrays.asList("门店1", "门店2"));
headerList.put("域名3", Arrays.asList("门店1", "门店2"));
LinkedHashMap<String, List<String>> propertyNameList = new LinkedHashMap<>();
propertyNameList.put("test1", null);
propertyNameList.put("2", Arrays.asList("store1", "store2"));
propertyNameList.put("3", Arrays.asList("store1", "store2"));
Map<String, List<String>> needEncryptField = new HashMap<>(16);
needEncryptField.put("test1", null);
needEncryptField.put("2", Arrays.asList("store1"));
needEncryptField.put("3", Arrays.asList("store2"));
try {
downloadForDoubleHeaderTitle(path, reportId, fileName, excelExtensionCode, headerList, propertyNameList, loader, needEncryptField, null);
} catch (Exception e) {
LOGGER.warn(e);
}
}
});
return RestResponse.success(reportId); return RestResponse.success(reportId);
} }
......
...@@ -298,7 +298,26 @@ public class MenuController { ...@@ -298,7 +298,26 @@ public class MenuController {
ServiceResponse<Page<SystemSetLogDTO>> response = logApiService.listSystemSetLog(pageQO.getPageSize(), ServiceResponse<Page<SystemSetLogDTO>> response = logApiService.listSystemSetLog(pageQO.getPageSize(),
pageQO.getCurrentPage(), searchParam); pageQO.getCurrentPage(), searchParam);
return ResultControllerUtils.commonPageResult(response, LogListVO.class); if (response.isSuccess()) {
Page page = (Page) response.getResult();
if (page == null) {
return RestResponse.success();
}
List<SystemSetLogDTO> responseList = page.getResult();
if (CollectionUtils.isNotEmpty(responseList)) {
List<LogListVO> resultList = responseList.stream().map(e -> {
LogListVO temp = EntityUtil.changeEntityNew(LogListVO.class, e);
temp.setNationCodeFrom(e.getRemark1());
temp.setPhoneFrom(e.getRemark2());
return temp;
}).collect(Collectors.toList());
page.setResult(resultList);
return RestResponse.success(page);
}
return RestResponse.success();
} else {
return RestResponse.failure(response.getCode(), response.getMessage());
}
} }
public static List<Map<String, Object>> changePageListToTree(int storeGroupId, List<MenuDTO> list) { public static List<Map<String, Object>> changePageListToTree(int storeGroupId, List<MenuDTO> list) {
......
...@@ -56,9 +56,9 @@ public class ExcelUtils { ...@@ -56,9 +56,9 @@ public class ExcelUtils {
for (int j = 0; j < everyLines.get(i).size(); j++) { for (int j = 0; j < everyLines.get(i).size(); j++) {
sheet.setColumnWidth(j, COLUMN_HEIGHT); sheet.setColumnWidth(j, COLUMN_HEIGHT);
//将内容按顺序赋给对应的列对象 //将内容按顺序赋给对应的列对象
XSSFCell cell1 = row.createCell(j); XSSFCell cellTemp = row.createCell(j);
cell1.setCellValue(everyLines.get(i).get(j)); cellTemp.setCellValue(everyLines.get(i).get(j));
cell1.setCellStyle(style); cellTemp.setCellStyle(style);
} }
} }
return wb; return wb;
...@@ -153,16 +153,16 @@ public class ExcelUtils { ...@@ -153,16 +153,16 @@ public class ExcelUtils {
Boolean isDate = dateTypeMap.get(colix); Boolean isDate = dateTypeMap.get(colix);
if (isDate != null && isDate) { if (isDate != null && isDate) {
if (xssfCell.getCellType() == Cell.CELL_TYPE_NUMERIC) { if (xssfCell.getCellTypeEnum() == CellType.NUMERIC) {
Date date = xssfCell.getDateCellValue(); Date date = xssfCell.getDateCellValue();
map.put(colix, format.format(date)); map.put(colix, format.format(date));
} else { } else {
xssfCell.setCellType(Cell.CELL_TYPE_STRING); xssfCell.setCellType(CellType.STRING);
map.put(colix, xssfCell.getStringCellValue()); map.put(colix, xssfCell.getStringCellValue());
} }
} else { } else {
if (xssfCell.getCellType() != Cell.CELL_TYPE_STRING) { if (xssfCell.getCellTypeEnum() != CellType.STRING) {
xssfCell.setCellType(Cell.CELL_TYPE_STRING); xssfCell.setCellType(CellType.STRING);
} }
map.put(colix, xssfCell.getStringCellValue()); map.put(colix, xssfCell.getStringCellValue());
} }
......
...@@ -40,8 +40,8 @@ public class LogListVO implements Serializable{ ...@@ -40,8 +40,8 @@ public class LogListVO implements Serializable{
private Long relationId; private Long relationId;
private String businessName; private String businessName;
private String remark1; private String nationCodeFrom;
private String remark2; private String phoneFrom;
public Long getLogId() { public Long getLogId() {
return logId; return logId;
...@@ -71,11 +71,11 @@ public class LogListVO implements Serializable{ ...@@ -71,11 +71,11 @@ public class LogListVO implements Serializable{
} }
public String getNationCode() { public String getNationCode() {
return remark1; return nationCodeFrom;
} }
public String getPhone() { public String getPhone() {
return remark2; return phoneFrom;
} }
public String getProject() { public String getProject() {
...@@ -132,21 +132,21 @@ public class LogListVO implements Serializable{ ...@@ -132,21 +132,21 @@ public class LogListVO implements Serializable{
return this; return this;
} }
public String getRemark1() { public String getNationCodeFrom() {
return remark1; return nationCodeFrom;
} }
public LogListVO setRemark1(String remark1) { public LogListVO setNationCodeFrom(String nationCodeFrom) {
this.remark1 = remark1; this.nationCodeFrom = nationCodeFrom;
return this; return this;
} }
public String getRemark2() { public String getPhoneFrom() {
return remark2; return phoneFrom;
} }
public LogListVO setRemark2(String remark2) { public LogListVO setPhoneFrom(String phoneFrom) {
this.remark2 = remark2; this.phoneFrom = phoneFrom;
return this; return this;
} }
...@@ -164,8 +164,8 @@ public class LogListVO implements Serializable{ ...@@ -164,8 +164,8 @@ public class LogListVO implements Serializable{
", createTime=" + createTime + ", createTime=" + createTime +
", relationId=" + relationId + ", relationId=" + relationId +
", businessName='" + businessName + '\'' + ", businessName='" + businessName + '\'' +
", remark1='" + remark1 + '\'' + ", nationCodeFrom='" + nationCodeFrom + '\'' +
", remark2='" + remark2 + '\'' + ", phoneFrom='" + phoneFrom + '\'' +
'}'; '}';
} }
} }
package com.gic.auth.web.vo;
import java.io.Serializable;
/**
*
* @ClassName: TestObj
* @Description:
* @author zhiwj
* @date 2020-09-10 10:03
*/
public class TestObj implements Serializable{
private static final long serialVersionUID = -4882149987195822359L;
private String store1;
private String store2;
public TestObj() {
}
public TestObj(String store1, String store2) {
this.store1 = store1;
this.store2 = store2;
}
public String getStore1() {
return store1;
}
public TestObj setStore1(String store1) {
this.store1 = store1;
return this;
}
public String getStore2() {
return store2;
}
public TestObj setStore2(String store2) {
this.store2 = store2;
return this;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment