refactor(logs): 将日志服务从设备模块迁移到系统模块
- 将 CsLogsPO 相关类从 cs-device 模块移动到 cs-system 模块 - 更新所有相关导入路径以指向新的包位置 - 修改 MqttMessageHandler 使用远程 Feign 客户端调用日志服务 - 清理不再使用的分页和日志 POJO 导入依赖 - 重命名相关 Mapper 和 Service 类以匹配新模块结构
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package com.njcn.csdevice.controller.equipment;
|
package com.njcn.csdevice.controller.equipment;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.constant.OperateType;
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
@@ -10,7 +9,6 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.csdevice.pojo.po.CsEventSendMsg;
|
import com.njcn.csdevice.pojo.po.CsEventSendMsg;
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
|
||||||
import com.njcn.csdevice.pojo.vo.CsEventSendMsgVO;
|
import com.njcn.csdevice.pojo.vo.CsEventSendMsgVO;
|
||||||
import com.njcn.csdevice.service.ICsEventSendMsgService;
|
import com.njcn.csdevice.service.ICsEventSendMsgService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import com.njcn.csdevice.enums.DeviceOperate;
|
|||||||
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
import com.njcn.csdevice.pojo.dto.CsEquipmentDeliveryDTO;
|
||||||
import com.njcn.csdevice.pojo.param.*;
|
import com.njcn.csdevice.pojo.param.*;
|
||||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
|
||||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||||
import com.njcn.csdevice.pojo.vo.DevVersionVO;
|
import com.njcn.csdevice.pojo.vo.DevVersionVO;
|
||||||
import com.njcn.csdevice.pojo.vo.DeviceManagerVO;
|
import com.njcn.csdevice.pojo.vo.DeviceManagerVO;
|
||||||
@@ -30,7 +29,6 @@ import com.njcn.system.enums.DicDataTypeEnum;
|
|||||||
import com.njcn.system.pojo.po.SysDicTreePO;
|
import com.njcn.system.pojo.po.SysDicTreePO;
|
||||||
import com.njcn.web.advice.DeviceLog;
|
import com.njcn.web.advice.DeviceLog;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|||||||
@@ -2,12 +2,10 @@ package com.njcn.csdevice.handler;
|
|||||||
|
|
||||||
|
|
||||||
import com.github.tocrhz.mqtt.annotation.MqttSubscribe;
|
import com.github.tocrhz.mqtt.annotation.MqttSubscribe;
|
||||||
|
|
||||||
import com.github.tocrhz.mqtt.annotation.Payload;
|
import com.github.tocrhz.mqtt.annotation.Payload;
|
||||||
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
||||||
import com.njcn.common.utils.PubUtils;
|
import com.njcn.common.utils.PubUtils;
|
||||||
import com.njcn.csdevice.service.CsLogsPOService;
|
import com.njcn.cssystem.api.CsLogsFeignClient;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||||
@@ -25,8 +23,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class MqttMessageHandler {
|
public class MqttMessageHandler {
|
||||||
|
|
||||||
|
private final CsLogsFeignClient csLogsFeignClient;
|
||||||
private final CsLogsPOService csLogsPOService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插入devicelog
|
* 插入devicelog
|
||||||
@@ -34,7 +31,7 @@ public class MqttMessageHandler {
|
|||||||
@MqttSubscribe(value = "/deviceLog")
|
@MqttSubscribe(value = "/deviceLog")
|
||||||
public void responseRtData(String topic, MqttMessage message, @Payload String payload) {
|
public void responseRtData(String topic, MqttMessage message, @Payload String payload) {
|
||||||
DeviceLogDTO deviceLogDTO = PubUtils.json2obj(new String(message.getPayload(), StandardCharsets.UTF_8),DeviceLogDTO.class);
|
DeviceLogDTO deviceLogDTO = PubUtils.json2obj(new String(message.getPayload(), StandardCharsets.UTF_8),DeviceLogDTO.class);
|
||||||
csLogsPOService.addLog(deviceLogDTO);
|
csLogsFeignClient.addUserLog(deviceLogDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
package com.njcn.csdevice.mapper;
|
package com.njcn.csdevice.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.njcn.csdevice.pojo.po.CsEventSendMsg;
|
import com.njcn.csdevice.pojo.po.CsEventSendMsg;
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
|
||||||
import com.njcn.csdevice.pojo.vo.CsEventSendMsgVO;
|
import com.njcn.csdevice.pojo.vo.CsEventSendMsgVO;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|||||||
@@ -5,13 +5,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.njcn.csdevice.pojo.param.*;
|
import com.njcn.csdevice.pojo.param.*;
|
||||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
|
||||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||||
import com.njcn.csdevice.pojo.vo.DevVersionVO;
|
import com.njcn.csdevice.pojo.vo.DevVersionVO;
|
||||||
import com.njcn.csdevice.pojo.vo.DeviceManagerVO;
|
import com.njcn.csdevice.pojo.vo.DeviceManagerVO;
|
||||||
import com.njcn.csdevice.pojo.vo.ProjectEquipmentVO;
|
import com.njcn.csdevice.pojo.vo.ProjectEquipmentVO;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import com.njcn.access.utils.MqttUtil;
|
|||||||
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.csdevice.api.CsLedgerFeignClient;
|
import com.njcn.csdevice.api.CsLedgerFeignClient;
|
||||||
import com.njcn.csdevice.api.CsLogsFeignClient;
|
|
||||||
import com.njcn.csdevice.constant.DataParam;
|
import com.njcn.csdevice.constant.DataParam;
|
||||||
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
||||||
import com.njcn.csdevice.mapper.CsEquipmentDeliveryMapper;
|
import com.njcn.csdevice.mapper.CsEquipmentDeliveryMapper;
|
||||||
@@ -50,6 +49,7 @@ import com.njcn.csharmonic.api.CsHarmonicPlanLineFeignClient;
|
|||||||
import com.njcn.csharmonic.api.EventUserFeignClient;
|
import com.njcn.csharmonic.api.EventUserFeignClient;
|
||||||
import com.njcn.csharmonic.param.CsEventUserQueryParam;
|
import com.njcn.csharmonic.param.CsEventUserQueryParam;
|
||||||
import com.njcn.csharmonic.pojo.po.CsEventPO;
|
import com.njcn.csharmonic.pojo.po.CsEventPO;
|
||||||
|
import com.njcn.cssystem.api.CsLogsFeignClient;
|
||||||
import com.njcn.device.biz.mapper.OverLimitWlMapper;
|
import com.njcn.device.biz.mapper.OverLimitWlMapper;
|
||||||
import com.njcn.oss.constant.OssPath;
|
import com.njcn.oss.constant.OssPath;
|
||||||
import com.njcn.oss.utils.FileStorageUtil;
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
package com.njcn.csdevice.service.impl;
|
package com.njcn.csdevice.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.csdevice.mapper.CsEventSendMsgMapper;
|
import com.njcn.csdevice.mapper.CsEventSendMsgMapper;
|
||||||
import com.njcn.csdevice.pojo.po.CsEventSendMsg;
|
import com.njcn.csdevice.pojo.po.CsEventSendMsg;
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
|
||||||
import com.njcn.csdevice.pojo.vo.CsEventSendMsgVO;
|
import com.njcn.csdevice.pojo.vo.CsEventSendMsgVO;
|
||||||
import com.njcn.csdevice.service.ICsEventSendMsgService;
|
import com.njcn.csdevice.service.ICsEventSendMsgService;
|
||||||
import com.njcn.cssystem.pojo.po.CsFeedbackChatPO;
|
|
||||||
import com.njcn.system.api.EpdFeignClient;
|
import com.njcn.system.api.EpdFeignClient;
|
||||||
import com.njcn.system.pojo.po.EleEpdPqd;
|
import com.njcn.system.pojo.po.EleEpdPqd;
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ public class DeviceFtpServiceImpl implements DeviceFtpService {
|
|||||||
private final AskDeviceDataFeignClient askDeviceDataFeignClient;
|
private final AskDeviceDataFeignClient askDeviceDataFeignClient;
|
||||||
private final RedisUtil redisUtil;
|
private final RedisUtil redisUtil;
|
||||||
private final ChannelObjectUtil channelObjectUtil;
|
private final ChannelObjectUtil channelObjectUtil;
|
||||||
private final FileStorageUtil fileStorageUtil;
|
|
||||||
private final MqttUtil mqttUtil;
|
private final MqttUtil mqttUtil;
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
@@ -57,6 +56,7 @@ public class DeviceFtpServiceImpl implements DeviceFtpService {
|
|||||||
if (Objects.nonNull(object)) {
|
if (Objects.nonNull(object)) {
|
||||||
makeUpVo.setPrjDataPath(object.toString());
|
makeUpVo.setPrjDataPath(object.toString());
|
||||||
makeUpVo.setType("dir");
|
makeUpVo.setType("dir");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -84,6 +84,7 @@ public class DeviceFtpServiceImpl implements DeviceFtpService {
|
|||||||
if (object != null) {
|
if (object != null) {
|
||||||
// 根据类型处理不同的数据
|
// 根据类型处理不同的数据
|
||||||
processObject(result, object, type);
|
processObject(result, object, type);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.njcn.csdevice.api;
|
package com.njcn.cssystem.api;
|
||||||
|
|
||||||
import com.njcn.common.pojo.constant.ServerInfo;
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.csdevice.api.fallback.CsLogsClientFallbackFactory;
|
import com.njcn.cssystem.api.fallback.CsLogsClientFallbackFactory;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.njcn.csdevice.api.fallback;
|
package com.njcn.cssystem.api.fallback;
|
||||||
|
|
||||||
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.csdevice.api.CsLogsFeignClient;
|
import com.njcn.cssystem.api.CsLogsFeignClient;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@@ -1,16 +1,10 @@
|
|||||||
package com.njcn.csdevice.pojo.po;
|
package com.njcn.cssystem.pojo.po;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import lombok.Data;
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.njcn.csdevice.controller.equipment;
|
package com.njcn.cssystem.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
@@ -8,8 +8,8 @@ import com.njcn.common.pojo.enums.common.LogEnum;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
import com.njcn.cssystem.pojo.po.CsLogsPO;
|
||||||
import com.njcn.csdevice.service.CsLogsPOService;
|
import com.njcn.cssystem.service.CsLogsPOService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -35,10 +35,9 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequestMapping("/cslog")
|
@RequestMapping("/cslog")
|
||||||
public class CsLogController extends BaseController {
|
public class CsLogController extends BaseController {
|
||||||
|
|
||||||
private final CsLogsPOService csLogsPOService;
|
private final CsLogsPOService csLogsPOService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插入审计日志
|
* 插入审计日志
|
||||||
*/
|
*/
|
||||||
@@ -57,12 +56,8 @@ public class CsLogController extends BaseController {
|
|||||||
@ApiImplicitParam(name = "baseParam", value = "查询日志参数", required = true)
|
@ApiImplicitParam(name = "baseParam", value = "查询日志参数", required = true)
|
||||||
public HttpResult<IPage<CsLogsPO>> queryLog(@RequestBody BaseParam baseParam){
|
public HttpResult<IPage<CsLogsPO>> queryLog(@RequestBody BaseParam baseParam){
|
||||||
String methodDescribe = getMethodDescribe("queryLog");
|
String methodDescribe = getMethodDescribe("queryLog");
|
||||||
|
|
||||||
IPage<CsLogsPO> list = csLogsPOService.queryPage(baseParam);
|
IPage<CsLogsPO> list = csLogsPOService.queryPage(baseParam);
|
||||||
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.njcn.csdevice.mapper;
|
package com.njcn.cssystem.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
import com.njcn.cssystem.pojo.po.CsLogsPO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.njcn.csdevice.service;
|
package com.njcn.cssystem.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
||||||
|
import com.njcn.cssystem.pojo.po.CsLogsPO;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -16,7 +16,6 @@ import com.njcn.web.pojo.param.BaseParam;
|
|||||||
*/
|
*/
|
||||||
public interface CsLogsPOService extends IService<CsLogsPO>{
|
public interface CsLogsPOService extends IService<CsLogsPO>{
|
||||||
|
|
||||||
|
|
||||||
void addLog(DeviceLogDTO deviceLogDTO);
|
void addLog(DeviceLogDTO deviceLogDTO);
|
||||||
|
|
||||||
IPage<CsLogsPO> queryPage(BaseParam baseParam);
|
IPage<CsLogsPO> queryPage(BaseParam baseParam);
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
package com.njcn.cssystem.service.impl;
|
package com.njcn.cssystem.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.csdevice.api.RoleEngineerDevFeignClient;
|
import com.njcn.csdevice.api.RoleEngineerDevFeignClient;
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
|
||||||
import com.njcn.cssystem.mapper.CsFeedbackChatMapper;
|
import com.njcn.cssystem.mapper.CsFeedbackChatMapper;
|
||||||
import com.njcn.cssystem.mapper.CsFeedbackMapper;
|
import com.njcn.cssystem.mapper.CsFeedbackMapper;
|
||||||
import com.njcn.cssystem.pojo.param.CsFeedbackAddParm;
|
import com.njcn.cssystem.pojo.param.CsFeedbackAddParm;
|
||||||
@@ -16,7 +14,6 @@ import com.njcn.cssystem.pojo.po.CsFeedbackPO;
|
|||||||
import com.njcn.cssystem.pojo.po.CsFilePathPO;
|
import com.njcn.cssystem.pojo.po.CsFilePathPO;
|
||||||
import com.njcn.cssystem.pojo.vo.CsFeedbackDetailVO;
|
import com.njcn.cssystem.pojo.vo.CsFeedbackDetailVO;
|
||||||
import com.njcn.cssystem.pojo.vo.CsFeedbackVO;
|
import com.njcn.cssystem.pojo.vo.CsFeedbackVO;
|
||||||
import com.njcn.cssystem.service.CsFeedbackChatService;
|
|
||||||
import com.njcn.cssystem.service.CsFeedbackService;
|
import com.njcn.cssystem.service.CsFeedbackService;
|
||||||
import com.njcn.cssystem.service.CsFilePathService;
|
import com.njcn.cssystem.service.CsFilePathService;
|
||||||
import com.njcn.oss.constant.OssPath;
|
import com.njcn.oss.constant.OssPath;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.njcn.csdevice.service.impl;
|
package com.njcn.cssystem.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -6,10 +6,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
import com.njcn.common.pojo.dto.DeviceLogDTO;
|
||||||
import com.njcn.csdevice.mapper.CsLogsPOMapper;
|
import com.njcn.cssystem.mapper.CsLogsPOMapper;
|
||||||
import com.njcn.csdevice.pojo.po.CsLogsPO;
|
import com.njcn.cssystem.pojo.po.CsLogsPO;
|
||||||
import com.njcn.csdevice.service.CsLogsPOService;
|
import com.njcn.cssystem.service.CsLogsPOService;
|
||||||
import com.njcn.user.enums.AppRoleEnum;
|
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
@@ -30,7 +29,6 @@ import java.util.List;
|
|||||||
public class CsLogsPOServiceImpl extends ServiceImpl<CsLogsPOMapper, CsLogsPO> implements CsLogsPOService {
|
public class CsLogsPOServiceImpl extends ServiceImpl<CsLogsPOMapper, CsLogsPO> implements CsLogsPOService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
// @Transactional(rollbackFor = {Exception.class})
|
|
||||||
public void addLog(DeviceLogDTO deviceLogDTO) {
|
public void addLog(DeviceLogDTO deviceLogDTO) {
|
||||||
CsLogsPO csPO = new CsLogsPO();
|
CsLogsPO csPO = new CsLogsPO();
|
||||||
BeanUtils.copyProperties(deviceLogDTO,csPO);
|
BeanUtils.copyProperties(deviceLogDTO,csPO);
|
||||||
@@ -47,7 +45,6 @@ public class CsLogsPOServiceImpl extends ServiceImpl<CsLogsPOMapper, CsLogsPO> i
|
|||||||
List<String> strings = JSONArray.parseArray(userRole, String.class);
|
List<String> strings = JSONArray.parseArray(userRole, String.class);
|
||||||
QueryWrapper<CsLogsPO> csLogsPOQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<CsLogsPO> csLogsPOQueryWrapper = new QueryWrapper<>();
|
||||||
csLogsPOQueryWrapper.lambda()
|
csLogsPOQueryWrapper.lambda()
|
||||||
// .eq(!strings.contains(AppRoleEnum.OPERATION_MANAGER.getCode()),CsLogsPO::getUserName, username)
|
|
||||||
.ge(StringUtils.isNotBlank(baseParam.getSearchBeginTime()),CsLogsPO::getCreateTime,baseParam.getSearchBeginTime()).
|
.ge(StringUtils.isNotBlank(baseParam.getSearchBeginTime()),CsLogsPO::getCreateTime,baseParam.getSearchBeginTime()).
|
||||||
le(StringUtils.isNotBlank(baseParam.getSearchEndTime()),CsLogsPO::getCreateTime,baseParam.getSearchEndTime()).orderByDesc(CsLogsPO::getCreateTime);
|
le(StringUtils.isNotBlank(baseParam.getSearchEndTime()),CsLogsPO::getCreateTime,baseParam.getSearchEndTime()).orderByDesc(CsLogsPO::getCreateTime);
|
||||||
IPage<CsLogsPO> list = this.getBaseMapper().selectPage(returnpage,csLogsPOQueryWrapper);
|
IPage<CsLogsPO> list = this.getBaseMapper().selectPage(returnpage,csLogsPOQueryWrapper);
|
||||||
Reference in New Issue
Block a user