|
@@ -202,17 +202,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Page<PitcherDataDayVO> getPitcherDataDay(PitcherDataDayDTO dto) {
|
|
|
- if (StringUtils.isBlank(dto.getSourceSystem())) {
|
|
|
- dto.setSourceSystem("ZX_ONE");
|
|
|
- }
|
|
|
- List<Long> userIds;
|
|
|
- if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
- com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
- userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
- } else {
|
|
|
- userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
|
|
|
- }
|
|
|
-
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
//不传递时间,默认查询当天
|
|
|
if (dto.getBeginDate() == null || dto.getEndDate() == null) {
|
|
|
dto.setBeginDate(LocalDate.now());
|
|
@@ -220,7 +211,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
}
|
|
|
//创建查询条件
|
|
|
Criteria cri = Cnd.cri();
|
|
|
- if (CollectionUtils.isNotEmpty(userIds)) {
|
|
|
+ if (userIds != null) {
|
|
|
cri.where().andInList("pitcher_id", userIds);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
@@ -270,17 +261,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
*/
|
|
|
@Override
|
|
|
public PitcherDataDayTotalVO getPitcherDataDayTotal(PitcherDataDayTotalDTO dto) {
|
|
|
- if (StringUtils.isBlank(dto.getSourceSystem())) {
|
|
|
- dto.setSourceSystem("ZX_ONE");
|
|
|
- }
|
|
|
- List<Long> userIds;
|
|
|
- if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
- com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
- userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
- } else {
|
|
|
- userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
|
|
|
- }
|
|
|
-
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
//不传递时间,默认查询当天
|
|
|
if (dto.getBeginDate() == null || dto.getEndDate() == null) {
|
|
|
dto.setBeginDate(LocalDate.now());
|
|
@@ -288,7 +270,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
}
|
|
|
//创建查询条件
|
|
|
Criteria cri = Cnd.cri();
|
|
|
- if (CollectionUtils.isNotEmpty(userIds)) {
|
|
|
+ if (userIds != null) {
|
|
|
cri.where().andInList("pitcher_id", userIds);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
@@ -321,16 +303,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Page<PitcherDataTotalVO> getPitcherDataTotal(PitcherDataTotalDTO dto) {
|
|
|
- if (StringUtils.isBlank(dto.getSourceSystem())) {
|
|
|
- dto.setSourceSystem("ZX_ONE");
|
|
|
- }
|
|
|
- List<Long> userIds;
|
|
|
- if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
- com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
- userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
- } else {
|
|
|
- userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
|
|
|
- }
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
//如果注册时间参数为空,默认设置查询当天数据
|
|
|
if (dto.getBeginDate() == null || dto.getEndDate() == null) {
|
|
|
dto.setBeginDate(LocalDate.now());
|
|
@@ -421,17 +395,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
*/
|
|
|
@Override
|
|
|
public PitcherDataTotalSumVO getPitcherDataTotalSum(PitcherDataTotalSumDTO dto) {
|
|
|
- if (StringUtils.isBlank(dto.getSourceSystem())) {
|
|
|
- dto.setSourceSystem("ZX_ONE");
|
|
|
- }
|
|
|
- List<Long> userIds;
|
|
|
- if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
- com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
- userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
- } else {
|
|
|
- userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
|
|
|
- }
|
|
|
-
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
//如果注册时间参数为空,默认设置查询当天数据
|
|
|
if (dto.getBeginDate() == null || dto.getEndDate() == null) {
|
|
|
dto.setBeginDate(LocalDate.now());
|
|
@@ -521,19 +486,9 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Page<PitcherGameDataDayVO> getPitcherGameDataDay(PitcherGameDataDayDTO dto) {
|
|
|
- if (StringUtils.isBlank(dto.getSourceSystem())) {
|
|
|
- dto.setSourceSystem("ZX_ONE");
|
|
|
- }
|
|
|
- List<Long> userIds;
|
|
|
- List<Long> gameIds;
|
|
|
- if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
- com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
- userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
- gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
- } else {
|
|
|
- userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
|
|
|
- gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
- }
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
+ List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
//不传递时间,默认查询当天
|
|
|
if (dto.getBeginDate() == null || dto.getEndDate() == null) {
|
|
|
dto.setBeginDate(LocalDate.now());
|
|
@@ -541,10 +496,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
}
|
|
|
//创建查询条件
|
|
|
Criteria cri = Cnd.cri();
|
|
|
- if (CollectionUtils.isNotEmpty(userIds)) {
|
|
|
+ if (userIds != null) {
|
|
|
cri.where().andInList("pitcher_id", userIds);
|
|
|
}
|
|
|
- if (CollectionUtils.isNotEmpty(gameIds)) {
|
|
|
+ if (gameIds != null) {
|
|
|
cri.where().andInList("game_id", gameIds);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
@@ -601,20 +556,9 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
*/
|
|
|
@Override
|
|
|
public PitcherGameDataDayTotalVO getPitcherGameDataDayTotal(PitcherGameDataDayTotalDTO dto) {
|
|
|
- if (StringUtils.isBlank(dto.getSourceSystem())) {
|
|
|
- dto.setSourceSystem("ZX_ONE");
|
|
|
- }
|
|
|
- List<Long> userIds;
|
|
|
- List<Long> gameIds;
|
|
|
- if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
- com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
- userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
- gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
- } else {
|
|
|
- userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
|
|
|
- gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
- }
|
|
|
-
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
+ List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
//不传递时间,默认查询当天
|
|
|
if (dto.getBeginDate() == null || dto.getEndDate() == null) {
|
|
|
dto.setBeginDate(LocalDate.now());
|
|
@@ -622,10 +566,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
}
|
|
|
//创建查询条件
|
|
|
Criteria cri = Cnd.cri();
|
|
|
- if (CollectionUtils.isNotEmpty(userIds)) {
|
|
|
+ if (userIds != null) {
|
|
|
cri.where().andInList("pitcher_id", userIds);
|
|
|
}
|
|
|
- if (CollectionUtils.isNotEmpty(gameIds)) {
|
|
|
+ if (gameIds != null) {
|
|
|
cri.where().andInList("game_id", gameIds);
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
@@ -664,19 +608,9 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Page<PitcherGameDataTotalVO> getPitcherGameDataTotal(PitcherGameDataTotalDTO dto) {
|
|
|
- if (StringUtils.isBlank(dto.getSourceSystem())) {
|
|
|
- dto.setSourceSystem("ZX_ONE");
|
|
|
- }
|
|
|
- List<Long> userIds;
|
|
|
- List<Long> gameIds;
|
|
|
- if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
- com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
- userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
- gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
- } else {
|
|
|
- userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
|
|
|
- gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
- }
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
+ List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
//如果注册时间参数为空,默认设置查询当天数据
|
|
|
if (dto.getBeginDate() == null || dto.getEndDate() == null) {
|
|
|
dto.setBeginDate(LocalDate.now());
|
|
@@ -773,19 +707,9 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
*/
|
|
|
@Override
|
|
|
public PitcherGameDataTotalSumVO getPitcherGameDataTotalSum(PitcherGameDataTotalSumDTO dto) {
|
|
|
- if (StringUtils.isBlank(dto.getSourceSystem())) {
|
|
|
- dto.setSourceSystem("ZX_ONE");
|
|
|
- }
|
|
|
- List<Long> userIds;
|
|
|
- List<Long> gameIds;
|
|
|
- if (StringUtils.isNotBlank(dto.getSourceSystem())) {
|
|
|
- com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
- userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
- gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
- } else {
|
|
|
- userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
|
|
|
- gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
- }
|
|
|
+ com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
|
|
|
+ List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
|
|
|
+ List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
|
|
|
//如果注册时间参数为空,默认设置查询当天数据
|
|
|
if (dto.getBeginDate() == null || dto.getEndDate() == null) {
|
|
|
dto.setBeginDate(LocalDate.now());
|
|
@@ -1118,7 +1042,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
private Criteria myCri(List<Long> userIds, List<Long> gameIds, PitcherGameDataTotalDTO dto, String type, Boolean needGroupBy) {
|
|
|
//根据传入的dto拼接查询参数
|
|
|
Criteria cri = Cnd.cri();
|
|
|
- if (CollectionUtils.isNotEmpty(gameIds)) {
|
|
|
+ if (gameIds != null) {
|
|
|
//拼接游戏id查询条件
|
|
|
cri.where().andInList("game_id", gameIds);
|
|
|
}
|
|
@@ -1134,7 +1058,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
//拼接SDK来源
|
|
|
cri.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
|
- if (CollectionUtils.isNotEmpty(userIds)) {
|
|
|
+ if (userIds != null) {
|
|
|
//拼接投手ID
|
|
|
cri.where().andInList("pitcher_id", userIds);
|
|
|
}
|
|
@@ -1257,7 +1181,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
//拼接SDK来源
|
|
|
cri.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
|
- if (CollectionUtils.isNotEmpty(userIds)) {
|
|
|
+ if (userIds != null) {
|
|
|
//拼接投手ID
|
|
|
cri.where().andInList("pitcher_id", userIds);
|
|
|
}
|
|
@@ -1295,7 +1219,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
//拼接SDK来源
|
|
|
cri.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
|
- if (CollectionUtils.isNotEmpty(userIds)) {
|
|
|
+ if (userIds != null) {
|
|
|
//拼接投手ID
|
|
|
cri.where().andInList("pitcher_id", userIds);
|
|
|
}
|
|
@@ -1325,7 +1249,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
|
|
|
//拼接SDK来源
|
|
|
cri.where().andEquals("source_system", dto.getSourceSystem());
|
|
|
}
|
|
|
- if (CollectionUtils.isNotEmpty(userIds)) {
|
|
|
+ if (userIds != null) {
|
|
|
//拼接投手ID
|
|
|
cri.where().andInList("user_zx_pitcher_id", userIds);
|
|
|
}
|