支付回调不加书bug
This commit is contained in:
@@ -312,6 +312,26 @@ public class BuyOrderController {
|
|||||||
return R.ok(result);
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算运费
|
* 计算运费
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.peanut.modules.book.controller;
|
package com.peanut.modules.book.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.peanut.common.utils.R;
|
import com.peanut.common.utils.R;
|
||||||
import com.peanut.modules.book.entity.PointCategoryEntity;
|
import com.peanut.modules.book.entity.PointCategoryEntity;
|
||||||
@@ -80,6 +81,8 @@ public class PointController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping("/addPoint")
|
@RequestMapping("/addPoint")
|
||||||
public R addPoint(@RequestBody PointEntity pointEntity){
|
public R addPoint(@RequestBody PointEntity pointEntity){
|
||||||
|
String jsonString = JSON.toJSONString(pointEntity.getImageList());
|
||||||
|
pointEntity.setImages(jsonString);
|
||||||
pointService.save(pointEntity);
|
pointService.save(pointEntity);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@@ -103,6 +106,8 @@ public class PointController {
|
|||||||
*/
|
*/
|
||||||
@RequestMapping("/editPoint")
|
@RequestMapping("/editPoint")
|
||||||
public R editPoint(@RequestBody PointEntity pointEntity){
|
public R editPoint(@RequestBody PointEntity pointEntity){
|
||||||
|
String jsonString = JSON.toJSONString(pointEntity.getImageList());
|
||||||
|
pointEntity.setImages(jsonString);
|
||||||
pointService.updateById(pointEntity);
|
pointService.updateById(pointEntity);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
package com.peanut.modules.book.entity;
|
package com.peanut.modules.book.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName("point")
|
@TableName("point")
|
||||||
@@ -18,11 +16,16 @@ public class PointEntity implements Serializable {
|
|||||||
|
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
|
private String images;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<String> imageList;
|
||||||
|
|
||||||
private Integer pointCategoryId;
|
private Integer pointCategoryId;
|
||||||
|
|
||||||
private String alias;
|
private String alias;
|
||||||
|
|
||||||
private String merdians;
|
private String meridian;
|
||||||
|
|
||||||
private String position;
|
private String position;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.peanut.modules.book.service.impl;
|
package com.peanut.modules.book.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -36,6 +37,9 @@ public class PointServiceImpl extends ServiceImpl<PointDao, PointEntity> impleme
|
|||||||
}
|
}
|
||||||
wrapper.orderByDesc(PointEntity::getSort);
|
wrapper.orderByDesc(PointEntity::getSort);
|
||||||
Page<PointEntity> pointEntityPage = getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
|
Page<PointEntity> pointEntityPage = getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
|
||||||
|
for (PointEntity p : pointEntityPage.getRecords()){
|
||||||
|
p.setImageList(JSON.parseArray(p.getImages(),String.class));
|
||||||
|
}
|
||||||
return pointEntityPage;
|
return pointEntityPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<select id="getOrderBookId" parameterType="string" resultType="int">
|
<select id="getOrderBookId" parameterType="string" resultType="int">
|
||||||
SELECT spb.book_id
|
SELECT spb.book_id
|
||||||
FROM shop_product_book spb
|
FROM shop_product_book spb
|
||||||
LEFT JOIN buy_order_detail bod ON spb.product_id = bod.product_id
|
LEFT JOIN buy_order_product bod ON spb.product_id = bod.product_id
|
||||||
LEFT JOIN buy_order bo ON bo.order_id = bod.order_id
|
LEFT JOIN buy_order bo ON bo.order_id = bod.order_id
|
||||||
WHERE bo.order_sn = #{orderSn}
|
WHERE bo.order_sn = #{orderSn}
|
||||||
AND spb.del_flag != -1
|
AND spb.del_flag != -1
|
||||||
|
|||||||
Reference in New Issue
Block a user