lyhzzz %!s(int64=2) %!d(string=hai) anos
pai
achega
a50232e6c2

+ 1 - 1
src/main/java/com/cdf/entity/TotalData.java

@@ -27,7 +27,7 @@ public class TotalData implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @TableId(value = "id",type = IdType.AUTO)
-    private String id;
+    private Integer id;
 
     @TableField("day_time")
     private String dayTime;

+ 0 - 4
src/main/java/com/cdf/service/impl/TotalDataServiceImpl.java

@@ -56,7 +56,6 @@ public class TotalDataServiceImpl extends ServiceImpl<ITotalDataMapper, TotalDat
                     week = newTotalData(weekStart);
                 }
                 week.setDayTime(weekStart);
-                week.setId(weekStart);
                 return week;
             case 2:     //月
                 if(StringUtils.isEmpty(time)){
@@ -67,7 +66,6 @@ public class TotalDataServiceImpl extends ServiceImpl<ITotalDataMapper, TotalDat
                 if(month == null){
                     month = newTotalData(time);
                 }
-                month.setId(time);
                 month.setDayTime(time);
                 return month;
             case 3:     //时间段
@@ -76,7 +74,6 @@ public class TotalDataServiceImpl extends ServiceImpl<ITotalDataMapper, TotalDat
                     if(totalData == null){
                         totalData = newTotalData(startDay +"-"+endDay);
                     }
-                    totalData.setId(startDay +"-"+ endDay);
                     return totalData;
                 }
                 if(StringUtils.isEmpty(time)){
@@ -135,7 +132,6 @@ public class TotalDataServiceImpl extends ServiceImpl<ITotalDataMapper, TotalDat
 
     private TotalData newTotalData(String id ){
         TotalData totalData = new TotalData();
-        totalData.setId(id);
         totalData.setDayTime(id);
         totalData.setAvgStopTime(0L);
         totalData.setAvgStepNum(0L);