From 726b056fc2d3b51acdeb0b5fbaf74c8886acc2ac Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Fri, 23 Apr 2021 14:49:40 +0800
Subject: [PATCH] screen-manage                 更新时间格式

---
 screen-manage/src/main/java/com/moral/api/pojo/vo/account/AccountQueryVO.java |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/screen-manage/src/main/java/com/moral/api/pojo/vo/account/AccountQueryVO.java b/screen-manage/src/main/java/com/moral/api/pojo/vo/account/AccountQueryVO.java
index 70c68b4..11ad7c3 100644
--- a/screen-manage/src/main/java/com/moral/api/pojo/vo/account/AccountQueryVO.java
+++ b/screen-manage/src/main/java/com/moral/api/pojo/vo/account/AccountQueryVO.java
@@ -63,27 +63,29 @@
     public static AccountVO convertToQueryPage(AccountDTO dto) {
         if (dto.getAccount() == null)
             return null;
-        AccountInsertVO vo = new AccountInsertVO();
+        AccountVO vo = new AccountVO();
         ManageAccount account = dto.getAccount();
         List<ManageRole> roles = dto.getRoles();
-        List<String> roleNames = new ArrayList<>();
-        if (!ObjectUtils.isEmpty(roles)) {
-            roles.forEach(role -> roleNames.add(role.getName()));
+        if(!ObjectUtils.isEmpty(roles)){
+            roles.forEach(value-> {
+                value.setIsDelete(null);
+                value.setCreateTime(null);
+                value.setUpdateTime(null);
+                value.setDesc(null);
+            });
         }
         vo.setId(account.getId());
+        vo.setAccount(account.getAccount());
         vo.setUserName(account.getUserName());
         vo.setEmail(account.getEmail());
         vo.setMobile(account.getMobile());
         vo.setWechat(account.getWechat());
-        vo.setRoleNames(roleNames);
+        vo.setRoles(roles);
         //Date������String
         Date createTime = account.getCreateTime();
-        Date updateTime = account.getUpdateTime();
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String createTimeStr = sdf.format(createTime);
-        String updateTimeStr = sdf.format(updateTime);
         vo.setCreateTime(createTimeStr);
-        vo.setUpdateTime(updateTimeStr);
         return vo;
     }
 }

--
Gitblit v1.8.0