소스 검색

调整用户导出模板

luojun 2 년 전
부모
커밋
bb0c7ddcba
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysUserController.java

+ 10 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysUserController.java

@@ -524,6 +524,16 @@ public class SysUserController extends BaseController {
             throw new RuntimeException("导出数据为空!");
         }
         list = list.stream().filter(e -> "Y".equals(e.getIsManager())).collect(Collectors.toList());
+
+        AtomicInteger xh= new AtomicInteger();
+        xh.getAndIncrement();
+        list.forEach(e->{
+            if (e.getIsManager()==null) {
+                e.setIsManager("N");
+            }
+            e.setXh(String.valueOf(xh.getAndIncrement()));
+        });
+
         if (list.size() > 10000) {
             throw new RuntimeException("导出数据量过大(单次导出限量10000条数据),请填写条件分批导出");
         }