|
@@ -73,7 +73,7 @@ public class EtlKuaishouReportAccountHourlyServiceImpl extends ServiceImpl<EtlKu
|
|
String endTime = request.getString("endTime");
|
|
String endTime = request.getString("endTime");
|
|
EtlKuaishouReportAccountHourly today = null;
|
|
EtlKuaishouReportAccountHourly today = null;
|
|
EtlKuaishouReportAccountHourly yesterday = null;
|
|
EtlKuaishouReportAccountHourly yesterday = null;
|
|
- if (Check.isNull(endTime)) {
|
|
|
|
|
|
+ if (endTime.equals(startTime)) {
|
|
Integer hour = DateUtils.getHour(DateUtils.now());
|
|
Integer hour = DateUtils.getHour(DateUtils.now());
|
|
today = etlHourlyAccountMapper.getOnedayAggregateByHour(startTime, accountId, hour);
|
|
today = etlHourlyAccountMapper.getOnedayAggregateByHour(startTime, accountId, hour);
|
|
String lastDay = DateUtils.getLastDay(startTime, 1);
|
|
String lastDay = DateUtils.getLastDay(startTime, 1);
|
|
@@ -120,7 +120,7 @@ public class EtlKuaishouReportAccountHourlyServiceImpl extends ServiceImpl<EtlKu
|
|
JSONObject obj = new JSONObject();
|
|
JSONObject obj = new JSONObject();
|
|
List<JSONObject> todayList = null;
|
|
List<JSONObject> todayList = null;
|
|
List<JSONObject> yesterdayList = null;
|
|
List<JSONObject> yesterdayList = null;
|
|
- if (Check.isNull(endTime)) {
|
|
|
|
|
|
+ if (endTime.equals(startTime)) {
|
|
todayList = etlHourlyAccountMapper.getOnedayEtlReportList(startTime, accountId, value, type);
|
|
todayList = etlHourlyAccountMapper.getOnedayEtlReportList(startTime, accountId, value, type);
|
|
String lastDay = DateUtils.getLastDay(startTime, 1);
|
|
String lastDay = DateUtils.getLastDay(startTime, 1);
|
|
yesterdayList = etlHourlyAccountMapper.getOnedayEtlReportList(lastDay, accountId, value, type);
|
|
yesterdayList = etlHourlyAccountMapper.getOnedayEtlReportList(lastDay, accountId, value, type);
|
|
@@ -137,10 +137,9 @@ public class EtlKuaishouReportAccountHourlyServiceImpl extends ServiceImpl<EtlKu
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Result<Object> getMaxChargeAccountId(Long accountId) {
|
|
|
|
|
|
+ public Result<Object> getMaxChargeAccountId(Long accountId, String userId) {
|
|
if (Check.isNull(accountId)) {
|
|
if (Check.isNull(accountId)) {
|
|
- LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
|
- accountId = etlDailyAccountMapper.getMaxChargeAccountId(sysUser.getId());
|
|
|
|
|
|
+ accountId = etlDailyAccountMapper.getMaxChargeAccountId(userId);
|
|
}
|
|
}
|
|
JSONObject obj = new JSONObject();
|
|
JSONObject obj = new JSONObject();
|
|
CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
|
|
CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
|