he2802 3 anni fa
parent
commit
b042b9e138

+ 4 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/order/OrderGoodsController.java

@@ -82,8 +82,10 @@ public class OrderGoodsController extends BaseController {
     @ApiOperation("获取订单商品重复购买详细信息")
     @PreAuthorize("@ss.hasPermi('system:goods:query')")
     @GetMapping("/rebuyInfo")
-    public AjaxResult<OrderGoodsVo> rebuyInfo(OrderGoodsQueryBo bo) {
-        return AjaxResult.success(iOrderGoodsService.rebuyInfo(bo));
+    public TableDataInfo<OrderGoodsVo> rebuyInfo(OrderGoodsQueryBo bo) {
+        startPage();
+        List<OrderGoodsVo> list = iOrderGoodsService.rebuyInfo(bo);
+        return getDataTable(list);
     }
 
     /**

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderGoodsMapper.java

@@ -28,5 +28,5 @@ public interface OrderGoodsMapper extends BaseMapper<OrderGoods> {
     Long getBuyGoodsReadyPay(OrderGoodsQueryBo bo);
 
     List<OrderGoodsVo> sendGoods();
-    OrderGoodsVo rebuyInfo(OrderGoodsQueryBo bo);
+    List<OrderGoodsVo> rebuyInfo(OrderGoodsQueryBo bo);
 }

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderGoodsService.java

@@ -32,7 +32,7 @@ public interface IOrderGoodsService extends IService<OrderGoods> {
 	 * 查询列表
 	 */
 	List<OrderGoodsVo> queryList(OrderGoodsQueryBo bo);
-	OrderGoodsVo rebuyInfo(OrderGoodsQueryBo bo);
+	List<OrderGoodsVo> rebuyInfo(OrderGoodsQueryBo bo);
 
 
 	/**

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderGoodsServiceImpl.java

@@ -97,7 +97,7 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
     }
 
     @Override
-    public OrderGoodsVo rebuyInfo(OrderGoodsQueryBo bo) {
+    public List<OrderGoodsVo> rebuyInfo(OrderGoodsQueryBo bo) {
         return this.baseMapper.rebuyInfo(bo);
     }
 

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml

@@ -206,7 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 LEFT JOIN class_grade cg ON og.grade_id = cg.grade_id
                 LEFT JOIN `order` o on og.order_sn = o.order_sn
         WHERE
-            o.user_id = #{userId} and og.goods_id = #{goodsId} and og.order_goods_id !=  #{orderGoodsId}
+            o.user_id = #{userId} and og.goods_id = #{goodsId} and og.pay_status in (2,3) and  og.order_goods_id !=  #{orderGoodsId}
 
     </select>
 </mapper>