yurk 2 年之前
父節點
當前提交
7b40ff552c

+ 3 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TimeTypeController.java

@@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import java.util.Arrays;
-import java.util.HashMap;
 import java.util.List;
 
 /**
@@ -38,10 +37,9 @@ public class TimeTypeController {
     public HttpRespMsg get(Integer companyId) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId).eq("report_status", 1));
-        HashMap map=new HashMap();
-        map.put("result",  timeTypeService.getById(companyId));
-        map.put("userList", userList);
-        httpRespMsg.data=map;
+        TimeType timeType = timeTypeService.getById(companyId);
+        timeType.setUserList(userList);
+        httpRespMsg.data=timeType;
         return httpRespMsg;
     }
 

+ 5 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -9,6 +9,7 @@ import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.List;
 
 /**
  * <p>
@@ -231,6 +232,10 @@ public class TimeType extends Model<TimeType> {
     private Integer alertType;
 
 
+    @TableField(exist = false)
+    private List<User> userList;
+
+
     @Override
     protected Serializable pkVal() {
         return this.companyId;