Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into dev1/user_model
This commit is contained in:
@@ -10,8 +10,10 @@ import com.peanut.config.Constants;
|
|||||||
import com.peanut.config.DelayQueueConfig;
|
import com.peanut.config.DelayQueueConfig;
|
||||||
import com.peanut.modules.book.entity.*;
|
import com.peanut.modules.book.entity.*;
|
||||||
import com.peanut.modules.book.service.*;
|
import com.peanut.modules.book.service.*;
|
||||||
|
import com.peanut.modules.book.vo.request.BuyOrderListRequestVo;
|
||||||
import com.peanut.modules.book.vo.request.ProductRequestVo;
|
import com.peanut.modules.book.vo.request.ProductRequestVo;
|
||||||
import com.peanut.modules.book.vo.request.ProductTransportVo;
|
import com.peanut.modules.book.vo.request.ProductTransportVo;
|
||||||
|
import com.peanut.modules.book.vo.response.BuyOrderListResponseVo;
|
||||||
import com.peanut.modules.book.vo.response.ExpressQueryResponseVo;
|
import com.peanut.modules.book.vo.response.ExpressQueryResponseVo;
|
||||||
import com.peanut.modules.book.vo.ShippingAddressRequestVo;
|
import com.peanut.modules.book.vo.ShippingAddressRequestVo;
|
||||||
import com.peanut.modules.book.vo.UserAddressVo;
|
import com.peanut.modules.book.vo.UserAddressVo;
|
||||||
@@ -91,6 +93,18 @@ public class BuyOrderController {
|
|||||||
return R.ok().put("page", page);
|
return R.ok().put("page", page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单列表
|
||||||
|
*
|
||||||
|
* @param requestVo request value object
|
||||||
|
* @return R
|
||||||
|
*/
|
||||||
|
@RequestMapping(path = "orderList", method = RequestMethod.POST)
|
||||||
|
public R orderList(@RequestBody BuyOrderListRequestVo requestVo) {
|
||||||
|
List<BuyOrderListResponseVo> response = buyOrderService.orderList(requestVo);
|
||||||
|
return R.ok().put("result", response);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下单
|
* 下单
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,20 +2,21 @@ package com.peanut.modules.book.dao;
|
|||||||
|
|
||||||
import com.peanut.modules.book.entity.BuyOrder;
|
import com.peanut.modules.book.entity.BuyOrder;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.peanut.modules.book.vo.request.BuyOrderListRequestVo;
|
||||||
|
import com.peanut.modules.book.vo.response.BuyOrderListResponseVo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单表
|
* 订单表
|
||||||
*
|
*
|
||||||
* @author yl
|
* @author yl
|
||||||
* @email yl328572838@163.com
|
* @email yl328572838@163.com
|
||||||
* @date 2022-08-29 15:27:44
|
* @date 2022-08-29 15:27:44
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface BuyOrderDao extends BaseMapper<BuyOrder> {
|
public interface BuyOrderDao extends BaseMapper<BuyOrder> {
|
||||||
|
List<BuyOrder> orderList(BuyOrderListRequestVo requestVo);
|
||||||
|
|
||||||
public List<BuyOrder> queryListByOrderIds(Integer[] ids);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.peanut.modules.book.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.peanut.modules.book.entity.BuyOrderProduct;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface BuyOrderProductDao extends BaseMapper<BuyOrderProduct> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.peanut.modules.book.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 订单-商品
|
||||||
|
* @Author: Cauchy
|
||||||
|
* @CreateTime: 2023/10/19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("buy_order_product")
|
||||||
|
public class BuyOrderProduct {
|
||||||
|
/**
|
||||||
|
* 主键 ID
|
||||||
|
*/
|
||||||
|
private int id;
|
||||||
|
/**
|
||||||
|
* 订单 ID
|
||||||
|
*/
|
||||||
|
private int orderId;
|
||||||
|
/**
|
||||||
|
* 商品 ID
|
||||||
|
*/
|
||||||
|
private int productId;
|
||||||
|
/**
|
||||||
|
* 商品数量
|
||||||
|
*/
|
||||||
|
private int quantity;
|
||||||
|
/**
|
||||||
|
* 商品价格
|
||||||
|
*/
|
||||||
|
private BigDecimal realPrice;
|
||||||
|
/**
|
||||||
|
* 快递订单 ID
|
||||||
|
*/
|
||||||
|
private int express_order_id;
|
||||||
|
/**
|
||||||
|
* 删除标识
|
||||||
|
*/
|
||||||
|
private int delFlag;
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.peanut.modules.book.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.peanut.modules.book.entity.BuyOrderProduct;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public interface BuyOrderProductService extends IService<BuyOrderProduct> {
|
||||||
|
}
|
||||||
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||||||
import com.peanut.common.utils.PageUtils;
|
import com.peanut.common.utils.PageUtils;
|
||||||
import com.peanut.modules.book.entity.BuyOrder;
|
import com.peanut.modules.book.entity.BuyOrder;
|
||||||
import com.peanut.modules.book.vo.UserOrderVo;
|
import com.peanut.modules.book.vo.UserOrderVo;
|
||||||
|
import com.peanut.modules.book.vo.request.BuyOrderListRequestVo;
|
||||||
|
import com.peanut.modules.book.vo.response.BuyOrderListResponseVo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -31,6 +33,8 @@ public interface BuyOrderService extends IService<BuyOrder> {
|
|||||||
// 查询所有订单是否有可合并
|
// 查询所有订单是否有可合并
|
||||||
Page checkOrder(Map<String, Object> params);
|
Page checkOrder(Map<String, Object> params);
|
||||||
|
|
||||||
|
List<BuyOrderListResponseVo> orderList(BuyOrderListRequestVo requestVo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单拆分发货
|
* 订单拆分发货
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.peanut.modules.book.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.peanut.modules.book.dao.BuyOrderProductDao;
|
||||||
|
import com.peanut.modules.book.entity.BuyOrderProduct;
|
||||||
|
import com.peanut.modules.book.service.BuyOrderProductService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 订单-商品 Service 实现类
|
||||||
|
* @Author: Cauchy
|
||||||
|
* @CreateTime: 2023/10/19
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BuyOrderProductServiceImpl extends ServiceImpl<BuyOrderProductDao, BuyOrderProduct> implements BuyOrderProductService {
|
||||||
|
}
|
||||||
@@ -15,6 +15,9 @@ import com.peanut.modules.book.service.*;
|
|||||||
import com.peanut.modules.book.entity.ExpressCommodity;
|
import com.peanut.modules.book.entity.ExpressCommodity;
|
||||||
import com.peanut.modules.book.vo.ExpressOrderResponseVo;
|
import com.peanut.modules.book.vo.ExpressOrderResponseVo;
|
||||||
import com.peanut.modules.book.vo.UserOrderVo;
|
import com.peanut.modules.book.vo.UserOrderVo;
|
||||||
|
import com.peanut.modules.book.vo.request.BuyOrderListRequestVo;
|
||||||
|
import com.peanut.modules.book.vo.response.BuyOrderListResponseVo;
|
||||||
|
import com.peanut.modules.book.vo.response.ConsigneeVo;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -48,6 +51,9 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
@Autowired
|
@Autowired
|
||||||
ShopProductService shopProductService;
|
ShopProductService shopProductService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BuyOrderDao buyOrderDao;
|
||||||
|
|
||||||
|
|
||||||
protected Logger logger = LoggerFactory.getLogger(BuyOrderServiceImpl.class);
|
protected Logger logger = LoggerFactory.getLogger(BuyOrderServiceImpl.class);
|
||||||
|
|
||||||
@@ -86,8 +92,6 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<BuyOrder> records = page.getRecords();
|
List<BuyOrder> records = page.getRecords();
|
||||||
for (BuyOrder record : records) {
|
for (BuyOrder record : records) {
|
||||||
Integer userId = record.getUserId();
|
Integer userId = record.getUserId();
|
||||||
@@ -103,7 +107,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
return new PageUtils(page);
|
return new PageUtils(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void list1(){
|
public void list1() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,6 +290,33 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
|||||||
return rntPage;
|
return rntPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BuyOrderListResponseVo> orderList(BuyOrderListRequestVo requestVo) {
|
||||||
|
List<BuyOrder> buyOrderList = buyOrderDao.orderList(requestVo);
|
||||||
|
List<BuyOrderListResponseVo> result = new ArrayList<>();
|
||||||
|
for (BuyOrder buyOrder : buyOrderList) {
|
||||||
|
BuyOrderListResponseVo responseVo = new BuyOrderListResponseVo();
|
||||||
|
responseVo.setOrderSn(buyOrder.getOrderSn());
|
||||||
|
responseVo.setOrderStatus(buyOrder.getOrderStatus());
|
||||||
|
responseVo.setRemark(buyOrder.getRemark());
|
||||||
|
responseVo.setPaymentDate(buyOrder.getPaymentDate());
|
||||||
|
responseVo.setPaymentMethod(buyOrder.getPaymentMethod());
|
||||||
|
ConsigneeVo consigneeVo = new ConsigneeVo();
|
||||||
|
consigneeVo.setConsigneeName(buyOrder.getShippingUser());
|
||||||
|
consigneeVo.setConsigneeMobile(buyOrder.getUserPhone());
|
||||||
|
consigneeVo.setProvince(buyOrder.getProvince());
|
||||||
|
consigneeVo.setCity(buyOrder.getCity());
|
||||||
|
consigneeVo.setCounty(buyOrder.getDistrict());
|
||||||
|
consigneeVo.setAddress(buyOrder.getAddress());
|
||||||
|
responseVo.setConsignee(consigneeVo);
|
||||||
|
// responseVo.setExpressList();
|
||||||
|
// responseVo.setGoodsList();
|
||||||
|
requestVo.setIndex((requestVo.getIndex() - 1) * requestVo.getPageSize());
|
||||||
|
result.add(responseVo);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void delivery(String expressCompanyCode, List<Integer> buyOrderDetailId) {
|
public void delivery(String expressCompanyCode, List<Integer> buyOrderDetailId) {
|
||||||
QueryWrapper<BuyOrderDetail> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<BuyOrderDetail> queryWrapper = new QueryWrapper<>();
|
||||||
|
|||||||
@@ -35,4 +35,8 @@ public class BuyOrderListRequestVo {
|
|||||||
* 订单状态
|
* 订单状态
|
||||||
*/
|
*/
|
||||||
private Integer orderStatus;
|
private Integer orderStatus;
|
||||||
|
/**
|
||||||
|
* 数据起始位置
|
||||||
|
*/
|
||||||
|
private Integer index;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.peanut.modules.book.vo.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 订单列表相应 Value Object
|
||||||
|
* @Author: Cauchy
|
||||||
|
* @CreateTime: 2023/10/19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BuyOrderListResponseVo {
|
||||||
|
/**
|
||||||
|
* 订单号
|
||||||
|
*/
|
||||||
|
private String orderSn;
|
||||||
|
/**
|
||||||
|
* 支付方式
|
||||||
|
*/
|
||||||
|
private String paymentMethod;
|
||||||
|
/**
|
||||||
|
* 订单状态
|
||||||
|
*/
|
||||||
|
private String orderStatus;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 支付时间
|
||||||
|
*/
|
||||||
|
private Date paymentDate;
|
||||||
|
/**
|
||||||
|
* 商品列表
|
||||||
|
*/
|
||||||
|
private List<GoodsResponseVo> goodsList;
|
||||||
|
/**
|
||||||
|
* 快递列表
|
||||||
|
*/
|
||||||
|
private List<ExpressResponseVo> expressList;
|
||||||
|
/**
|
||||||
|
* 收货人信息
|
||||||
|
*/
|
||||||
|
private ConsigneeVo consignee;
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.peanut.modules.book.vo.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 收货人 Value Object
|
||||||
|
* @Author: Cauchy
|
||||||
|
* @CreateTime: 2023/10/19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ConsigneeVo {
|
||||||
|
/**
|
||||||
|
* 收货人姓名
|
||||||
|
*/
|
||||||
|
private String consigneeName;
|
||||||
|
/**
|
||||||
|
* 收货人电话
|
||||||
|
*/
|
||||||
|
private String consigneeMobile;
|
||||||
|
/**
|
||||||
|
* 省份
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
/**
|
||||||
|
* 城市
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
/**
|
||||||
|
* 区县
|
||||||
|
*/
|
||||||
|
private String county;
|
||||||
|
/**
|
||||||
|
* 详细地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.peanut.modules.book.vo.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 物流响应 Value Object
|
||||||
|
* @Author: Cauchy
|
||||||
|
* @CreateTime: 2023/10/19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ExpressResponseVo {
|
||||||
|
/**
|
||||||
|
* 快递单号
|
||||||
|
*/
|
||||||
|
private String expressOrderSn;
|
||||||
|
/**
|
||||||
|
* 快递公司
|
||||||
|
*/
|
||||||
|
private String expressCompany;
|
||||||
|
/**
|
||||||
|
* 快递面单
|
||||||
|
*/
|
||||||
|
private String printTemplate;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.peanut.modules.book.vo.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 商品信息 Value Object
|
||||||
|
* @Author: Cauchy
|
||||||
|
* @CreateTime: 2023/10/19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class GoodsResponseVo {
|
||||||
|
/**
|
||||||
|
* 商品名称
|
||||||
|
*/
|
||||||
|
private String productName;
|
||||||
|
/**
|
||||||
|
* 商品图片
|
||||||
|
*/
|
||||||
|
private String productImage;
|
||||||
|
/**
|
||||||
|
* 商品价格
|
||||||
|
*/
|
||||||
|
private BigDecimal productPrice;
|
||||||
|
}
|
||||||
@@ -3,71 +3,92 @@
|
|||||||
|
|
||||||
<mapper namespace="com.peanut.modules.book.dao.BuyOrderDao">
|
<mapper namespace="com.peanut.modules.book.dao.BuyOrderDao">
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 -->
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
<resultMap type="com.peanut.modules.book.entity.BuyOrder" id="buyOrderMap">
|
<resultMap type="com.peanut.modules.book.entity.BuyOrder" id="buyOrderMap">
|
||||||
<result property="orderId" column="order_id" />
|
<result property="orderId" column="order_id"/>
|
||||||
<result property="orderSn" column="order_sn" />
|
<result property="orderSn" column="order_sn"/>
|
||||||
<result property="userId" column="user_id" />
|
<result property="userId" column="user_id"/>
|
||||||
<result property="shippingUser" column="shipping_user" />
|
<result property="shippingUser" column="shipping_user"/>
|
||||||
<result property="province" column="province" />
|
<result property="province" column="province"/>
|
||||||
<result property="city" column="city" />
|
<result property="city" column="city"/>
|
||||||
<result property="district" column="district" />
|
<result property="district" column="district"/>
|
||||||
<result property="address" column="address" />
|
<result property="address" column="address"/>
|
||||||
<result property="paymentMethod" column="payment_method" />
|
<result property="paymentMethod" column="payment_method"/>
|
||||||
<result property="orderMoney" column="order_money" />
|
<result property="orderMoney" column="order_money"/>
|
||||||
<result property="districtMoney" column="district_money" />
|
<result property="districtMoney" column="district_money"/>
|
||||||
<result property="realMoney" column="real_money" />
|
<result property="realMoney" column="real_money"/>
|
||||||
<result property="shippingMoney" column="shipping_money" />
|
<result property="shippingMoney" column="shipping_money"/>
|
||||||
<result property="shippingCompName" column="shipping_comp_name" />
|
<result property="shippingCompName" column="shipping_comp_name"/>
|
||||||
<result property="shippingSn" column="shipping_sn" />
|
<result property="shippingSn" column="shipping_sn"/>
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="shippingTime" column="shipping_time" />
|
<result property="shippingTime" column="shipping_time"/>
|
||||||
<result property="orderStatus" column="order_status" />
|
<result property="orderStatus" column="order_status"/>
|
||||||
<result property="successTime" column="success_time" />
|
<result property="successTime" column="success_time"/>
|
||||||
<result property="couponId" column="coupon_id" />
|
<result property="couponId" column="coupon_id"/>
|
||||||
<result property="couponName" column="coupon_name" />
|
<result property="couponName" column="coupon_name"/>
|
||||||
<result property="userPhone" column="user_phone" />
|
<result property="userPhone" column="user_phone"/>
|
||||||
<result property="orderType" column="order_type" />
|
<result property="orderType" column="order_type"/>
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="expNo" column="exp_no" />
|
<result property="expNo" column="exp_no"/>
|
||||||
<result property="isSend" column="is_send" />
|
<result property="isSend" column="is_send"/>
|
||||||
<result property="addressId" column="address_id" />
|
<result property="addressId" column="address_id"/>
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark"/>
|
||||||
<result property="orderCode" column="order_code" />
|
<result property="orderCode" column="order_code"/>
|
||||||
<result property="paymentDate" column="payment_date" />
|
<result property="paymentDate" column="payment_date"/>
|
||||||
|
|
||||||
|
|
||||||
<collection property="products" ofType="com.peanut.modules.book.entity.BuyOrderDetail">
|
<collection property="products" ofType="com.peanut.modules.book.entity.BuyOrderDetail">
|
||||||
<result property="orderId" column="order_id" />
|
<result property="orderId" column="order_id"/>
|
||||||
<result property="productName" column="product_name" />
|
<result property="productName" column="product_name"/>
|
||||||
<result property="quantity" column="quantity" />
|
<result property="quantity" column="quantity"/>
|
||||||
<result property="productPrice" column="product_price" />
|
<result property="productPrice" column="product_price"/>
|
||||||
<result property="weight" column="weight" />
|
<result property="weight" column="weight"/>
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark"/>
|
||||||
</collection>
|
</collection>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- <resultMap id="OrderDetailResult" type="com.peanut.modules.book.entity.BuyOrderDetail">-->
|
<!-- <resultMap id="OrderDetailResult" type="com.peanut.modules.book.entity.BuyOrderDetail">-->
|
||||||
|
|
||||||
<!-- </resultMap>-->
|
<!-- </resultMap>-->
|
||||||
|
|
||||||
<select id="queryListByOrderIds" resultType="com.peanut.modules.book.entity.BuyOrder">
|
<select id="queryListByOrderIds" resultType="com.peanut.modules.book.entity.BuyOrder">
|
||||||
select
|
select
|
||||||
*,
|
*,
|
||||||
buy_order_detail.order_id,
|
buy_order_detail.order_id,
|
||||||
buy_order_detail.product_name,
|
buy_order_detail.product_name,
|
||||||
buy_order_detail.quantity,
|
buy_order_detail.quantity,
|
||||||
buy_order_detail.product_price,
|
buy_order_detail.product_price,
|
||||||
buy_order_detail.weight,
|
buy_order_detail.weight,
|
||||||
buy_order_detail.remark
|
buy_order_detail.remark
|
||||||
from buy_order
|
from buy_order
|
||||||
left join buy_order_detail on buy_order.order_id = buy_order_detail.order_id
|
left join buy_order_detail on buy_order.order_id = buy_order_detail.order_id
|
||||||
where buy_order.order_id in
|
where buy_order.order_id in
|
||||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
and del_flag = 0
|
and del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="orderList" resultType="com.peanut.modules.book.entity.BuyOrder"
|
||||||
|
parameterType="com.peanut.modules.book.vo.request.BuyOrderListRequestVo">
|
||||||
|
select order_sn, province, city, district, user_phone, address, payment_method, order_status, remark
|
||||||
|
from buy_order
|
||||||
|
<where>
|
||||||
|
<if test="orderStatus != null">
|
||||||
|
and order_status = #{orderStatus}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null">
|
||||||
|
and create_time >= #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
and create_time <= #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="searchKeyWord != null">
|
||||||
|
and order_sn like %#{searchKeyWord}%
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
limit #{index},#{pageSize}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user