From 8c627df4abacbe7397d0c1831f1a71c62ebe15b2 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期三, 15 十月 2025 10:45:33 +0800
Subject: [PATCH] yys 1.随机排产
---
ruoyi-admin/src/main/java/com/ruoyi/PlusCodeGenerator.java | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/PlusCodeGenerator.java b/ruoyi-admin/src/main/java/com/ruoyi/PlusCodeGenerator.java
index eeb12f5..1c2cc8c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/PlusCodeGenerator.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/PlusCodeGenerator.java
@@ -24,22 +24,22 @@
* 鍔熻兘锛氭牴鎹暟鎹簱琛ㄧ粨鏋勮嚜鍔ㄧ敓鎴怑ntity銆丮apper銆丼ervice銆丆ontroller绛変唬鐮�
* 淇锛氳В鍐矲reemarker妯℃澘涓璯enerateService鍙橀噺缂哄け鐨勯棶棰�
*/
-@SpringBootApplication
public class PlusCodeGenerator {
// 鏁版嵁搴撻厤缃�
- private static final String DB_URL = "jdbc:postgresql://lunor.cn:5431/ruoyi-java";
- private static final String DB_USERNAME = "test";
- private static final String DB_PASSWORD = "chj123456";
+ private static final String DB_URL = "jdbc:postgresql://127.0.0.1:5433/zd-02";
+ private static final String DB_USERNAME = "postgres";
+ private static final String DB_PASSWORD = "123456";
// 椤圭洰鍩虹閰嶇疆
private static final String BASE_PACKAGE = "com.ruoyi";
- private static final String MODULE_NAME = "basic"; // 妯″潡鍚�
+ private static final String MODULE_NAME = "business"; // 妯″潡鍚�
public static void main(String[] args) {
String projectPath = System.getProperty("user.dir"); // 鑾峰彇椤圭洰鏍硅矾寰�
- String path = "basic-server"; // 妯″潡鍚嶇О
- String table = "test"; // 琛ㄥ悕锛屽涓〃閫楀彿闅斿紑
+ String path = "main-business"; // 妯″潡鍚嶇О
+ String table = "equipment_usage_detail"; // 琛ㄥ悕,澶氫釜琛ㄩ�楀彿闅斿紑
+ String author = "ld";
// 浠g爜杈撳嚭璺緞閰嶇疆
String outputBasePath = Paths.get(projectPath, path, "src", "main", "java").toString();
@@ -48,7 +48,7 @@
// 浠g爜鐢熸垚鏍稿績閰嶇疆
FastAutoGenerator.create(DB_URL, DB_USERNAME, DB_PASSWORD)
.globalConfig(builder -> {
- builder.author("ruoyi") // 浣滆�呬俊鎭�
+ builder.author(author) // 浣滆�呬俊鎭�
.outputDir(outputBasePath) // 浠g爜杈撳嚭鐩綍
.dateType(DateType.ONLY_DATE) // 鏃ユ湡绫诲瀷
.commentDate("yyyy-MM-dd") // 娉ㄩ噴鏃ユ湡鏍煎紡
@@ -73,7 +73,7 @@
// 瀹炰綋绫婚厤缃�
.entityBuilder()
- .superClass("com.ruoyi.common.core.domain.BaseEntity") // 缁ф壙鍩虹被
+ .superClass("com.ruoyi.common.core.domain.MyBaseEntity") // 缁ф壙鍩虹被
.addSuperEntityColumns("create_by", "create_time", "update_by", "update_time") // 鎺掗櫎鍩虹被瀛楁
.enableLombok() // 鍚敤Lombok
.naming(NamingStrategy.underline_to_camel) // 琛ㄥ悕杞┘宄�
@@ -127,8 +127,8 @@
"create_by", "create_time", "update_by", "update_time"
)); // 鍩虹被瀛楁
customMap.put("idType", "AUTO"); // 涓婚敭绫诲瀷
- customMap.put("superEntityClass", "com.ruoyi.common.core.domain.BaseEntity"); // 鍩虹被鍏ㄨ矾寰�
- customMap.put("author", "ruoyi"); // 浣滆�呬俊鎭�
+ customMap.put("superEntityClass", "com.ruoyi.common.core.domain.MyBaseEntity"); // 鍩虹被鍏ㄨ矾寰�
+ customMap.put("author", author); // 浣滆�呬俊鎭�
customMap.put("packageName", BASE_PACKAGE + "." + MODULE_NAME); // 鍖呭悕
customMap.put("tableName", table); // 琛ㄥ悕
@@ -148,8 +148,8 @@
if (Files.exists(entityPath)) {
String content = Files.readString(entityPath);
content = content.replace(
- "extends com.ruoyi.common.core.domain.BaseEntity",
- "extends BaseEntity"
+ "extends com.ruoyi.common.core.domain.MyBaseEntity",
+ "extends MyBaseEntity"
); // 绠�鍖栧熀绫诲紩鐢�
Files.writeString(entityPath, content);
}
--
Gitblit v1.9.3