From 53c10570b6e5ab63bbde59277971eaff4959fb22 Mon Sep 17 00:00:00 2001 From: ZiJIe <17738440858@163.com> Date: Mon, 23 Jun 2025 18:57:07 +0800 Subject: [PATCH] 222 --- ruoyi-admin/pom.xml | 201 ++-- .../web/controller/ProductsController.java | 17 + .../web/controller/tool/TestController.java | 1 - .../src/main/resources/application-druid.yml | 4 +- .../src/main/resources/application.yml | 258 ++-- ruoyi-ui/package.json | 145 +-- ruoyi-ui/public/index.html | 416 +++---- ruoyi-ui/src/api/prod/products.js | 44 + ruoyi-ui/src/router/index.js | 16 + ruoyi-ui/src/views/prod/products/index.vue | 1059 +++++++++++++++++ ruoyi-ui/vue.config.js | 2 +- 11 files changed, 1655 insertions(+), 508 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/ProductsController.java create mode 100644 ruoyi-ui/src/api/prod/products.js create mode 100644 ruoyi-ui/src/views/prod/products/index.vue diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 434b5f07..6c69ee70 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -1,96 +1,107 @@ - - - - ruoyi - com.ruoyi - 3.9.0 - - 4.0.0 - jar - ruoyi-admin - - - web服务入口 - - - - - - - org.springframework.boot - spring-boot-devtools - true - - - - - io.springfox - springfox-boot-starter - - - - - io.swagger - swagger-models - 1.6.2 - - - - - mysql - mysql-connector-java - - - - - com.ruoyi - ruoyi-framework - - - - - com.ruoyi - ruoyi-quartz - - - - - com.ruoyi - ruoyi-generator - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - 2.5.15 - - true - - - - - repackage - - - - - - org.apache.maven.plugins - maven-war-plugin - 3.1.0 - - false - ${project.artifactId} - - - - ${project.artifactId} - - + + + + ruoyi + com.ruoyi + 3.9.0 + + 4.0.0 + jar + ruoyi-admin + + + web服务入口 + + + + + + + org.springframework.boot + spring-boot-devtools + true + + + + us.codecraft + webmagic-core + 1.0.3 + + + + us.codecraft + webmagic-extension + 1.0.3 + + + + io.springfox + springfox-boot-starter + + + + + io.swagger + swagger-models + 1.6.2 + + + + + mysql + mysql-connector-java + + + + + com.ruoyi + ruoyi-framework + + + + + com.ruoyi + ruoyi-quartz + + + + + com.ruoyi + ruoyi-generator + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.5.15 + + true + + + + + repackage + + + + + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 + + false + ${project.artifactId} + + + + ${project.artifactId} + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ProductsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ProductsController.java new file mode 100644 index 00000000..d43dbbd5 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ProductsController.java @@ -0,0 +1,17 @@ +package com.ruoyi.web.controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.core.controller.BaseController; +/** + * prodController + * + * @author ruoyi + * @date 2025-06-21 + */ +@RestController +@RequestMapping("/prod/products") +public class ProductsController extends BaseController +{ + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java index c55f9749..fa175c7e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java @@ -1,5 +1,4 @@ package com.ruoyi.web.controller.tool; - import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index bcfad3ea..b4082d28 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,9 +6,9 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://192.168.1.89:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: password + password: 123123 # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 8fb70df7..70054625 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -1,129 +1,129 @@ -# 项目相关配置 -ruoyi: - # 名称 - name: RuoYi - # 版本 - version: 3.9.0 - # 版权年份 - copyrightYear: 2025 - # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: D:/ruoyi/uploadPath - # 获取ip地址开关 - addressEnabled: false - # 验证码类型 math 数字计算 char 字符验证 - captchaType: math - -# 开发环境配置 -server: - # 服务器的HTTP端口,默认为8080 - port: 8080 - servlet: - # 应用的访问路径 - context-path: / - tomcat: - # tomcat的URI编码 - uri-encoding: UTF-8 - # 连接数满后的排队数,默认为100 - accept-count: 1000 - threads: - # tomcat最大线程数,默认为200 - max: 800 - # Tomcat启动初始化的线程数,默认值10 - min-spare: 100 - -# 日志配置 -logging: - level: - com.ruoyi: debug - org.springframework: warn - -# 用户配置 -user: - password: - # 密码最大错误次数 - maxRetryCount: 5 - # 密码锁定时间(默认10分钟) - lockTime: 10 - -# Spring配置 -spring: - # 资源信息 - messages: - # 国际化资源文件路径 - basename: i18n/messages - profiles: - active: druid - # 文件上传 - servlet: - multipart: - # 单个文件大小 - max-file-size: 10MB - # 设置总上传的文件大小 - max-request-size: 20MB - # 服务模块 - devtools: - restart: - # 热部署开关 - enabled: true - # redis 配置 - redis: - # 地址 - host: localhost - # 端口,默认为6379 - port: 6379 - # 数据库索引 - database: 0 - # 密码 - password: - # 连接超时时间 - timeout: 10s - lettuce: - pool: - # 连接池中的最小空闲连接 - min-idle: 0 - # 连接池中的最大空闲连接 - max-idle: 8 - # 连接池的最大数据库连接数 - max-active: 8 - # #连接池最大阻塞等待时间(使用负值表示没有限制) - max-wait: -1ms - -# token配置 -token: - # 令牌自定义标识 - header: Authorization - # 令牌密钥 - secret: abcdefghijklmnopqrstuvwxyz - # 令牌有效期(默认30分钟) - expireTime: 30 - -# MyBatis配置 -mybatis: - # 搜索指定包别名 - typeAliasesPackage: com.ruoyi.**.domain - # 配置mapper的扫描,找到所有的mapper.xml映射文件 - mapperLocations: classpath*:mapper/**/*Mapper.xml - # 加载全局的配置文件 - configLocation: classpath:mybatis/mybatis-config.xml - -# PageHelper分页插件 -pagehelper: - helperDialect: mysql - supportMethodsArguments: true - params: count=countSql - -# Swagger配置 -swagger: - # 是否开启swagger - enabled: true - # 请求前缀 - pathMapping: /dev-api - -# 防止XSS攻击 -xss: - # 过滤开关 - enabled: true - # 排除链接(多个用逗号分隔) - excludes: /system/notice - # 匹配链接 - urlPatterns: /system/*,/monitor/*,/tool/* +# 项目相关配置 +ruoyi: + # 名称 + name: RuoYi + # 版本 + version: 3.9.0 + # 版权年份 + copyrightYear: 2025 + # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) + profile: D:/ruoyi/uploadPath + # 获取ip地址开关 + addressEnabled: false + # 验证码类型 math 数字计算 char 字符验证 + captchaType: math + +# 开发环境配置 +server: + # 服务器的HTTP端口,默认为8080 + port: 8080 + servlet: + # 应用的访问路径 + context-path: / + tomcat: + # tomcat的URI编码 + uri-encoding: UTF-8 + # 连接数满后的排队数,默认为100 + accept-count: 1000 + threads: + # tomcat最大线程数,默认为200 + max: 800 + # Tomcat启动初始化的线程数,默认值10 + min-spare: 100 + +# 日志配置 +logging: + level: + com.ruoyi: debug + org.springframework: warn + +# 用户配置 +user: + password: + # 密码最大错误次数 + maxRetryCount: 5 + # 密码锁定时间(默认10分钟) + lockTime: 10 + +# Spring配置 +spring: + # 资源信息 + messages: + # 国际化资源文件路径 + basename: i18n/messages + profiles: + active: druid + # 文件上传 + servlet: + multipart: + # 单个文件大小 + max-file-size: 10MB + # 设置总上传的文件大小 + max-request-size: 20MB + # 服务模块 + devtools: + restart: + # 热部署开关 + enabled: true + # redis 配置 + redis: + # 地址 + host: localhost + # 端口,默认为6379 + port: 6379 + # 数据库索引 + database: 0 + # 密码 + password: + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms + +# token配置 +token: + # 令牌自定义标识 + header: Authorization + # 令牌密钥 + secret: abcdefghijklmnopqrstuvwxyz + # 令牌有效期(默认30分钟) + expireTime: 30 + +# MyBatis配置 +mybatis: + # 搜索指定包别名 + typeAliasesPackage: com.ruoyi.**.domain + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapperLocations: classpath*:mapper/**/*Mapper.xml + # 加载全局的配置文件 + configLocation: classpath:mybatis/mybatis-config.xml + +# PageHelper分页插件 +pagehelper: + helperDialect: mysql + supportMethodsArguments: true + params: count=countSql + +# Swagger配置 +swagger: + # 是否开启swagger + enabled: true + # 请求前缀 + pathMapping: /dev-api + +# 防止XSS攻击 +xss: + # 过滤开关 + enabled: true + # 排除链接(多个用逗号分隔) + excludes: /system/notice,/tool/webmagic + # 匹配链接 + urlPatterns: /system/*,/monitor/*,/tool/* diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 5df0cedf..0c89da88 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,72 +1,73 @@ -{ - "name": "ruoyi", - "version": "3.9.0", - "description": "若依管理系统", - "author": "若依", - "license": "MIT", - "scripts": { - "dev": "vue-cli-service serve", - "build:prod": "vue-cli-service build", - "build:stage": "vue-cli-service build --mode staging", - "preview": "node build/index.js --preview" - }, - "keywords": [ - "vue", - "admin", - "dashboard", - "element-ui", - "boilerplate", - "admin-template", - "management-system" - ], - "repository": { - "type": "git", - "url": "https://gitee.com/y_project/RuoYi-Vue.git" - }, - "dependencies": { - "@riophae/vue-treeselect": "0.4.0", - "axios": "0.28.1", - "clipboard": "2.0.8", - "core-js": "3.37.1", - "echarts": "5.4.0", - "element-ui": "2.15.14", - "file-saver": "2.0.5", - "fuse.js": "6.4.3", - "highlight.js": "9.18.5", - "js-beautify": "1.13.0", - "js-cookie": "3.0.1", - "jsencrypt": "3.0.0-rc.1", - "nprogress": "0.2.0", - "quill": "2.0.2", - "screenfull": "5.0.2", - "sortablejs": "1.10.2", - "splitpanes": "2.4.1", - "vue": "2.6.12", - "vue-count-to": "1.0.13", - "vue-cropper": "0.5.5", - "vue-router": "3.4.9", - "vuedraggable": "2.24.3", - "vuex": "3.6.0" - }, - "devDependencies": { - "@vue/cli-plugin-babel": "4.4.6", - "@vue/cli-service": "4.4.6", - "babel-plugin-dynamic-import-node": "2.3.3", - "chalk": "4.1.0", - "compression-webpack-plugin": "6.1.2", - "connect": "3.6.6", - "sass": "1.32.13", - "sass-loader": "10.1.1", - "script-ext-html-webpack-plugin": "2.1.5", - "svg-sprite-loader": "5.1.1", - "vue-template-compiler": "2.6.12" - }, - "engines": { - "node": ">=8.9", - "npm": ">= 3.0.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions" - ] -} +{ + "name": "ruoyi", + "version": "3.9.0", + "description": "若依管理系统", + "author": "若依", + "license": "MIT", + "scripts": { + "dev": "vue-cli-service serve", + "build:prod": "vue-cli-service build", + "build:stage": "vue-cli-service build --mode staging", + "preview": "node build/index.js --preview" + }, + "keywords": [ + "vue", + "admin", + "dashboard", + "element-ui", + "boilerplate", + "admin-template", + "management-system" + ], + "repository": { + "type": "git", + "url": "https://gitee.com/y_project/RuoYi-Vue.git" + }, + "dependencies": { + "@riophae/vue-treeselect": "0.4.0", + "axios": "0.28.1", + "clipboard": "2.0.8", + "core-js": "^3.43.0", + "echarts": "5.4.0", + "element-ui": "2.15.14", + "file-saver": "2.0.5", + "fuse.js": "6.4.3", + "highlight.js": "9.18.5", + "js-beautify": "1.13.0", + "js-cookie": "3.0.1", + "jsencrypt": "3.0.0-rc.1", + "nprogress": "0.2.0", + "quill": "2.0.2", + "screenfull": "5.0.2", + "sortablejs": "1.10.2", + "splitpanes": "2.4.1", + "vue": "2.6.12", + "vue-count-to": "1.0.13", + "vue-cropper": "0.5.5", + "vue-router": "3.4.9", + "vuedraggable": "2.24.3", + "vuex": "3.6.0", + "xlsx": "^0.18.5" + }, + "devDependencies": { + "@vue/cli-plugin-babel": "4.4.6", + "@vue/cli-service": "4.4.6", + "babel-plugin-dynamic-import-node": "2.3.3", + "chalk": "4.1.0", + "compression-webpack-plugin": "6.1.2", + "connect": "3.6.6", + "sass": "1.32.13", + "sass-loader": "10.1.1", + "script-ext-html-webpack-plugin": "2.1.5", + "svg-sprite-loader": "5.1.1", + "vue-template-compiler": "2.6.12" + }, + "engines": { + "node": ">=8.9", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ] +} diff --git a/ruoyi-ui/public/index.html b/ruoyi-ui/public/index.html index 56fd45b3..925455ca 100644 --- a/ruoyi-ui/public/index.html +++ b/ruoyi-ui/public/index.html @@ -1,208 +1,208 @@ - - - - - - - - - <%= webpackConfig.name %> - - - - -
-
-
-
-
-
正在加载系统资源,请耐心等待
-
-
- - + + + + + + + + + <%= webpackConfig.name %> + + + + +
+
+
+
+
+
正在加载系统资源,请耐心等待
+
+
+ + diff --git a/ruoyi-ui/src/api/prod/products.js b/ruoyi-ui/src/api/prod/products.js new file mode 100644 index 00000000..6c0d4d33 --- /dev/null +++ b/ruoyi-ui/src/api/prod/products.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询prod列表 +export function listProducts(query) { + return request({ + url: '/prod/products/list', + method: 'get', + params: query + }) +} + +// 查询prod详细 +export function getProducts(productId) { + return request({ + url: '/prod/products/' + productId, + method: 'get' + }) +} + +// 新增prod +export function addProducts(data) { + return request({ + url: '/prod/products', + method: 'post', + data: data + }) +} + +// 修改prod +export function updateProducts(data) { + return request({ + url: '/prod/products', + method: 'put', + data: data + }) +} + +// 删除prod +export function delProducts(productId) { + return request({ + url: '/prod/products/' + productId, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index bbfd2374..12f1f98e 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -87,6 +87,22 @@ export const constantRoutes = [ meta: { title: '个人中心', icon: 'user' } } ] + }, + { + path: '/banma', + component: Layout, + hidden: false, + redirect: 'noredirect', + name: 'Banma', + meta: { title: '斑马订单', icon: 'shopping' }, + children: [ + { + path: 'orders', + component: () => import('@/views/banma/orders/index'), + name: 'BanmaOrders', + meta: { title: '订单管理', icon: 'list' } + } + ] } ] diff --git a/ruoyi-ui/src/views/prod/products/index.vue b/ruoyi-ui/src/views/prod/products/index.vue new file mode 100644 index 00000000..7b28f61e --- /dev/null +++ b/ruoyi-ui/src/views/prod/products/index.vue @@ -0,0 +1,1059 @@ + + + + + diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index a6bfb3b8..ae755d9d 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -9,7 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin') const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题 -const baseUrl = 'http://localhost:8080' // 后端接口 +const baseUrl = 'http://192.168.1.89:8080' // 后端接口 const port = process.env.port || process.env.npm_config_port || 80 // 端口