微信小程序分类查询(优惠券错误)完成
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.atguigu.ssyx.home.controller;
|
||||
|
||||
import com.atguigu.ssyx.client.product.ProductFeignClient;
|
||||
import com.atguigu.ssyx.common.auth.AuthContextHolder;
|
||||
import com.atguigu.ssyx.common.result.Result;
|
||||
import com.atguigu.ssyx.home.service.HomeService;
|
||||
@@ -10,6 +11,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -26,7 +28,8 @@ import java.util.Map;
|
||||
@RequestMapping("api/home")
|
||||
public class HomeApiController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ProductFeignClient productFeignClient;
|
||||
@Autowired
|
||||
private HomeService homeService;
|
||||
|
||||
@@ -39,4 +42,13 @@ public class HomeApiController {
|
||||
return Result.ok(map);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "获取分类信息")
|
||||
@GetMapping("category")
|
||||
public Result category() {
|
||||
return Result.ok(productFeignClient.findAllCategoryList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user