支付回调不加书bug

This commit is contained in:
wangjinlei
2023-11-02 18:19:13 +08:00
parent f219296d33
commit 051373adf0
5 changed files with 38 additions and 6 deletions

View File

@@ -312,6 +312,26 @@ public class BuyOrderController {
return R.ok(result);
}
@RequestMapping("/llll")
public R ls(){
LambdaQueryWrapper<BuyOrder> wrapper = new LambdaQueryWrapper<>();
ArrayList<Integer> integers = new ArrayList<>();
integers.add(1);
integers.add(2);
integers.add(3);
wrapper.in(BuyOrder::getOrderStatus,integers);
wrapper.eq(BuyOrder::getOrderType,"order");
List<BuyOrder> list = buyOrderService.list(wrapper);
for (BuyOrder b : list){
List<Integer> orderBookId = shopProductBookService.getOrderBookId(b.getOrderSn());
System.out.println(orderBookId);
userEbookBuyService.addBookForUser(b.getUserId(),orderBookId);
}
return R.ok();
}
/**
* 计算运费
*

View File

@@ -1,5 +1,6 @@
package com.peanut.modules.book.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.peanut.common.utils.R;
import com.peanut.modules.book.entity.PointCategoryEntity;
@@ -80,6 +81,8 @@ public class PointController {
*/
@RequestMapping("/addPoint")
public R addPoint(@RequestBody PointEntity pointEntity){
String jsonString = JSON.toJSONString(pointEntity.getImageList());
pointEntity.setImages(jsonString);
pointService.save(pointEntity);
return R.ok();
}
@@ -103,6 +106,8 @@ public class PointController {
*/
@RequestMapping("/editPoint")
public R editPoint(@RequestBody PointEntity pointEntity){
String jsonString = JSON.toJSONString(pointEntity.getImageList());
pointEntity.setImages(jsonString);
pointService.updateById(pointEntity);
return R.ok();
}