TRX 1 yıl önce
ebeveyn
işleme
5b2754b229

+ 1 - 0
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/artemis/OperationMessageService.java

@@ -753,6 +753,7 @@ public class OperationMessageService {
         OperationMessageResultModel model = null;
         if (ObjectUtils.isNotEmpty(entity)) {
             model = new OperationMessageResultModel();
+            BeanUtils.copyProperties(entity, model);
         }
         return model;
     }

+ 2 - 0
OneCardIotServer/src/main/java/com/zhongshu/iot/server/core/service/iot/IotServiceImpl.java

@@ -35,6 +35,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.Assert;
@@ -624,6 +625,7 @@ public class IotServiceImpl extends SuperService {
         if (StringUtils.isEmpty(param.getIotTemplateId()) && StringUtils.isEmpty(param.getIotThingId()) && StringUtils.isEmpty(param.getDeviceId())) {
             return ResultContent.buildFail("iotTemplateId和iotThingId和deviceId不能同时为空");
         }
+        param.setOrderSort(Sort.by(Sort.Order.asc("createTime")));
         Page<IotMain> page = iotMainDao.page(pageable, param);
         return ResultContent.buildSuccess(PageEntityUtil.toPageModel(page, this::toAttributeModel));
     }