Commit 18d74679 by 章国平

Merge branch 'master' into 'develop'

Master

See merge request !2
2 parents 1925de63 a4b8b71c
......@@ -2,40 +2,20 @@ spring:
cloud:
gateway:
routes:
- id: placeOrder
uri: lb://project-order
predicates:
- Path=/order/create
- id: queryStorage
uri: lb://project-storage
predicates:
- Path=/storage/
- id: queryAccount
uri: lb://project-account
predicates:
- Path=/account/
- id: praiseItemRocketMQ
uri: lb://project-provider
predicates:
- Path=/praise/rocketmq
- id: praiseItemSentinel
uri: lb://project-provider
predicates:
- Path=/praise/sentinel
- id: queryPraise
uri: lb://project-consumer
predicates:
- Path=/praise/query
- id: user
uri: lb://user
predicates:
- Path=/user/**, /v1/team/**, /v1/user/**
- id: order
uri: lb://project-order
predicates:
- Path=/order/**
- id: gis
uri: lb://gis
uri: lb://project-gis
predicates:
- Path=/gis/**
- id: district
uri: lb://district
uri: lb://project-district
predicates:
- Path=/district/**
......
......@@ -21,6 +21,7 @@ import com.alibaba.cloud.integration.common.Result;
import com.alibaba.cloud.integration.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
......@@ -38,16 +39,20 @@ public class OrderController {
@PostMapping("/create")
public Result<?> createOrder(@RequestParam("userId") String userId,
@RequestParam("commodityCode") String commodityCode,
@RequestParam("count") Integer count) {
@RequestParam("commodityCode") String commodityCode, @RequestParam("count") Integer count) {
Result<?> res = null;
try {
res = orderService.createOrder(userId, commodityCode, count);
}
catch (BusinessException e) {
} catch (BusinessException e) {
return Result.failed(e.getMessage());
}
return res;
}
@GetMapping("/test")
public Result<?> test(@RequestParam(value = "param", required = false) String param) {
System.out.println("test ok");
return Result.success("test ok");
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!