Commit c9223141 by 杨林龙

添加日志

1 parent 5529ff60
......@@ -3,6 +3,7 @@ package cn.com.glsx.stdinterface.modules.controller;
import cn.com.glsx.stdinterface.dto.StatisticsDriveDto;
import cn.com.glsx.stdinterface.modules.service.StatisticsDriveService;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON;
import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -29,7 +30,15 @@ public class StatisticsDriveController {
public R statisticsDriveDataEveryDay() {
log.info("开始查询试驾统计数据");
List<StatisticsDriveDto> statisticsDriveList = statisticsDriveService.statisticsDriveDataEveryDay();
if (CollectionUtil.isEmpty(statisticsDriveList)) {
log.info("数据集合的大小为0===");
log.info("数据集合的实体===" + JSON.toJSONString(statisticsDriveList));
return R.ok();
}
log.info("数据集合的大小为===" + statisticsDriveList.size());
log.info("数据集合的实体===" + JSON.toJSONString(statisticsDriveList));
return R.ok().data(statisticsDriveList);
}
......@@ -39,8 +48,10 @@ public class StatisticsDriveController {
log.info("开始保存试驾统计数据,数据集合的大小为===" + statisticsDriveDtoList.size());
if (CollectionUtil.isNotEmpty(statisticsDriveDtoList)) {
statisticsDriveService.insertStatisticsDriveList(statisticsDriveDtoList);
log.info("保存数据成功");
log.info("保存数据成功===");
return R.ok();
}
log.info("数据集合为空 没有数据可以保存===");
return R.ok();
}
}
......@@ -30,6 +30,7 @@ public class StatisticsDriveService {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, -1);
String yesterDayFormat = new SimpleDateFormat("yyyy-MM-dd").format(cal.getTime());
log.info("数据统计的天数===" + yesterDayFormat);
return statisticsDriveMapper.statisticsDriveDataEveryDay(yesterDayFormat);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!