初始化仓库
parent
f81075ca3c
commit
237c03bdcc
|
@ -1,109 +0,0 @@
|
||||||
<?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</artifactId>
|
|
||||||
<version>3.6.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>cloud-modules-car</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>org.springframework.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
|
||||||
<version>4.1.2</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- SpringCloud Alibaba Nacos -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- SpringCloud Alibaba Nacos Config -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- SpringCloud Alibaba Sentinel -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- SpringBoot Actuator -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Mysql Connector -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.mysql</groupId>
|
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- MuYu Common DataSource -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>cloud-common-datasource</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- MuYu Common DataScope -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>cloud-common-datascope</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- MuYu Common Log -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>cloud-common-log</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 接口模块 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>cloud-common-api-doc</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.muyu</groupId>
|
|
||||||
<artifactId>cloud-common-rabbit</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<finalName>${project.artifactId}</finalName>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<goals>
|
|
||||||
<goal>repackage</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.muyu;
|
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
|
||||||
@EnableFeignClients
|
|
||||||
@MapperScan(value = "com.muyu.mapper")
|
|
||||||
public class CarSystemApplication {
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(CarSystemApplication.class,args);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,26 +0,0 @@
|
||||||
package com.muyu.controller;
|
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
|
||||||
import com.muyu.domain.CarType;
|
|
||||||
import com.muyu.service.CarTypeService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/carType")
|
|
||||||
public class CarTypeController {
|
|
||||||
@Autowired
|
|
||||||
private CarTypeService carTypeService;
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/selectCarTypeList")
|
|
||||||
public Result selectCarTypeList(){
|
|
||||||
return Result.success(carTypeService.selectCarTypeList());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
package com.muyu.controller;
|
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
|
||||||
import com.muyu.domain.SysCar;
|
|
||||||
import com.muyu.domain.req.SysCarReq;
|
|
||||||
import com.muyu.service.SysCarService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/sysCar")
|
|
||||||
public class SysCarController {
|
|
||||||
@Autowired
|
|
||||||
private SysCarService sysCarService;
|
|
||||||
|
|
||||||
@PostMapping("/selectSysCarVoList")
|
|
||||||
public Result selectSysCarVoList(@RequestBody SysCarReq sysCarReq){
|
|
||||||
return Result.success(sysCarService.selectSysCarVoList(sysCarReq));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/selectSysCarVoById/{id}")
|
|
||||||
public Result selectSysCarVoById(@PathVariable("id") Long id){
|
|
||||||
return Result.success(sysCarService.selectSysCarVoById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/addSysCar")
|
|
||||||
public Result addSysCar(@RequestBody SysCar sysCar){
|
|
||||||
return Result.success(sysCarService.addSysCar(sysCar));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping("/updateSysCar")
|
|
||||||
public Result updateSysCar(@RequestBody SysCar sysCar){
|
|
||||||
return Result.success(sysCarService.updateSysCar(sysCar));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@DeleteMapping("/deleteSysCarById/{id}")
|
|
||||||
public Result deleteSysCarById(@PathVariable("id") Long id){
|
|
||||||
int i = sysCarService.deleteSysCarById(id);
|
|
||||||
return i>0?Result.success():Result.error();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
package com.muyu.controller;
|
|
||||||
|
|
||||||
import com.muyu.common.core.domain.Result;
|
|
||||||
import com.muyu.domain.SysCarLog;
|
|
||||||
import com.muyu.service.SysCarLogService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/sysCarLog")
|
|
||||||
public class SysCarLogController {
|
|
||||||
@Autowired
|
|
||||||
private SysCarLogService sysCarLogService;
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/selectList")
|
|
||||||
public Result selectList(){
|
|
||||||
return Result.success(sysCarLogService.selectList());
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/selectList/{id}")
|
|
||||||
public Result selectById(@PathVariable("id") Long id){
|
|
||||||
return Result.success(sysCarLogService.selectById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
package com.muyu.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.muyu.domain.CarType;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
|
|
||||||
public interface CarTypeMapper extends BaseMapper<CarType> {
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
package com.muyu.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.muyu.domain.SysCar;
|
|
||||||
import com.muyu.domain.SysCarLog;
|
|
||||||
|
|
||||||
public interface SysCarLogMapper extends BaseMapper<SysCarLog> {
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.muyu.mapper;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import com.muyu.domain.SysCar;
|
|
||||||
import com.muyu.domain.req.SysCarReq;
|
|
||||||
import com.muyu.domain.vo.SysCarVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
public interface SysCarMapper extends BaseMapper<SysCar> {
|
|
||||||
List<SysCarVo> selectSysCarVoList(SysCarReq sysCarReq);
|
|
||||||
|
|
||||||
|
|
||||||
SysCarVo selectSysCarVoById(@Param("id") Long id);
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
package com.muyu.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.muyu.domain.CarType;
|
|
||||||
import com.muyu.mapper.CarTypeMapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
public interface CarTypeService extends IService<CarType> {
|
|
||||||
List<CarType> selectCarTypeList();
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
package com.muyu.service;
|
|
||||||
|
|
||||||
import com.muyu.domain.SysCarLog;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface SysCarLogService {
|
|
||||||
|
|
||||||
|
|
||||||
List<SysCarLog> selectList();
|
|
||||||
|
|
||||||
SysCarLog selectById(Long id);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
package com.muyu.service;
|
|
||||||
|
|
||||||
import com.muyu.domain.SysCar;
|
|
||||||
import com.muyu.domain.req.SysCarReq;
|
|
||||||
import com.muyu.domain.vo.SysCarVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface SysCarService {
|
|
||||||
List<SysCarVo> selectSysCarVoList(SysCarReq sysCarReq);
|
|
||||||
|
|
||||||
SysCarVo selectSysCarVoById(Long id);
|
|
||||||
|
|
||||||
int addSysCar(SysCar sysCar);
|
|
||||||
|
|
||||||
int deleteSysCarById(Long id);
|
|
||||||
|
|
||||||
int updateSysCar(SysCar sysCar);
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
package com.muyu.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.muyu.domain.CarType;
|
|
||||||
import com.muyu.mapper.CarTypeMapper;
|
|
||||||
import com.muyu.service.CarTypeService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class CarTypeServiceImpl extends ServiceImpl<CarTypeMapper,CarType> implements CarTypeService {
|
|
||||||
@Autowired
|
|
||||||
private CarTypeMapper carTypeMapper;
|
|
||||||
@Override
|
|
||||||
public List<CarType> selectCarTypeList() {
|
|
||||||
QueryWrapper<CarType> carTypeQueryWrapper = new QueryWrapper<>();
|
|
||||||
return carTypeMapper.selectList(carTypeQueryWrapper);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
package com.muyu.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.muyu.domain.CarType;
|
|
||||||
import com.muyu.domain.SysCarLog;
|
|
||||||
import com.muyu.mapper.CarTypeMapper;
|
|
||||||
import com.muyu.mapper.SysCarLogMapper;
|
|
||||||
import com.muyu.service.CarTypeService;
|
|
||||||
import com.muyu.service.SysCarLogService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class SysCarLogServiceImpl extends ServiceImpl<SysCarLogMapper, SysCarLog> implements SysCarLogService {
|
|
||||||
@Autowired
|
|
||||||
private SysCarLogMapper sysCarLogMapper;
|
|
||||||
@Override
|
|
||||||
public List<SysCarLog> selectList() {
|
|
||||||
QueryWrapper<SysCarLog> sysCarLogQueryWrapper = new QueryWrapper<>();
|
|
||||||
return sysCarLogMapper.selectList(sysCarLogQueryWrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SysCarLog selectById(Long id) {
|
|
||||||
return sysCarLogMapper.selectById(id);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,42 +0,0 @@
|
||||||
package com.muyu.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.muyu.domain.SysCar;
|
|
||||||
import com.muyu.domain.req.SysCarReq;
|
|
||||||
import com.muyu.domain.vo.SysCarVo;
|
|
||||||
import com.muyu.mapper.SysCarMapper;
|
|
||||||
import com.muyu.service.SysCarService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class SysCarServiceImpl extends ServiceImpl<SysCarMapper,SysCar> implements SysCarService {
|
|
||||||
@Autowired
|
|
||||||
private SysCarMapper sysCarMapper;
|
|
||||||
@Override
|
|
||||||
public List<SysCarVo> selectSysCarVoList(SysCarReq sysCarReq) {
|
|
||||||
return sysCarMapper.selectSysCarVoList(sysCarReq);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public SysCarVo selectSysCarVoById(Long id) {
|
|
||||||
return sysCarMapper.selectSysCarVoById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int addSysCar(SysCar sysCar) {
|
|
||||||
return sysCarMapper.insert(sysCar);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int deleteSysCarById(Long id) {
|
|
||||||
return sysCarMapper.deleteById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int updateSysCar(SysCar sysCar) {
|
|
||||||
return sysCarMapper.updateById(sysCar);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
Spring Boot Version: ${spring-boot.version}
|
|
||||||
Spring Application Name: ${spring.application.name}
|
|
|
@ -1,56 +0,0 @@
|
||||||
# Tomcat
|
|
||||||
server:
|
|
||||||
port: 9520
|
|
||||||
|
|
||||||
# nacos线上地址
|
|
||||||
nacos:
|
|
||||||
addr: 47.101.53.251:8848
|
|
||||||
user-name: nacos
|
|
||||||
password: nacos
|
|
||||||
namespace: four
|
|
||||||
|
|
||||||
# Spring
|
|
||||||
spring:
|
|
||||||
application:
|
|
||||||
# 应用名称
|
|
||||||
name: cloud-car
|
|
||||||
profiles:
|
|
||||||
# 环境配置
|
|
||||||
active: dev
|
|
||||||
cloud:
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
# 服务注册地址
|
|
||||||
server-addr: ${nacos.addr}
|
|
||||||
# nacos用户名
|
|
||||||
username: ${nacos.user-name}
|
|
||||||
# nacos密码
|
|
||||||
password: ${nacos.password}
|
|
||||||
# 命名空间
|
|
||||||
namespace: ${nacos.namespace}
|
|
||||||
config:
|
|
||||||
# 服务注册地址
|
|
||||||
server-addr: ${nacos.addr}
|
|
||||||
# nacos用户名
|
|
||||||
username: ${nacos.user-name}
|
|
||||||
# nacos密码
|
|
||||||
password: ${nacos.password}
|
|
||||||
# 命名空间
|
|
||||||
namespace: ${nacos.namespace}
|
|
||||||
# 配置文件格式
|
|
||||||
file-extension: yml
|
|
||||||
# 共享配置
|
|
||||||
shared-configs:
|
|
||||||
# 系统共享配置
|
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
|
||||||
# 系统环境Config共享配置
|
|
||||||
- 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}
|
|
||||||
# rabbit 配置文件
|
|
||||||
- application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
|
||||||
|
|
||||||
logging:
|
|
||||||
level:
|
|
||||||
com.muyu.system.mapper: DEBUG
|
|
||||||
|
|
|
@ -1,74 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/cloud-car"/>
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
|
||||||
<logger name="com.muyu" level="info"/>
|
|
||||||
<!-- Spring日志级别控制 -->
|
|
||||||
<logger name="org.springframework" level="warn"/>
|
|
||||||
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="file_info"/>
|
|
||||||
<appender-ref ref="file_error"/>
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
|
@ -1,81 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/cloud-car"/>
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
|
||||||
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.sky.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 使用gRpc将日志发送到skywalking服务端 -->
|
|
||||||
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
|
||||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
|
||||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
|
||||||
<Pattern>${log.sky.pattern}</Pattern>
|
|
||||||
</layout>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
|
||||||
<logger name="com.muyu" level="info"/>
|
|
||||||
<!-- Spring日志级别控制 -->
|
|
||||||
<logger name="org.springframework" level="warn"/>
|
|
||||||
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="GRPC_LOG"/>
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="file_info"/>
|
|
||||||
<appender-ref ref="file_error"/>
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
|
@ -1,81 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
|
||||||
<!-- 日志存放路径 -->
|
|
||||||
<property name="log.path" value="logs/cloud-car"/>
|
|
||||||
<!-- 日志输出格式 -->
|
|
||||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
|
||||||
<property name="log.sky.pattern" value="%d{HH:mm:ss.SSS} %yellow([%tid]) [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
|
||||||
|
|
||||||
<!-- 控制台输出 -->
|
|
||||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>${log.sky.pattern}</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统日志输出 -->
|
|
||||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/info.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>INFO</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
|
||||||
<file>${log.path}/error.log</file>
|
|
||||||
<!-- 循环政策:基于时间创建日志文件 -->
|
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
|
||||||
<!-- 日志文件名格式 -->
|
|
||||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
|
||||||
<!-- 日志最大的历史 60天 -->
|
|
||||||
<maxHistory>60</maxHistory>
|
|
||||||
</rollingPolicy>
|
|
||||||
|
|
||||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
|
||||||
<!-- 过滤的级别 -->
|
|
||||||
<level>ERROR</level>
|
|
||||||
<!-- 匹配时的操作:接收(记录) -->
|
|
||||||
<onMatch>ACCEPT</onMatch>
|
|
||||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
|
||||||
<onMismatch>DENY</onMismatch>
|
|
||||||
</filter>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 使用gRpc将日志发送到skywalking服务端 -->
|
|
||||||
<appender name="GRPC_LOG" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
|
|
||||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
|
||||||
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
|
|
||||||
<Pattern>${log.sky.pattern}</Pattern>
|
|
||||||
</layout>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
|
|
||||||
<!-- 系统模块日志级别控制 -->
|
|
||||||
<logger name="com.muyu" level="info"/>
|
|
||||||
<!-- Spring日志级别控制 -->
|
|
||||||
<logger name="org.springframework" level="warn"/>
|
|
||||||
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="GRPC_LOG"/>
|
|
||||||
<appender-ref ref="console"/>
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<!--系统操作日志-->
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="file_info"/>
|
|
||||||
<appender-ref ref="file_error"/>
|
|
||||||
</root>
|
|
||||||
</configuration>
|
|
|
@ -1,41 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.muyu.mapper.SysCarMapper">
|
|
||||||
<select id="selectSysCarVoList" resultType="com.muyu.domain.vo.SysCarVo">
|
|
||||||
SELECT * ,car_type.type_name,tb_fence.fence_name
|
|
||||||
FROM `sys_car`
|
|
||||||
LEFT JOIN car_type ON sys_car.car_type_id=car_type.id
|
|
||||||
LEFT JOIN tb_fence ON sys_car.fence_id=tb_fence.fence_id
|
|
||||||
<where>
|
|
||||||
<if test="carVin!=null and carVin!=''">
|
|
||||||
sys_car.car_vin=#{carVin}
|
|
||||||
</if>
|
|
||||||
<if test="state!=null and state!=''">
|
|
||||||
and sys_car.state=#{state}
|
|
||||||
</if>
|
|
||||||
<if test="carMotorManufacturer!=null and carMotorManufacturer!=''">
|
|
||||||
and sys_car.car_motor_manufacturer=#{carMotorManufacturer}
|
|
||||||
</if>
|
|
||||||
<if test="carBatteryManufacturer!=null and carBatteryManufacturer!=''">
|
|
||||||
and sys_car.car_battery_manufacturer=#{carBatteryManufacturer}
|
|
||||||
</if>
|
|
||||||
<if test="carMotorModel!=null and carMotorModel!=''">
|
|
||||||
and sys_car.car_motor_model=#{carMotorModel}
|
|
||||||
</if>
|
|
||||||
<if test="carBatteryModel!=null and carBatteryModel!=''">
|
|
||||||
and sys_car.car_battery_model=#{carBatteryModel}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectSysCarVoById" resultType="com.muyu.domain.vo.SysCarVo">
|
|
||||||
SELECT * ,car_type.type_name,tb_fence.fence_name
|
|
||||||
FROM `sys_car`
|
|
||||||
LEFT JOIN car_type ON sys_car.car_type_id=car_type.id
|
|
||||||
LEFT JOIN tb_fence ON sys_car.fence_id=tb_fence.fence_id
|
|
||||||
where sys_car.id=#{id}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
Loading…
Reference in New Issue