he2802 1 éve
szülő
commit
0ce8a8ffef

+ 2 - 2
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/DateUtils.java

@@ -663,7 +663,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
 
 
     public static Map<Long,Long> getWeekTime(Long startTime,Long endTime){
-        Map<Long,Long> mapList = new HashMap<>();
+        Map<Long,Long> mapList = new LinkedHashMap<>();
         Long zeroTime = DateUtils.getScheduleTimeZeroTime(startTime);
         //一天的时间戳
         Long time = 86400L;
@@ -677,7 +677,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
     public static Map<Long,Long> getMonthTime(Long startTime,Long endTime){
         //一天的时间戳
         Long time = 86400L;
-        Map<Long,Long> map = new HashMap<>();
+        Map<Long,Long> map = new  LinkedHashMap<>();
         try{
             SimpleDateFormat format = new SimpleDateFormat("yyyy-MM");
             Date d1 = DateUtils.timeToDate(startTime);

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/goods/service/impl/TopOldOrderServiceImpl.java

@@ -3927,7 +3927,7 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
     }
 
     private Map<Long,Long> getWeekTime(Long startTime,Long endTime){
-        Map<Long,Long> mapList = new HashMap<>();
+        Map<Long,Long> mapList = new LinkedHashMap<>();
         Map<Long, Long> weekTime = DateUtils.getWeekTime(startTime,endTime);
         List<Long> aa = new ArrayList<>();
         aa.addAll(weekTime.keySet());

+ 1 - 0
zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml

@@ -2108,6 +2108,7 @@
         <if test="viewSign != null and viewSign == 3">
             GROUP BY DATE_FORMAT(FROM_UNIXTIME(a.timeStr), '%Y-%m')
         </if>
+        ORDER BY timeStr
     </select>
 
     <select id="getStatisticsBusinessView" parameterType="com.zhongzheng.modules.top.order.bo.TopOrderStatisticsViewBo"