|
@@ -31,6 +31,12 @@ public class AdsAccountRechargeRankingServiceImpl implements IAdsAccountRecharge
|
|
|
|
|
|
@Override
|
|
|
public Page<AdsAccountRechargeRankingVO> listOfPage(AdsAccountRechargeRankingListDTO dto) {
|
|
|
+ if (StringUtils.isBlank(dto.getSortFiled())) {
|
|
|
+ dto.setSortFiled("cost");
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(dto.getSortType())) {
|
|
|
+ dto.setSortType("desc");
|
|
|
+ }
|
|
|
if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
|
|
|
dto.setPitcherId(SecurityUtil.getUserId().toString());
|
|
|
}
|
|
@@ -65,16 +71,16 @@ public class AdsAccountRechargeRankingServiceImpl implements IAdsAccountRecharge
|
|
|
if (StringUtils.isNotBlank(dto.getPitcherId())) {
|
|
|
cri.where().and(AdsAccountRechargeRanking::getPitcherId, "=", dto.getPitcherId());
|
|
|
}
|
|
|
- if(StringUtils.isNotBlank(dto.getAccountId())) {
|
|
|
+ if (StringUtils.isNotBlank(dto.getAccountId())) {
|
|
|
cri.where().and(AdsAccountRechargeRanking::getAccountId, "=", dto.getAccountId());
|
|
|
}
|
|
|
- if(StringUtils.isNotBlank(dto.getGameId())) {
|
|
|
+ if (StringUtils.isNotBlank(dto.getGameId())) {
|
|
|
cri.where().and(AdsAccountRechargeRanking::getGameId, "=", dto.getGameId());
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(dto.getType())) {
|
|
|
cri.where().and(AdsAccountRechargeRanking::getType, "=", dto.getType());
|
|
|
}
|
|
|
- cri.groupBy(AdsAccountRechargeRanking::getAccountId, AdsAccountRechargeRanking::getPitcherId, AdsAccountRechargeRanking::getType, AdsAccountRechargeRanking::getGameId);
|
|
|
+ cri.groupBy("account_id", "pitcher_id", "type", "game_id");
|
|
|
cri.orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
|
|
|
Sql sql = Sqls.queryEntity(sqlStr + "$condition");
|
|
|
sql.setPager(pager);
|