@RequestMapping("/byDay")
public String byDay(@RequestParam int yyyy, @RequestParam int mm, @RequestParam int dd){
String date = Integer.toString(yyyy) + '-' + String.format("%02d", mm)+ '-' + String.format("%02d", dd) ;
List list = detailService.selectByDay(date);
JSONArray json = new JSONArray();
list.forEach(detail -> {
json.add(JSONObject.toJSON(detail));
});
return json.toString();
}
public List selectByDay(String date) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.between("editTime",date + " 00:00:00",date + " 23:59:59")
.groupBy("upgradeTime")
.orderByAsc("id");
return detailDAO.selectList(queryWrapper);
}