|
|
@@ -418,10 +418,9 @@ public class AssetService {
|
|
|
}
|
|
|
|
|
|
public Page<UserHistory> userHistory(Long userId, PageQuery pageQuery) {
|
|
|
- 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");
|
|
|
+ Map<String, Object> query = pageQuery.getQuery();
|
|
|
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 +430,9 @@ public class AssetService {
|
|
|
and.add(criteriaBuilder.and(criteriaBuilder.equal(root.get("fromUserId"), userId)));
|
|
|
}
|
|
|
}
|
|
|
- if (ObjectUtils.isNotEmpty(query.get("operation"))){
|
|
|
+ Object operation4 = query.get("operation");
|
|
|
+ if (ObjectUtils.isNotEmpty(operation4)){
|
|
|
+ String operation = (String) query.get("operation");
|
|
|
if (operation.equals("买入")){
|
|
|
log.error("进了买入里了=========");
|
|
|
operation="出售";
|