|
|
@@ -421,7 +421,7 @@ public class AssetService {
|
|
|
Map<String, Object> query = pageQuery.getQuery();
|
|
|
Page<TokenHistory> page = tokenHistoryRepo.findAll(((root, criteriaQuery, criteriaBuilder) -> {
|
|
|
List<Predicate> and = JpaUtils.toPredicates(pageQuery, TokenHistory.class, root, criteriaQuery, criteriaBuilder);
|
|
|
- //String operation = (String) query.get("operation");
|
|
|
+ String operation = (String) query.get("operation");
|
|
|
if (ObjectUtils.isEmpty(query.get("toUserId")) && ObjectUtils.isEmpty(query.get("fromUserId"))) {
|
|
|
and.add(criteriaBuilder.or(criteriaBuilder.equal(root.get("toUserId"), userId), criteriaBuilder.equal(root.get("fromUserId"), userId)));
|
|
|
} else {
|
|
|
@@ -431,7 +431,7 @@ public class AssetService {
|
|
|
and.add(criteriaBuilder.and(criteriaBuilder.equal(root.get("fromUserId"), userId)));
|
|
|
}
|
|
|
}
|
|
|
- /* if (ObjectUtils.isNotEmpty(query.get("operation"))){
|
|
|
+ if (ObjectUtils.isNotEmpty(query.get("operation"))){
|
|
|
if (operation.equals("买入")){
|
|
|
log.error("进了买入里了=========");
|
|
|
operation="出售";
|
|
|
@@ -452,7 +452,7 @@ public class AssetService {
|
|
|
boolean operation1 = and.add(criteriaBuilder.and(criteriaBuilder.equal(root.get("operation"), operation)));
|
|
|
log.error("进入转赠========="+operation1);
|
|
|
}
|
|
|
- }*/
|
|
|
+ }
|
|
|
return criteriaBuilder.and(and.toArray(new Predicate[0]));
|
|
|
}), JpaUtils.toPageRequest(pageQuery));
|
|
|
|
|
|
@@ -482,7 +482,7 @@ public class AssetService {
|
|
|
|
|
|
return userHistory;
|
|
|
});
|
|
|
- Object operation1 = query.get("operation");
|
|
|
+ /*Object operation1 = query.get("operation");
|
|
|
boolean b = null != operation1;
|
|
|
log.error("是否进入"+b);
|
|
|
if (null!=operation1){
|
|
|
@@ -500,7 +500,7 @@ public class AssetService {
|
|
|
}
|
|
|
Pageable pageable = PageRequest.of(pageQuery.getPage(), pageQuery.getSize());
|
|
|
map = PageUtil.createPageFromList(content, pageable);
|
|
|
- }
|
|
|
+ }*/
|
|
|
return map;
|
|
|
}
|
|
|
|