Browse Source

解决mapper文件无法找到问题

linhui.li 2 weeks ago
parent
commit
ac1077cce3

+ 1 - 1
py-goods/src/main/java/com/poyee/controller/SpuCategoryController.java

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*;
 import java.util.List;
 
 @RestController
-@RequestMapping("/system/material/category")
+@RequestMapping("/spu/category")
 @Api(tags = "商品分类管理")
 public class SpuCategoryController {
     @Autowired

+ 1 - 8
py-goods/src/main/java/com/poyee/controller/SpuController.java

@@ -56,14 +56,7 @@ public class SpuController extends BaseController<SpuService, Spu, SpuDTO> {
         return Result.error();
     }
 
-    @ApiOperation("商品分类查询")
-    @GetMapping("category/list")
-    public Result<SpuDTO> categoryList(){
-        LambdaQueryWrapper<SpuDTO> categoryQueryWrapper=new LambdaQueryWrapper<>();
-        categoryQueryWrapper.select(SpuDTO::getCategory).groupBy(SpuDTO::getCategory);
-        List<SpuDTO> list = baseService.list(categoryQueryWrapper);
-        return Result.success(list);
-    }
+    
 
 
 }

+ 1 - 1
py-starter/src/main/resources/application.yml

@@ -12,7 +12,7 @@ mybatis:
   # 搜索指定包别名
   typeAliasesPackage: com.poyee.dto,com.poyee.dto.req,com.poyee.**.dto,com.poyee.**.dto.req
   # 配置mapper的扫描,找到所有的mapper.xml映射文件
-  mapperLocations: classpath*:mapper/*Mapper.xml,classpath*:mapper/**/*Mapper.xml
+  mapperLocations: classpath*:mapper/**/*Mapper.xml
   # 加载全局的配置文件
   configLocation: classpath:mybatis/mybatis-config.xml