feat():修复代码缓存框架
parent
dd94f2e39e
commit
ecf81cc79e
|
@ -1,8 +1,11 @@
|
|||
package com.muyu.common.cache;
|
||||
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import com.muyu.common.redis.service.RedisService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 抽象缓存层
|
||||
* * @className: CacheAbsBasic ️✈️
|
||||
|
@ -18,16 +21,43 @@ public abstract class CacheAbsBasic <K, V> implements CacheBasic<K, V>{
|
|||
|
||||
@Override
|
||||
public void put(K key, V value) {
|
||||
redisService.setCacheObject(encode(key), value);
|
||||
|
||||
try {
|
||||
redisService.setCacheObject(encode(key), value,30L,TimeUnit.MINUTES);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("运行时异常,异常信息为:{}"+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public V get(K key) {
|
||||
|
||||
try {
|
||||
return redisService.getCacheObject(encode(key));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("运行时异常,异常信息为:{}"+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(K key) {
|
||||
|
||||
try {
|
||||
redisService.deleteObject(encode(key));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("运行时异常,异常信息为:{}"+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hashKey(K key){
|
||||
Boolean b = false;
|
||||
|
||||
try {
|
||||
b = redisService.hasKey(encode(key));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("运行时异常,异常信息为:{}"+e.getMessage());
|
||||
}
|
||||
return b;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package com.muyu.common.cache;
|
||||
|
||||
import org.springframework.data.redis.core.TimeoutUtils;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 缓存基础
|
||||
* * @className: CacheBasic ️✈️
|
||||
|
@ -14,4 +19,6 @@ public interface CacheBasic<K, V> extends PrimaryKeyBasic<K> {
|
|||
V get(K key);
|
||||
|
||||
void remove(K key);
|
||||
|
||||
boolean hashKey(K key);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<module>cloud-common-cache</module>
|
||||
<module>cloud-common-iotdb</module>
|
||||
<module>cloud-common-caffeine</module>
|
||||
|
||||
</modules>
|
||||
|
||||
<artifactId>cloud-common</artifactId>
|
||||
|
|
|
@ -53,7 +53,3 @@ spring:
|
|||
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# xxl-job 配置文件
|
||||
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.muyu.system.mapper: DEBUG
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-modules-enterprise</artifactId>
|
||||
<version>3.6.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>enterpise-cache</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-cache</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>enterpise-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,42 @@
|
|||
package com.muyu.enterpise.cache;
|
||||
|
||||
import com.muyu.common.cache.CacheAbsBasic;
|
||||
import com.muyu.common.cache.CacheBasic;
|
||||
import com.muyu.domain.MessageValue;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author xie ya ru
|
||||
* @Date 2024/9/29 20:04
|
||||
* @注释
|
||||
*/
|
||||
@Component
|
||||
public class EnterpiseCacheService extends CacheAbsBasic<String, MessageValue> {
|
||||
|
||||
/**
|
||||
* 前缀
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String keyPre() {
|
||||
return"messageValue:info:";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String encode(String key) {
|
||||
return super.encode(key);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解密
|
||||
* @param key 缓存建
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String decode(String key) {
|
||||
return key.replace("messageValue:info:","");
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
com.muyu.enterpise.cache.EnterpiseCacheService
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import com.muyu.domain.req.MessageValueAddReq;
|
||||
import com.muyu.domain.resp.MessageValueListResp;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -82,4 +83,14 @@ public class MessageValue extends BaseEntity {
|
|||
.messageEndIndex(messageValueAddReq.getMessageEndIndex())
|
||||
.build();
|
||||
}
|
||||
public static MessageValue addRollback(MessageValueListResp messageValueListResp){
|
||||
return MessageValue.builder()
|
||||
.templateId(messageValueListResp.getMessageId())
|
||||
.messageType(messageValueListResp.getMessageType())
|
||||
.messageCode(messageValueListResp.getMessageCode())
|
||||
.messageLabel(messageValueListResp.getMessageLabel())
|
||||
.messageStartIndex(messageValueListResp.getMessageStartIndex())
|
||||
.messageEndIndex(messageValueListResp.getMessageEndIndex())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
@ -21,14 +18,13 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||
* @date 2024-09-18
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName(value = "sys_car", autoResultMap = true)
|
||||
@Tag(name = "车辆基础信息对象")
|
||||
public class SysCar extends BaseEntity{
|
||||
public class SysCarReq {
|
||||
|
||||
/** 自增主键 */
|
||||
@TableId( type = IdType.AUTO)
|
||||
|
@ -68,24 +64,4 @@ public class SysCar extends BaseEntity{
|
|||
private Integer state;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("carVin", getCarVin())
|
||||
.append("carPlate", getCarPlate())
|
||||
.append("carBrand", getCarBrand())
|
||||
.append("carModel", getCarModel())
|
||||
.append("carType", getCarType())
|
||||
.append("warnStrategy", getWarnStrategy())
|
||||
.append("groupCode", getGroupCode())
|
||||
.append("state", getState())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package com.muyu.domain.resp;
|
|||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.domain.SysCar;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
@ -89,19 +90,19 @@ public class SysCarResp {
|
|||
@Schema(description = "启用状态")
|
||||
private Integer state;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SysCarResp{" +
|
||||
"id=" + id +
|
||||
", carVin='" + carVin + '\'' +
|
||||
", carPlate='" + carPlate + '\'' +
|
||||
", carBrand='" + carBrand + '\'' +
|
||||
", carModel='" + carModel + '\'' +
|
||||
", carType=" + carType +
|
||||
", sysTypeName='" + sysTypeName + '\'' +
|
||||
", warnStrategy=" + warnStrategy +
|
||||
", groupCode='" + groupCode + '\'' +
|
||||
", state=" + state +
|
||||
'}';
|
||||
|
||||
public static SysCarResp reverseResp(SysCar sysCar){
|
||||
return SysCarResp.builder()
|
||||
.id(sysCar.getId())
|
||||
.carVin(sysCar.getCarVin())
|
||||
.carPlate(sysCar.getCarPlate())
|
||||
.carBrand(sysCar.getCarBrand())
|
||||
.carModel(sysCar.getCarModel())
|
||||
.carType(sysCar.getCarType())
|
||||
.warnStrategy(sysCar.getWarnStrategy())
|
||||
.groupCode(sysCar.getGroupCode())
|
||||
.state(sysCar.getState())
|
||||
.build();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,6 +83,14 @@
|
|||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-xxl</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- cache缓存框架 -->
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>enterpise-cache</artifactId>
|
||||
<version>${muyu.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
|
||||
import com.muyu.domain.CarFenceClazz;
|
||||
import com.muyu.service.CarFenceClazzService;
|
||||
import com.muyu.enterpise.service.CarFenceClazzService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
|
@ -1,12 +1,12 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarFence;
|
||||
import com.muyu.domain.req.CarFenceReq;
|
||||
import com.muyu.domain.resp.CarFenceResq;
|
||||
import com.muyu.service.CarFenceService;
|
||||
import com.muyu.service.CarFenceServiceMybaits;
|
||||
import com.muyu.enterpise.service.CarFenceService;
|
||||
import com.muyu.enterpise.service.CarFenceServiceMybaits;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
|
@ -1,8 +1,8 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarFenceType;
|
||||
import com.muyu.service.CarFenceTypeService;
|
||||
import com.muyu.enterpise.service.CarFenceTypeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
|
@ -1,8 +1,8 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.service.CarTypeService;
|
||||
import com.muyu.enterpise.service.CarTypeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ import com.muyu.domain.req.FaultCodeAddReq;
|
|||
import com.muyu.domain.req.FaultCodeListReq;
|
||||
import com.muyu.domain.req.FaultCodeUpdReq;
|
||||
import com.muyu.domain.resp.FaultCodeTotalListResp;
|
||||
import com.muyu.service.FaultCodeService;
|
||||
import com.muyu.enterpise.service.FaultCodeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ import com.muyu.domain.FaultCondition;
|
|||
import com.muyu.domain.req.FaultConditionAddReq;
|
||||
import com.muyu.domain.req.FaultConditionListReq;
|
||||
import com.muyu.domain.req.FaultConditionUpdReq;
|
||||
import com.muyu.service.FaultConditionService;
|
||||
import com.muyu.enterpise.service.FaultConditionService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,6 +1,6 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.service.FaultLabelService;
|
||||
import com.muyu.enterpise.service.FaultLabelService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.req.FaultLogListReq;
|
||||
import com.muyu.service.FaultLogService;
|
||||
import com.muyu.enterpise.service.FaultLogService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.CarFaultRule;
|
||||
import com.muyu.domain.FaultRule;
|
||||
import com.muyu.service.FaultRuleService;
|
||||
import com.muyu.enterpise.service.FaultRuleService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,6 +1,6 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.service.FaultTypeService;
|
||||
import com.muyu.enterpise.service.FaultTypeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,8 +1,8 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.FenceGroup;
|
||||
import com.muyu.service.FenceGroupService;
|
||||
import com.muyu.enterpise.service.FenceGroupService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
|
@ -1,11 +1,11 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.message.Message;
|
||||
import com.muyu.domain.message.MessageReq;
|
||||
import com.muyu.domain.message.MessageSendReq;
|
||||
import com.muyu.service.MessageService;
|
||||
import com.muyu.enterpise.service.MessageService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.MessageTemplate;
|
||||
import com.muyu.domain.req.MessageTemplateAddReq;
|
||||
import com.muyu.domain.resp.MessageTemplateListResp;
|
||||
import com.muyu.service.MessageTemplateService;
|
||||
import com.muyu.enterpise.service.MessageTemplateService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
|
@ -6,7 +6,8 @@ import com.muyu.domain.MessageValue;
|
|||
import com.muyu.domain.req.MessageValueAddReq;
|
||||
import com.muyu.domain.req.MessageValueReq;
|
||||
import com.muyu.domain.resp.MessageValueListResp;
|
||||
import com.muyu.service.MessageValueService;
|
||||
import com.muyu.enterpise.cache.EnterpiseCacheService;
|
||||
import com.muyu.enterpise.service.MessageValueService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
@ -33,8 +34,8 @@ public class MessageValueController extends BaseController {
|
|||
@Autowired
|
||||
private MessageValueService messageValueService;
|
||||
|
||||
@Resource
|
||||
private RedisTemplate<String,MessageValue> redisTemplate;
|
||||
@Autowired
|
||||
private EnterpiseCacheService enterpiseCacheService;
|
||||
|
||||
/**
|
||||
* 报文数据列表查询
|
||||
|
@ -56,8 +57,8 @@ public class MessageValueController extends BaseController {
|
|||
@PostMapping("/")
|
||||
@Operation(summary = "添加报文数据", description = "新增报文数据")
|
||||
public Result<String> save(@RequestBody MessageValueAddReq messageValueAddReq){
|
||||
redisTemplate.boundValueOps("messageValue:" +messageValueAddReq.getTemplateId()).increment(1);
|
||||
messageValueService.save(MessageValue.addBuild(messageValueAddReq));
|
||||
enterpiseCacheService.put(String.valueOf(messageValueAddReq.getTemplateId()),MessageValue.addBuild(messageValueAddReq));
|
||||
return Result.success("添加成功");
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.domain.FenceGroup;
|
||||
import com.muyu.domain.req.CarFenceAdd;
|
||||
import com.muyu.service.CarFenceServiceMybaits;
|
||||
import com.muyu.service.MiddleService;
|
||||
import com.muyu.enterpise.service.CarFenceServiceMybaits;
|
||||
import com.muyu.enterpise.service.MiddleService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
|
@ -6,8 +6,9 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
|||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.domain.SysCar;
|
||||
import com.muyu.domain.req.SysCarReq;
|
||||
import com.muyu.domain.resp.SysCarResp;
|
||||
import com.muyu.service.SysCarService;
|
||||
import com.muyu.enterpise.service.SysCarService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -34,10 +35,10 @@ public class SysCarController extends BaseController
|
|||
*/
|
||||
@RequiresPermissions("car:car:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<SysCarResp>> list(SysCar sysCar)
|
||||
public Result<TableDataInfo<SysCarResp>> list(SysCarReq sysCarReq)
|
||||
{
|
||||
startPage();
|
||||
List<SysCarResp> list = sysCarService.selectSysCarList(sysCar);
|
||||
List<SysCarResp> list = sysCarService.selectSysCarList(sysCarReq);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
|
@ -7,7 +7,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
|||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.domain.SysCarFault;
|
||||
import com.muyu.service.ISysCarFaultService;
|
||||
import com.muyu.enterpise.service.ISysCarFaultService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.validation.annotation.Validated;
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.domain.SysCarType;
|
||||
import com.muyu.service.SysTypeService;
|
||||
import com.muyu.enterpise.service.SysTypeService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
|
@ -6,7 +6,7 @@ import com.muyu.common.core.web.controller.BaseController;
|
|||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.domain.WarnLogs;
|
||||
import com.muyu.service.IWarnLogsService;
|
||||
import com.muyu.enterpise.service.IWarnLogsService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.validation.annotation.Validated;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
|
@ -6,7 +6,7 @@ import com.muyu.common.core.web.controller.BaseController;
|
|||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.domain.WarnRule;
|
||||
import com.muyu.service.IWarnRuleService;
|
||||
import com.muyu.enterpise.service.IWarnRuleService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.validation.annotation.Validated;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.controller;
|
||||
package com.muyu.enterpise.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
|
@ -6,7 +6,7 @@ import com.muyu.common.core.web.controller.BaseController;
|
|||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.domain.WarnStrategy;
|
||||
import com.muyu.service.IWarnStrategyService;
|
||||
import com.muyu.enterpise.service.IWarnStrategyService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.validation.annotation.Validated;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.CarFenceClazz;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.CarFence;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.muyu.domain.CarFence;
|
||||
import com.muyu.domain.CarMiddle;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.CarFenceType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.CarType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.FaultCode;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.FaultCondition;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.FaultLabel;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.FaultLog;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.FaultRule;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.FaultType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.FenceGroup;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.message.Message;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.MessageTemplate;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.MessageValue;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.SysCarFault;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.SysCar;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.SysCarType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.domain.WarnLogs;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.mapper;
|
||||
package com.muyu.enterpise.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.CarFenceClazz;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.muyu.domain.CarFence;
|
||||
import com.muyu.domain.FenceGroup;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.CarFenceType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.CarType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.FaultCondition;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.muyu.domain.CarFaultRule;
|
||||
import com.muyu.domain.FaultReport;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
/**
|
||||
* 故障检测策略的接口
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.FaultLabel;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.FaultLog;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.FaultRule;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.FaultType;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.FenceGroup;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.SysCarFault;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.WarnLogs;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.WarnRule;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.WarnStrategy;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.message.Message;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.MessageTemplate;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.MessageValue;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
/**
|
||||
* 中间表服务接口
|
|
@ -1,7 +1,8 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.SysCar;
|
||||
import com.muyu.domain.req.SysCarReq;
|
||||
import com.muyu.domain.resp.SysCarResp;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -26,7 +27,7 @@ public interface SysCarService extends IService<SysCar> {
|
|||
* @param sysCar 车辆基础信息
|
||||
* @return 车辆基础信息集合
|
||||
*/
|
||||
public List<SysCarResp> selectSysCarList(SysCar sysCar);
|
||||
public List<SysCarResp> selectSysCarList(SysCarReq sysCarReq);
|
||||
|
||||
/**
|
||||
* 判断 车辆基础信息 id是否唯一
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service;
|
||||
package com.muyu.enterpise.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.domain.SysCarType;
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.CarFenceClazz;
|
||||
import com.muyu.mapper.CarFenceClazzMapper;
|
||||
import com.muyu.service.CarFenceClazzService;
|
||||
import com.muyu.enterpise.mapper.CarFenceClazzMapper;
|
||||
import com.muyu.enterpise.service.CarFenceClazzService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
@ -9,10 +9,10 @@ import com.muyu.domain.CarFenceClazz;
|
|||
import com.muyu.domain.CarFenceType;
|
||||
import com.muyu.domain.req.CarFenceReq;
|
||||
import com.muyu.domain.resp.CarFenceResq;
|
||||
import com.muyu.mapper.CarFenceMapper;
|
||||
import com.muyu.service.CarFenceClazzService;
|
||||
import com.muyu.service.CarFenceService;
|
||||
import com.muyu.service.CarFenceTypeService;
|
||||
import com.muyu.enterpise.mapper.CarFenceMapper;
|
||||
import com.muyu.enterpise.service.CarFenceClazzService;
|
||||
import com.muyu.enterpise.service.CarFenceService;
|
||||
import com.muyu.enterpise.service.CarFenceTypeService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
|
@ -1,12 +1,12 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.muyu.domain.CarFence;
|
||||
import com.muyu.domain.CarMiddle;
|
||||
import com.muyu.domain.FenceAndGroupMiddle;
|
||||
import com.muyu.domain.FenceGroup;
|
||||
import com.muyu.domain.req.CarFenceAdd;
|
||||
import com.muyu.mapper.CarFenceServiceMybaitsMapper;
|
||||
import com.muyu.service.CarFenceServiceMybaits;
|
||||
import com.muyu.enterpise.mapper.CarFenceServiceMybaitsMapper;
|
||||
import com.muyu.enterpise.service.CarFenceServiceMybaits;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.CarFenceType;
|
||||
import com.muyu.mapper.CarFenceTypeMapper;
|
||||
import com.muyu.service.CarFenceTypeService;
|
||||
import com.muyu.enterpise.mapper.CarFenceTypeMapper;
|
||||
import com.muyu.enterpise.service.CarFenceTypeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.CarType;
|
||||
import com.muyu.mapper.CarTypeMapper;
|
||||
import com.muyu.service.CarTypeService;
|
||||
import com.muyu.enterpise.mapper.CarTypeMapper;
|
||||
import com.muyu.enterpise.service.CarTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
@ -11,8 +11,8 @@ import com.muyu.domain.req.FaultCodeUpdReq;
|
|||
import com.muyu.domain.resp.FaultCodeListResp;
|
||||
import com.muyu.domain.resp.FaultCodeTotalListResp;
|
||||
import com.muyu.domain.vo.FaultCodeVo;
|
||||
import com.muyu.mapper.FaultCodeMapper;
|
||||
import com.muyu.service.FaultCodeService;
|
||||
import com.muyu.enterpise.mapper.FaultCodeMapper;
|
||||
import com.muyu.enterpise.service.FaultCodeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
@ -7,8 +7,8 @@ import com.muyu.domain.req.FaultConditionAddReq;
|
|||
import com.muyu.domain.req.FaultConditionListReq;
|
||||
import com.muyu.domain.resp.FaultConditionListResp;
|
||||
import com.muyu.domain.resp.FaultConditionTotalListResp;
|
||||
import com.muyu.mapper.FaultConditionMapper;
|
||||
import com.muyu.service.FaultConditionService;
|
||||
import com.muyu.enterpise.mapper.FaultConditionMapper;
|
||||
import com.muyu.enterpise.service.FaultConditionService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.FaultLabel;
|
||||
import com.muyu.mapper.FaultLabelMapper;
|
||||
import com.muyu.service.FaultLabelService;
|
||||
import com.muyu.enterpise.mapper.FaultLabelMapper;
|
||||
import com.muyu.enterpise.service.FaultLabelService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
@ -6,8 +6,8 @@ import com.muyu.domain.FaultLog;
|
|||
import com.muyu.domain.req.FaultLogListReq;
|
||||
import com.muyu.domain.resp.FaultLogListResp;
|
||||
import com.muyu.domain.resp.FaultLogTotalListResp;
|
||||
import com.muyu.mapper.FaultLogMapper;
|
||||
import com.muyu.service.FaultLogService;
|
||||
import com.muyu.enterpise.mapper.FaultLogMapper;
|
||||
import com.muyu.enterpise.service.FaultLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.FaultRule;
|
||||
import com.muyu.mapper.FaultRuleMapper;
|
||||
import com.muyu.service.FaultRuleService;
|
||||
import com.muyu.enterpise.mapper.FaultRuleMapper;
|
||||
import com.muyu.enterpise.service.FaultRuleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.FaultType;
|
||||
import com.muyu.mapper.FaultTypeMapper;
|
||||
import com.muyu.service.FaultTypeService;
|
||||
import com.muyu.enterpise.mapper.FaultTypeMapper;
|
||||
import com.muyu.enterpise.service.FaultTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.FenceGroup;
|
||||
import com.muyu.mapper.FenceGroupMapper;
|
||||
import com.muyu.service.FenceGroupService;
|
||||
import com.muyu.enterpise.mapper.FenceGroupMapper;
|
||||
import com.muyu.enterpise.service.FenceGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
@ -9,8 +9,8 @@ import com.muyu.common.system.domain.LoginUser;
|
|||
import com.muyu.domain.message.Message;
|
||||
import com.muyu.domain.message.MessageReq;
|
||||
import com.muyu.domain.message.MessageSendReq;
|
||||
import com.muyu.mapper.MessageMapper;
|
||||
import com.muyu.service.MessageService;
|
||||
import com.muyu.enterpise.mapper.MessageMapper;
|
||||
import com.muyu.enterpise.service.MessageService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.MessageTemplate;
|
||||
import com.muyu.mapper.MessageTemplateMapper;
|
||||
import com.muyu.service.MessageTemplateService;
|
||||
import com.muyu.enterpise.mapper.MessageTemplateMapper;
|
||||
import com.muyu.enterpise.service.MessageTemplateService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
|
@ -1,4 +1,4 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
@ -7,14 +7,13 @@ import com.muyu.common.core.utils.StringUtils;
|
|||
import com.muyu.domain.MessageValue;
|
||||
import com.muyu.domain.req.MessageValueReq;
|
||||
import com.muyu.domain.resp.MessageValueListResp;
|
||||
import com.muyu.mapper.MessageValueMapper;
|
||||
import com.muyu.service.MessageValueService;
|
||||
import com.muyu.enterpise.mapper.MessageValueMapper;
|
||||
import com.muyu.enterpise.service.MessageValueService;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 消息值服务实现类
|
||||
|
@ -32,7 +31,7 @@ public class MessageValueServiceImpl
|
|||
private MessageValueMapper messageValueMapper;
|
||||
|
||||
|
||||
private RedisTemplate<String, MessageValue> redisTemplate;
|
||||
|
||||
/**
|
||||
* 查询所有消息值
|
||||
* @param messageValueReq
|
||||
|
@ -54,9 +53,7 @@ public class MessageValueServiceImpl
|
|||
}
|
||||
|
||||
List<MessageValue> list = this.list(queryWrapper);
|
||||
for (MessageValue messageValue : list){
|
||||
redisTemplate.boundValueOps("messageValue:" + messageValue.getTemplateId()).set(messageValue);
|
||||
}
|
||||
|
||||
|
||||
return list.stream()
|
||||
.map(messageValue -> MessageValueListResp.valueBuild(
|
|
@ -1,7 +1,7 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.muyu.mapper.MiddleMapper;
|
||||
import com.muyu.service.MiddleService;
|
||||
import com.muyu.enterpise.mapper.MiddleMapper;
|
||||
import com.muyu.enterpise.service.MiddleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.domain.SysCarFault;
|
||||
import com.muyu.mapper.SysCarFaultMapper;
|
||||
import com.muyu.service.ISysCarFaultService;
|
||||
import com.muyu.enterpise.mapper.SysCarFaultMapper;
|
||||
import com.muyu.enterpise.service.ISysCarFaultService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
|
@ -1,15 +1,18 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.SysCar;
|
||||
import com.muyu.domain.req.SysCarReq;
|
||||
import com.muyu.domain.resp.SysCarResp;
|
||||
import com.muyu.mapper.SysCarMapper;
|
||||
import com.muyu.service.SysCarService;
|
||||
import com.muyu.enterpise.mapper.SysCarMapper;
|
||||
import com.muyu.enterpise.service.SysCarService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -32,11 +35,12 @@ public class SysCarServiceImpl
|
|||
* @return 车辆基础信息
|
||||
*/
|
||||
@Override
|
||||
public SysCar selectSysCarById(Long id)
|
||||
{
|
||||
public SysCar selectSysCarById(Long id) {
|
||||
LambdaQueryWrapper<SysCar> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Assert.notNull(id, "id不可为空");
|
||||
queryWrapper.eq(SysCar::getId, id);
|
||||
|
||||
|
||||
return this.getOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
@ -44,34 +48,36 @@ public class SysCarServiceImpl
|
|||
/**
|
||||
* 查询车辆基础信息列表
|
||||
*
|
||||
* @param sysCar 车辆基础信息
|
||||
* @param sysCarReq 车辆基础信息
|
||||
* @return 车辆基础信息
|
||||
*/
|
||||
@Override
|
||||
public List<SysCarResp> selectSysCarList(SysCar sysCar)
|
||||
{
|
||||
return sysCarMapper.selectSysCarList(sysCar);
|
||||
// LambdaQueryWrapper<SysCarResp> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// if (StringUtils.isNotEmpty(sysCar.getCarVin())){
|
||||
// queryWrapper.like(SysCarResp::getCarVin, sysCar.getCarVin());
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(sysCar.getCarPlate())){
|
||||
// queryWrapper.like(SysCarResp::getCarPlate, sysCar.getCarPlate());
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(sysCar.getCarBrand())){
|
||||
// queryWrapper.eq(SysCarResp::getCarBrand, sysCar.getCarBrand());
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(sysCar.getCarModel())){
|
||||
// queryWrapper.eq(SysCarResp::getCarModel, sysCar.getCarModel());
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(String.valueOf(sysCar.getCarType()))){
|
||||
// queryWrapper.eq(SysCarResp::getCarType, sysCar.getCarType());
|
||||
// }
|
||||
// if (StringUtils.isNotEmpty(String.valueOf(sysCar.getState()))){
|
||||
// queryWrapper.eq(SysCarResp::getState, sysCar.getState());
|
||||
// }
|
||||
// return this.list(queryWrapper);
|
||||
public List<SysCarResp> selectSysCarList(SysCarReq sysCarReq) {
|
||||
LambdaQueryWrapper<SysCar> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (StringUtils.isNotEmpty(sysCarReq.getCarVin())) {
|
||||
queryWrapper.eq(SysCar::getCarVin,sysCarReq.getCarVin());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(sysCarReq.getCarPlate())) {
|
||||
queryWrapper.like(SysCar::getCarPlate, sysCarReq.getCarPlate());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(sysCarReq.getCarBrand())) {
|
||||
queryWrapper.eq(SysCar::getCarBrand, sysCarReq.getCarBrand());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(sysCarReq.getCarModel())) {
|
||||
queryWrapper.eq(SysCar::getCarModel, sysCarReq.getCarModel());
|
||||
}
|
||||
if (null == sysCarReq.getCarType()) {
|
||||
queryWrapper.eq(SysCar::getCarType, sysCarReq.getCarType());
|
||||
}
|
||||
if (null == sysCarReq.getState()) {
|
||||
queryWrapper.eq(SysCar::getState, sysCarReq.getState());
|
||||
}
|
||||
List<SysCar> list = this.list(queryWrapper);
|
||||
return list.stream()
|
||||
.map(SysCarResp::reverseResp)
|
||||
.toList();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 唯一 判断
|
|
@ -1,9 +1,9 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.domain.SysCarType;
|
||||
import com.muyu.mapper.SysTypeMapper;
|
||||
import com.muyu.service.SysTypeService;
|
||||
import com.muyu.enterpise.mapper.SysTypeMapper;
|
||||
import com.muyu.enterpise.service.SysTypeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
|
@ -1,11 +1,11 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.domain.WarnLogs;
|
||||
import com.muyu.mapper.WarnLogsMapper;
|
||||
import com.muyu.service.IWarnLogsService;
|
||||
import com.muyu.enterpise.mapper.WarnLogsMapper;
|
||||
import com.muyu.enterpise.service.IWarnLogsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.domain.WarnRule;
|
||||
import com.muyu.mapper.WarnRuleMapper;
|
||||
import com.muyu.service.IWarnRuleService;
|
||||
import com.muyu.enterpise.mapper.WarnRuleMapper;
|
||||
import com.muyu.enterpise.service.IWarnRuleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
|
@ -1,11 +1,11 @@
|
|||
package com.muyu.service.impl;
|
||||
package com.muyu.enterpise.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.domain.WarnStrategy;
|
||||
import com.muyu.mapper.WarnStrategyMapper;
|
||||
import com.muyu.service.IWarnStrategyService;
|
||||
import com.muyu.enterpise.mapper.WarnStrategyMapper;
|
||||
import com.muyu.enterpise.service.IWarnStrategyService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue