离线数据上传

This commit is contained in:
hzj
2024-09-29 16:15:52 +08:00
parent d1574e43be
commit 4745b86085
19 changed files with 1045 additions and 840 deletions

View File

@@ -22,6 +22,7 @@ import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.List;
/**
@@ -91,4 +92,13 @@ public class CsEventController extends BaseController {
csEventPOService.saveBatchEventList(csEventPOS);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/queryByIndex")
@ApiOperation("根据表唯一索引查询(用于校验是否存在该事件)")
public HttpResult<CsEventPO> queryByIndex(@RequestBody CsEventPO csEventPO) {
String methodDescribe = getMethodDescribe("queryByIndex");
CsEventPO po = csEventPOService.lambdaQuery().eq(CsEventPO::getDeviceId,csEventPO.getDeviceId()).eq(CsEventPO::getTag,csEventPO.getTag()).eq(CsEventPO::getStartTime,csEventPO.getStartTime()).one();
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, po, methodDescribe);
}
}