|
|
@@ -1,8 +1,13 @@
|
|
|
package com.xunmei.mediator.api.controller;
|
|
|
|
|
|
|
|
|
+import com.xunmei.common.core.web.domain.AjaxResult;
|
|
|
+import com.xunmei.mediator.api.service.*;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* @author jingyuanchao
|
|
|
@@ -10,64 +15,17 @@ import org.springframework.web.bind.annotation.*;
|
|
|
* @date 2024/1/25 17:04
|
|
|
*/
|
|
|
|
|
|
-@RestController("/mediator")
|
|
|
+@RestController
|
|
|
public class MediatorController {
|
|
|
|
|
|
- /* @Resource
|
|
|
- private EquipmentSyncService equipmentSyncService;
|
|
|
- @Resource
|
|
|
- private NorthStatisticsSyncService northStatisticsSyncService;
|
|
|
- @Resource
|
|
|
- private NorthErrorService northErrorService;
|
|
|
- @Resource
|
|
|
- private IMediatorCategoryService categoryService;
|
|
|
@Resource
|
|
|
- private IMediatorDeviceDataService deviceDataService;
|
|
|
- @Resource
|
|
|
- private IMediatorDeviceDataLogService deviceDataLogService;
|
|
|
-
|
|
|
- @InnerAuth
|
|
|
- @PostMapping("/isCompleted")
|
|
|
- public List<DeviceReceivePageDto> isCompleted(@RequestBody DeviceReceivePageDto pageData) {
|
|
|
- return equipmentSyncService.isCompleted(pageData);
|
|
|
- }
|
|
|
-
|
|
|
- @InnerAuth
|
|
|
- @PostMapping("/saveDeviceData")
|
|
|
- public void saveDeviceData(@RequestBody List<DeviceReceivePageDto> pageData) {
|
|
|
- equipmentSyncService.saveDeviceData(pageData);
|
|
|
- }
|
|
|
-
|
|
|
- @InnerAuth
|
|
|
- @GetMapping("/saveOrUpdateBaseCountByDataType")
|
|
|
- public void saveOrUpdateBaseCountByDataType(@RequestParam("dataType") Integer dataType,
|
|
|
- @RequestParam("size") int size,
|
|
|
- @RequestParam("boo") boolean boo) {
|
|
|
- northStatisticsSyncService.saveOrUpdateBaseCountByDataType(dataType, size, boo);
|
|
|
- }
|
|
|
-
|
|
|
- @InnerAuth
|
|
|
- @PostMapping("/saveErrorData")
|
|
|
- void saveErrorData(@RequestBody List<NorthError> errors) {
|
|
|
- northErrorService.saveErrorData(errors);
|
|
|
- }
|
|
|
+ private IIotDvrChannelService iotDvrChannelService;
|
|
|
|
|
|
- @InnerAuth
|
|
|
- @GetMapping("/findCategoryByCodeAndParentId")
|
|
|
- MediatorCategory findCategoryByCodeAndParentId(@RequestParam String code, @RequestParam long parentId) {
|
|
|
- return categoryService.findCategoryByCodeAndParentId(code, parentId);
|
|
|
- }
|
|
|
|
|
|
- @InnerAuth
|
|
|
- @PostMapping("/saveOrUpdateDeviceData")
|
|
|
- void saveOrUpdateDeviceData(@RequestBody List<MediatorDeviceData> deviceDataList) {
|
|
|
- deviceDataService.saveOrUpdateBatch(deviceDataList);
|
|
|
+ @ApiOperation("处理缓存中的通道信息数据")
|
|
|
+ @GetMapping({"/mediator/channelCacheDeal"})
|
|
|
+ public AjaxResult channelCacheDeal() {
|
|
|
+ this.iotDvrChannelService.channelCacheDeal();
|
|
|
+ return AjaxResult.success();
|
|
|
}
|
|
|
-
|
|
|
- @InnerAuth
|
|
|
- @PostMapping("/saveOrUpdateDeviceDataLog")
|
|
|
- void saveOrUpdateDeviceDataLog(@RequestBody List<MediatorDeviceDataLog> deviceDataList) {
|
|
|
- deviceDataLogService.saveOrUpdateBatch(deviceDataList);
|
|
|
- }*/
|
|
|
-
|
|
|
}
|