- 修改订单展示
- 增加实付金额修改功能
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package cn.iocoder.mall.order.application.convert;
|
||||
package cn.iocoder.mall.order.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.dto.OrderBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderBO;
|
||||
import cn.iocoder.mall.order.dataobject.OrderDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mappings;
|
||||
@@ -1,7 +1,7 @@
|
||||
package cn.iocoder.mall.order.application.convert;
|
||||
package cn.iocoder.mall.order.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.dto.OrderCreateItemDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderItemBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderItemBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderItemUpdateDTO;
|
||||
import cn.iocoder.mall.order.dataobject.OrderItemDO;
|
||||
import org.mapstruct.Mapper;
|
||||
@@ -1,5 +1,6 @@
|
||||
package cn.iocoder.mall.order.application.convert;
|
||||
package cn.iocoder.mall.order.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderLogisticsBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCreateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderLogisticsUpdateDTO;
|
||||
import cn.iocoder.mall.order.dataobject.OrderLogisticsDO;
|
||||
@@ -7,6 +8,8 @@ import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单物流 convert
|
||||
*
|
||||
@@ -23,4 +26,7 @@ public interface OrderLogisticsConvert {
|
||||
|
||||
@Mappings({})
|
||||
OrderLogisticsDO convert(OrderLogisticsUpdateDTO orderLogisticsDTO);
|
||||
|
||||
@Mappings({})
|
||||
List<OrderLogisticsBO> convertOrderLogisticsBO(List<OrderLogisticsDO> orderLogisticsDOList);
|
||||
}
|
||||
@@ -46,12 +46,12 @@ public interface OrderItemMapper {
|
||||
* 查询 - 根据 orderIds 和 status
|
||||
*
|
||||
* @param orderIds
|
||||
* @param status
|
||||
* @param deleted
|
||||
* @return
|
||||
*/
|
||||
List<OrderItemDO> selectByOrderIdsAndStatus(
|
||||
List<OrderItemDO> selectByOrderIdsAndDeleted(
|
||||
@Param("orderIds") Collection<Integer> orderIds,
|
||||
@Param("status") Integer status
|
||||
@Param("deleted") Integer deleted
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
package cn.iocoder.mall.order.dao;
|
||||
|
||||
import cn.iocoder.mall.order.dataobject.OrderLogisticsDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单 item mapper
|
||||
*
|
||||
@@ -25,4 +29,14 @@ public interface OrderLogisticsMapper {
|
||||
* @param orderLogisticsDO
|
||||
*/
|
||||
void updateById(OrderLogisticsDO orderLogisticsDO);
|
||||
|
||||
/**
|
||||
* 查询 - 根据 orderId
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<OrderLogisticsDO> selectByIds(
|
||||
@Param("ids") Collection<Integer> ids
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class OrderDO extends DeletableDO {
|
||||
/**
|
||||
* 交易金额
|
||||
*/
|
||||
private Integer price;
|
||||
private Integer payAmount;
|
||||
|
||||
///
|
||||
/// 时间信息
|
||||
@@ -87,7 +87,7 @@ public class OrderDO extends DeletableDO {
|
||||
", userId=" + userId +
|
||||
", orderLogisticsId=" + orderLogisticsId +
|
||||
", orderNo='" + orderNo + '\'' +
|
||||
", price=" + price +
|
||||
", payAmount=" + payAmount +
|
||||
", paymentTime=" + paymentTime +
|
||||
", deliveryTime=" + deliveryTime +
|
||||
", receiverTime=" + receiverTime +
|
||||
@@ -134,12 +134,12 @@ public class OrderDO extends DeletableDO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPrice() {
|
||||
return price;
|
||||
public Integer getPayAmount() {
|
||||
return payAmount;
|
||||
}
|
||||
|
||||
public OrderDO setPrice(Integer price) {
|
||||
this.price = price;
|
||||
public OrderDO setPayAmount(Integer payAmount) {
|
||||
this.payAmount = payAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,14 +28,26 @@ public class OrderItemDO extends DeletableDO {
|
||||
* 商品编号
|
||||
*/
|
||||
private Integer skuId;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String skuName;
|
||||
/**
|
||||
* 商品图片
|
||||
*/
|
||||
private String skuImage;
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer quantity;
|
||||
/**
|
||||
* 金额(分)
|
||||
* 价格(分)
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* 支付金额(实付金额)
|
||||
*/
|
||||
private Integer payAmount;
|
||||
|
||||
///
|
||||
/// 时间信息
|
||||
@@ -86,9 +98,12 @@ public class OrderItemDO extends DeletableDO {
|
||||
"id=" + id +
|
||||
", orderId=" + orderId +
|
||||
", orderNo='" + orderNo + '\'' +
|
||||
", skuId='" + skuId + '\'' +
|
||||
", skuId=" + skuId +
|
||||
", skuName=" + skuName +
|
||||
", skuImage=" + skuImage +
|
||||
", quantity=" + quantity +
|
||||
", price=" + price +
|
||||
", payAmount=" + payAmount +
|
||||
", paymentTime=" + paymentTime +
|
||||
", deliveryTime=" + deliveryTime +
|
||||
", receiverTime=" + receiverTime +
|
||||
@@ -134,6 +149,24 @@ public class OrderItemDO extends DeletableDO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSkuName() {
|
||||
return skuName;
|
||||
}
|
||||
|
||||
public OrderItemDO setSkuName(String skuName) {
|
||||
this.skuName = skuName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getSkuImage() {
|
||||
return skuImage;
|
||||
}
|
||||
|
||||
public OrderItemDO setSkuImage(String skuImage) {
|
||||
this.skuImage = skuImage;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
@@ -152,6 +185,15 @@ public class OrderItemDO extends DeletableDO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getPayAmount() {
|
||||
return payAmount;
|
||||
}
|
||||
|
||||
public OrderItemDO setPayAmount(Integer payAmount) {
|
||||
this.payAmount = payAmount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Date getPaymentTime() {
|
||||
return paymentTime;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,10 @@ public class OrderLogisticsDO extends BaseDO {
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 收件区域编号
|
||||
*/
|
||||
@@ -40,6 +44,7 @@ public class OrderLogisticsDO extends BaseDO {
|
||||
public String toString() {
|
||||
return "OrderLogisticsDO{" +
|
||||
"id=" + id +
|
||||
", orderId=" + orderId +
|
||||
", areaNo='" + areaNo + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", mobile='" + mobile + '\'' +
|
||||
@@ -57,6 +62,15 @@ public class OrderLogisticsDO extends BaseDO {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Integer getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public OrderLogisticsDO setOrderId(Integer orderId) {
|
||||
this.orderId = orderId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAreaNo() {
|
||||
return areaNo;
|
||||
}
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
package cn.iocoder.mall.order.service;
|
||||
|
||||
import cn.iocoder.common.framework.constant.DeletedStatusEnum;
|
||||
import cn.iocoder.common.framework.util.CollectionUtil;
|
||||
import cn.iocoder.common.framework.util.ServiceExceptionUtil;
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.order.OrderCommon;
|
||||
import cn.iocoder.mall.order.api.OrderService;
|
||||
import cn.iocoder.mall.order.api.bo.*;
|
||||
import cn.iocoder.mall.order.api.constant.OrderErrorCodeEnum;
|
||||
import cn.iocoder.mall.order.api.constant.OrderHasReturnExchangeEnum;
|
||||
import cn.iocoder.mall.order.api.constant.OrderStatusEnum;
|
||||
import cn.iocoder.mall.order.api.dto.*;
|
||||
import cn.iocoder.mall.order.application.convert.OrderConvert;
|
||||
import cn.iocoder.mall.order.application.convert.OrderItemConvert;
|
||||
import cn.iocoder.mall.order.application.convert.OrderLogisticsConvert;
|
||||
import cn.iocoder.mall.order.convert.OrderConvert;
|
||||
import cn.iocoder.mall.order.convert.OrderItemConvert;
|
||||
import cn.iocoder.mall.order.convert.OrderLogisticsConvert;
|
||||
import cn.iocoder.mall.order.dao.OrderItemMapper;
|
||||
import cn.iocoder.mall.order.dao.OrderLogisticsMapper;
|
||||
import cn.iocoder.mall.order.dao.OrderMapper;
|
||||
import cn.iocoder.mall.order.dataobject.OrderDO;
|
||||
import cn.iocoder.mall.order.dataobject.OrderItemDO;
|
||||
import cn.iocoder.mall.order.dataobject.OrderLogisticsDO;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -58,15 +59,36 @@ public class OrderServiceImpl implements OrderService {
|
||||
List<OrderDO> orderDOList = orderMapper.selectPage(orderQueryDTO);
|
||||
|
||||
// 获取订单 id
|
||||
Set<Integer> orderIds = orderDOList.stream().map(orderDO -> orderDO.getId()).collect(Collectors.toSet());
|
||||
Set<Integer> orderIds = orderDOList.stream()
|
||||
.map(orderDO -> orderDO.getId())
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
Set<Integer> orderLogisticsIds = orderDOList.stream()
|
||||
.map(orderDO -> orderDO.getOrderLogisticsId())
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 获取物流信息
|
||||
List<OrderLogisticsDO> orderLogisticsDOList = orderLogisticsMapper.selectByIds(orderLogisticsIds);
|
||||
List<OrderLogisticsBO> orderLogisticsBOList
|
||||
= OrderLogisticsConvert.INSTANCE.convertOrderLogisticsBO(orderLogisticsDOList);
|
||||
Map<Integer, OrderLogisticsBO> orderLogisticsDOMap
|
||||
= orderLogisticsBOList.stream().collect(Collectors.toMap(OrderLogisticsBO::getId, obj -> obj));
|
||||
|
||||
// 获取 订单的 items
|
||||
List<OrderItemDO> orderItemDOList = orderItemMapper
|
||||
.selectByOrderIdsAndStatus(orderIds, DeletedStatusEnum.DELETED_NO.getValue());
|
||||
.selectByOrderIdsAndDeleted(orderIds, DeletedStatusEnum.DELETED_NO.getValue());
|
||||
|
||||
List<OrderItemBO> orderItemBOList = OrderItemConvert.INSTANCE.convertOrderItemDO(orderItemDOList);
|
||||
Map<Integer, List<OrderItemBO>> orderItemBOMultimap = CollectionUtil
|
||||
.buildMultimap(orderItemBOList, Integer.class, OrderItemBO.class, "orderId");
|
||||
Map<Integer, List<OrderItemBO>> orderItemBOMultimap = orderItemBOList.stream().collect(
|
||||
Collectors.toMap(
|
||||
OrderItemBO::getOrderId,
|
||||
item -> Lists.newArrayList(item),
|
||||
(oldVal, newVal) -> {
|
||||
oldVal.addAll(newVal);
|
||||
return oldVal;
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// 转换 orderDO 为 OrderBO,并设置 item
|
||||
List<OrderBO> orderPageBOList = OrderConvert.INSTANCE.convertPageBO(orderDOList);
|
||||
@@ -74,6 +96,9 @@ public class OrderServiceImpl implements OrderService {
|
||||
if (orderItemBOMultimap.containsKey(orderBO.getId())) {
|
||||
orderBO.setOrderItems(orderItemBOMultimap.get(orderBO.getId()));
|
||||
}
|
||||
if (orderLogisticsDOMap.containsKey(orderBO.getOrderLogisticsId())) {
|
||||
orderBO.setOrderLogistics(orderLogisticsDOMap.get(orderBO.getOrderLogisticsId()));
|
||||
}
|
||||
return orderBO;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
@@ -86,7 +111,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public CommonResult<cn.iocoder.mall.order.api.bo.OrderBO> createOrder(Integer userId, OrderCreateDTO orderCreateDTO) {
|
||||
public CommonResult<OrderCreateBO> createOrder(Integer userId, OrderCreateDTO orderCreateDTO) {
|
||||
List<OrderCreateItemDTO> orderItemDTOList = orderCreateDTO.getOrderItems();
|
||||
OrderLogisticsDO orderLogisticsDO = OrderLogisticsConvert.INSTANCE.convert(orderCreateDTO);
|
||||
List<OrderItemDO> orderItemDOList = OrderItemConvert.INSTANCE.convert(orderItemDTOList);
|
||||
@@ -120,7 +145,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
.setUserId(userId)
|
||||
.setOrderLogisticsId(orderLogisticsDO.getId())
|
||||
.setOrderNo(UUID.randomUUID().toString().replace("-", ""))
|
||||
.setPrice(-1) // 先设置一个默认值,金额在下面计算
|
||||
.setPayAmount(-1) // 先设置一个默认值,金额在下面计算
|
||||
.setClosingTime(null)
|
||||
.setDeliveryTime(null)
|
||||
.setPaymentTime(null)
|
||||
@@ -140,6 +165,9 @@ public class OrderServiceImpl implements OrderService {
|
||||
.setOrderId(orderDO.getId())
|
||||
.setOrderNo(orderDO.getOrderNo())
|
||||
.setPrice(goodsPrice)
|
||||
.setPayAmount(orderItemDO.getQuantity() * orderItemDO.getPrice())
|
||||
.setSkuName("夏季衣服-默认数据")
|
||||
.setSkuImage("//img.alicdn.com/tps/i4/TB1TiGwKXXXXXXRXFXXqVMCNVXX-400-400.jpg_350x350q90.jpg_.webp")
|
||||
.setPaymentTime(null)
|
||||
.setDeliveryTime(null)
|
||||
.setReceiverTime(null)
|
||||
@@ -158,16 +186,16 @@ public class OrderServiceImpl implements OrderService {
|
||||
orderMapper.updateById(
|
||||
new OrderDO()
|
||||
.setId(orderDO.getId())
|
||||
.setPrice(totalAmount)
|
||||
.setPayAmount(totalAmount)
|
||||
);
|
||||
|
||||
// TODO: 2019-03-17 Sin 需要发送 创建成果 MQ 消息
|
||||
|
||||
return CommonResult.success(
|
||||
new cn.iocoder.mall.order.api.bo.OrderBO()
|
||||
new OrderCreateBO()
|
||||
.setId(orderDO.getId())
|
||||
.setOrderNo(orderDO.getOrderNo())
|
||||
.setMoney(orderDO.getPrice())
|
||||
.setPayAmount(orderDO.getPayAmount())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -181,6 +209,19 @@ public class OrderServiceImpl implements OrderService {
|
||||
return CommonResult.success(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public CommonResult updateOrderItemPayAmount(Integer orderId, Integer orderItemId, Integer payAmount) {
|
||||
if (payAmount < 0) {
|
||||
return ServiceExceptionUtil.error(OrderErrorCodeEnum.ORDER_PAY_AMOUNT_NOT_NEGATIVE.getCode());
|
||||
}
|
||||
orderItemMapper.updateById(new OrderItemDO().setId(orderItemId).setPayAmount(payAmount));
|
||||
List<OrderItemDO> orderItemDOList = orderItemMapper.selectByOrderIdAndDeleted(orderId, DeletedStatusEnum.DELETED_NO.getValue());
|
||||
Integer orderPayAmount = orderCommon.calculatedAmount(orderItemDOList);
|
||||
orderMapper.updateById(new OrderDO().setId(orderId).setPayAmount(orderPayAmount));
|
||||
return CommonResult.success(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult deleteOrderItem(OrderItemDeletedDTO orderItemDeletedDTO) {
|
||||
Integer orderId = orderItemDeletedDTO.getOrderId();
|
||||
@@ -211,7 +252,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
orderMapper.updateById(
|
||||
new OrderDO()
|
||||
.setId(orderId)
|
||||
.setPrice(totalAmount)
|
||||
.setPayAmount(totalAmount)
|
||||
);
|
||||
return CommonResult.success(null);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="cn.iocoder.mall.order.dao.OrderItemMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, order_id, order_no, sku_id, quantity, price,
|
||||
id, order_id, order_no, sku_id, sku_name, sku_image, quantity, price, pay_amount,
|
||||
payment_time, delivery_time, receiver_time, closing_time,
|
||||
has_return_exchange, status, create_time, update_time, deleted
|
||||
</sql>
|
||||
@@ -13,7 +13,7 @@
|
||||
-->
|
||||
<insert id="insert" parameterType="OrderItemDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO `order_item` (
|
||||
order_id, order_no, sku_id, quantity, price,
|
||||
order_id, order_no, sku_id, sku_name, sku_image, quantity, price, pay_amount,
|
||||
payment_time, delivery_time, receiver_time, closing_time,
|
||||
has_return_exchange, status, create_time, update_time, deleted
|
||||
) VALUES (
|
||||
@@ -38,13 +38,22 @@
|
||||
<if test="skuId != null">
|
||||
, sku_id = #{skuId}
|
||||
</if>
|
||||
<if test="skuName != null">
|
||||
, sku_name = #{skuName}
|
||||
</if>
|
||||
<if test="skuImage != null">
|
||||
, sku_image = #{skuImage}
|
||||
</if>
|
||||
<if test="quantity != null">
|
||||
, quantity = #{quantity}
|
||||
</if>
|
||||
<if test="price != null">
|
||||
, price = #{price}
|
||||
</if>
|
||||
-- time
|
||||
<if test="payAmount != null">
|
||||
, pay_amount = #{payAmount}
|
||||
</if>
|
||||
|
||||
<if test="paymentTime != null">
|
||||
, payment_time = #{paymentTime}
|
||||
</if>
|
||||
@@ -57,7 +66,7 @@
|
||||
<if test="closingTime != null">
|
||||
, closing_time = #{closingTime}
|
||||
</if>
|
||||
-- other
|
||||
|
||||
<if test="hasReturnExchange != null">
|
||||
, has_return_exchange = #{hasReturnExchange}
|
||||
</if>
|
||||
@@ -114,12 +123,14 @@
|
||||
<!--
|
||||
查询 - 根据 orderIds 和 status
|
||||
-->
|
||||
<select id="selectByOrderIdsAndStatus" resultType="cn.iocoder.mall.order.dataobject.OrderItemDO">
|
||||
SELECT * FROM `order_item`
|
||||
WHERE `status` = #{status}
|
||||
<select id="selectByOrderIdsAndDeleted" resultType="cn.iocoder.mall.order.dataobject.OrderItemDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_item`
|
||||
WHERE `deleted` = #{deleted}
|
||||
AND `order_id`
|
||||
IN
|
||||
<foreach collection="orderIds" index="orderId" open="(" close=")" separator=",">
|
||||
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="cn.iocoder.mall.order.dao.OrderLogisticsMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, area_no, `name`, mobile, address, logistics_no
|
||||
id, area_no, `name`, mobile, address, logistics_no, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
@@ -49,4 +49,18 @@
|
||||
<include refid="updateFieldSql" />
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!--
|
||||
查询 - 根据 orderId
|
||||
-->
|
||||
<select id="selectByIds" resultType="cn.iocoder.mall.order.dataobject.OrderLogisticsDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_logistics`
|
||||
WHERE `id`
|
||||
IN
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="cn.iocoder.mall.order.dao.OrderMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, user_id, order_logistics_id, order_no, price, payment_time,
|
||||
id, user_id, order_logistics_id, order_no, pay_amount, payment_time,
|
||||
delivery_time, receiver_time, closing_time, has_return_exchange,
|
||||
status, remark, create_time, update_time, `deleted`
|
||||
</sql>
|
||||
@@ -36,8 +36,8 @@
|
||||
<if test="orderNo != null">
|
||||
, order_no = #{orderNo}
|
||||
</if>
|
||||
<if test="price != null">
|
||||
, price = #{price}
|
||||
<if test="payAmount != null">
|
||||
, pay_amount = #{payAmount}
|
||||
</if>
|
||||
-- time
|
||||
<if test="paymentTime != null">
|
||||
|
||||
@@ -3,12 +3,11 @@ package cn.iocoder.mall.order.service;
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.order.OrderApplicationTest;
|
||||
import cn.iocoder.mall.order.api.OrderService;
|
||||
import cn.iocoder.mall.order.api.bo.OrderBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCreateBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCreateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCreateItemDTO;
|
||||
import cn.iocoder.mall.order.dao.OrderMapper;
|
||||
import cn.iocoder.mall.order.dataobject.OrderDO;
|
||||
import org.checkerframework.checker.units.qual.A;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -44,7 +43,7 @@ public class OrderServiceImplTest {
|
||||
.setSkuId(1)
|
||||
.setQuantity(1);
|
||||
|
||||
CommonResult<OrderBO> result = orderService.createOrder(
|
||||
CommonResult<OrderCreateBO> result = orderService.createOrder(
|
||||
userId,
|
||||
new OrderCreateDTO()
|
||||
.setRemark("")
|
||||
|
||||
Reference in New Issue
Block a user