提交修改,删除部分多余代码
This commit is contained in:
parent
a36aedad4b
commit
769cad2420
25
.idea/.gitignore
vendored
Normal file
25
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
|
|
||||||
|
# 忽略 IDEA 的项目文件
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
|
||||||
|
# 忽略编译文件
|
||||||
|
/target/
|
||||||
|
/classes/
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# 忽略日志文件
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# 忽略系统生成文件
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
104
README.md
Normal file
104
README.md
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
# Introduction
|
||||||
|
skyeye是一个用来规划无人机航线,并控制无人机按规定航线飞行并采集处理雷达负载数据的软件。
|
||||||
|
|
||||||
|
# Prerequistites
|
||||||
|
## 一、 安装openjdk,11
|
||||||
|
|
||||||
|
### 1.1 在官网下载
|
||||||
|
Adoptium(推荐):https://adoptium.net/temurin/releases/?version=11
|
||||||
|
|
||||||
|
### 1.2 配置环境变量(关键)
|
||||||
|
```
|
||||||
|
1️⃣ 打开环境变量
|
||||||
|
此电脑 → 右键 → 属性
|
||||||
|
→ 高级系统设置
|
||||||
|
→ 环境变量
|
||||||
|
|
||||||
|
2️⃣ 配置 JAVA_HOME(决定默认 JDK)
|
||||||
|
如果你想默认用 JDK 11
|
||||||
|
JAVA_HOME = C:\Program Files\Java\jdk-11.0.10 这是举例,需要填你的jdk路径
|
||||||
|
如果你想默认用 JDK 8
|
||||||
|
JAVA_HOME = C:\Program Files\Java\jdk1.8.0_361
|
||||||
|
👉 只保留一个 JAVA_HOME
|
||||||
|
|
||||||
|
3️⃣ 配置 PATH(非常重要)
|
||||||
|
在 Path 里,只保留这一条:
|
||||||
|
%JAVA_HOME%\bin
|
||||||
|
⚠️ 删除这些常见“坑”:
|
||||||
|
直接写死的
|
||||||
|
C:\Program Files\Java\jdk1.8...\bin
|
||||||
|
C:\Program Files\Java\jdk-11...\bin
|
||||||
|
多个 Java bin 同时存在
|
||||||
|
|
||||||
|
4️⃣ 验证
|
||||||
|
新开一个 cmd:
|
||||||
|
java -version
|
||||||
|
javac -version
|
||||||
|
看到:java version "11.x.x"
|
||||||
|
说明成功 🎉
|
||||||
|
```
|
||||||
|
|
||||||
|
## 二、 安装配置mysql 8.0
|
||||||
|
## 三、安装redis 6.x/7.x(7.4不可)
|
||||||
|
### 3.1 安装包
|
||||||
|
安装包在飞书云盘-技术资料-Redis-安装包
|
||||||
|
|
||||||
|
Redis-7.2.12-Windows-x64-cygwin-with-Service.zip
|
||||||
|
如果你希望 Redis 可以注册为 Windows 服务 自动启动,同时不介意依赖 Cygwin
|
||||||
|
|
||||||
|
Redis-7.2.12-Windows-x64-cygwin.zip 只想运行 Redis,临时用,不需要服务启动
|
||||||
|
修改redis配置C:\Program Files\Redis\redis.windows.conf
|
||||||
|
|
||||||
|
### 3.2 安装步骤
|
||||||
|
```
|
||||||
|
解压
|
||||||
|
D:\Redis\Redis-7.2.12\
|
||||||
|
|
||||||
|
启动 Redis Server 临时运行
|
||||||
|
CMD 进入目录:cd D:\Redis\Redis-7.2.12
|
||||||
|
redis-server.exe redis.windows.conf
|
||||||
|
|
||||||
|
测试连接
|
||||||
|
redis-cli.exe ping
|
||||||
|
返回 PONG 即启动成功
|
||||||
|
|
||||||
|
注册为 Windows 服务(可选,管理员权限 CMD)
|
||||||
|
redis-server.exe --service-install redis.windows.conf
|
||||||
|
redis-server.exe --service-start
|
||||||
|
这样 Redis 会随 Windows 自动启动
|
||||||
|
停止服务:
|
||||||
|
redis-server.exe --service-stop
|
||||||
|
卸载服务:
|
||||||
|
redis-server.exe --service-uninstall
|
||||||
|
```
|
||||||
|
|
||||||
|
## 四、安装node.js
|
||||||
|
## 五、安装python 3.13
|
||||||
|
|
||||||
|
官网下载 https://www.python.org/downloads/release/python-31311/
|
||||||
|
|
||||||
|
# 启动后端工程
|
||||||
|
## 1. Project->sdk->java 11
|
||||||
|
## 2. 编译安装library下的所有工程
|
||||||
|
## 3. 编译安装skyeye-common-extend和skyeye-common-generator
|
||||||
|
## 4. 安装library下的opencv库
|
||||||
|
## 5. 执行resource目录下的db.sql创建数据库
|
||||||
|
## 6. 配置application-dev.yml中的数据源
|
||||||
|
|
||||||
|
# 服务启动顺序
|
||||||
|
## 1. redis服务
|
||||||
|
## 2. skyeye-service-py下的python服务
|
||||||
|
## 3. skyeye-service-manager
|
||||||
|
|
||||||
|
# 启动前端
|
||||||
|
## 1. 在frontend目录中执行
|
||||||
|
```
|
||||||
|
#npm install
|
||||||
|
```
|
||||||
|
## 2. 拷贝resource目录中的dt-sdk到node-modules目录
|
||||||
|
## 3. 编译前端代码
|
||||||
|
```
|
||||||
|
# npm run serve
|
||||||
|
```
|
||||||
|
## 4. 在浏览器中打开主页,localhost:8080, 默认用户名密码为:admin/123
|
||||||
|
|
||||||
19
backend/Skyeye-sys-dev/.idea/.gitignore
vendored
19
backend/Skyeye-sys-dev/.idea/.gitignore
vendored
@ -6,5 +6,20 @@
|
|||||||
# Datasource local storage ignored files
|
# Datasource local storage ignored files
|
||||||
/dataSources/
|
/dataSources/
|
||||||
/dataSources.local.xml
|
/dataSources.local.xml
|
||||||
# Editor-based HTTP Client requests
|
|
||||||
/httpRequests/
|
# 忽略 IDEA 的项目文件
|
||||||
|
.idea/
|
||||||
|
*.iml
|
||||||
|
|
||||||
|
# 忽略编译文件
|
||||||
|
/target/
|
||||||
|
/classes/
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# 忽略日志文件
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# 忽略系统生成文件
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,134 +0,0 @@
|
|||||||
package ${package.Controller};
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
#if(${restControllerStyle})
|
|
||||||
#else
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
#end
|
|
||||||
|
|
||||||
#if(${superControllerClassPackage})
|
|
||||||
import ${superControllerClassPackage};
|
|
||||||
#end
|
|
||||||
#if(${swagger2})
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
#end
|
|
||||||
#if(${entityLombokModel})
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
#end
|
|
||||||
|
|
||||||
import $!{package.Entity}.$!{entity};
|
|
||||||
import $!{package.Service}.$!{table.serviceName};
|
|
||||||
import com.zhangy.skyeye.common.pojo.result.Result;
|
|
||||||
import com.zhangy.skyeye.common.pojo.param.IdParam;
|
|
||||||
import com.zhangy.skyeye.db.utils.MPUtil;
|
|
||||||
import com.zhangy.skyeye.db.pojo.page.PageParam;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment} 前端控制器
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
#if(${restControllerStyle})
|
|
||||||
@RestController
|
|
||||||
#else
|
|
||||||
@Controller
|
|
||||||
#end
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Slf4j
|
|
||||||
@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口")
|
|
||||||
@RequestMapping("#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end")
|
|
||||||
#if(${superControllerClass})
|
|
||||||
public class ${table.controllerName} extends ${superControllerClass} {
|
|
||||||
#else
|
|
||||||
public class ${table.controllerName} {
|
|
||||||
#end
|
|
||||||
|
|
||||||
private $!{table.serviceName} $!{table.entityPath}Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*/
|
|
||||||
@PostMapping("/save")
|
|
||||||
@ApiOperationSupport(order = 1)
|
|
||||||
@ApiOperation(value = "新增", notes = "传入$!{table.entityPath}")
|
|
||||||
public Result save(@RequestBody $!{entity} $!{table.entityPath}) {
|
|
||||||
if($!{table.entityPath} == null){
|
|
||||||
return Result.error("参数异常");
|
|
||||||
}
|
|
||||||
return Result.status($!{table.entityPath}Service.save($!{table.entityPath}));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改 $!{table.comment}
|
|
||||||
*/
|
|
||||||
@PostMapping("/update")
|
|
||||||
@ApiOperationSupport(order = 2)
|
|
||||||
@ApiOperation(value = "修改", notes = "传入$!{table.entityPath}")
|
|
||||||
public Result update(@RequestBody $!{entity} $!{table.entityPath}) {
|
|
||||||
if($!{table.entityPath} == null){
|
|
||||||
return Result.error("参数异常");
|
|
||||||
}
|
|
||||||
return Result.status($!{table.entityPath}Service.updateById($!{table.entityPath}));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除 $!{table.comment}
|
|
||||||
*/
|
|
||||||
@PostMapping("/remove")
|
|
||||||
@ApiOperationSupport(order = 3)
|
|
||||||
@ApiOperation(value = "删除", notes = "传入ids")
|
|
||||||
public Result remove(@RequestBody IdParam<Long> idParam) {
|
|
||||||
if(idParam == null){
|
|
||||||
return Result.error("参数异常!");
|
|
||||||
}
|
|
||||||
|
|
||||||
return Result.status($!{table.entityPath}Service.removeByIds(idParam.getIds()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
@GetMapping("/detail")
|
|
||||||
@ApiOperationSupport(order = 4)
|
|
||||||
@ApiOperation(value = "详情", notes = "传入id")
|
|
||||||
public Result<$!{entity}> detail(Long id) {
|
|
||||||
if(id == null){
|
|
||||||
return Result.error("参数异常");
|
|
||||||
}
|
|
||||||
$!{entity} detail = $!{table.entityPath}Service.getById(id);
|
|
||||||
return Result.successData(detail);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询 $!{table.comment}
|
|
||||||
*/
|
|
||||||
@GetMapping("/list")
|
|
||||||
@ApiOperationSupport(order = 5)
|
|
||||||
@ApiOperation(value = "查询", notes = "传入$!{table.entityPath}")
|
|
||||||
public Result list(PageParam pageParam, $!{entity} $!{table.entityPath}) {
|
|
||||||
List<$!{entity}> list = $!{table.entityPath}Service.list($!{table.entityPath}Service.getQueryWrapper(pageParam, $!{table.entityPath}));
|
|
||||||
return Result.successData(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页 $!{table.comment}
|
|
||||||
*/
|
|
||||||
@GetMapping("/page")
|
|
||||||
@ApiOperationSupport(order = 6)
|
|
||||||
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}")
|
|
||||||
public Result<IPage> page(PageParam pageParam, $!{entity} $!{table.entityPath}) {
|
|
||||||
IPage<$!{entity}> pages = $!{table.entityPath}Service.page(
|
|
||||||
MPUtil.getPage(pageParam),
|
|
||||||
$!{table.entityPath}Service.getQueryWrapper(null, $!{table.entityPath})
|
|
||||||
);
|
|
||||||
return Result.successData(pages);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,158 +0,0 @@
|
|||||||
package ${package.Entity};
|
|
||||||
|
|
||||||
#foreach($pkg in ${table.importPackages})
|
|
||||||
import ${pkg};
|
|
||||||
#end
|
|
||||||
#if(${swagger2})
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
#end
|
|
||||||
#if(${entityLombokModel})
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
#if(${chainModel})
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment}
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
#if(${entityLombokModel})
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
#if(${superEntityClass})
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
#else
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
#end
|
|
||||||
#if(${chainModel})
|
|
||||||
@Accessors(chain = true)
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#if(${table.convert})
|
|
||||||
@TableName("${table.name}")
|
|
||||||
#end
|
|
||||||
#if(${swagger2})
|
|
||||||
@ApiModel(value="${entity}对象", description="$!{table.comment}")
|
|
||||||
#end
|
|
||||||
#if(${superEntityClass})
|
|
||||||
public class ${entity} extends ${superEntityClass}#if(${activeRecord})<${entity}>#end {
|
|
||||||
#elseif(${activeRecord})
|
|
||||||
public class ${entity} extends Model<${entity}> {
|
|
||||||
#else
|
|
||||||
public class ${entity} implements Serializable {
|
|
||||||
#end
|
|
||||||
|
|
||||||
#if(${entitySerialVersionUID})
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
#end
|
|
||||||
## ---------- BEGIN 字段循环遍历 ----------
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
|
|
||||||
#if(${field.keyFlag})
|
|
||||||
#set($keyPropertyName=${field.propertyName})
|
|
||||||
#end
|
|
||||||
#if("$!field.comment" != "")
|
|
||||||
#if(${swagger2})
|
|
||||||
@ApiModelProperty(value = "${field.comment}", position = ${foreach.index})
|
|
||||||
#else
|
|
||||||
/**
|
|
||||||
* ${field.comment}
|
|
||||||
*/
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#if(${field.keyFlag})
|
|
||||||
## 主键
|
|
||||||
#if(${field.keyIdentityFlag})
|
|
||||||
@TableId(value = "${field.annotationColumnName}", type = IdType.AUTO)
|
|
||||||
#elseif(!$null.isNull(${idType}) && "$!idType" != "")
|
|
||||||
@TableId(value = "${field.annotationColumnName}", type = IdType.${idType})
|
|
||||||
#elseif(${field.convert})
|
|
||||||
@TableId("${field.annotationColumnName}")
|
|
||||||
#end
|
|
||||||
## 普通字段
|
|
||||||
#elseif(${field.fill})
|
|
||||||
## ----- 存在字段填充设置 -----
|
|
||||||
#if(${field.convert})
|
|
||||||
@TableField(value = "${field.annotationColumnName}", fill = FieldFill.${field.fill})
|
|
||||||
#else
|
|
||||||
@TableField(fill = FieldFill.${field.fill})
|
|
||||||
#end
|
|
||||||
#elseif(${field.convert})
|
|
||||||
@TableField("${field.annotationColumnName}")
|
|
||||||
#end
|
|
||||||
## 乐观锁注解
|
|
||||||
#if(${versionFieldName}==${field.name})
|
|
||||||
@Version
|
|
||||||
#end
|
|
||||||
## 逻辑删除注解
|
|
||||||
#if(${logicDeleteFieldName}==${field.name})
|
|
||||||
@TableLogic
|
|
||||||
#end
|
|
||||||
private ${field.propertyType} ${field.propertyName};
|
|
||||||
#end
|
|
||||||
## ---------- END 字段循环遍历 ----------
|
|
||||||
#if(!${entityLombokModel})
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if(${field.propertyType.equals("boolean")})
|
|
||||||
#set($getprefix="is")
|
|
||||||
#else
|
|
||||||
#set($getprefix="get")
|
|
||||||
#end
|
|
||||||
public ${field.propertyType} ${getprefix}${field.capitalName}() {
|
|
||||||
return ${field.propertyName};
|
|
||||||
}
|
|
||||||
#if(${chainModel})
|
|
||||||
public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
|
|
||||||
#else
|
|
||||||
public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
|
|
||||||
#end
|
|
||||||
this.${field.propertyName} = ${field.propertyName};
|
|
||||||
#if(${chainModel})
|
|
||||||
return this;
|
|
||||||
#end
|
|
||||||
}
|
|
||||||
#end
|
|
||||||
## --foreach end---
|
|
||||||
#end
|
|
||||||
## --end of #if(!${entityLombokModel})--
|
|
||||||
#if(${entityColumnConstant})
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
public static final String ${field.name.toUpperCase()} = "${field.name}";
|
|
||||||
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#if(${activeRecord})
|
|
||||||
@Override
|
|
||||||
protected Serializable pkVal() {
|
|
||||||
#if(${keyPropertyName})
|
|
||||||
return this.${keyPropertyName};
|
|
||||||
#else
|
|
||||||
return null;
|
|
||||||
#end
|
|
||||||
}
|
|
||||||
|
|
||||||
#end
|
|
||||||
#if(!${entityLombokModel})
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "${entity}{" +
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if($!{foreach.index}==0)
|
|
||||||
"${field.propertyName}=" + ${field.propertyName} +
|
|
||||||
#else
|
|
||||||
", ${field.propertyName}=" + ${field.propertyName} +
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
"}";
|
|
||||||
}
|
|
||||||
#end
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
package ${package.Mapper};
|
|
||||||
|
|
||||||
import ${package.Entity}.${entity};
|
|
||||||
import ${superMapperClassPackage};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment} Mapper 接口
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
public interface ${table.mapperName} extends ${superMapperClass}<${entity}> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,38 +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="${package.Mapper}.${table.mapperName}">
|
|
||||||
#if(${enableCache})
|
|
||||||
<!-- 开启二级缓存 -->
|
|
||||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
|
|
||||||
#end
|
|
||||||
|
|
||||||
#if(${baseResultMap})
|
|
||||||
<!-- 通用查询映射结果 -->
|
|
||||||
<resultMap id="BaseResultMap" type="${package.Entity}.${entity}">
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if(${field.keyFlag})##生成主键排在第一位
|
|
||||||
<id column="${field.name}" property="${field.propertyName}" />
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#foreach($field in ${table.commonFields})##生成公共字段
|
|
||||||
<result column="${field.name}" property="${field.propertyName}" />
|
|
||||||
#end
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if(!${field.keyFlag})##生成普通字段
|
|
||||||
<result column="${field.name}" property="${field.propertyName}" />
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
#end
|
|
||||||
#if(${baseColumnList})
|
|
||||||
<!-- 通用查询结果列 -->
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
#foreach($field in ${table.commonFields})
|
|
||||||
${field.columnName},
|
|
||||||
#end
|
|
||||||
${table.fieldNames}
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
#end
|
|
||||||
</mapper>
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package ${package.Service};
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.zhangy.skyeye.db.pojo.page.PageParam;
|
|
||||||
import ${package.Entity}.${entity};
|
|
||||||
import ${superServiceClassPackage};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment} 服务类
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过实体类获取QueryWrapper
|
|
||||||
* @param pageParam 分页参数
|
|
||||||
* @param $!{table.entityPath} 实体信息
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
QueryWrapper<$!{entity}> getQueryWrapper(PageParam pageParam, $!{entity} $!{table.entityPath});
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
package ${package.ServiceImpl};
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.zhangy.skyeye.db.pojo.page.PageParam;
|
|
||||||
import com.zhangy.skyeye.db.utils.MPUtil;
|
|
||||||
import ${package.Entity}.${entity};
|
|
||||||
import ${package.Mapper}.${table.mapperName};
|
|
||||||
import ${package.Service}.${table.serviceName};
|
|
||||||
import ${superServiceImplClassPackage};
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment} 服务实现类
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过实体类获取QueryWrapper
|
|
||||||
* @param pageParam 分页参数
|
|
||||||
* @param $!{table.entityPath} 实体信息
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public QueryWrapper<$!{entity}> getQueryWrapper(PageParam pageParam, $!{entity} $!{table.entityPath}){
|
|
||||||
QueryWrapper<$!{entity}> queryWrapper = MPUtil.getQueryWrapper(pageParam);
|
|
||||||
|
|
||||||
if($!{table.entityPath} == null){
|
|
||||||
return queryWrapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
## 主键
|
|
||||||
#if(${field.keyIdentityFlag})
|
|
||||||
//主键
|
|
||||||
if($!{table.entityPath}.get${field.capitalName}() != null){
|
|
||||||
queryWrapper.lambda()
|
|
||||||
.eq($!{entity}::get${field.capitalName}, $!{table.entityPath}.get${field.capitalName}());
|
|
||||||
return queryWrapper;
|
|
||||||
}
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
|
|
||||||
//TODO 此处可以根据各字段查询需求修改查询条件,eq、like、ge、gt、le、lt、ne...等等等
|
|
||||||
queryWrapper.lambda()
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if(!${field.keyIdentityFlag})
|
|
||||||
#if($!{foreach.last})
|
|
||||||
.eq($!{table.entityPath}.get${field.capitalName}() != null, $!{entity}::get${field.capitalName}, $!{table.entityPath}.get${field.capitalName}());
|
|
||||||
#else
|
|
||||||
.eq($!{table.entityPath}.get${field.capitalName}() != null, $!{entity}::get${field.capitalName}, $!{table.entityPath}.get${field.capitalName}())
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
return queryWrapper;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
artifactId=skyeye-common-extend
|
|
||||||
groupId=com.zhangy
|
|
||||||
version=1.0.0.RELEASE
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
com\zhangy\skyeye\common\extend\exception\AuthException.class
|
|
||||||
com\zhangy\skyeye\common\extend\dto\PageDTO.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\BeanUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\HttpUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\NumberUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\ZipUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\win\exception\WinServException.class
|
|
||||||
com\zhangy\skyeye\common\extend\win\consts\WinServ32ExitCodeEnum.class
|
|
||||||
com\zhangy\skyeye\common\extend\win\util\Win64Util.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\JsonUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\dto\QueryDTO.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\ObjectUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\enums\CodeEnum.class
|
|
||||||
com\zhangy\skyeye\common\extend\win\dto\WinServStatusDTO.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\DateUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\exception\ServiceException.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\FileUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\MapUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\enums\StringCodeEnum.class
|
|
||||||
com\zhangy\skyeye\common\extend\win\consts\WinServStateEnum.class
|
|
||||||
com\zhangy\skyeye\common\extend\anno\OperationLog.class
|
|
||||||
com\zhangy\skyeye\common\extend\enums\EnumUtil.class
|
|
||||||
com\zhangy\skyeye\common\extend\anno\IgnoreAuth.class
|
|
||||||
com\zhangy\skyeye\common\extend\util\MathUtil.class
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\HttpUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\BeanUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\FileUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\MapUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\win\util\Win64Util.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\exception\AuthException.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\enums\CodeEnum.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\DateUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\enums\EnumUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\JsonUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\dto\QueryDTO.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\ZipUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\anno\OperationLog.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\win\consts\WinServStateEnum.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\win\exception\WinServException.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\dto\PageDTO.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\MathUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\NumberUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\exception\ServiceException.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\win\dto\WinServStatusDTO.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\anno\IgnoreAuth.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\util\ObjectUtil.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\enums\StringCodeEnum.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-extend\src\main\java\com\zhangy\skyeye\common\extend\win\consts\WinServ32ExitCodeEnum.java
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,134 +0,0 @@
|
|||||||
package ${package.Controller};
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
#if(${restControllerStyle})
|
|
||||||
#else
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
#end
|
|
||||||
|
|
||||||
#if(${superControllerClassPackage})
|
|
||||||
import ${superControllerClassPackage};
|
|
||||||
#end
|
|
||||||
#if(${swagger2})
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
||||||
#end
|
|
||||||
#if(${entityLombokModel})
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
#end
|
|
||||||
|
|
||||||
import $!{package.Entity}.$!{entity};
|
|
||||||
import $!{package.Service}.$!{table.serviceName};
|
|
||||||
import com.zhangy.skyeye.common.pojo.result.Result;
|
|
||||||
import com.zhangy.skyeye.common.pojo.param.IdParam;
|
|
||||||
import com.zhangy.skyeye.db.utils.MPUtil;
|
|
||||||
import com.zhangy.skyeye.db.pojo.page.PageParam;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment} 前端控制器
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
#if(${restControllerStyle})
|
|
||||||
@RestController
|
|
||||||
#else
|
|
||||||
@Controller
|
|
||||||
#end
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Slf4j
|
|
||||||
@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口")
|
|
||||||
@RequestMapping("#if(${controllerMappingHyphenStyle})${controllerMappingHyphen}#else${table.entityPath}#end")
|
|
||||||
#if(${superControllerClass})
|
|
||||||
public class ${table.controllerName} extends ${superControllerClass} {
|
|
||||||
#else
|
|
||||||
public class ${table.controllerName} {
|
|
||||||
#end
|
|
||||||
|
|
||||||
private $!{table.serviceName} $!{table.entityPath}Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增
|
|
||||||
*/
|
|
||||||
@PostMapping("/save")
|
|
||||||
@ApiOperationSupport(order = 1)
|
|
||||||
@ApiOperation(value = "新增", notes = "传入$!{table.entityPath}")
|
|
||||||
public Result save(@RequestBody $!{entity} $!{table.entityPath}) {
|
|
||||||
if($!{table.entityPath} == null){
|
|
||||||
return Result.error("参数异常");
|
|
||||||
}
|
|
||||||
return Result.status($!{table.entityPath}Service.save($!{table.entityPath}));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改 $!{table.comment}
|
|
||||||
*/
|
|
||||||
@PostMapping("/update")
|
|
||||||
@ApiOperationSupport(order = 2)
|
|
||||||
@ApiOperation(value = "修改", notes = "传入$!{table.entityPath}")
|
|
||||||
public Result update(@RequestBody $!{entity} $!{table.entityPath}) {
|
|
||||||
if($!{table.entityPath} == null){
|
|
||||||
return Result.error("参数异常");
|
|
||||||
}
|
|
||||||
return Result.status($!{table.entityPath}Service.updateById($!{table.entityPath}));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除 $!{table.comment}
|
|
||||||
*/
|
|
||||||
@PostMapping("/remove")
|
|
||||||
@ApiOperationSupport(order = 3)
|
|
||||||
@ApiOperation(value = "删除", notes = "传入ids")
|
|
||||||
public Result remove(@RequestBody IdParam<Long> idParam) {
|
|
||||||
if(idParam == null){
|
|
||||||
return Result.error("参数异常!");
|
|
||||||
}
|
|
||||||
|
|
||||||
return Result.status($!{table.entityPath}Service.removeByIds(idParam.getIds()));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 详情
|
|
||||||
*/
|
|
||||||
@GetMapping("/detail")
|
|
||||||
@ApiOperationSupport(order = 4)
|
|
||||||
@ApiOperation(value = "详情", notes = "传入id")
|
|
||||||
public Result<$!{entity}> detail(Long id) {
|
|
||||||
if(id == null){
|
|
||||||
return Result.error("参数异常");
|
|
||||||
}
|
|
||||||
$!{entity} detail = $!{table.entityPath}Service.getById(id);
|
|
||||||
return Result.successData(detail);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询 $!{table.comment}
|
|
||||||
*/
|
|
||||||
@GetMapping("/list")
|
|
||||||
@ApiOperationSupport(order = 5)
|
|
||||||
@ApiOperation(value = "查询", notes = "传入$!{table.entityPath}")
|
|
||||||
public Result list(PageParam pageParam, $!{entity} $!{table.entityPath}) {
|
|
||||||
List<$!{entity}> list = $!{table.entityPath}Service.list($!{table.entityPath}Service.getQueryWrapper(pageParam, $!{table.entityPath}));
|
|
||||||
return Result.successData(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页 $!{table.comment}
|
|
||||||
*/
|
|
||||||
@GetMapping("/page")
|
|
||||||
@ApiOperationSupport(order = 6)
|
|
||||||
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}")
|
|
||||||
public Result<IPage> page(PageParam pageParam, $!{entity} $!{table.entityPath}) {
|
|
||||||
IPage<$!{entity}> pages = $!{table.entityPath}Service.page(
|
|
||||||
MPUtil.getPage(pageParam),
|
|
||||||
$!{table.entityPath}Service.getQueryWrapper(null, $!{table.entityPath})
|
|
||||||
);
|
|
||||||
return Result.successData(pages);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,158 +0,0 @@
|
|||||||
package ${package.Entity};
|
|
||||||
|
|
||||||
#foreach($pkg in ${table.importPackages})
|
|
||||||
import ${pkg};
|
|
||||||
#end
|
|
||||||
#if(${swagger2})
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
#end
|
|
||||||
#if(${entityLombokModel})
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
#if(${chainModel})
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment}
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
#if(${entityLombokModel})
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
#if(${superEntityClass})
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
#else
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
#end
|
|
||||||
#if(${chainModel})
|
|
||||||
@Accessors(chain = true)
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#if(${table.convert})
|
|
||||||
@TableName("${table.name}")
|
|
||||||
#end
|
|
||||||
#if(${swagger2})
|
|
||||||
@ApiModel(value="${entity}对象", description="$!{table.comment}")
|
|
||||||
#end
|
|
||||||
#if(${superEntityClass})
|
|
||||||
public class ${entity} extends ${superEntityClass}#if(${activeRecord})<${entity}>#end {
|
|
||||||
#elseif(${activeRecord})
|
|
||||||
public class ${entity} extends Model<${entity}> {
|
|
||||||
#else
|
|
||||||
public class ${entity} implements Serializable {
|
|
||||||
#end
|
|
||||||
|
|
||||||
#if(${entitySerialVersionUID})
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
#end
|
|
||||||
## ---------- BEGIN 字段循环遍历 ----------
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
|
|
||||||
#if(${field.keyFlag})
|
|
||||||
#set($keyPropertyName=${field.propertyName})
|
|
||||||
#end
|
|
||||||
#if("$!field.comment" != "")
|
|
||||||
#if(${swagger2})
|
|
||||||
@ApiModelProperty(value = "${field.comment}", position = ${foreach.index})
|
|
||||||
#else
|
|
||||||
/**
|
|
||||||
* ${field.comment}
|
|
||||||
*/
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#if(${field.keyFlag})
|
|
||||||
## 主键
|
|
||||||
#if(${field.keyIdentityFlag})
|
|
||||||
@TableId(value = "${field.annotationColumnName}", type = IdType.AUTO)
|
|
||||||
#elseif(!$null.isNull(${idType}) && "$!idType" != "")
|
|
||||||
@TableId(value = "${field.annotationColumnName}", type = IdType.${idType})
|
|
||||||
#elseif(${field.convert})
|
|
||||||
@TableId("${field.annotationColumnName}")
|
|
||||||
#end
|
|
||||||
## 普通字段
|
|
||||||
#elseif(${field.fill})
|
|
||||||
## ----- 存在字段填充设置 -----
|
|
||||||
#if(${field.convert})
|
|
||||||
@TableField(value = "${field.annotationColumnName}", fill = FieldFill.${field.fill})
|
|
||||||
#else
|
|
||||||
@TableField(fill = FieldFill.${field.fill})
|
|
||||||
#end
|
|
||||||
#elseif(${field.convert})
|
|
||||||
@TableField("${field.annotationColumnName}")
|
|
||||||
#end
|
|
||||||
## 乐观锁注解
|
|
||||||
#if(${versionFieldName}==${field.name})
|
|
||||||
@Version
|
|
||||||
#end
|
|
||||||
## 逻辑删除注解
|
|
||||||
#if(${logicDeleteFieldName}==${field.name})
|
|
||||||
@TableLogic
|
|
||||||
#end
|
|
||||||
private ${field.propertyType} ${field.propertyName};
|
|
||||||
#end
|
|
||||||
## ---------- END 字段循环遍历 ----------
|
|
||||||
#if(!${entityLombokModel})
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if(${field.propertyType.equals("boolean")})
|
|
||||||
#set($getprefix="is")
|
|
||||||
#else
|
|
||||||
#set($getprefix="get")
|
|
||||||
#end
|
|
||||||
public ${field.propertyType} ${getprefix}${field.capitalName}() {
|
|
||||||
return ${field.propertyName};
|
|
||||||
}
|
|
||||||
#if(${chainModel})
|
|
||||||
public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
|
|
||||||
#else
|
|
||||||
public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
|
|
||||||
#end
|
|
||||||
this.${field.propertyName} = ${field.propertyName};
|
|
||||||
#if(${chainModel})
|
|
||||||
return this;
|
|
||||||
#end
|
|
||||||
}
|
|
||||||
#end
|
|
||||||
## --foreach end---
|
|
||||||
#end
|
|
||||||
## --end of #if(!${entityLombokModel})--
|
|
||||||
#if(${entityColumnConstant})
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
public static final String ${field.name.toUpperCase()} = "${field.name}";
|
|
||||||
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#if(${activeRecord})
|
|
||||||
@Override
|
|
||||||
protected Serializable pkVal() {
|
|
||||||
#if(${keyPropertyName})
|
|
||||||
return this.${keyPropertyName};
|
|
||||||
#else
|
|
||||||
return null;
|
|
||||||
#end
|
|
||||||
}
|
|
||||||
|
|
||||||
#end
|
|
||||||
#if(!${entityLombokModel})
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "${entity}{" +
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if($!{foreach.index}==0)
|
|
||||||
"${field.propertyName}=" + ${field.propertyName} +
|
|
||||||
#else
|
|
||||||
", ${field.propertyName}=" + ${field.propertyName} +
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
"}";
|
|
||||||
}
|
|
||||||
#end
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
package ${package.Mapper};
|
|
||||||
|
|
||||||
import ${package.Entity}.${entity};
|
|
||||||
import ${superMapperClassPackage};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment} Mapper 接口
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
public interface ${table.mapperName} extends ${superMapperClass}<${entity}> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,38 +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="${package.Mapper}.${table.mapperName}">
|
|
||||||
#if(${enableCache})
|
|
||||||
<!-- 开启二级缓存 -->
|
|
||||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
|
|
||||||
#end
|
|
||||||
|
|
||||||
#if(${baseResultMap})
|
|
||||||
<!-- 通用查询映射结果 -->
|
|
||||||
<resultMap id="BaseResultMap" type="${package.Entity}.${entity}">
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if(${field.keyFlag})##生成主键排在第一位
|
|
||||||
<id column="${field.name}" property="${field.propertyName}" />
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#foreach($field in ${table.commonFields})##生成公共字段
|
|
||||||
<result column="${field.name}" property="${field.propertyName}" />
|
|
||||||
#end
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if(!${field.keyFlag})##生成普通字段
|
|
||||||
<result column="${field.name}" property="${field.propertyName}" />
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
#end
|
|
||||||
#if(${baseColumnList})
|
|
||||||
<!-- 通用查询结果列 -->
|
|
||||||
<sql id="Base_Column_List">
|
|
||||||
#foreach($field in ${table.commonFields})
|
|
||||||
${field.columnName},
|
|
||||||
#end
|
|
||||||
${table.fieldNames}
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
#end
|
|
||||||
</mapper>
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package ${package.Service};
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.zhangy.skyeye.db.pojo.page.PageParam;
|
|
||||||
import ${package.Entity}.${entity};
|
|
||||||
import ${superServiceClassPackage};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment} 服务类
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过实体类获取QueryWrapper
|
|
||||||
* @param pageParam 分页参数
|
|
||||||
* @param $!{table.entityPath} 实体信息
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
QueryWrapper<$!{entity}> getQueryWrapper(PageParam pageParam, $!{entity} $!{table.entityPath});
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
package ${package.ServiceImpl};
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.zhangy.skyeye.db.pojo.page.PageParam;
|
|
||||||
import com.zhangy.skyeye.db.utils.MPUtil;
|
|
||||||
import ${package.Entity}.${entity};
|
|
||||||
import ${package.Mapper}.${table.mapperName};
|
|
||||||
import ${package.Service}.${table.serviceName};
|
|
||||||
import ${superServiceImplClassPackage};
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* $!{table.comment} 服务实现类
|
|
||||||
*
|
|
||||||
* @author ${author}
|
|
||||||
* @since ${date}
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过实体类获取QueryWrapper
|
|
||||||
* @param pageParam 分页参数
|
|
||||||
* @param $!{table.entityPath} 实体信息
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public QueryWrapper<$!{entity}> getQueryWrapper(PageParam pageParam, $!{entity} $!{table.entityPath}){
|
|
||||||
QueryWrapper<$!{entity}> queryWrapper = MPUtil.getQueryWrapper(pageParam);
|
|
||||||
|
|
||||||
if($!{table.entityPath} == null){
|
|
||||||
return queryWrapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
## 主键
|
|
||||||
#if(${field.keyIdentityFlag})
|
|
||||||
//主键
|
|
||||||
if($!{table.entityPath}.get${field.capitalName}() != null){
|
|
||||||
queryWrapper.lambda()
|
|
||||||
.eq($!{entity}::get${field.capitalName}, $!{table.entityPath}.get${field.capitalName}());
|
|
||||||
return queryWrapper;
|
|
||||||
}
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
|
|
||||||
//TODO 此处可以根据各字段查询需求修改查询条件,eq、like、ge、gt、le、lt、ne...等等等
|
|
||||||
queryWrapper.lambda()
|
|
||||||
#foreach($field in ${table.fields})
|
|
||||||
#if(!${field.keyIdentityFlag})
|
|
||||||
#if($!{foreach.last})
|
|
||||||
.eq($!{table.entityPath}.get${field.capitalName}() != null, $!{entity}::get${field.capitalName}, $!{table.entityPath}.get${field.capitalName}());
|
|
||||||
#else
|
|
||||||
.eq($!{table.entityPath}.get${field.capitalName}() != null, $!{entity}::get${field.capitalName}, $!{table.entityPath}.get${field.capitalName}())
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
#end
|
|
||||||
return queryWrapper;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
artifactId=skyeye-common-generator
|
|
||||||
groupId=com.zhangy
|
|
||||||
version=1.0.0.RELEASE
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
com\zhangy\skyeye\common\generator\GeneratorApi_DM$2.class
|
|
||||||
com\zhangy\skyeye\common\generator\GeneratorApi$1.class
|
|
||||||
com\zhangy\skyeye\common\generator\GeneratorApi_DM.class
|
|
||||||
com\zhangy\skyeye\common\generator\GeneratorApi_DM$1.class
|
|
||||||
com\zhangy\skyeye\common\generator\GeneratorApi$2.class
|
|
||||||
com\zhangy\skyeye\common\generator\GeneratorApi.class
|
|
||||||
@ -1,2 +0,0 @@
|
|||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-generator\src\main\java\com\zhangy\skyeye\common\generator\GeneratorApi_DM.java
|
|
||||||
D:\workspace\skyeyesystem\backend\Skyeye-sys-dev\skyeye-common\skyeye-common-generator\src\main\java\com\zhangy\skyeye\common\generator\GeneratorApi.java
|
|
||||||
Binary file not shown.
@ -120,6 +120,11 @@
|
|||||||
<artifactId>quartz</artifactId>
|
<artifactId>quartz</artifactId>
|
||||||
<version>2.3.2</version>
|
<version>2.3.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<!--<dependency>
|
<!--<dependency>
|
||||||
<groupId>org.quartz-scheduler</groupId>
|
<groupId>org.quartz-scheduler</groupId>
|
||||||
<artifactId>quartz-jobs</artifactId>
|
<artifactId>quartz-jobs</artifactId>
|
||||||
|
|||||||
@ -37,7 +37,7 @@ spring:
|
|||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/zhangy-skyeye?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&useSSL=false
|
url: jdbc:mysql://127.0.0.1:3306/zhangy-skyeye?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
username: root
|
username: root
|
||||||
password: 'P@ssw0rd'
|
password: 'root'
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ spring:
|
|||||||
database: 0
|
database: 0
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
password: 'P@ssw0rd'
|
#password: 'P@ssw0rd'
|
||||||
|
|
||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
mapper-locations: classpath*:mapping/**/*Mapping.xml
|
mapper-locations: classpath*:mapping/**/*Mapping.xml
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,93 +0,0 @@
|
|||||||
# 应用服务 WEB 访问端口
|
|
||||||
server:
|
|
||||||
port: 9116
|
|
||||||
servlet:
|
|
||||||
context-path: /
|
|
||||||
compression:
|
|
||||||
enabled: true
|
|
||||||
tomcat:
|
|
||||||
connection-timeout: 18000000
|
|
||||||
|
|
||||||
# 应用名称
|
|
||||||
spring:
|
|
||||||
main:
|
|
||||||
allow-circular-references: true
|
|
||||||
application:
|
|
||||||
name: skyeye-service-manager
|
|
||||||
profiles:
|
|
||||||
# active: dev
|
|
||||||
config:
|
|
||||||
activate:
|
|
||||||
on-profile:
|
|
||||||
- dev
|
|
||||||
servlet:
|
|
||||||
multipart:
|
|
||||||
max-file-size: 200MB
|
|
||||||
max-request-size: 500MB
|
|
||||||
mvc:
|
|
||||||
pathmatch:
|
|
||||||
matching-strategy: ant-path-matcher
|
|
||||||
quartz:
|
|
||||||
properties:
|
|
||||||
org.quartz.threadPool.threadCount: 20
|
|
||||||
org.quartz.threadPool.threadPriority: 5
|
|
||||||
org.quartz.jobStore.misfireThreshold: 60000
|
|
||||||
|
|
||||||
# 数据源配置
|
|
||||||
datasource:
|
|
||||||
url: jdbc:mysql://127.0.0.1:3306/zhangy-skyeye?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&useSSL=false
|
|
||||||
username: root
|
|
||||||
password: 'P@ssw0rd'
|
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
|
||||||
|
|
||||||
jackson:
|
|
||||||
default-property-inclusion: non_null
|
|
||||||
date-format: yyyy-MM-dd'T'HH:mm:ss'Z'
|
|
||||||
|
|
||||||
#redis 配置
|
|
||||||
redis:
|
|
||||||
database: 0
|
|
||||||
host: 127.0.0.1
|
|
||||||
port: 6379
|
|
||||||
password: 'P@ssw0rd'
|
|
||||||
|
|
||||||
mybatis-plus:
|
|
||||||
mapper-locations: classpath*:mapping/**/*Mapping.xml
|
|
||||||
global-config:
|
|
||||||
banner: false
|
|
||||||
db-config:
|
|
||||||
id-type: AUTO
|
|
||||||
table-underline: true
|
|
||||||
configuration:
|
|
||||||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
|
||||||
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
||||||
call-setters-on-nulls: true
|
|
||||||
# Jasypt 配置
|
|
||||||
jasypt:
|
|
||||||
encryptor:
|
|
||||||
# 指定加密算法,例如 PBEWithMD5AndDES, PBEWithHMACSHA512AndAES_256 等
|
|
||||||
algorithm: PBEWithMD5AndDES
|
|
||||||
ld:
|
|
||||||
file-root: "d:/1/"
|
|
||||||
uav:
|
|
||||||
upload: kmz
|
|
||||||
sar:
|
|
||||||
image:
|
|
||||||
type: 1
|
|
||||||
udp:
|
|
||||||
status:
|
|
||||||
answer-timeout: 1
|
|
||||||
connect-timeout: 15
|
|
||||||
py:
|
|
||||||
ktkxUrl: http://127.0.0.1:18090/ktkx/UavPlanning/SAR
|
|
||||||
# detectUrl: http://127.0.0.1:18091/ktkx/detect/cpu/SARCoord
|
|
||||||
weather:
|
|
||||||
cityCode: 101120201
|
|
||||||
|
|
||||||
logging:
|
|
||||||
file:
|
|
||||||
name: "logs/"
|
|
||||||
level:
|
|
||||||
com.zhangy: info
|
|
||||||
org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler: OFF
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
spring:
|
|
||||||
application:
|
|
||||||
name: zy-skyeye-service
|
|
||||||
profiles:
|
|
||||||
active: dev
|
|
||||||
debug: true
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user