|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.zc.business.service.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.ruoyi.common.utils.PageUtils; |
|
|
|
import com.zc.business.domain.*; |
|
|
@ -46,6 +47,18 @@ public class DcOperLogServiceImpl extends ServiceImpl<DcOperLogMapper, DcOperLog |
|
|
|
return list(getDcOperLogLambdaQueryWrapper(dcOperLog, endTime, startTime)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询设备的调用次数根据设备类型分组 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<Map<String, Object>> countByDeviceType() { |
|
|
|
QueryWrapper<DcOperLog> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.select("COUNT(dc_device_type) as deviceCount", "dc_device_type") |
|
|
|
.ne("dc_device_type", "") |
|
|
|
.groupBy("dc_device_type"); |
|
|
|
return listMaps(queryWrapper); |
|
|
|
} |
|
|
|
|
|
|
|
private static LambdaQueryWrapper<DcOperLog> getDcOperLogLambdaQueryWrapper(DcOperLog dcOperLog, Date endTime, Date startTime) { |
|
|
|
LambdaQueryWrapper<DcOperLog> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
if (dcOperLog.getId() != null) { |
|
|
|