update
This commit is contained in:
@ -222,6 +222,7 @@ public class ShiroConfiguration {
|
||||
// anon:不授权访问
|
||||
filterChainDefinitionMap.put("/doLogin", "anon");
|
||||
filterChainDefinitionMap.put("/login", "anon");
|
||||
filterChainDefinitionMap.put("/goodsOfOrder", "anon");
|
||||
filterChainDefinitionMap.put("/qqApi/**","anon");
|
||||
//错误跳转
|
||||
filterChainDefinitionMap.put("/error/**", "anon");
|
||||
|
@ -170,6 +170,26 @@ public class OrderApi {
|
||||
return new Result(ResultUtil.SUCCESS, ResultUtil.SUCCESS_MSG, wisdWxuser);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取订单的商品列表")
|
||||
@ApiImplicitParams({@ApiImplicitParam(name = "orderNumber", value = "订单号", paramType = "orderNumber")})
|
||||
@GetMapping("goodsOfOrder")
|
||||
public Result getGoodsOfOrder(String orderNumber) {
|
||||
WisdOeder wisdOeder = orderService.getOrderByNumber(orderNumber);
|
||||
List<WisdOrderDetail> orderDetailList = orderDetailService.getByOrderId(wisdOeder.getId());
|
||||
List<WisdGoods> wisdGoodsList = new ArrayList<>();
|
||||
for (WisdOrderDetail wisdOrderDetail : orderDetailList) {
|
||||
WisdGoods wisdGoods = goodsService.getInfoById(wisdOrderDetail.getGoodsId());
|
||||
WisdGoodsSpec wisdGoodsSpec = goodsSpecService.getById(wisdOrderDetail.getSpecId());
|
||||
wisdGoods.setWisdGoodsSpec(wisdGoodsSpec);
|
||||
wisdGoods.setGoodsNum(wisdOrderDetail.getGoodsNum());
|
||||
if (wisdOrderDetail.getSpecPrice() != null) {
|
||||
wisdGoods.setSprice(wisdOrderDetail.getSpecPrice().doubleValue());
|
||||
}
|
||||
wisdGoodsList.add(wisdGoods);
|
||||
}
|
||||
return new Result(ResultUtil.SUCCESS, ResultUtil.SUCCESS, wisdGoodsList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "提交订单")
|
||||
@PostMapping("addOrder")
|
||||
public Result addOrder(@RequestBody WisdOeder wisdOeder, HttpServletRequest request) {
|
||||
|
@ -1,12 +1,12 @@
|
||||
#开发环境
|
||||
spring:
|
||||
datasource:
|
||||
# url: jdbc:mysql://192.168.0.137:3306/wisdo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://146.56.198.32:3306/wisdo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
# username: yshop
|
||||
username: root
|
||||
# password: Qwer1234.
|
||||
password: Sphc666888!
|
||||
url: jdbc:mysql://192.168.0.233:3306/wisdo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
# url: jdbc:mysql://146.56.198.32:3306/wisdo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
username: yshop
|
||||
# username: root
|
||||
password: Qwer1234.
|
||||
# password: Sphc666888!
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
|
@ -1,6 +1,6 @@
|
||||
server:
|
||||
# port: 9000
|
||||
port: 9090
|
||||
port: 9000
|
||||
# port: 9090
|
||||
servlet:
|
||||
context-path: /wisdommining
|
||||
spring:
|
||||
@ -39,8 +39,8 @@ spring:
|
||||
# port: 6379
|
||||
redis:
|
||||
database: 10
|
||||
# host: localhost
|
||||
host: 146.56.198.32
|
||||
host: localhost
|
||||
# host: 146.56.198.32
|
||||
timeout: 100000
|
||||
jedis:
|
||||
pool:
|
||||
@ -49,8 +49,8 @@ spring:
|
||||
max-idle: 8
|
||||
min-idle: 0
|
||||
port: 6379
|
||||
password: Zsd@2021!
|
||||
# password:
|
||||
# password: Zsd@2021!
|
||||
password:
|
||||
|
||||
|
||||
mybatis-plus:
|
||||
|
Reference in New Issue
Block a user