...
This commit is contained in:
parent
3697fbf5ee
commit
afbfd42c07
|
@ -35,7 +35,6 @@ import io.renren.modules.resource.entity.ResourceEntity;
|
||||||
import io.renren.modules.resource.entity.ResourceEntityDelFlag;
|
import io.renren.modules.resource.entity.ResourceEntityDelFlag;
|
||||||
import io.renren.modules.resource.entity.TbDataResourceRelEntity;
|
import io.renren.modules.resource.entity.TbDataResourceRelEntity;
|
||||||
import io.renren.modules.resource.service.ResourceService;
|
import io.renren.modules.resource.service.ResourceService;
|
||||||
import io.renren.modules.resourceBrowse.dao.ResourceBrowseDao;
|
|
||||||
import io.renren.modules.resourceCar.dao.ResourceCarDao;
|
import io.renren.modules.resourceCar.dao.ResourceCarDao;
|
||||||
import io.renren.modules.resourceCollection.dao.ResourceCollectionDao;
|
import io.renren.modules.resourceCollection.dao.ResourceCollectionDao;
|
||||||
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
|
import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
|
||||||
|
@ -474,7 +473,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
return 0l + Long.valueOf(total) == 0 ? -1 : Long.valueOf(total);
|
return 0l + Long.valueOf(total) == 0 ? -1 : Long.valueOf(total);
|
||||||
}
|
}
|
||||||
long pingTOp = (index.get("pin_top_time") == null) ? 0 + (Long.valueOf(total) == 0 ? -1 : Long.valueOf(total)) : Long.parseLong(index.get("pin_top_time").toString()) + Long.valueOf(total);
|
long pingTOp = (index.get("pin_top_time") == null) ? 0 + (Long.valueOf(total) == 0 ? -1 : Long.valueOf(total)) : Long.parseLong(index.get("pin_top_time").toString()) + Long.valueOf(total);
|
||||||
return pingTOp % 1000;
|
return (pingTOp % 1000) == 0 ? -1 : pingTOp % 1000;
|
||||||
}).reversed()
|
}).reversed()
|
||||||
).skip((long) (pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
|
).skip((long) (pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
|
||||||
return temp;
|
return temp;
|
||||||
|
@ -484,14 +483,14 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
ids = customThreadPool.submit(() -> {
|
ids = customThreadPool.submit(() -> {
|
||||||
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast)
|
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast)
|
||||||
.sorted(Comparator.comparing(x -> {
|
.sorted(Comparator.comparing(x -> {
|
||||||
Map index = x;
|
Map index = (Map) x;
|
||||||
int pingTOp_ = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString());
|
int pingTOp_ = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString());
|
||||||
String string = (index.get("total") == null) ? "0" : index.get("total").toString();
|
String total = (index.get("total") == null) ? "0" : index.get("total").toString();
|
||||||
if (pingTOp_ <= 0) {
|
if (pingTOp_ <= 0) {
|
||||||
return 0l + Long.valueOf(string);
|
return 0l + Long.valueOf(total) == 0 ? -1 : Long.valueOf(total);
|
||||||
}
|
}
|
||||||
long pingTOp = (index.get("pin_top_time") == null) ? 0 + Long.valueOf(string) : Long.parseLong(index.get("pin_top_time").toString()) + Long.valueOf(string);
|
long pingTOp = (index.get("pin_top_time") == null) ? 0 + (Long.valueOf(total) == 0 ? -1 : Long.valueOf(total)) : Long.parseLong(index.get("pin_top_time").toString()) + Long.valueOf(total);
|
||||||
return pingTOp;
|
return (pingTOp % 1000) == 0 ? -1 : pingTOp % 1000;
|
||||||
})).skip((pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
|
})).skip((pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
|
||||||
return temp;
|
return temp;
|
||||||
}).get();
|
}).get();
|
||||||
|
|
Loading…
Reference in New Issue