|
@@ -4,7 +4,9 @@ import cn.hutool.core.util.IdcardUtil;
|
|
|
import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.employment.config.OSSConfig;
|
|
|
import com.jpsoft.employment.modules.base.entity.EnterpriseInfo;
|
|
|
+import com.jpsoft.employment.modules.base.entity.PersonLoginLog;
|
|
|
import com.jpsoft.employment.modules.base.service.EnterpriseInfoService;
|
|
|
+import com.jpsoft.employment.modules.base.service.PersonLoginLogService;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.employment.modules.common.utils.DES3;
|
|
|
import com.jpsoft.employment.modules.common.utils.OSSUtil;
|
|
@@ -47,6 +49,9 @@ public class PersonInfoController {
|
|
|
@Autowired
|
|
|
private EnterpriseInfoService enterpriseInfoService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PersonLoginLogService personLoginLogService;
|
|
|
+
|
|
|
@Value("${jwt.secret}")
|
|
|
private String jwtSecret;
|
|
|
|
|
@@ -258,6 +263,8 @@ public class PersonInfoController {
|
|
|
|
|
|
List<Map> mapList = new ArrayList<>();
|
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+
|
|
|
for (PersonInfo personInfo : page) {
|
|
|
Map map = new HashMap();
|
|
|
map.put("id", personInfo.getId());
|
|
@@ -286,6 +293,15 @@ public class PersonInfoController {
|
|
|
map.put("status", personInfo.getStatus());
|
|
|
map.put("statusN", statusN);
|
|
|
|
|
|
+ //最近登录时间
|
|
|
+ String lastLoginTime = "";
|
|
|
+ PersonLoginLog personLoginLog = personLoginLogService.lastLogin(personInfo.getId());
|
|
|
+ if (personLoginLog != null) {
|
|
|
+ lastLoginTime = sdf.format(personLoginLog.getCreateTime());
|
|
|
+ }
|
|
|
+
|
|
|
+ map.put("lastLoginTime", lastLoginTime);
|
|
|
+
|
|
|
mapList.add(map);
|
|
|
}
|
|
|
|
|
@@ -495,7 +511,7 @@ public class PersonInfoController {
|
|
|
//表头
|
|
|
Row rowTitle = sheet.createRow(0);
|
|
|
|
|
|
- String[] titles = new String[]{"序号", "姓名", "联系电话", "身份证号", "性别", "年龄", "认证状态"};
|
|
|
+ String[] titles = new String[]{"序号", "姓名", "联系电话", "身份证号", "性别", "年龄","最后登录时间", "认证状态"};
|
|
|
|
|
|
for (int i = 0; i < titles.length; i++) {
|
|
|
Cell cell = rowTitle.createCell(i);
|
|
@@ -514,6 +530,7 @@ public class PersonInfoController {
|
|
|
row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("idCard"), ""));
|
|
|
row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("genderN"), ""));
|
|
|
row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("age"), ""));
|
|
|
+ row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("lastLoginTime"), ""));
|
|
|
row.createCell(colIndex++).setCellValue(com.jpsoft.employment.modules.common.utils.StringUtils.strValue(map.get("statusN"), ""));
|
|
|
}
|
|
|
|