puzhibing
2024-02-22 76dd910d1c4ea422700b155c6d38d46ce4e20888
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
package com.stylefeng.guns.modular.system.controller.general;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.base.tips.ErrorTip;
import com.stylefeng.guns.core.common.constant.factory.PageFactory;
import com.stylefeng.guns.core.shiro.ShiroKit;
import com.stylefeng.guns.core.util.*;
import com.stylefeng.guns.modular.system.model.TCompany;
import com.stylefeng.guns.modular.system.model.TPubTransactionDetails;
import com.stylefeng.guns.modular.system.model.TUser;
import com.stylefeng.guns.modular.system.service.ITCompanyService;
import com.stylefeng.guns.modular.system.service.ITPubTransactionDetailsService;
import com.stylefeng.guns.modular.system.service.ITUserService;
import com.stylefeng.guns.modular.system.util.HttpRequestUtil;
import com.stylefeng.guns.modular.system.util.PushURL;
import com.stylefeng.guns.modular.system.util.RedisUtil;
import org.apache.commons.lang.time.DateUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
 
/**
 * 用户管理控制器
 *
 * @author fengshuonan
 * @Date 2020-06-01 15:47:58
 */
@Controller
@RequestMapping("/tUser")
public class TUserController extends BaseController {
 
    private String PREFIX = "/system/tUser/";
 
    @Autowired
    private ITUserService tUserService;
 
    @Autowired
    private ITPubTransactionDetailsService pubTransactionDetailsService;
 
    /**
     * 跳转到用户管理首页
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "tUser.html";
    }
 
    /**
     * 跳转到修改用户管理
     */
    @RequestMapping("/tUser_userDetail/{tUserId}")
    public String tUser_userDetail(@PathVariable Integer tUserId, Model model) {
        Map<String,Object> tUser = tUserService.getUserDetailById(tUserId);
        model.addAttribute("item",tUser);
        return PREFIX + "tUser_userDetail.html";
    }
 
    /**
     * 跳转到修改用户余额页面
     */
    @RequestMapping("/tUser_updateBalance/{tUserId}")
    public String tUser_updateBalance(@PathVariable Integer tUserId, Model model) {
        model.addAttribute("tUserId",tUserId);
        return PREFIX + "tUser_updateBalance.html";
    }
 
    /**
     * 跳转到修改用户密码页面
     */
    @RequestMapping("/tUser_updatePassword/{tUserId}")
    public String tUser_updatePassword(@PathVariable Integer tUserId, Model model) {
        model.addAttribute("tUserId",tUserId);
        return PREFIX + "tUser_updatePassword.html";
    }
 
    /**
     * 跳转到邀请信息页面
     * @author yxh
     * @date 2021/3/25 15:11
     * @param tUserId
     * @param model
     */
    @RequestMapping("/inviteInfo/{tUserId}")
    public String inviteInfo(@PathVariable Integer tUserId,Model model){
        model.addAttribute("tUserId",tUserId);
        return PREFIX+"tUser_inviteInfo.html";
    }
 
    /**
     * 用户邀请信息列表
     * @author yxh
     * @date 2021/3/25 15:31
     * @param tUserId
     * @return java.lang.Object
     */
    @RequestMapping(value = "/InviteInfoList")
    @ResponseBody
    public Object inviteInfolist(Integer tUserId,String time) {
        String start = null;
        String end = null;
        if(ToolUtil.isNotEmpty(time)){
            start = time.split(" - ")[0];
            end = time.split(" - ")[1];
        }
        Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
        page.setRecords(tUserService.getUserInviteList(page,tUserId,start, end));
        return super.packForBT(page);
    }
 
    /**
     * 跳转到修改用户状态页面
     */
    @RequestMapping("/tUser_optUser/{tUserId}/{optType}")
    public String tUser_optUser(@PathVariable Integer tUserId,@PathVariable Integer optType, Model model) {
        model.addAttribute("tUserId",tUserId);
        model.addAttribute("optType",optType);
        return PREFIX + "tUser_optUser.html";
    }
 
    /**
     * 获取用户管理列表
     */
    @RequestMapping(value = "/list")
    @ResponseBody
    public Object list(String insertTime,
                       String id,
                       String nickName,
                       String phone,
                       Integer isAuth,
                       Integer state,String companyName) {
        String beginTime = null;
        String endTime = null;
        if (SinataUtil.isNotEmpty(insertTime)){
            String[] timeArray = insertTime.split(" - ");
            beginTime = timeArray[0];
            endTime = timeArray[1];
        }
        Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage();
        page.setRecords(tUserService.getUserList(page,beginTime,endTime,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),isAuth,state,id,nickName,phone,companyName));
        return super.packForBT(page);
    }
 
    /**
     * 修改余额操作
     */
    @RequestMapping(value = "/updateBalance")
    @ResponseBody
    public Object updateBalance(@RequestParam Integer tUserId,
                                @RequestParam Integer updateType,
                                @RequestParam BigDecimal money) {
        TUser tUser = tUserService.selectById(tUserId);
        if (SinataUtil.isNotEmpty(tUser)){
            if (1 == updateType.intValue()){  //增加
                tUser.setBalance(tUser.getBalance().add(money));
            }else if (2 == updateType.intValue()){  //减少
                if((tUser.getBalance().subtract(money)).compareTo(new BigDecimal(0)) == -1){
                    tUser.setBalance(new BigDecimal(0));
                }else{
                    tUser.setBalance(tUser.getBalance().subtract(money));
                }
            }
            tUser.setUpdateTime(new Date());
            tUser.setUpdateUser(ShiroKit.getUser().getId());
            tUserService.updateById(tUser);
            //插入交易明细记录
            TPubTransactionDetails pubTransactionDetails=new TPubTransactionDetails();
            pubTransactionDetails.setInsertTime(new Date());
            pubTransactionDetails.setUserId(tUserId);
            pubTransactionDetails.setRemark("修改用户余额插入");
            pubTransactionDetails.setMoney(money);
            pubTransactionDetails.setState(updateType.intValue());
            pubTransactionDetails.setType(1);//金额
            pubTransactionDetails.setUserType(1);//用户
            pubTransactionDetails.setOrderType(5);
            pubTransactionDetailsService.insert(pubTransactionDetails);
        }
        return SUCCESS_TIP;
    }
 
    /**
     * 修改密码操作
     */
    @RequestMapping(value = "/updatePassword")
    @ResponseBody
    public Object updatePassword(@RequestParam Integer tUserId,
                                @RequestParam String password) {
        TUser tUser = tUserService.selectById(tUserId);
        if (SinataUtil.isNotEmpty(tUser)){
//            tUser.setPassWord(MD5Util.encrypt(password));
            tUser.setPassWord(ShiroKit.md5(password, "&a.s"));
            tUser.setUpdateTime(new Date());
            tUser.setUpdateUser(ShiroKit.getUser().getId());
            tUserService.updateById(tUser);
        }
        return SUCCESS_TIP;
    }
 
    @Autowired
    private RedisUtil redisUtil;
    /**
     * 操作用户
     */
    @RequestMapping(value = "/optUser")
    @ResponseBody
    public Object optUser(@RequestParam Integer tUserId,@RequestParam Integer optType,@RequestParam String remark) {
        TUser tUser = tUserService.selectById(tUserId);
        if (SinataUtil.isNotEmpty(tUser)){
            if (1 == optType.intValue()){   //冻结
                tUser.setState(2);
                tUser.setRemark(remark);
                String key = redisUtil.getValue("USER_" + tUser.getPhone());
                redisUtil.remove(key);//删除个人信息数据
                redisUtil.remove("USER_" + tUser.getPhone());//删除后台冻结相关缓存
                redisUtil.remove("USER_" + tUserId);//清除存储的token
                //增加推送
                Map<String,String> map = new HashMap<>();
                map.put("uid", tUser.getId().toString());
                String result = HttpRequestUtil.postRequest(PushURL.freeze_user_url, map);
                System.out.println("冻结用户:【userId="+tUser.getId().toString()+"】,调用接口:"+result);
 
            }else if (2 == optType.intValue()){  //解冻
                tUser.setState(1);
                tUser.setRemark(remark);
            }
            tUser.setUpdateTime(new Date());
            tUser.setUpdateUser(ShiroKit.getUser().getId());
            tUserService.updateById(tUser);
        }
        return SUCCESS_TIP;
    }
 
    /**
     * 下载模板
     * @param request
     * @param response
     */
    @RequestMapping(value = "/uploadUserModel")
    public void uploadUserModel(HttpServletRequest request, HttpServletResponse response) {
        // 表格数据【封装】
        List<List<String>> dataList = new ArrayList<List<String>>();
 
        // 首行【封装】
        List<String> shellList = new ArrayList<String>();
        shellList.add("昵称");
        shellList.add("手机号");
        shellList.add("生日[例如:1995-09-09]");
        shellList.add("性别[男/女]");
        shellList.add("紧急联系人[选填]");
        shellList.add("紧急联系电话[选填]");
        shellList.add("是否实名认证[是/否]");
        shellList.add("真实姓名");
        shellList.add("身份证号");
        shellList.add("余额");
        shellList.add("密码[6-18个长度]");
        dataList.add(shellList);
 
        try {
            // 调用工具类进行导出
            ExcelExportUtil.easySheet("平台导入用户模板"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "平台导入用户模板", dataList, request, response);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
 
    /**
     * 导入操作
     * @param request
     * @return
     */
    @RequestMapping(value="/exportUser",method = RequestMethod.POST)
    @ResponseBody
    public Object exportUser(HttpServletRequest request){
        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
        MultipartFile file = (MultipartFile) multipartRequest.getFile("myfile");
        try {
            //定时五秒后执行
            /*Map<String,Object> maps=new HashMap<>();
            Workbook book = WoUtil.ImportFile(file);
            maps.put("book",book);
            QuartzManager.addJob(AddContract.class, (AddContract.name+new Date().getTime()).toUpperCase(), TimeJobType.ADMIN,DateUtil.getDate_strYMdHms(new Date().getTime() + 1*1000) , maps);*/
 
            Workbook book = WoUtil.ImportFile(file);
            Sheet sh = book.getSheetAt(0);   //获取到第一个表
            for (int i = 1; i <= sh.getLastRowNum(); i++) {
                Row row = sh.getRow(i);
 
                Cell cell0 = row.getCell(0);  //昵称
                String nickName = null;
                if (SinataUtil.isNotEmpty(cell0)){
                    nickName = String.valueOf(cell0.getStringCellValue()).trim();
                }
 
                Cell cell1 = row.getCell(1);  //手机号
                String phone = null;
                if (SinataUtil.isNotEmpty(cell1)){
                    phone = String.valueOf(cell1.getStringCellValue()).trim();
                }
 
                Cell cell2 = row.getCell(2);  //生日[例如:1995-09-09]
                String birthday = null;
                if (SinataUtil.isNotEmpty(cell2)){
                    birthday = String.valueOf(cell2.getStringCellValue()).trim();
                }
 
                Cell cell3 = row.getCell(3);  //性别[男/女]
                String sex = null;
                if (SinataUtil.isNotEmpty(cell3)){
                    sex = String.valueOf(cell3.getStringCellValue()).trim();
                }
 
                Cell cell4 = row.getCell(4);  //紧急联系人[选填]
                String emergencyContact = null;
                if (SinataUtil.isNotEmpty(cell4)){
                    emergencyContact = String.valueOf(cell4.getStringCellValue()).trim();
                }
 
                Cell cell5 = row.getCell(5);  //紧急联系电话[选填]
                String emergencyContactNumber = null;
                if (SinataUtil.isNotEmpty(cell5)){
                    emergencyContactNumber = String.valueOf(cell5.getStringCellValue()).trim();
                }
 
                Cell cell6 = row.getCell(6);  //是否实名认证[是/否]
                String isAuth = null;
                if (SinataUtil.isNotEmpty(cell6)){
                    isAuth = String.valueOf(cell6.getStringCellValue()).trim();
                }
 
                Cell cell7 = row.getCell(7);  //真实姓名
                String name = null;
                if (SinataUtil.isNotEmpty(cell7)){
                    name = String.valueOf(cell7.getStringCellValue()).trim();
                }
 
                Cell cell8 = row.getCell(8);  //身份证号
                String idCard = null;
                if (SinataUtil.isNotEmpty(cell8)){
                    idCard = String.valueOf(cell8.getStringCellValue()).trim();
                }
 
                Cell cell9 = row.getCell(9);  //余额
                String balance = null;
                if (SinataUtil.isNotEmpty(cell9)){
                    balance = String.valueOf(cell9.getStringCellValue()).trim();
                }
 
                Cell cell10 = row.getCell(10);  //密码
                String passWord = null;
                if (SinataUtil.isNotEmpty(cell10)){
                    passWord = String.valueOf(cell10.getStringCellValue()).trim();
                }
 
                if (SinataUtil.isEmpty(nickName) || SinataUtil.isEmpty(phone) || SinataUtil.isEmpty(birthday)
                        || SinataUtil.isEmpty(sex) || SinataUtil.isEmpty(isAuth) || SinataUtil.isEmpty(balance)
                        || SinataUtil.isEmpty(passWord) ){
                    return new ErrorTip(500, "单元格不能为空");
                }else{
                    int count = tUserService.selectCount(new EntityWrapper<TUser>().eq("phone", phone).notIn("flag", 3));
                    if (count > 0){
                        return new ErrorTip(500, "手机号已存在,请重新填写");
                    }
                    //判断性别
                    if (!sex.equals("男") && !sex.equals("女")){
                        return new ErrorTip(500, "性别内容不正确");
                    }
                    //判断是否实名认证
                    if (!isAuth.equals("是") && !isAuth.equals("否")){
                        return new ErrorTip(500, "是否实名认证内容不正确");
                    }
                    if ("是".equals(isAuth)){
                        //判断紧急联系电话
                        if (SinataUtil.isNotEmpty(emergencyContactNumber)){
                            if (!isPhone(emergencyContactNumber)){
                                return new ErrorTip(500, "紧急联系电话格式不正确");
                            }
                        }
                    }
                    //判断生日格式
                    try {
                        if (!isValidDate(birthday)) {
                            birthday = importByExcelForDate(birthday);
                        }
                    }catch (Exception e){
                        return new ErrorTip(500, "年检到期时间格式不正确");
                    }
                    //判断手机号
                    if (!isPhone(phone)){
                        return new ErrorTip(500, "手机号格式不正确");
                    }
                    //判断余额
                    if (!isDouble(balance)){
                        return new ErrorTip(500, "余额格式不正确");
                    }
                    //判断登录密码
                    if (!isPassword(passWord)){
                        return new ErrorTip(500, "登录密码格式不正确");
                    }
                    TUser user = new TUser();
                    TCompany company = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1).notIn("flag", 3).last(" limit 1"));
                    user.setCompanyId(company.getId());
                    user.setPhone(phone);
                    user.setNickName(nickName);
                    user.setBirthday(DateUtil.parseDate(birthday));
                    if (sex.equals("男")){
                        user.setSex(1);
                    }else if (sex.equals("女")){
                        user.setSex(2);
                    }
                    user.setEmergencyContact(emergencyContact);
                    user.setEmergencyContactNumber(emergencyContactNumber);
                    if ("是".equals(isAuth)){
                        user.setIsAuth(2);
                    }else if ("否".equals(isAuth)){
                        user.setIsAuth(1);
                    }
                    user.setFirstName(name);
                    user.setIdCard(idCard);
                    user.setBalance(new BigDecimal(balance));
                    user.setPassWord(ShiroKit.md5(passWord, "&a.s"));
                    user.setState(1);
                    user.setFlag("1");
                    user.setInsertTime(new Date());
                    user.setInsertUser(ShiroKit.getUser().getId());
                    tUserService.insert(user);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return SUCCESS_TIP;
    }
 
    @Autowired
    private ITCompanyService itCompanyService;
 
    /**
     * 判断日期是否满足yyyy-MM-dd格式
     * @param str
     * @return
     */
    public static boolean isValidDate(String str) {
        boolean convertSuccess=true;
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        try {
            format.setLenient(false);
            format.parse(str);
        } catch (Exception e) {
            convertSuccess=false;
        }
        return convertSuccess;
    }
 
 
    /**
     * 转换日期
     * @return
     */
    public static String importByExcelForDate(String value) {//value就是它的天数
        String currentCellValue = "";
        if(value != null && !value.equals("")){
            Calendar calendar = new GregorianCalendar(1900,0,-1);
            Date d = calendar.getTime();
            Date dd = DateUtils.addDays(d,Integer.valueOf(value));
            DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
            currentCellValue = formater.format(dd);
        }
        return currentCellValue;
    }
 
    /**
     * 验证手机号格式是否正确
     * @param str
     * @return
     */
    public static boolean isPhone(String str) {
        try{
            String reg = "^1\\d{10}$";
            boolean flag = str.matches(reg);
            return flag;
        }catch(NumberFormatException e) {
            System.out.println("异常:\"" + str + "\"...");
            return false;
        }
    }
 
    /**
     * 验证密码长度是否正确
     * @param str
     * @return
     */
    public static boolean isPassword(String str) {
        try{
            String reg = "^.{6,18}$";
            boolean flag = str.matches(reg);
            return flag;
        }catch(NumberFormatException e) {
            System.out.println("异常:\"" + str + "\"...");
            return false;
        }
    }
 
    /**
     * 验证是否可以字符转为金额值
     * @param str
     * @return
     */
    public static boolean isDouble(String str) {
        try{
            Double.parseDouble(str);
            return true;
        }catch(NumberFormatException e) {
            System.out.println("异常:\"" + str + "\"不是数字/整数/小数...");
            return false;
        }
    }
 
    /**
     *  导出用户信息
     */
    @RequestMapping(value = "/outUser")
    public void outUser(HttpServletRequest request, HttpServletResponse response) {
        List<Map<String,Object>> listMap = tUserService.getUserListNoPage(ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId());
 
        // 表格数据【封装】
        List<List<String>> dataList = new ArrayList<>();
 
        //第一行显示【封装】
        List<String> twoList = new ArrayList<String>();
        twoList.add("总计:");
        twoList.add(String.valueOf(listMap.size())+"条");
        dataList.add(twoList);
 
        // 列【封装】
        List<String> shellList = new ArrayList<String>();
        shellList.add("注册时间");
        shellList.add("用户ID");
        shellList.add("注册地所属分公司");
        shellList.add("昵称");
        shellList.add("手机号");
        shellList.add("紧急联系人姓名");
        shellList.add("紧急联系人电话");
        shellList.add("是否实名认证");
        shellList.add("历史出行次数");
        shellList.add("历史消费");
        shellList.add("积分");
        shellList.add("备注");
        shellList.add("状态");
        dataList.add(shellList);
 
        for (Map<String,Object> object : listMap){
            // 详细数据列【封装】
            shellList = new ArrayList<String>();
            if(SinataUtil.isNotEmpty(object.get("insertTime"))){
                shellList.add(DateUtil.formatDate(DateUtil.parse(object.get("insertTime").toString(),"YYYY-MM-dd HH:mm:ss.S"), "YYYY-MM-dd HH:mm:ss"));
            }else{
                shellList.add("-");
            }
            shellList.add(String.valueOf(object.get("id")));
            if(SinataUtil.isNotEmpty(object.get("companyName"))){
                shellList.add(object.get("companyName").toString());
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("nickName"))){
                shellList.add(object.get("nickName").toString());
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("phone"))){
                shellList.add(object.get("phone").toString());
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("emergencyContact"))){
                shellList.add(object.get("emergencyContact").toString());
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("emergencyContactNumber"))){
                shellList.add(object.get("emergencyContactNumber").toString());
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("isAuth"))){
                shellList.add(object.get("isAuth").toString().equals("是")?"是":"否");
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("historyNum"))){
                shellList.add(object.get("historyNum").toString());
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("consumptionNum"))){
                shellList.add(object.get("consumptionNum").toString());
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("integral"))){
                shellList.add(object.get("integral").toString());
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("remark"))){
                shellList.add(object.get("remark").toString());
            }else{
                shellList.add("-");
            }
            if(SinataUtil.isNotEmpty(object.get("state"))){
                shellList.add(Integer.valueOf(object.get("state").toString()) == 1?"正常":"冻结");
            }else{
                shellList.add("-");
            }
            dataList.add(shellList);
        }
        try {
            // 调用工具类进行导出
            ExcelExportUtil.easySheet("用户信息导出记录"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "用户信息导出记录", dataList,request, response);
 
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
 
 
 
 
}