|
@@ -142,7 +142,7 @@ public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceD
|
|
|
@ApiOperation("添加/累加")
|
|
|
@PostMapping("saveOrAccum")
|
|
|
public R saveOrAccum(@RequestBody DeviceDataDto.SaveOrAccum saveOrAccum) {
|
|
|
- return new SaveOrAccum().saveOrAccum(this, saveOrAccum);
|
|
|
+ return new SaveOrAccum().saveOrAccum(saveOrAccum, this);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -287,16 +287,16 @@ public class DeviceDataServiceImpl extends ServiceImpl<DeviceDataMapper, DeviceD
|
|
|
|
|
|
public static class SaveOrAccum {
|
|
|
|
|
|
- public R saveOrAccum(DeviceDataServiceImpl deviceDataService, DeviceDataDto.SaveOrAccum saveOrAccum) {
|
|
|
+ public R saveOrAccum(DeviceDataDto.SaveOrAccum saveOrAccum, DeviceDataServiceImpl deviceDataService) {
|
|
|
return new LockUtils()
|
|
|
.name("saveOrAccum.deviceId")
|
|
|
.prefix("data_save_accum_")
|
|
|
.build(SaveOrAccum.class)
|
|
|
- .exec(deviceDataService, saveOrAccum);
|
|
|
+ .exec(saveOrAccum, deviceDataService);
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|
|
|
- public R exec(DeviceDataServiceImpl deviceDataService, DeviceDataDto.SaveOrAccum saveOrAccum) {
|
|
|
+ public R exec(DeviceDataDto.SaveOrAccum saveOrAccum, DeviceDataServiceImpl deviceDataService) {
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
String yyyyMMdd = DataTime.toString(now, "yyyyMMdd");
|
|
|
//获取字典
|