整理商品模块

This commit is contained in:
2024-07-25 19:21:15 +08:00
parent d896646c30
commit b81f80971f
19 changed files with 305 additions and 176 deletions
@@ -70,7 +70,7 @@ public class CmsGenerator {
// "cms_mp_pages",
// "cms_mp"
// "cms_mp_field"
"cms_mp_ad"
// "cms_mp_ad"
};
// 需要去除的表前缀
@@ -28,7 +28,9 @@ public class ShopGenerator {
// 输出目录
private static final String OUTPUT_DIR = "/src/main/java";
// Vue文件输出位置
private static final String OUTPUT_LOCATION_VUE = "/Users/gxwebsoft/VUE/com.gxwebsoft.core-web";
private static final String OUTPUT_LOCATION_VUE = "/Users/gxwebsoft/VUE/gxtyzx-admin-vue";
// Vue文件输出目录
private static final String OUTPUT_LOCATION_UNIAPP = "/Users/gxwebsoft/VUE/nbg";
// Vue文件输出目录
private static final String OUTPUT_DIR_VUE = "/src";
// 作者名称
@@ -46,7 +48,7 @@ public class ShopGenerator {
private static final String MODULE_NAME = "shop";
// 需要生成的表
private static final String[] TABLE_NAMES = new String[]{
// "shop_spec",
"shop_spec",
// "shop_spec_value",
// "shop_goods",
// "shop_goods_spec",
@@ -72,7 +74,7 @@ public class ShopGenerator {
// "shop_order_info_log",
// "shop_order_goods",
// "shop_wechat_deposit",
"shop_users",
// "shop_users",
// "shop_user_address",
// "shop_user_balance_log"
};
@@ -204,6 +206,14 @@ public class ShopGenerator {
+ tableInfo.getEntityPath() + "/" + "index.ts";
}
});
focList.add(new FileOutConfig() {
@Override
public String outputFile(TableInfo tableInfo) {
return OUTPUT_LOCATION_UNIAPP + OUTPUT_DIR_VUE
+ "/api/" + pc.getModuleName() + "/"
+ tableInfo.getEntityPath() + "/" + "index.ts";
}
});
// 生成TS文件 (/api/shop/goods/model/index.ts)
templatePath = TEMPLATES_DIR + "/model.ts.btl";
focList.add(new FileOutConfig(templatePath) {
@@ -214,6 +224,14 @@ public class ShopGenerator {
+ tableInfo.getEntityPath() + "/model/" + "index.ts";
}
});
focList.add(new FileOutConfig(templatePath) {
@Override
public String outputFile(TableInfo tableInfo) {
return OUTPUT_LOCATION_UNIAPP + OUTPUT_DIR_VUE
+ "/api/" + pc.getModuleName() + "/"
+ tableInfo.getEntityPath() + "/model/" + "index.ts";
}
});
// 生成Vue文件(/views/shop/goods/index.vue)
templatePath = TEMPLATES_DIR + "/index.vue.btl";
focList.add(new FileOutConfig(templatePath) {