代码调整
This commit is contained in:
@@ -28,12 +28,7 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.jeffreyning</groupId>
|
|
||||||
<artifactId>mybatisplus-plus</artifactId>
|
|
||||||
<version>1.5.1-RELEASE</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ import java.util.stream.Stream;
|
|||||||
*/
|
*/
|
||||||
public class GenerateCode {
|
public class GenerateCode {
|
||||||
|
|
||||||
private static final String TARGET_DIR = "C://code";
|
private static final String TARGET_DIR = "D://code";
|
||||||
|
|
||||||
private static final String DB_URL = "jdbc:mysql://192.168.1.18:13306/pqsinfo_test";
|
private static final String DB_URL = "jdbc:mysql://192.168.1.18:13306/pqsinfo_hb_pv";
|
||||||
|
|
||||||
private static final String USERNAME = "root";
|
private static final String USERNAME = "root";
|
||||||
|
|
||||||
@@ -30,8 +30,8 @@ public class GenerateCode {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
List<Module> modules = Stream.of(
|
List<Module> modules = Stream.of(
|
||||||
new Module("xuyang", "com.njcn.access", "zl", Stream.of(
|
new Module("hongawen", "com.hongawen.mybatis", "zl", Stream.of(
|
||||||
"ele_epd_pqd"
|
"r_dis_mp_measure_phase_report_d"
|
||||||
).collect(Collectors.toList()), "")
|
).collect(Collectors.toList()), "")
|
||||||
).collect(Collectors.toList());
|
).collect(Collectors.toList());
|
||||||
generateJavaFile(modules);
|
generateJavaFile(modules);
|
||||||
|
|||||||
@@ -26,6 +26,10 @@
|
|||||||
<artifactId>common-web</artifactId>
|
<artifactId>common-web</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.jeffreyning</groupId>
|
||||||
|
<artifactId>mybatisplus-plus</artifactId>
|
||||||
|
</dependency>
|
||||||
<!--数据库相关********satrt-->
|
<!--数据库相关********satrt-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mybatis.spring.boot</groupId>
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
@@ -53,11 +57,7 @@
|
|||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>com.github.jeffreyning</groupId>-->
|
|
||||||
<!-- <artifactId>mybatisplus-plus</artifactId>-->
|
|
||||||
<!-- <scope>compile</scope>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<!--数据库相关********end-->
|
<!--数据库相关********end-->
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ public class MybatisConfig {
|
|||||||
* @date 2023/5/30 14:53
|
* @date 2023/5/30 14:53
|
||||||
* @return BatchInjector
|
* @return BatchInjector
|
||||||
*/
|
*/
|
||||||
// @Bean
|
@Bean
|
||||||
// public BatchInjector BatchInjector() {
|
public BatchInjector BatchInjector() {
|
||||||
// return new BatchInjector();
|
return new BatchInjector();
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
|
|||||||
import com.baomidou.mybatisplus.core.injector.AbstractMethod;
|
import com.baomidou.mybatisplus.core.injector.AbstractMethod;
|
||||||
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
|
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
|
||||||
import com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn;
|
import com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn;
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppSqlInjector;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ import java.util.List;
|
|||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @date 2023年05月30日 14:51
|
* @date 2023年05月30日 14:51
|
||||||
*/
|
*/
|
||||||
public class BatchInjector extends DefaultSqlInjector {
|
public class BatchInjector extends MppSqlInjector {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AbstractMethod> getMethodList(Class<?> mapperClass) {
|
public List<AbstractMethod> getMethodList(Class<?> mapperClass) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import java.util.List;
|
|||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @date 2023年05月30日 14:54
|
* @date 2023年05月30日 14:54
|
||||||
*/
|
*/
|
||||||
public interface BatchMapper<T> extends BaseMapper<T> {
|
public interface BatchBaseMapper<T> extends BaseMapper<T> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 真正的批量插入
|
* 真正的批量插入
|
||||||
@@ -22,13 +22,6 @@
|
|||||||
<artifactId>common-device-biz</artifactId>
|
<artifactId>common-device-biz</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.jeffreyning</groupId>
|
|
||||||
<artifactId>mybatisplus-plus</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.jeffreyning</groupId>
|
|
||||||
<artifactId>mybatisplus-plus</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -90,12 +90,6 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.jeffreyning</groupId>
|
|
||||||
<artifactId>mybatisplus-plus</artifactId>
|
|
||||||
<version>1.5.1-RELEASE</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mapstruct</groupId>
|
<groupId>org.mapstruct</groupId>
|
||||||
<artifactId>mapstruct</artifactId>
|
<artifactId>mapstruct</artifactId>
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package com.njcn.prepare;
|
package com.njcn.prepare;
|
||||||
|
|
||||||
import com.github.jeffreyning.mybatisplus.conf.EnableMPP;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
import org.springframework.context.annotation.DependsOn;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author hongawen
|
* @author hongawen
|
||||||
@@ -17,7 +15,6 @@ import org.springframework.context.annotation.DependsOn;
|
|||||||
@MapperScan("com.njcn.**.mapper")
|
@MapperScan("com.njcn.**.mapper")
|
||||||
@EnableFeignClients(basePackages = "com.njcn")
|
@EnableFeignClients(basePackages = "com.njcn")
|
||||||
@SpringBootApplication(scanBasePackages = "com.njcn")
|
@SpringBootApplication(scanBasePackages = "com.njcn")
|
||||||
@EnableMPP
|
|
||||||
public class PrepareApplication {
|
public class PrepareApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -54,12 +54,7 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.jeffreyning</groupId>
|
|
||||||
<artifactId>mybatisplus-plus</artifactId>
|
|
||||||
<version>1.5.1-RELEASE</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>prepare-api</artifactId>
|
<artifactId>prepare-api</artifactId>
|
||||||
|
|||||||
@@ -67,12 +67,7 @@
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.jeffreyning</groupId>
|
|
||||||
<artifactId>mybatisplus-plus</artifactId>
|
|
||||||
<version>1.5.1-RELEASE</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.belerweb</groupId>
|
<groupId>com.belerweb</groupId>
|
||||||
<artifactId>pinyin4j</artifactId>
|
<artifactId>pinyin4j</artifactId>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.njcn.process;
|
package com.njcn.process;
|
||||||
|
|
||||||
import com.github.jeffreyning.mybatisplus.conf.EnableMPP;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
@@ -17,7 +16,6 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
|||||||
@MapperScan("com.njcn.**.mapper")
|
@MapperScan("com.njcn.**.mapper")
|
||||||
@EnableFeignClients(basePackages = "com.njcn")
|
@EnableFeignClients(basePackages = "com.njcn")
|
||||||
@SpringBootApplication(scanBasePackages = "com.njcn")
|
@SpringBootApplication(scanBasePackages = "com.njcn")
|
||||||
@EnableMPP
|
|
||||||
public class ProcessApplication {
|
public class ProcessApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -39,10 +39,7 @@
|
|||||||
<version>4.4.0</version>
|
<version>4.4.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.github.jeffreyning</groupId>
|
|
||||||
<artifactId>mybatisplus-plus</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>easyexcel</artifactId>
|
<artifactId>easyexcel</artifactId>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.njcn.system;
|
package com.njcn.system;
|
||||||
|
|
||||||
import com.github.jeffreyning.mybatisplus.conf.EnableMPP;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
@@ -16,7 +15,6 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
|||||||
@MapperScan("com.njcn.**.mapper")
|
@MapperScan("com.njcn.**.mapper")
|
||||||
@EnableFeignClients(basePackages = "com.njcn")
|
@EnableFeignClients(basePackages = "com.njcn")
|
||||||
@SpringBootApplication(scanBasePackages = "com.njcn")
|
@SpringBootApplication(scanBasePackages = "com.njcn")
|
||||||
@EnableMPP
|
|
||||||
public class SystemBootMain {
|
public class SystemBootMain {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(SystemBootMain.class, args);
|
SpringApplication.run(SystemBootMain.class, args);
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.njcn.system.mapper;
|
package com.njcn.system.mapper;
|
||||||
|
|
||||||
import com.njcn.db.mapper.BatchMapper;
|
import com.njcn.db.mapper.BatchBaseMapper;
|
||||||
import com.njcn.system.excel.UserLogExcel;
|
import com.njcn.system.excel.UserLogExcel;
|
||||||
import com.njcn.system.pojo.po.UserLog;
|
import com.njcn.system.pojo.po.UserLog;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@@ -17,7 +16,7 @@ import java.util.List;
|
|||||||
* @author hongawen
|
* @author hongawen
|
||||||
* @since 2021-12-13
|
* @since 2021-12-13
|
||||||
*/
|
*/
|
||||||
public interface UserLogMapper extends BatchMapper<UserLog> {
|
public interface UserLogMapper extends BatchBaseMapper<UserLog> {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user