提交 | 用户 | age
|
de7e73
|
1 |
package com.hx.phiappt.feign; |
F |
2 |
|
|
3 |
import com.hx.phiappt.dto.stock.StockDto; |
|
4 |
import com.hx.resultTool.Result; |
|
5 |
import org.springframework.cloud.openfeign.FeignClient; |
|
6 |
import org.springframework.web.bind.annotation.PostMapping; |
|
7 |
import org.springframework.web.bind.annotation.RequestBody; |
|
8 |
|
|
9 |
/** |
|
10 |
* 这里这个name 需要填写 请求的服务提供者的注册到nacos Server上面的服务名,path 是请求接口前缀 |
|
11 |
*/ |
cc1dd8
|
12 |
@FeignClient(name="warehouse-service", path = "/warehouse",contextId = "warehouse-stock") |
63ddd3
|
13 |
public interface WStockService { |
de7e73
|
14 |
|
F |
15 |
/** |
63ddd3
|
16 |
* 更新商品库存信息 |
de7e73
|
17 |
*/ |
F |
18 |
@PostMapping(value = "/stock/update/one") |
|
19 |
Result updateStock(@RequestBody StockDto stockDto); |
|
20 |
|
|
21 |
} |