diff --git a/sql/optional/mall/mall.sql b/sql/optional/mall/mall.sql
index 9493c3bcf..e8a29fb0d 100644
--- a/sql/optional/mall/mall.sql
+++ b/sql/optional/mall/mall.sql
@@ -20,25 +20,6 @@ SET NAMES utf8mb4;
-- ----------------------------
-- Table structure for product_category
-- ----------------------------
-DROP TABLE IF EXISTS `product_category`;
-CREATE TABLE `product_category`
-(
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '分类编号',
- `parent_id` bigint NOT NULL COMMENT '父分类编号',
- `name` varchar(255) NOT NULL COMMENT '分类名称',
- `icon` varchar(100) NOT NULL DEFAULT '#' COMMENT '分类图标',
- `banner_url` varchar(255) NOT NULL COMMENT '分类图片',
- `sort` int DEFAULT '0' COMMENT '分类排序',
- `description` varchar(1024) DEFAULT NULL COMMENT '分类描述',
- `status` tinyint NOT NULL COMMENT '开启状态',
- `creator` varchar(64) DEFAULT '' COMMENT '创建者',
- `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updater` varchar(64) DEFAULT '' COMMENT '更新者',
- `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
- `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB COMMENT='商品分类';
-- ----------------------------
-- Table structure for product_brand
@@ -83,6 +64,7 @@ INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `pa
VALUES ('分类删除', 'product:category:delete', 3, 4, @parentId, '', '', '', 0);
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
VALUES ('分类导出', 'product:category:export', 3, 5, @parentId, '', '', '', 0);
+
-- 品牌管理 菜单 SQL
INSERT INTO `system_menu`(`name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`)
VALUES ('品牌管理', '', 2, 1, 2001, 'brand', '', 'mall/product/brand/index', 0);
diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/AppCategoryController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/AppCategoryController.java
index 508059ae7..5300c9c67 100644
--- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/AppCategoryController.java
+++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/AppCategoryController.java
@@ -35,6 +35,4 @@ public class AppCategoryController {
return success(CategoryConvert.INSTANCE.convertList03(list));
}
-
-
}
diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/vo/AppCategoryListRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/vo/AppCategoryListRespVO.java
index e50c53e4d..9ed47f9d7 100644
--- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/vo/AppCategoryListRespVO.java
+++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/category/vo/AppCategoryListRespVO.java
@@ -8,7 +8,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
-@ApiModel(value = "App - 商品分类 列表 Request VO", description = "参数和 CategoryBaseVO 是一致的")
+@ApiModel(value = "App - 商品分类 Response VO")
public class AppCategoryListRespVO {
@ApiModelProperty(value = "分类编号", required = true, example = "2")
@@ -22,17 +22,8 @@ public class AppCategoryListRespVO {
@NotBlank(message = "分类名称不能为空")
private String name;
- @ApiModelProperty(value = "分类图标")
- @NotBlank(message = "分类图标不能为空")
- private String icon;
-
@ApiModelProperty(value = "分类图片", required = true)
@NotBlank(message = "分类图片不能为空")
- private String bannerUrl;
+ private String picUrl;
- @ApiModelProperty(value = "分类排序", required = true, example = "1")
- private Integer sort;
-
- @ApiModelProperty(value = "分类描述", required = true, example = "描述")
- private String description;
}
diff --git a/yudao-ui-admin/src/api/mall/product/category.js b/yudao-ui-admin/src/api/mall/product/category.js
index bd825034d..4b8754b5a 100644
--- a/yudao-ui-admin/src/api/mall/product/category.js
+++ b/yudao-ui-admin/src/api/mall/product/category.js
@@ -1,7 +1,7 @@
import request from '@/utils/request'
// 创建商品分类
-export function createCategory(data) {
+export function createProductCategory(data) {
return request({
url: '/product/category/create',
method: 'post',
@@ -10,7 +10,7 @@ export function createCategory(data) {
}
// 更新商品分类
-export function updateCategory(data) {
+export function updateProductCategory(data) {
return request({
url: '/product/category/update',
method: 'put',
@@ -19,7 +19,7 @@ export function updateCategory(data) {
}
// 删除商品分类
-export function deleteCategory(id) {
+export function deleteProductCategory(id) {
return request({
url: '/product/category/delete?id=' + id,
method: 'delete'
@@ -27,37 +27,18 @@ export function deleteCategory(id) {
}
// 获得商品分类
-export function getCategory(id) {
+export function getProductCategory(id) {
return request({
url: '/product/category/get?id=' + id,
method: 'get'
})
}
-// 获得商品分类
-export function listCategory(query) {
+// 获得商品分类列表
+export function getProductCategoryList(query) {
return request({
- url: '/product/category/listByQuery',
+ url: '/product/category/list',
method: 'get',
params: query
})
}
-
-// 获得商品分类分页
-export function getCategoryPage(query) {
- return request({
- url: '/product/category/page',
- method: 'get',
- params: query
- })
-}
-
-// 导出商品分类 Excel
-export function exportCategoryExcel(query) {
- return request({
- url: '/product/category/export-excel',
- method: 'get',
- params: query,
- responseType: 'blob'
- })
-}
diff --git a/yudao-ui-admin/src/views/mall/product/brand/index.vue b/yudao-ui-admin/src/views/mall/product/brand/index.vue
index b0c3c97b8..0dd249561 100644
--- a/yudao-ui-admin/src/views/mall/product/brand/index.vue
+++ b/yudao-ui-admin/src/views/mall/product/brand/index.vue
@@ -118,7 +118,7 @@ import {
getBrandPage,
updateBrand
} from "@/api/mall/product/brand";
-import {listCategory} from "@/api/mall/product/category";
+import {getProductCategoryList} from "@/api/mall/product/category";
import ImageUpload from '@/components/ImageUpload';
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -194,7 +194,7 @@ export default {
},
/** 查询分类下拉树结构 */
getTreeselect() {
- listCategory().then(response => {
+ getProductCategoryList().then(response => {
this.categoryOptions = [];
const menu = {id: 0, name: '商品分类', children: []};
menu.children = this.handleTree(response.data, "id", "pid");
diff --git a/yudao-ui-admin/src/views/mall/product/category/index.vue b/yudao-ui-admin/src/views/mall/product/category/index.vue
index 41ed4c020..615c44328 100644
--- a/yudao-ui-admin/src/views/mall/product/category/index.vue
+++ b/yudao-ui-admin/src/views/mall/product/category/index.vue
@@ -6,12 +6,6 @@
-
-
-
-
-
搜索
重置
@@ -28,27 +22,16 @@
展开/折叠
-
- 导出
-
-
-
-
+
+
-
-
-
-
-
-
+
@@ -78,32 +61,22 @@
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+ 推荐 200x100 图片分辨率
+ 推荐 100x100 图片分辨率
-
-
-
+
+
+