|
|
@@ -184,6 +184,29 @@ public class StoreInServiceImpl implements StoreInService {
|
|
|
}
|
|
|
logger.info("Start to execute find.");
|
|
|
StoreIn store = storeDao.findByUuid(uuid);
|
|
|
+ // 为了给前端返回一致的顺序
|
|
|
+ Set<Qualification> qualifications = new TreeSet<Qualification>(new Comparator()
|
|
|
+ {
|
|
|
+ public int compare(Object o1, Object o2) {
|
|
|
+ Qualification time1 = (Qualification)o1;
|
|
|
+ Qualification time2 = (Qualification)o2;
|
|
|
+ if (time1.getId().intValue() > time2.getId().intValue())
|
|
|
+ {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ else if (time1.getId().intValue() == time2.getId().intValue())
|
|
|
+ {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ qualifications.addAll(store.getQualifications());
|
|
|
+ store.setQualifications(qualifications);
|
|
|
logger.info(String.format("Start to execute find %s", store != null ? store.toString() : null));
|
|
|
return store;
|
|
|
}
|