|
|
@@ -2,14 +2,17 @@ package com.goafanti.customer.service.impl;
|
|
|
|
|
|
import com.goafanti.common.dao.*;
|
|
|
import com.goafanti.common.model.*;
|
|
|
+import com.goafanti.common.utils.excel.NewExcelUtil;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.customer.bo.InputSelectUserArchives;
|
|
|
+import com.goafanti.customer.bo.OutSelectUserArchives;
|
|
|
import com.goafanti.customer.bo.UserArchivesDetails;
|
|
|
import com.goafanti.customer.service.CustomerService;
|
|
|
import com.goafanti.customer.service.UserArchivesService;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -38,6 +41,11 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
private AdminMapper adminMapper;
|
|
|
@Resource
|
|
|
private UserDataLogMapper userDataLogMapper;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @Value(value = "${upload.path}")
|
|
|
+ private final String uploadPath = null;
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -236,6 +244,14 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
|
|
|
@Override
|
|
|
public Object selectUserArchives(InputSelectUserArchives in) {
|
|
|
+ Map<String, Object> params = getParams(in);
|
|
|
+ Pagination<OutSelectUserArchives> page = (Pagination<OutSelectUserArchives>) findPage("selectUserArchivesList",
|
|
|
+ "selectUserArchivesCount", params, in.getPageNo(), in.getPageSize());
|
|
|
+
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ private Map<String, Object> getParams(InputSelectUserArchives in) {
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
if (in.getNewChannel() != null)params.put("newChannel", in.getNewChannel());
|
|
|
if (in.getShareType() != null)params.put("shareType", in.getShareType());
|
|
|
@@ -250,7 +266,17 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
String[] split = in.getIndustry().split(",");
|
|
|
params.put("industry", split);
|
|
|
}
|
|
|
- return findPage("selectUserArchivesList",
|
|
|
- "selectUserArchivesCount", params, in.getPageNo(), in.getPageSize());
|
|
|
+ return params;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Object selectUserArchivesExport(InputSelectUserArchives in) {
|
|
|
+ Map<String, Object> params = getParams(in);
|
|
|
+ List<OutSelectUserArchives> list= (List<OutSelectUserArchives>) findList("selectUserArchivesList",
|
|
|
+ params, 1, 999999);
|
|
|
+ NewExcelUtil<OutSelectUserArchives> newExcelUtil = new NewExcelUtil<>(OutSelectUserArchives.class);
|
|
|
+ return newExcelUtil.exportExcel( list,"用户档案",uploadPath);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|