修改查询交易记录接口
1、添加按id排序 2、添加查询所有国家 3、添加接口,更新用户国家、职业信息
This commit is contained in:
@@ -222,4 +222,6 @@ public interface AccountService extends IService<Account> {
|
||||
void updateAccountValidity(Long accountId, Long currentPeriodEnd);
|
||||
|
||||
void updateUserRoleAndCredits(Long accountId, String type);
|
||||
|
||||
void updateUserInfo(String country, String occupation);
|
||||
}
|
||||
|
||||
@@ -48,4 +48,6 @@ public interface ConvenientInquiryService extends IService<Questionnaire> {
|
||||
List<Map<String, Object>> getAllUserIdList();
|
||||
|
||||
PageBaseResponse<PaymentInfoVO> queryTransactionRecords(QueryPaymentInfoDTO queryPaymentInfoDTO);
|
||||
|
||||
Map<String, List<String>> getCities();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user