|
@@ -169,7 +169,7 @@ public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceD
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public DeviceDataDto.Vo getByDay(Long deviceId, Long mercId, String dateValue) {
|
|
public DeviceDataDto.Vo getByDay(Long deviceId, Long mercId, String dateValue) {
|
|
- return getOneData(EnumDeviceDataType.DAY.getCode(), deviceId, mercId, dateValue);
|
|
|
|
|
|
+ return getOneData(EnumDeviceDataType.DAY.getCode(), deviceId, mercId, dateValue);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -180,7 +180,7 @@ public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceD
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public List<DeviceDataDto.Vo> getMercDataOneDay(Long mercId, String dateValue) {
|
|
public List<DeviceDataDto.Vo> getMercDataOneDay(Long mercId, String dateValue) {
|
|
- return getMercListData(EnumDeviceDataType.DAY.getCode(), mercId, dateValue);
|
|
|
|
|
|
+ return getMercListData(EnumDeviceDataType.DAY.getCode(), mercId, dateValue);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -192,7 +192,7 @@ public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceD
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public List<DeviceDataDto.Vo> getMercDataOneMonth(Long mercId, String dateValue) {
|
|
public List<DeviceDataDto.Vo> getMercDataOneMonth(Long mercId, String dateValue) {
|
|
- return getMercListData(EnumDeviceDataType.MONTH.getCode(), mercId, dateValue);
|
|
|
|
|
|
+ return getMercListData(EnumDeviceDataType.MONTH.getCode(), mercId, dateValue);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -204,7 +204,7 @@ public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceD
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public DeviceDataDto.Vo getByMonth(Long deviceId, Long mercId, String dateValue) {
|
|
public DeviceDataDto.Vo getByMonth(Long deviceId, Long mercId, String dateValue) {
|
|
- return getOneData(EnumDeviceDataType.MONTH.getCode(), deviceId, mercId, dateValue);
|
|
|
|
|
|
+ return getOneData(EnumDeviceDataType.MONTH.getCode(), deviceId, mercId, dateValue);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -216,7 +216,7 @@ public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceD
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public DeviceDataDto.Vo getByYear(Long deviceId, Long mercId, String dateValue) {
|
|
public DeviceDataDto.Vo getByYear(Long deviceId, Long mercId, String dateValue) {
|
|
- return getOneData(EnumDeviceDataType.YEAR.getCode(), deviceId, mercId, dateValue);
|
|
|
|
|
|
+ return getOneData(EnumDeviceDataType.YEAR.getCode(), deviceId, mercId, dateValue);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -265,7 +265,7 @@ public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceD
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public List<DeviceDataDto.Vo> getListByDay(Long deviceId, Integer startDateValue, Integer endDateValue) {
|
|
public List<DeviceDataDto.Vo> getListByDay(Long deviceId, Integer startDateValue, Integer endDateValue) {
|
|
- return getListData(EnumDeviceDataType.DAY.getCode(), deviceId, startDateValue, endDateValue);
|
|
|
|
|
|
+ return getListData(EnumDeviceDataType.DAY.getCode(), deviceId, startDateValue, endDateValue);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -327,6 +327,31 @@ public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceD
|
|
return R.ok(list);
|
|
return R.ok(list);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ @ApiOperation("商户日期维度查询")
|
|
|
|
+ public R<PageBean<DeviceDataDto.Vo>> pageByMercAndDate(DeviceDataDto.PageByMercAndDate pageByMercAndDate) {
|
|
|
|
+ PageBean pageBean = pageByMercAndDate.getPage();
|
|
|
|
+ LambdaQueryWrapper<DeviceData> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(pageByMercAndDate, DeviceData.class)
|
|
|
|
+ .in(DeviceData::getDeviceId)
|
|
|
|
+ .in(DeviceData::getDateValue)
|
|
|
|
+ .build()
|
|
|
|
+ .orderByDesc(DeviceData::getCreateTime);
|
|
|
|
+ IPage<DeviceData> iPage = page(toIPage(pageBean), lambdaQueryWrapper);
|
|
|
|
+ return R.ok(toPageBean(DeviceDataDto.Vo.class, iPage));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ @ApiOperation("商户日期维度统计查询")
|
|
|
|
+ public R<Long> pageByMercAndDateCount(DeviceDataDto.PageByMercAndDate pageByMercAndDate) {
|
|
|
|
+ LambdaQueryWrapper<DeviceData> lambdaQueryWrapper = new MybatisPlusQuery().eqWrapper(pageByMercAndDate, DeviceData.class)
|
|
|
|
+ .in(DeviceData::getDeviceId)
|
|
|
|
+ .in(DeviceData::getDateValue)
|
|
|
|
+ .build()
|
|
|
|
+ .orderByDesc(DeviceData::getCreateTime);
|
|
|
|
+ long count = count(lambdaQueryWrapper);
|
|
|
|
+ return R.ok(count);
|
|
|
|
+ }
|
|
|
|
+
|
|
public static class SaveOrAccum {
|
|
public static class SaveOrAccum {
|
|
|
|
|
|
public R saveOrAccum(DeviceDataDto.SaveOrAccum saveOrAccum, DeviceDataServiceImpl deviceDataService) {
|
|
public R saveOrAccum(DeviceDataDto.SaveOrAccum saveOrAccum, DeviceDataServiceImpl deviceDataService) {
|