diff --git a/.gitignore b/.gitignore index 59458557..204d12e0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ app/unpackage Crmeb-2022-01-04.log crmeb_front_log +crmeb/LOG_HOME_IS_UNDEFINED diff --git a/admin/package.json b/admin/package.json index 7cfa198b..d5e80835 100644 --- a/admin/package.json +++ b/admin/package.json @@ -5,7 +5,7 @@ "author": "CRMEB", "license": "MIT", "scripts": { - "dev": "vue-cli-service serve", + "dev": "vue-cli-service serve --open", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", diff --git a/admin/src/api/codegen.js b/admin/src/api/codegen.js index e69de29b..3b54267d 100644 --- a/admin/src/api/codegen.js +++ b/admin/src/api/codegen.js @@ -0,0 +1,29 @@ +// +---------------------------------------------------------------------- +// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] +// +---------------------------------------------------------------------- +// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved. +// +---------------------------------------------------------------------- +// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 +// +---------------------------------------------------------------------- +// | Author: CRMEB Team +// +---------------------------------------------------------------------- + +import request from '@/utils/request' + +/** + * 查询待生成代码列表 + * @param pram + */ +export function getCodegenList(pram) { + const data = { + page: pram.page, + limit: pram.limit, + tableName: pram.tableName + } + return request({ + url: '/codegen/list', + method: 'GET', + params: data + }) +} + diff --git a/admin/src/router/index.js b/admin/src/router/index.js index 6b4a7dc9..5e3b7422 100644 --- a/admin/src/router/index.js +++ b/admin/src/router/index.js @@ -29,6 +29,7 @@ import operationRouter from './modules/operation' import appSettingRouter from './modules/appSetting' import maintainRouter from './modules/maintain' import mobileRouter from './modules/mobile' +import codegen from './modules/codegen' /** @@ -82,7 +83,9 @@ export const constantRoutes = [ maintainRouter, //移动端管理 mobileRouter, - + // 代码生成 + codegen, + { path: '/404', component: () => import('@/views/error-page/404'), diff --git a/admin/src/router/modules/codegen.js b/admin/src/router/modules/codegen.js index b0ee45c3..19eb82f1 100644 --- a/admin/src/router/modules/codegen.js +++ b/admin/src/router/modules/codegen.js @@ -11,45 +11,20 @@ import Layout from '@/layout' const storeRouter = { - path: '/store', + path: '/codegen', component: Layout, - redirect: '/store/index', + redirect: '/codegen/codegenList', name: 'Store', meta: { - title: '商品', + title: '代码生成', icon: 'clipboard' }, children: [ { - path: 'index', - component: () => import('@/views/store/index'), + path: 'codegenList', + component: () => import('@/views/codegen/codegenList'), name: 'StoreIndex', - meta: { title: '商品管理', icon: '' } - }, - { - path: 'sort', - component: () => import('@/views/store/sort/index'), - name: 'Sort', - meta: { title: '商品分类', icon: '' } - }, - { - path: 'attr', - component: () => import('@/views/store/storeAttr/index'), - name: 'SortAttr', - meta: { title: '商品规格', icon: '' } - }, - { - path: 'comment', - component: () => import('@/views/store/storeComment/index'), - name: 'StoreComment', - meta: { title: '商品评论', icon: '' } - }, - { - path: 'list/creatProduct/:id?/:isDisabled?', - component: () => import('@/views/store/creatStore/index'), - name: 'SortCreat', - meta: { title: '商品添加', noCache: true, activeMenu: `/store/index` }, - hidden: true + meta: { title: '待生成列表', icon: '' } } ] } diff --git a/admin/src/views/codegen/codegenList.vue b/admin/src/views/codegen/codegenList.vue index 4445f390..29a7bf96 100644 --- a/admin/src/views/codegen/codegenList.vue +++ b/admin/src/views/codegen/codegenList.vue @@ -1,10 +1,107 @@ diff --git a/admin/vue.config.js b/admin/vue.config.js index c8397dd7..59dc742c 100644 --- a/admin/vue.config.js +++ b/admin/vue.config.js @@ -32,7 +32,7 @@ module.exports = { productionSourceMap: false, devServer: { port: port, - open: true, + open: false, overlay: { warnings: false, errors: true diff --git a/crmeb/crmeb-admin/src/main/resources/application.yml b/crmeb/crmeb-admin/src/main/resources/application.yml index 796d9add..b523daec 100644 --- a/crmeb/crmeb-admin/src/main/resources/application.yml +++ b/crmeb/crmeb-admin/src/main/resources/application.yml @@ -7,7 +7,7 @@ crmeb: wechat-js-api-beta: true #微信js api是否是beta版本 asyncConfig: false #是否同步config表数据到redis asyncWeChatProgramTempList: false #是否同步小程序公共模板库 - imagePath: /你的项目绝对路径/crmebimage/ # 服务器图片路径配置 斜杠结尾 + imagePath: /Users/stivepeim/Documents/ZBKJ/OpenSource/CRMEBJava/crmeb/crmebimage/ # 服务器图片路径配置 斜杠结尾 database: mysql # 配置端口 @@ -39,16 +39,16 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/crmeb_java_os?characterEncoding=utf-8&useSSL=false&serverTimeZone=GMT+8 - username: crmeb_java_os - password: 111111 + url: jdbc:mysql://118.178.234.105:3306/crmeb_os?characterEncoding=utf-8&useSSL=false&serverTimeZone=GMT+8 + username: crmeb_os + password: cGEfaaRDbwd6cc2k redis: - host: 127.0.0.1 #地址 + host: 118.178.234.105 #地址 port: 6379 #端口 - password: 111111 + password: 1qazxsw2 timeout: 30000 # 连接超时时间(毫秒) - database: 14 #默认数据库 + database: 15 #默认数据库 jedis: pool: max-active: 200 # 连接池最大连接数(使用负值表示没有限制) diff --git a/crmeb/crmeb-common/src/main/java/com/zbkj/common/utils/genutils/GenCodeUtils.java b/crmeb/crmeb-common/src/main/java/com/zbkj/common/utils/genutils/GenCodeUtils.java index b4dddfbc..d885b966 100644 --- a/crmeb/crmeb-common/src/main/java/com/zbkj/common/utils/genutils/GenCodeUtils.java +++ b/crmeb/crmeb-common/src/main/java/com/zbkj/common/utils/genutils/GenCodeUtils.java @@ -142,6 +142,7 @@ public class GenCodeUtils { Template tpl = Velocity.getTemplate(template, "UTF-8"); tpl.merge(context, sw); try { + zip.finish(); zip.putNextEntry(new ZipEntry(getFileName(template, tableEntity.getClassName(), config.getString("package"), config.getString("moduleName")))); IOUtils.write(sw.toString(), zip, "UTF-8"); IOUtils.closeQuietly(sw); diff --git a/crmeb/sql/Crmeb_1.3.4.sql b/crmeb/sql/Crmeb_1.3.4.sql index e5344c8b..e5873804 100644 --- a/crmeb/sql/Crmeb_1.3.4.sql +++ b/crmeb/sql/Crmeb_1.3.4.sql @@ -7221,12 +7221,12 @@ INSERT INTO `eb_system_config` VALUES (7783, 'wechat_qrcode', 'wechat_qrcode', 6 INSERT INTO `eb_system_config` VALUES (7784, 'wechat_share_title', 'wechat_share_title', 65, '一码秦川', 0, '2021-12-25 12:26:14', '2021-12-25 12:26:14'); INSERT INTO `eb_system_config` VALUES (7785, 'wechat_share_synopsis', 'wechat_share_synopsis', 65, '一码秦川', 0, '2021-12-25 12:26:14', '2021-12-25 12:26:14'); INSERT INTO `eb_system_config` VALUES (7786, 'h5_avatar', 'h5_avatar', 65, 'crmebimage/public/operation/2021/12/25/0427b90c74b64a03ae3e7e5c628ef7d69038aimgou.jpg', 0, '2021-12-25 12:26:14', '2021-12-25 12:26:14'); -INSERT INTO `eb_system_config` VALUES (7802, 'api_url', 'api_url', 64, 'https://127.0.0.1:8080', 0, '2021-12-25 16:53:20', '2021-12-25 16:53:20'); +INSERT INTO `eb_system_config` VALUES (7802, 'api_url', 'api_url', 64, 'http://127.0.0.1:8080', 0, '2021-12-25 16:53:20', '2021-12-25 16:53:20'); INSERT INTO `eb_system_config` VALUES (7803, 'site_logo_lefttop', 'site_logo_lefttop', 64, 'crmebimage/public/operation/2021/12/25/6d292f4a663a453e8bcc9410eda89db55z1vksp7fx.png', 0, '2021-12-25 16:53:20', '2021-12-25 16:53:20'); INSERT INTO `eb_system_config` VALUES (7804, 'site_logo_square', 'site_logo_square', 64, 'crmebimage/public/maintain/2021/12/25/8cf6cd4fd29c4a59a094ba028c8f3f4czyd21fctzc.png', 0, '2021-12-25 16:53:20', '2021-12-25 16:53:20'); INSERT INTO `eb_system_config` VALUES (7805, 'site_logo_login', 'site_logo_login', 64, 'crmebimage/public/maintain/2021/12/25/8cf6cd4fd29c4a59a094ba028c8f3f4czyd21fctzc.png', 0, '2021-12-25 16:53:20', '2021-12-25 16:53:20'); INSERT INTO `eb_system_config` VALUES (7806, 'admin_login_bg_pic', 'admin_login_bg_pic', 64, 'crmebimage/public/maintain/2021/12/25/0016d1efa86d41e38e76801a7cd743c6wcupy21hvb.jpg', 0, '2021-12-25 16:53:20', '2021-12-25 16:53:20'); -INSERT INTO `eb_system_config` VALUES (7807, 'localUploadUrl', 'localUploadUrl', 108, 'https://127.0.0.1:8080', 0, '2021-12-30 15:17:28', '2021-12-30 15:17:28'); +INSERT INTO `eb_system_config` VALUES (7807, 'localUploadUrl', 'localUploadUrl', 108, 'http://127.0.0.1:8080', 0, '2021-12-30 15:17:28', '2021-12-30 15:17:28'); INSERT INTO `eb_system_config` VALUES (7808, 'image_ext_str', 'image_ext_str', 108, 'jpg,jpeg,gif,png,bmp,PNG,JPG,mp4', 0, '2021-12-30 15:17:28', '2021-12-30 15:17:28'); INSERT INTO `eb_system_config` VALUES (7809, 'image_max_size', 'image_max_size', 108, '10', 0, '2021-12-30 15:17:28', '2021-12-30 15:17:28'); INSERT INTO `eb_system_config` VALUES (7810, 'file_ext_str', 'file_ext_str', 108, 'zip,doc,docx,xls,xlsx,pdf,mp3,wma,wav,amr,mp4', 0, '2021-12-30 15:17:28', '2021-12-30 15:17:28'); @@ -7815,8 +7815,7 @@ INSERT INTO `eb_system_menu` VALUES (400, 39, '会员等级列表', '', 'admin:u INSERT INTO `eb_system_menu` VALUES (401, 40, '会员标签详情', '', 'admin:user:tag:info', '', 'A', 0, 1, 0, '2021-12-13 10:37:04', '2021-12-13 10:37:04'); INSERT INTO `eb_system_menu` VALUES (402, 344, '获取微信公众号js配置', '', 'admin:wechat:config', '', 'A', 0, 1, 0, '2021-12-13 10:38:24', '2021-12-13 10:38:24'); INSERT INTO `eb_system_menu` VALUES (403, 344, '微信素材上传', '', 'admin:wechat:media:upload', '', 'A', 0, 1, 0, '2021-12-13 10:38:50', '2021-12-13 10:38:50'); -INSERT INTO `eb_system_menu` VALUES (404, 13, '敏感操作日志', '', 'admin:log:sensitive:list', '/maintain/sensitiveLog', 'C', 0, 1, 1, '2021-12-13 17:54:06', '2021-12-13 18:12:17'); -INSERT INTO `eb_system_menu` VALUES (405, 13, '代码生成', '', '', '/codegen/codegenList', 'C', 0, 1, 1, '2022-08-23 18:07:37', '2022-08-23 18:07:37'); +INSERT INTO `eb_system_menu` VALUES (404, 13, '代码生成', '', '', '/codegen/codegenList', 'C', 0, 1, 0, '2022-08-23 18:07:37', '2022-08-23 18:07:37'); -- ---------------------------- -- Table structure for eb_system_notification