数据库新增
parent
2c8d7feb95
commit
4a8178e10a
@ -1,20 +0,0 @@
|
||||
package com.shxy.xyhkcamera;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class AppRunner implements ApplicationRunner {
|
||||
@Autowired
|
||||
private SdkInitService hksdkInitService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
hksdkInitService.initSdk();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
package com.shxy.xyhkcamera;
|
||||
|
||||
/**
|
||||
* @author jiangxin
|
||||
* @create 2022-01-19-16:40
|
||||
*/
|
||||
public class OsSelect {
|
||||
|
||||
public static boolean isLinux() {
|
||||
return System.getProperty("os.name").toLowerCase().contains("linux");
|
||||
}
|
||||
|
||||
public static boolean isWindows() {
|
||||
return System.getProperty("os.name").toLowerCase().contains("windows");
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
package com.shxy.xyhkcamera;
|
||||
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Pointer;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class SdkInitService {
|
||||
|
||||
@Autowired
|
||||
private ThreadPoolExecutor executor;
|
||||
|
||||
public static HCNetSDK hCNetSDK = null;
|
||||
static FExceptionCallBack_Imp fExceptionCallBack;
|
||||
|
||||
static class FExceptionCallBack_Imp implements HCNetSDK.FExceptionCallBack {
|
||||
public void invoke(int dwType, int lUserID, int lHandle, Pointer pUser) {
|
||||
System.out.println("异常事件类型:" + dwType);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public SdkInitService() {
|
||||
if (hCNetSDK == null) {
|
||||
synchronized (HCNetSDK.class) {
|
||||
try {
|
||||
hCNetSDK = (HCNetSDK) Native.loadLibrary(OSUtils.getLoadLibrary(), HCNetSDK.class);
|
||||
} catch (Exception ex) {
|
||||
log.error("SdkInitService-init-hCNetSDK-error");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Autowired
|
||||
public void initSdk() {
|
||||
log.info("HKSDKInitService-init-coming");
|
||||
executor.execute(new InitSdkTask());
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
//package com.shxy.xyhkcamera;
|
||||
//
|
||||
//public class Test {
|
||||
// public static void main(String[] args) {
|
||||
//
|
||||
//// HcNetSdkUtil hcNetSdkUtil = new HcNetSdkUtil(56, "", "");
|
||||
//// HCNetSDK sdkInstance = hcNetSdkUtil.createSDKInstance();
|
||||
//// sdkInstance.NET_DVR_Init();
|
||||
//// sdkInstance.NET_DVR_Login_V40();
|
||||
//// sdkInstance.NET_DVR_STDXMLConfig();
|
||||
//// sdkInstance.NET_DVR_StartRemoteConfig()
|
||||
// }
|
||||
//}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,17 @@
|
||||
//package com.shxy.xyhkcamera.alarm;
|
||||
//
|
||||
//import NetSDKDemo.HCNetSDK;
|
||||
//import com.sun.jna.Pointer;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * @author jiangxin
|
||||
// * @create 2022-08-15-17:26
|
||||
// */
|
||||
//public class FMSGCallBack implements HCNetSDK.FMSGCallBack {
|
||||
// //报警信息回调函数
|
||||
// public void invoke(int lCommand, HCNetSDK.NET_DVR_ALARMER pAlarmer, Pointer pAlarmInfo, int dwBufLen, Pointer pUser) {
|
||||
// AlarmDataParse.alarmDataHandle(lCommand, pAlarmer, pAlarmInfo, dwBufLen, pUser);
|
||||
// return;
|
||||
// }
|
||||
//}
|
@ -0,0 +1,22 @@
|
||||
//
|
||||
//package com.shxy.xyhkcamera.alarm;
|
||||
//
|
||||
//import com.shxy.xyhkcamera.HCNetSDK;
|
||||
//import com.sun.jna.Pointer;
|
||||
//
|
||||
//
|
||||
//
|
||||
//public class FMSGCallBack_V31 implements HCNetSDK.FMSGCallBack_V31 {
|
||||
// //报警信息回调函数
|
||||
// public boolean invoke(int lCommand, HCNetSDK.NET_DVR_ALARMER pAlarmer, Pointer pAlarmInfo, int dwBufLen, Pointer pUser) {
|
||||
// AlarmDataParse.alarmDataHandle(lCommand, pAlarmer, pAlarmInfo, dwBufLen, pUser);
|
||||
// return true;
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
@ -0,0 +1,34 @@
|
||||
package com.shxy.xyhkcamera.configure;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
@Component
|
||||
public class MybatisMetaObjectHandler implements MetaObjectHandler {
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
insertOrUpdateFill(metaObject, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
insertOrUpdateFill(metaObject, false);
|
||||
}
|
||||
|
||||
private void insertOrUpdateFill(MetaObject metaObject, boolean isInsert) {
|
||||
if (isInsert) {
|
||||
if (Objects.isNull(getFieldValByName("createTime", metaObject)))
|
||||
this.setFieldValByName("createTime", LocalDateTime.now(), metaObject);
|
||||
this.setFieldValByName("deleted", 0, metaObject);
|
||||
} else {
|
||||
if (Objects.isNull(getFieldValByName("updateTime", metaObject)))
|
||||
this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,26 @@
|
||||
//package com.shxy.xyhkcamera.configure;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.annotation.DbType;
|
||||
//import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;
|
||||
//import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
//import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
//
|
||||
//@Configuration
|
||||
//@EnableTransactionManagement
|
||||
//public class MybatisPlusConfig {
|
||||
//
|
||||
// @Bean
|
||||
// public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
// MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
// PaginationInnerInterceptor pii = new PaginationInnerInterceptor();
|
||||
// pii.setDbType(DbType.MYSQL);
|
||||
// pii.setMaxLimit(500L);
|
||||
// interceptor.addInnerInterceptor(pii);
|
||||
// return interceptor;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
//
|
@ -0,0 +1,18 @@
|
||||
package com.shxy.xyhkcamera.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 红外区域测温数据表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/data-eaif-hentity")
|
||||
public class DataEaifHController {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.shxy.xyhkcamera.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/modev-eaif-entity")
|
||||
public class ModevEaifController {
|
||||
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
package com.shxy.xyhkcamera.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 红外区域测温数据表
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("data_eaif_h")
|
||||
@ApiModel(value = "DataEaifHEntity对象", description = "红外区域测温数据表")
|
||||
public class DataEaifHEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("自动编号")
|
||||
@TableId(value = "data_id", type = IdType.AUTO)
|
||||
private Integer dataId;
|
||||
|
||||
@ApiModelProperty("设备ID")
|
||||
@TableField("eqmid")
|
||||
private Integer eqmid;
|
||||
|
||||
@ApiModelProperty("点、线、区域ID")
|
||||
@TableField("areaid")
|
||||
private Integer areaid;
|
||||
|
||||
@ApiModelProperty("采集时间")
|
||||
@TableField("capturetime")
|
||||
private LocalDateTime capturetime;
|
||||
|
||||
@ApiModelProperty("最大温度")
|
||||
@TableField("maxtemp")
|
||||
private Double maxtemp;
|
||||
|
||||
@ApiModelProperty("最小温度")
|
||||
@TableField("mintemp")
|
||||
private Double mintemp;
|
||||
|
||||
@ApiModelProperty("平均温度")
|
||||
@TableField("avgtemp")
|
||||
private Double avgtemp;
|
||||
|
||||
@ApiModelProperty("1=>摄氏度2=>华氏度")
|
||||
@TableField("unit")
|
||||
private Byte unit;
|
||||
|
||||
@ApiModelProperty("1->点2->线3->框")
|
||||
@TableField("type")
|
||||
private Byte type;
|
||||
|
||||
@ApiModelProperty("中间差")
|
||||
@TableField("mid")
|
||||
private Double mid;
|
||||
|
||||
@ApiModelProperty("标准方差值")
|
||||
@TableField("std")
|
||||
private Double std;
|
||||
|
||||
@TableField("isupload")
|
||||
private Integer isupload;
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.shxy.xyhkcamera.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("modev_eaif")
|
||||
@ApiModel(value = "ModevEaifEntity对象", description = "")
|
||||
public class ModevEaifEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@TableField("eqmid")
|
||||
private Integer eqmid;
|
||||
|
||||
@ApiModelProperty("预置点id")
|
||||
@TableField("nPresetId")
|
||||
private Integer nPresetId;
|
||||
|
||||
@ApiModelProperty("规则编号")
|
||||
@TableField("nRuleId")
|
||||
private Integer nRuleId;
|
||||
|
||||
@ApiModelProperty("规则类型")
|
||||
@TableField("nMeterType")
|
||||
private Integer nMeterType;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.shxy.xyhkcamera.mapper;
|
||||
|
||||
import com.shxy.xyhkcamera.entity.DataEaifHEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 红外区域测温数据表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
public interface DataEaifHMapper extends BaseMapper<DataEaifHEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.shxy.xyhkcamera.mapper;
|
||||
|
||||
import com.shxy.xyhkcamera.entity.ModevEaifEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
public interface ModevEaifMapper extends BaseMapper<ModevEaifEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?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.shxy.xyhkcamera.mapper.DataEaifHMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,5 @@
|
||||
<?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.shxy.xyhkcamera.mapper.ModevEaifMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,16 @@
|
||||
package com.shxy.xyhkcamera.service;
|
||||
|
||||
import com.shxy.xyhkcamera.entity.DataEaifHEntity;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 红外区域测温数据表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
public interface DataEaifHService extends IService<DataEaifHEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.shxy.xyhkcamera.service;
|
||||
|
||||
import com.shxy.xyhkcamera.entity.ModevEaifEntity;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
public interface ModevEaifService extends IService<ModevEaifEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.shxy.xyhkcamera.service.impl;
|
||||
|
||||
import com.shxy.xyhkcamera.entity.DataEaifHEntity;
|
||||
import com.shxy.xyhkcamera.mapper.DataEaifHMapper;
|
||||
import com.shxy.xyhkcamera.service.DataEaifHService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 红外区域测温数据表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@Service
|
||||
public class DataEaifHServiceImp extends ServiceImpl<DataEaifHMapper, DataEaifHEntity> implements DataEaifHService {
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.shxy.xyhkcamera.service.impl;
|
||||
|
||||
import com.shxy.xyhkcamera.entity.ModevEaifEntity;
|
||||
import com.shxy.xyhkcamera.mapper.ModevEaifMapper;
|
||||
import com.shxy.xyhkcamera.service.ModevEaifService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author jingjing
|
||||
* @since 2024-05-20
|
||||
*/
|
||||
@Service
|
||||
public class ModevEaifServiceImp extends ServiceImpl<ModevEaifMapper, ModevEaifEntity> implements ModevEaifService {
|
||||
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.shxy.xyhkcamera.utils;
|
||||
|
||||
|
||||
|
||||
import java.io.*;
|
||||
|
||||
public class CommonUtil {
|
||||
|
||||
//SDK时间解析
|
||||
public static String parseTime(int time) {
|
||||
int year = (time >> 26) + 2000;
|
||||
int month = (time >> 22) & 15;
|
||||
int day = (time >> 17) & 31;
|
||||
int hour = (time >> 12) & 31;
|
||||
int min = (time >> 6) & 63;
|
||||
int second = (time >> 0) & 63;
|
||||
String sTime = year + "-" + month + "-" + day + "-" + hour + ":" + min + ":" + second;
|
||||
// System.out.println(sTime);
|
||||
return sTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
//分辨率解析
|
||||
public static String parseResolution(int dwResolution) {
|
||||
int interlace = (((dwResolution) >> 28) & 0x1);
|
||||
int width = ((((dwResolution) >> 19) & 0x1ff) << 3); //宽
|
||||
int hight = ((((dwResolution) >> 8) & 0x7ff) << 1); //高
|
||||
int fps = ((dwResolution) & 0xff); //帧率
|
||||
String result = width + "*" + hight + "_" + fps;
|
||||
return result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取本地文件到数组中
|
||||
*
|
||||
* @param filename 本地文件
|
||||
* @return 返回读取到的数据到 byte数组
|
||||
* @throws IOException
|
||||
*/
|
||||
public static byte[] toByteArray(String filename) throws IOException {
|
||||
File file = new File(filename);
|
||||
if (!file.exists()) {
|
||||
throw new FileNotFoundException(filename);
|
||||
}
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream((int) file.length());
|
||||
BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
|
||||
try {
|
||||
byte[] buffer = new byte[1024];
|
||||
int len;
|
||||
while (-1 != (len = in.read(buffer, 0, buffer.length))) {
|
||||
bos.write(buffer, 0, len);
|
||||
}
|
||||
return bos.toByteArray();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
} finally {
|
||||
bos.close();
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.shxy.xyhkcamera.utils;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ArrayUtils;
|
||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
||||
import com.baomidou.mybatisplus.generator.FastAutoGenerator;
|
||||
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
|
||||
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
|
||||
import com.baomidou.mybatisplus.generator.config.PackageConfig;
|
||||
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
|
||||
import com.baomidou.mybatisplus.generator.config.converts.MySqlTypeConvert;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.baomidou.mybatisplus.generator.config.rules.DateType;
|
||||
import com.baomidou.mybatisplus.generator.config.rules.IColumnType;
|
||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
||||
import com.baomidou.mybatisplus.generator.engine.VelocityTemplateEngine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class MyBatisPlusGenerator {
|
||||
// 处理 all 情况
|
||||
protected static List<String> getTables(String tables) {
|
||||
return "all".equals(tables) ? Collections.emptyList() : Arrays.asList(tables.split(","));
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String projectPath = System.getProperty("user.dir");
|
||||
FastAutoGenerator.create("jdbc:mysql://192.168.1.190:3306/cac", "root", "123456")
|
||||
// 全局配置
|
||||
.globalConfig((scanner, builder) -> {
|
||||
builder.author(scanner.apply("请输入作者名称?"));
|
||||
builder.enableSwagger();
|
||||
builder.outputDir(projectPath + "/src/main/java");
|
||||
})
|
||||
// 包配置
|
||||
.packageConfig((scanner, builder) -> {
|
||||
builder.parent(scanner.apply("请输入包名?"));
|
||||
})
|
||||
// 策略配置
|
||||
.strategyConfig((scanner, builder) -> {
|
||||
builder.addInclude(MyBatisPlusGenerator.getTables(scanner.apply("请输入表名,多个英文逗号分隔?所有输入 all")))
|
||||
.controllerBuilder().enableRestStyle().enableHyphenStyle().build();
|
||||
builder.serviceBuilder()
|
||||
.formatServiceFileName("%sService")
|
||||
.formatServiceImplFileName("%sServiceImp")
|
||||
.build();
|
||||
//entity的策略配置
|
||||
builder.entityBuilder()
|
||||
.enableLombok()
|
||||
.enableTableFieldAnnotation()
|
||||
.versionColumnName("version")
|
||||
.logicDeleteColumnName("is_delete")
|
||||
.columnNaming(NamingStrategy.underline_to_camel)
|
||||
.idType(IdType.ASSIGN_ID)
|
||||
.formatFileName("%sEntity")
|
||||
.build();
|
||||
})
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
The dll in this directory£¨iconv.dll,libxml2.dll,zlib1.dll,calib.dll£©only used in ClientDemo.
|
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue