|
|
@@ -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));
|
|
|
}
|