From d89d17cbb3f4a21decfa9516e72f2bd0bdc6f83c Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Tue, 22 Sep 2020 22:00:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 25 -- ruoyi-admin/pom.xml | 42 +- .../main/java/com/ruoyi/RuoYiApplication.java | 6 - .../src/main/resources/application.yml | 4 +- .../src/main/resources/generator.yml | 2 +- ruoyi-ui/src/api/system/order.js | 53 +++ ruoyi-ui/src/views/dashboard/LineChart.vue | 270 ++++++------- ruoyi-ui/src/views/system/order/index.vue | 358 ++++++++++++++++++ ruoyi-ui/vue.config.js | 2 +- sql/ry_20200920.sql | 46 ++- 10 files changed, 627 insertions(+), 181 deletions(-) create mode 100644 ruoyi-ui/src/api/system/order.js create mode 100644 ruoyi-ui/src/views/system/order/index.vue diff --git a/pom.xml b/pom.xml index 90438fe87..ae52711d0 100644 --- a/pom.xml +++ b/pom.xml @@ -180,28 +180,6 @@ ${ruoyi.version} - - - javax.xml.bind - jaxb-api - 2.3.0 - - - com.sun.xml.bind - jaxb-impl - 2.3.0 - - - com.sun.xml.bind - jaxb-core - 2.3.0 - - - javax.activation - activation - 1.1.1 - - @@ -215,9 +193,6 @@ pom - - - diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 2359bfea4..a854d9fdf 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -1,7 +1,5 @@ - + ruoyi com.ruoyi @@ -49,7 +47,7 @@ springfox-swagger-ui - + mysql mysql-connector-java @@ -73,6 +71,30 @@ ruoyi-generator + + + + + javax.xml.bind + jaxb-api + 2.3.0 + + + com.sun.xml.bind + jaxb-impl + 2.3.0 + + + com.sun.xml.bind + jaxb-core + 2.3.0 + + + javax.activation + activation + 1.1.1 + + @@ -92,15 +114,15 @@ - - org.apache.maven.plugins - maven-war-plugin - 3.1.0 + + org.apache.maven.plugins + maven-war-plugin + 3.1.0 false ${project.artifactId} - - + + ${project.artifactId} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index 155bab405..aca364205 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -1,9 +1,3 @@ -/* - * @Description: - * @Author: huangdeliang - * @Date: 2020-09-21 11:32:59 - * @LastEditors: huangdeliang - */ package com.ruoyi; import org.springframework.boot.SpringApplication; diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 02db7e06f..dc7b0a4ce 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -1,11 +1,11 @@ # 项目相关配置 ruoyi: # 名称 - name: RuoYi + name: Ruoyi # 版本 version: 3.1.0 # 版权年份 - copyrightYear: 2019 + copyrightYear: 2020 # 实例演示开关 demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) diff --git a/ruoyi-generator/src/main/resources/generator.yml b/ruoyi-generator/src/main/resources/generator.yml index 4544c8c24..e02fd195f 100644 --- a/ruoyi-generator/src/main/resources/generator.yml +++ b/ruoyi-generator/src/main/resources/generator.yml @@ -1,7 +1,7 @@ # 代码生成 gen: # 作者 - author: ruoyi + author: wonder # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool packageName: com.ruoyi.system # 自动去除表前缀,默认是false diff --git a/ruoyi-ui/src/api/system/order.js b/ruoyi-ui/src/api/system/order.js new file mode 100644 index 000000000..d15b76592 --- /dev/null +++ b/ruoyi-ui/src/api/system/order.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询销售订单列表 +export function listOrder(query) { + return request({ + url: '/system/order/list', + method: 'get', + params: query + }) +} + +// 查询销售订单详细 +export function getOrder(orderId) { + return request({ + url: '/system/order/' + orderId, + method: 'get' + }) +} + +// 新增销售订单 +export function addOrder(data) { + return request({ + url: '/system/order', + method: 'post', + data: data + }) +} + +// 修改销售订单 +export function updateOrder(data) { + return request({ + url: '/system/order', + method: 'put', + data: data + }) +} + +// 删除销售订单 +export function delOrder(orderId) { + return request({ + url: '/system/order/' + orderId, + method: 'delete' + }) +} + +// 导出销售订单 +export function exportOrder(query) { + return request({ + url: '/system/order/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/views/dashboard/LineChart.vue b/ruoyi-ui/src/views/dashboard/LineChart.vue index 4e30a3701..05ab56522 100644 --- a/ruoyi-ui/src/views/dashboard/LineChart.vue +++ b/ruoyi-ui/src/views/dashboard/LineChart.vue @@ -1,135 +1,135 @@ - - - + + + diff --git a/ruoyi-ui/src/views/system/order/index.vue b/ruoyi-ui/src/views/system/order/index.vue new file mode 100644 index 000000000..9460d9d9f --- /dev/null +++ b/ruoyi-ui/src/views/system/order/index.vue @@ -0,0 +1,358 @@ + + + diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 4bb12a3cb..0035c6333 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -8,7 +8,7 @@ function resolve(dir) { const name = defaultSettings.title || '管理系统' // 标题 -const port = process.env.port || process.env.npm_config_port || 80 // 端口 +const port = process.env.port || process.env.npm_config_port || 8100 // 端口 // vue.config.js 配置说明 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions diff --git a/sql/ry_20200920.sql b/sql/ry_20200920.sql index 12f2e835e..180e61083 100644 --- a/sql/ry_20200920.sql +++ b/sql/ry_20200920.sql @@ -459,6 +459,7 @@ insert into sys_dict_type values(7, '通知类型', 'sys_notice_type', '0', insert into sys_dict_type values(8, '通知状态', 'sys_notice_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知状态列表'); insert into sys_dict_type values(9, '操作类型', 'sys_oper_type', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作类型列表'); insert into sys_dict_type values(10, '系统状态', 'sys_common_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录状态列表'); +insert into sys_dict_type values(11, '销售渠道', 'sys_sale_channel', '0', 'admin', '2020-09-22 17-33-00', 'ry', '2020-09-22 17-33-00', '登录状态列表'); -- ---------------------------- @@ -512,6 +513,7 @@ insert into sys_dict_data values(25, 8, '生成代码', '8', 'sys_oper_ty insert into sys_dict_data values(26, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '清空操作'); insert into sys_dict_data values(27, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); insert into sys_dict_data values(28, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); +insert into sys_dict_data values(29, 1, '微信', '0', 'sys_sale_channel', '', '', 'Y', '0', 'admin', '2020-09-22 17-33-00', 'ry', '2020-09-22 17-33-00', '销售渠道'); -- ---------------------------- @@ -678,4 +680,46 @@ create table gen_table_column ( update_by varchar(64) default '' comment '更新者', update_time datetime comment '更新时间', primary key (column_id) -) engine=innodb auto_increment=1 comment = '代码生成业务表字段'; \ No newline at end of file +) engine=innodb auto_increment=1 comment = '代码生成业务表字段'; + + +-- ---------------------------- +-- 20、分成比例业务表字段 +-- ---------------------------- +drop table if exists sys_commision; +create table sys_commision ( + rule_id bigint(20) not null auto_increment comment '编号', + user_id bigint(20) comment '用户ID', + nick_name varchar(30) not null comment '用户昵称', + amount int comment '金额', + rate int comment '分成比例', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default null comment '备注', + primary key (rule_id) +) engine=innodb auto_increment=1 comment = '业务提成比例表'; + + +-- ---------------------------- +-- 21、订单业务表字段 +-- ---------------------------- +drop table if exists sys_order; +create table sys_order ( + order_id bigint(20) not null auto_increment comment '编号', + user_id bigint(20) comment '用户ID', + nick_name varchar(30) not null comment '用户昵称', + amount int comment '金额', + sale_time datetime comment '成交日期', + channel_id bigint(20) comment '销售渠道ID', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default null comment '备注', + primary key (order_id) +) engine=innodb auto_increment=1 comment = '销售订单表'; + + +