|
@@ -3185,13 +3185,6 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
dto.setRegisteredBeginDate(LocalDate.now());
|
|
|
dto.setRegisteredEndDate(LocalDate.now());
|
|
|
}
|
|
|
- //如果没有排序条件给默认值
|
|
|
- if (StringUtils.isBlank(dto.getSortFiled())) {
|
|
|
- dto.setSortFiled("cost_date");
|
|
|
- }
|
|
|
- if (StringUtils.isBlank(dto.getSortType())) {
|
|
|
- dto.setSortType(OrderByEnum.DESC.getOrderType());
|
|
|
- }
|
|
|
//默认查询总数据
|
|
|
if (StringUtils.isBlank(dto.getTableTypes())) {
|
|
|
dto.setTableTypes("total");
|
|
@@ -3216,7 +3209,16 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
}
|
|
|
//拼接排序条件
|
|
|
Criteria orderByCri = Cnd.cri();
|
|
|
- orderByCri.getOrderBy().orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
|
|
|
+ //如果没有排序条件给默认值
|
|
|
+ if (StringUtils.isBlank(dto.getSortType())) {
|
|
|
+ dto.setSortType(OrderByEnum.DESC.getOrderType());
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(dto.getSortFiled())) {
|
|
|
+ orderByCri.getOrderBy().orderBy("cost_date", dto.getSortType());
|
|
|
+ orderByCri.getOrderBy().orderBy("cost", dto.getSortType());
|
|
|
+ } else {
|
|
|
+ orderByCri.getOrderBy().orderBy(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()), dto.getSortType());
|
|
|
+ }
|
|
|
//创建sql查询数据
|
|
|
Sql sql = Sqls.create(getFirstNewUserAgainByTableTypesSql(dto.getTableTypes(), cri) + orderByCri);
|
|
|
//设置自定义回传类型
|
|
@@ -3364,6 +3366,19 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
.append(dto.getSourceSystem())
|
|
|
.append("'");
|
|
|
}
|
|
|
+ //拼接排序条件
|
|
|
+ //如果没有排序条件给默认值
|
|
|
+ if (StringUtils.isBlank(dto.getSortType())) {
|
|
|
+ dto.setSortType(OrderByEnum.DESC.getOrderType());
|
|
|
+ }
|
|
|
+ if (StringUtils.isBlank(dto.getSortFiled())) {
|
|
|
+ queryStr.append(" ORDER BY today_total_amount DESC, player_id DESC");
|
|
|
+ } else {
|
|
|
+ queryStr.append("""
|
|
|
+ ORDER BY %s %s, player_id DESC
|
|
|
+ """.formatted(CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, dto.getSortFiled()),
|
|
|
+ dto.getSortType()));
|
|
|
+ }
|
|
|
//得到用户id数组
|
|
|
Long[] usersId = againTrendVO.getUsersId();
|
|
|
//查询具体的数据
|
|
@@ -3380,7 +3395,8 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
game_ads.ads_player_recharge_ranking
|
|
|
WHERE player_id IN (@usersId)
|
|
|
and dt = DATE_ADD(DATE(reg_user_time),
|
|
|
- """ + queryStr);
|
|
|
+ """ + queryStr
|
|
|
+ );
|
|
|
//设置参数
|
|
|
if ("total".equals(timeType)) {
|
|
|
userDetilsSql.vars().set("amount", "total_amount");
|