diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index b05738c..762d4f3 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,47 +4,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
@@ -56,6 +20,7 @@
+
@@ -90,6 +55,10 @@
1703487755445
-
+
+
+
+ 1703491174875
+
+
+
+ 1703491174875
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spzx-service/service-product/src/main/java/cn/bunny/web/product/controller/CategoryController.java b/spzx-service/service-product/src/main/java/cn/bunny/web/product/controller/CategoryController.java
new file mode 100644
index 0000000..51c2e63
--- /dev/null
+++ b/spzx-service/service-product/src/main/java/cn/bunny/web/product/controller/CategoryController.java
@@ -0,0 +1,31 @@
+package cn.bunny.web.product.controller;
+
+import cn.bunny.common.spzx.model.entity.product.Category;
+import cn.bunny.common.spzx.model.vo.common.Result;
+import cn.bunny.common.spzx.model.vo.common.ResultCodeEnum;
+import cn.bunny.web.product.service.CategoryService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.annotation.Resource;
+import org.springframework.web.bind.annotation.CrossOrigin;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@Tag(name = "分类接口管理")
+@RequestMapping(value="/api/product/category")
+@CrossOrigin
+public class CategoryController {
+ @Resource
+ private CategoryService categoryService;
+
+ @Operation(summary = "获取分类树形数据",description = "按照树型方式进行封装")
+ @GetMapping("findCategoryTree")
+ public Result findCategoryTree() {
+ List categoryList= categoryService.findCategoryTree();
+ return Result.build(categoryList, ResultCodeEnum.SUCCESS);
+ }
+}
diff --git a/spzx-service/service-product/src/main/resources/application-dev.yml b/spzx-service/service-product/src/main/resources/application-dev.yml
index 5d56c90..ff9b068 100644
--- a/spzx-service/service-product/src/main/resources/application-dev.yml
+++ b/spzx-service/service-product/src/main/resources/application-dev.yml
@@ -4,16 +4,16 @@ server:
spring:
application:
name: service-product
- cloud:
- nacos:
- discovery:
- server-addr: localhost:8848
+# cloud:
+# nacos:
+# discovery:
+# server-addr: localhost:8848
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://60.204.230.80:3306/db_spzx?characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true
username: root
- password: root
+ password: "02120212"
mybatis:
config-location: classpath:mybatis-config.xml
diff --git a/spzx-service/service-product/src/main/resources/mapper/product/CategoryMapper.xml b/spzx-service/service-product/src/main/resources/mapper/product/CategoryMapper.xml
index f6e99c5..136a2f7 100644
--- a/spzx-service/service-product/src/main/resources/mapper/product/CategoryMapper.xml
+++ b/spzx-service/service-product/src/main/resources/mapper/product/CategoryMapper.xml
@@ -11,7 +11,17 @@
+
+
+