修改查询交易记录接口

1、添加按id排序
2、添加查询所有国家
3、添加接口,更新用户国家、职业信息
This commit is contained in:
2025-01-10 16:13:45 +08:00
parent 698fca8787
commit ef70598180
8 changed files with 59 additions and 4 deletions

View File

@@ -620,11 +620,15 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
public PageBaseResponse<PaymentInfoVO> queryTransactionRecords(QueryPaymentInfoDTO queryPaymentInfoDTO) {
Integer size = queryPaymentInfoDTO.getSize();
int offset = (queryPaymentInfoDTO.getPage() - 1) * size;
String order = "DESC";
if (!StringUtil.isNullOrEmpty(queryPaymentInfoDTO.getOrder()) && queryPaymentInfoDTO.getOrder().equals("ASC")) {
order = "ASC";
}
List<PaymentInfoVO> paymentInfoVOS = paymentInfoMapper.queryPaymentInfo(queryPaymentInfoDTO.getPlatform(), queryPaymentInfoDTO.getPayerTotal(),
queryPaymentInfoDTO.getType(), queryPaymentInfoDTO.getStatus(),
queryPaymentInfoDTO.getCountry(), queryPaymentInfoDTO.getCity(),
queryPaymentInfoDTO.getStartTime(), queryPaymentInfoDTO.getEndTime(),
size, offset);
size, offset, order);
// 查询数据总量
Long total = paymentInfoMapper.queryPaymentInfoCount(queryPaymentInfoDTO.getPlatform(), queryPaymentInfoDTO.getPayerTotal(),
queryPaymentInfoDTO.getType(), queryPaymentInfoDTO.getStatus(),
@@ -643,5 +647,20 @@ public class ConvenientInquiryServiceImpl extends ServiceImpl<QuestionnaireMappe
return response;
}
public Map<String, List<String>> getCities(){
List<Map<String, String>> cities = paymentInfoMapper.getCities();
List<Map<String, String>> countries = paymentInfoMapper.getCountries();
List<String> cityCollect = cities.stream()
.map(cityEntry -> cityEntry.get("city"))
.collect(Collectors.toList());
List<String> countryCollect = countries.stream()
.map(cityEntry -> cityEntry.get("country"))
.collect(Collectors.toList());
return new HashMap<String, List<String>>() {{
put("city", cityCollect);
put("country", countryCollect);
}};
}
}