- 清理被错误提交的 target
parent
1749ccbe41
commit
407aa90600
|
@ -1,6 +0,0 @@
|
|||
swagger:
|
||||
enable: true
|
||||
title: 订单子系统
|
||||
description: 订单子系统
|
||||
version: 1.0.0
|
||||
base-package: cn.iocoder.mall.pay.application.controller
|
|
@ -1,28 +0,0 @@
|
|||
spring:
|
||||
application:
|
||||
name: order-application
|
||||
cloud:
|
||||
sentinel:
|
||||
transport:
|
||||
port: 8719
|
||||
dashboard: localhost:12088
|
||||
metric:
|
||||
charset: UTF-8
|
||||
eager: false
|
||||
|
||||
# server
|
||||
server:
|
||||
port: 18088
|
||||
servlet:
|
||||
context-path: /order-api/
|
||||
|
||||
swagger:
|
||||
enable: false
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,env,metrics,prometheus
|
||||
metrics:
|
||||
enabled: true
|
|
@ -1,270 +0,0 @@
|
|||
package cn.iocoder.mall.order.application.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.CalcOrderPriceBO;
|
||||
import cn.iocoder.mall.order.api.bo.CalcOrderPriceBO.Item;
|
||||
import cn.iocoder.mall.order.api.bo.CalcOrderPriceBO.ItemGroup;
|
||||
import cn.iocoder.mall.order.api.bo.CalcSkuPriceBO;
|
||||
import cn.iocoder.mall.order.application.vo.UsersCalcSkuPriceVO;
|
||||
import cn.iocoder.mall.order.application.vo.UsersCartDetailVO;
|
||||
import cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO;
|
||||
import cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.Fee;
|
||||
import cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.Sku;
|
||||
import cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.Spu;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrAndValuePairBO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:47:18+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class CartConvertImpl implements CartConvert {
|
||||
|
||||
@Override
|
||||
public UsersOrderConfirmCreateVO convert(CalcOrderPriceBO calcOrderPriceBO) {
|
||||
if ( calcOrderPriceBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersOrderConfirmCreateVO usersOrderConfirmCreateVO = new UsersOrderConfirmCreateVO();
|
||||
|
||||
usersOrderConfirmCreateVO.setItemGroups( itemGroupListToItemGroupList( calcOrderPriceBO.getItemGroups() ) );
|
||||
usersOrderConfirmCreateVO.setFee( feeToFee( calcOrderPriceBO.getFee() ) );
|
||||
usersOrderConfirmCreateVO.setCouponCardDiscountTotal( calcOrderPriceBO.getCouponCardDiscountTotal() );
|
||||
|
||||
return usersOrderConfirmCreateVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsersCartDetailVO convert2(CalcOrderPriceBO calcOrderPriceBO) {
|
||||
if ( calcOrderPriceBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersCartDetailVO usersCartDetailVO = new UsersCartDetailVO();
|
||||
|
||||
usersCartDetailVO.setItemGroups( itemGroupListToItemGroupList1( calcOrderPriceBO.getItemGroups() ) );
|
||||
usersCartDetailVO.setFee( feeToFee1( calcOrderPriceBO.getFee() ) );
|
||||
|
||||
return usersCartDetailVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UsersCalcSkuPriceVO convert2(CalcSkuPriceBO calcSkuPriceBO) {
|
||||
if ( calcSkuPriceBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UsersCalcSkuPriceVO usersCalcSkuPriceVO = new UsersCalcSkuPriceVO();
|
||||
|
||||
usersCalcSkuPriceVO.setFullPrivilege( calcSkuPriceBO.getFullPrivilege() );
|
||||
usersCalcSkuPriceVO.setTimeLimitedDiscount( calcSkuPriceBO.getTimeLimitedDiscount() );
|
||||
usersCalcSkuPriceVO.setOriginalPrice( calcSkuPriceBO.getOriginalPrice() );
|
||||
usersCalcSkuPriceVO.setBuyPrice( calcSkuPriceBO.getBuyPrice() );
|
||||
|
||||
return usersCalcSkuPriceVO;
|
||||
}
|
||||
|
||||
protected Spu spuToSpu(cn.iocoder.mall.product.api.bo.ProductSkuDetailBO.Spu spu) {
|
||||
if ( spu == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Spu spu1 = new Spu();
|
||||
|
||||
spu1.setId( spu.getId() );
|
||||
spu1.setName( spu.getName() );
|
||||
spu1.setCid( spu.getCid() );
|
||||
List<String> list = spu.getPicUrls();
|
||||
if ( list != null ) {
|
||||
spu1.setPicUrls( new ArrayList<String>( list ) );
|
||||
}
|
||||
|
||||
return spu1;
|
||||
}
|
||||
|
||||
protected Sku itemToSku(Item item) {
|
||||
if ( item == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Sku sku = new Sku();
|
||||
|
||||
sku.setId( item.getId() );
|
||||
sku.setSpu( spuToSpu( item.getSpu() ) );
|
||||
sku.setPicURL( item.getPicURL() );
|
||||
List<ProductAttrAndValuePairBO> list = item.getAttrs();
|
||||
if ( list != null ) {
|
||||
sku.setAttrs( new ArrayList<ProductAttrAndValuePairBO>( list ) );
|
||||
}
|
||||
sku.setPrice( item.getPrice() );
|
||||
sku.setQuantity( item.getQuantity() );
|
||||
sku.setBuyQuantity( item.getBuyQuantity() );
|
||||
sku.setOriginPrice( item.getOriginPrice() );
|
||||
sku.setBuyPrice( item.getBuyPrice() );
|
||||
sku.setPresentPrice( item.getPresentPrice() );
|
||||
sku.setBuyTotal( item.getBuyTotal() );
|
||||
sku.setDiscountTotal( item.getDiscountTotal() );
|
||||
sku.setPresentTotal( item.getPresentTotal() );
|
||||
|
||||
return sku;
|
||||
}
|
||||
|
||||
protected List<Sku> itemListToSkuList(List<Item> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Sku> list1 = new ArrayList<Sku>( list.size() );
|
||||
for ( Item item : list ) {
|
||||
list1.add( itemToSku( item ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.ItemGroup itemGroupToItemGroup(ItemGroup itemGroup) {
|
||||
if ( itemGroup == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.ItemGroup itemGroup1 = new cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.ItemGroup();
|
||||
|
||||
itemGroup1.setActivity( itemGroup.getActivity() );
|
||||
itemGroup1.setItems( itemListToSkuList( itemGroup.getItems() ) );
|
||||
|
||||
return itemGroup1;
|
||||
}
|
||||
|
||||
protected List<cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.ItemGroup> itemGroupListToItemGroupList(List<ItemGroup> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.ItemGroup> list1 = new ArrayList<cn.iocoder.mall.order.application.vo.UsersOrderConfirmCreateVO.ItemGroup>( list.size() );
|
||||
for ( ItemGroup itemGroup : list ) {
|
||||
list1.add( itemGroupToItemGroup( itemGroup ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected Fee feeToFee(cn.iocoder.mall.order.api.bo.CalcOrderPriceBO.Fee fee) {
|
||||
if ( fee == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Fee fee1 = new Fee();
|
||||
|
||||
fee1.setBuyTotal( fee.getBuyTotal() );
|
||||
fee1.setDiscountTotal( fee.getDiscountTotal() );
|
||||
fee1.setPostageTotal( fee.getPostageTotal() );
|
||||
fee1.setPresentTotal( fee.getPresentTotal() );
|
||||
|
||||
return fee1;
|
||||
}
|
||||
|
||||
protected cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Spu spuToSpu1(cn.iocoder.mall.product.api.bo.ProductSkuDetailBO.Spu spu) {
|
||||
if ( spu == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Spu spu1 = new cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Spu();
|
||||
|
||||
spu1.setId( spu.getId() );
|
||||
spu1.setName( spu.getName() );
|
||||
spu1.setCid( spu.getCid() );
|
||||
List<String> list = spu.getPicUrls();
|
||||
if ( list != null ) {
|
||||
spu1.setPicUrls( new ArrayList<String>( list ) );
|
||||
}
|
||||
|
||||
return spu1;
|
||||
}
|
||||
|
||||
protected cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Sku itemToSku1(Item item) {
|
||||
if ( item == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Sku sku = new cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Sku();
|
||||
|
||||
sku.setId( item.getId() );
|
||||
sku.setSpu( spuToSpu1( item.getSpu() ) );
|
||||
sku.setPicURL( item.getPicURL() );
|
||||
List<ProductAttrAndValuePairBO> list = item.getAttrs();
|
||||
if ( list != null ) {
|
||||
sku.setAttrs( new ArrayList<ProductAttrAndValuePairBO>( list ) );
|
||||
}
|
||||
sku.setPrice( item.getPrice() );
|
||||
sku.setQuantity( item.getQuantity() );
|
||||
sku.setBuyQuantity( item.getBuyQuantity() );
|
||||
sku.setSelected( item.getSelected() );
|
||||
sku.setActivity( item.getActivity() );
|
||||
sku.setOriginPrice( item.getOriginPrice() );
|
||||
sku.setBuyPrice( item.getBuyPrice() );
|
||||
sku.setPresentPrice( item.getPresentPrice() );
|
||||
sku.setBuyTotal( item.getBuyTotal() );
|
||||
sku.setDiscountTotal( item.getDiscountTotal() );
|
||||
sku.setPresentTotal( item.getPresentTotal() );
|
||||
|
||||
return sku;
|
||||
}
|
||||
|
||||
protected List<cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Sku> itemListToSkuList1(List<Item> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Sku> list1 = new ArrayList<cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Sku>( list.size() );
|
||||
for ( Item item : list ) {
|
||||
list1.add( itemToSku1( item ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected cn.iocoder.mall.order.application.vo.UsersCartDetailVO.ItemGroup itemGroupToItemGroup1(ItemGroup itemGroup) {
|
||||
if ( itemGroup == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.order.application.vo.UsersCartDetailVO.ItemGroup itemGroup1 = new cn.iocoder.mall.order.application.vo.UsersCartDetailVO.ItemGroup();
|
||||
|
||||
itemGroup1.setActivity( itemGroup.getActivity() );
|
||||
itemGroup1.setActivityDiscountTotal( itemGroup.getActivityDiscountTotal() );
|
||||
itemGroup1.setItems( itemListToSkuList1( itemGroup.getItems() ) );
|
||||
|
||||
return itemGroup1;
|
||||
}
|
||||
|
||||
protected List<cn.iocoder.mall.order.application.vo.UsersCartDetailVO.ItemGroup> itemGroupListToItemGroupList1(List<ItemGroup> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<cn.iocoder.mall.order.application.vo.UsersCartDetailVO.ItemGroup> list1 = new ArrayList<cn.iocoder.mall.order.application.vo.UsersCartDetailVO.ItemGroup>( list.size() );
|
||||
for ( ItemGroup itemGroup : list ) {
|
||||
list1.add( itemGroupToItemGroup1( itemGroup ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Fee feeToFee1(cn.iocoder.mall.order.api.bo.CalcOrderPriceBO.Fee fee) {
|
||||
if ( fee == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Fee fee1 = new cn.iocoder.mall.order.application.vo.UsersCartDetailVO.Fee();
|
||||
|
||||
fee1.setBuyTotal( fee.getBuyTotal() );
|
||||
fee1.setDiscountTotal( fee.getDiscountTotal() );
|
||||
fee1.setPostageTotal( fee.getPostageTotal() );
|
||||
fee1.setPresentTotal( fee.getPresentTotal() );
|
||||
|
||||
return fee1;
|
||||
}
|
||||
}
|
|
@ -1,149 +0,0 @@
|
|||
package cn.iocoder.mall.order.application.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.CartItemBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCreateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCreateDTO.OrderItem;
|
||||
import cn.iocoder.mall.order.api.dto.OrderItemUpdateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderLogisticsUpdateDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderQueryDTO;
|
||||
import cn.iocoder.mall.order.application.po.admin.OrderItemUpdatePO;
|
||||
import cn.iocoder.mall.order.application.po.admin.OrderLogisticsPO;
|
||||
import cn.iocoder.mall.order.application.po.admin.OrderPageQueryPO;
|
||||
import cn.iocoder.mall.order.application.po.user.OrderCreatePO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:47:18+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderConvertAPPImpl implements OrderConvertAPP {
|
||||
|
||||
@Override
|
||||
public OrderQueryDTO convert(OrderPageQueryPO orderPageQueryVO) {
|
||||
if ( orderPageQueryVO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderQueryDTO orderQueryDTO = new OrderQueryDTO();
|
||||
|
||||
orderQueryDTO.setId( orderPageQueryVO.getId() );
|
||||
orderQueryDTO.setOrderNo( orderPageQueryVO.getOrderNo() );
|
||||
orderQueryDTO.setUserId( orderPageQueryVO.getUserId() );
|
||||
orderQueryDTO.setStartPaymentTime( orderPageQueryVO.getStartPaymentTime() );
|
||||
orderQueryDTO.setEndPaymentTime( orderPageQueryVO.getEndPaymentTime() );
|
||||
orderQueryDTO.setStartCreateTime( orderPageQueryVO.getStartCreateTime() );
|
||||
orderQueryDTO.setEndCreateTime( orderPageQueryVO.getEndCreateTime() );
|
||||
orderQueryDTO.setDeleted( orderPageQueryVO.getDeleted() );
|
||||
orderQueryDTO.setStatus( orderPageQueryVO.getStatus() );
|
||||
orderQueryDTO.setPageNo( orderPageQueryVO.getPageNo() );
|
||||
orderQueryDTO.setPageSize( orderPageQueryVO.getPageSize() );
|
||||
|
||||
return orderQueryDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderLogisticsUpdateDTO convert(OrderLogisticsPO orderLogisticsVO) {
|
||||
if ( orderLogisticsVO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderLogisticsUpdateDTO orderLogisticsUpdateDTO = new OrderLogisticsUpdateDTO();
|
||||
|
||||
orderLogisticsUpdateDTO.setId( orderLogisticsVO.getId() );
|
||||
orderLogisticsUpdateDTO.setAreaNo( orderLogisticsVO.getAreaNo() );
|
||||
orderLogisticsUpdateDTO.setName( orderLogisticsVO.getName() );
|
||||
orderLogisticsUpdateDTO.setMobile( orderLogisticsVO.getMobile() );
|
||||
orderLogisticsUpdateDTO.setAddress( orderLogisticsVO.getAddress() );
|
||||
orderLogisticsUpdateDTO.setLogisticsNo( orderLogisticsVO.getLogisticsNo() );
|
||||
|
||||
return orderLogisticsUpdateDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderItemUpdateDTO convert(OrderItemUpdatePO orderItemUpdateVO) {
|
||||
if ( orderItemUpdateVO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderItemUpdateDTO orderItemUpdateDTO = new OrderItemUpdateDTO();
|
||||
|
||||
orderItemUpdateDTO.setId( orderItemUpdateVO.getId() );
|
||||
orderItemUpdateDTO.setSkuId( orderItemUpdateVO.getSkuId() );
|
||||
orderItemUpdateDTO.setQuantity( orderItemUpdateVO.getQuantity() );
|
||||
orderItemUpdateDTO.setPrice( orderItemUpdateVO.getPrice() );
|
||||
|
||||
return orderItemUpdateDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderCreateDTO convert(OrderCreatePO orderCreatePO) {
|
||||
if ( orderCreatePO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderCreateDTO orderCreateDTO = new OrderCreateDTO();
|
||||
|
||||
orderCreateDTO.setUserAddressId( orderCreatePO.getUserAddressId() );
|
||||
orderCreateDTO.setCouponCardId( orderCreatePO.getCouponCardId() );
|
||||
orderCreateDTO.setRemark( orderCreatePO.getRemark() );
|
||||
orderCreateDTO.setOrderItems( orderItemListToOrderItemList( orderCreatePO.getOrderItems() ) );
|
||||
|
||||
return orderCreateDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderItem> convert(List<CartItemBO> cartItems) {
|
||||
if ( cartItems == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderItem> list = new ArrayList<OrderItem>( cartItems.size() );
|
||||
for ( CartItemBO cartItemBO : cartItems ) {
|
||||
list.add( cartItemBOToOrderItem( cartItemBO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected OrderItem orderItemToOrderItem(cn.iocoder.mall.order.application.po.user.OrderCreatePO.OrderItem orderItem) {
|
||||
if ( orderItem == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderItem orderItem1 = new OrderItem();
|
||||
|
||||
orderItem1.setSkuId( orderItem.getSkuId() );
|
||||
orderItem1.setQuantity( orderItem.getQuantity() );
|
||||
|
||||
return orderItem1;
|
||||
}
|
||||
|
||||
protected List<OrderItem> orderItemListToOrderItemList(List<cn.iocoder.mall.order.application.po.user.OrderCreatePO.OrderItem> list) {
|
||||
if ( list == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderItem> list1 = new ArrayList<OrderItem>( list.size() );
|
||||
for ( cn.iocoder.mall.order.application.po.user.OrderCreatePO.OrderItem orderItem : list ) {
|
||||
list1.add( orderItemToOrderItem( orderItem ) );
|
||||
}
|
||||
|
||||
return list1;
|
||||
}
|
||||
|
||||
protected OrderItem cartItemBOToOrderItem(CartItemBO cartItemBO) {
|
||||
if ( cartItemBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderItem orderItem = new OrderItem();
|
||||
|
||||
orderItem.setSkuId( cartItemBO.getSkuId() );
|
||||
orderItem.setQuantity( cartItemBO.getQuantity() );
|
||||
|
||||
return orderItem;
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package cn.iocoder.mall.order.application.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.dto.OrderDeliveryDTO;
|
||||
import cn.iocoder.mall.order.application.po.admin.OrderDeliverPO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:47:18+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderDeliveryConvertImpl implements OrderDeliveryConvert {
|
||||
|
||||
@Override
|
||||
public OrderDeliveryDTO convert(OrderDeliverPO orderDeliverPO) {
|
||||
if ( orderDeliverPO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderDeliveryDTO orderDeliveryDTO = new OrderDeliveryDTO();
|
||||
|
||||
orderDeliveryDTO.setOrderId( orderDeliverPO.getOrderId() );
|
||||
orderDeliveryDTO.setLogistics( orderDeliverPO.getLogistics() );
|
||||
orderDeliveryDTO.setLogisticsNo( orderDeliverPO.getLogisticsNo() );
|
||||
List<Integer> list = orderDeliverPO.getOrderItemIds();
|
||||
if ( list != null ) {
|
||||
orderDeliveryDTO.setOrderItemIds( new ArrayList<Integer>( list ) );
|
||||
}
|
||||
|
||||
return orderDeliveryDTO;
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package cn.iocoder.mall.order.application.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.dto.OrderReturnApplyDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderReturnQueryDTO;
|
||||
import cn.iocoder.mall.order.application.po.admin.OrderReturnQueryPO;
|
||||
import cn.iocoder.mall.order.application.po.user.OrderReturnApplyPO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:47:18+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderReturnConvertImpl implements OrderReturnConvert {
|
||||
|
||||
@Override
|
||||
public OrderReturnApplyDTO convert(OrderReturnApplyPO orderReturnApplyPO) {
|
||||
if ( orderReturnApplyPO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderReturnApplyDTO orderReturnApplyDTO = new OrderReturnApplyDTO();
|
||||
|
||||
orderReturnApplyDTO.setOrderId( orderReturnApplyPO.getOrderId() );
|
||||
orderReturnApplyDTO.setReason( orderReturnApplyPO.getReason() );
|
||||
orderReturnApplyDTO.setDescribe( orderReturnApplyPO.getDescribe() );
|
||||
orderReturnApplyDTO.setReturnType( orderReturnApplyPO.getReturnType() );
|
||||
|
||||
return orderReturnApplyDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderReturnQueryDTO convert(OrderReturnQueryPO orderReturnQueryPO) {
|
||||
if ( orderReturnQueryPO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderReturnQueryDTO orderReturnQueryDTO = new OrderReturnQueryDTO();
|
||||
|
||||
orderReturnQueryDTO.setOrderId( orderReturnQueryPO.getOrderId() );
|
||||
orderReturnQueryDTO.setOrderNo( orderReturnQueryPO.getOrderNo() );
|
||||
orderReturnQueryDTO.setServiceNumber( orderReturnQueryPO.getServiceNumber() );
|
||||
orderReturnQueryDTO.setStartCreateTime( orderReturnQueryPO.getStartCreateTime() );
|
||||
orderReturnQueryDTO.setEndCreateTime( orderReturnQueryPO.getEndCreateTime() );
|
||||
orderReturnQueryDTO.setStatus( orderReturnQueryPO.getStatus() );
|
||||
orderReturnQueryDTO.setIndex( orderReturnQueryPO.getIndex() );
|
||||
orderReturnQueryDTO.setPageSize( orderReturnQueryPO.getPageSize() );
|
||||
|
||||
return orderReturnQueryDTO;
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://192.168.88.14:3306/mall_order?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: ${MALL_MYSQL_PASSWORD}
|
|
@ -1,76 +0,0 @@
|
|||
spring:
|
||||
# datasource
|
||||
datasource:
|
||||
url: jdbc:mysql://180.167.213.26:13306/mall_order?useSSL=false&useUnicode=true&characterEncoding=UTF-8
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: ${MALL_MYSQL_PASSWORD}
|
||||
|
||||
# mybatis
|
||||
#mybatis:
|
||||
# config-location: classpath:mybatis-config.xml
|
||||
# mapper-locations: classpath:mapper/*.xml
|
||||
# type-aliases-package: cn.iocoder.mall.order.biz.dataobject
|
||||
#
|
||||
# mybatis-plus
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: auto
|
||||
mapper-locations: classpath*:mapper/*.xml
|
||||
type-aliases-package: cn.iocoder.mall.order.biz.dataobject
|
||||
|
||||
# dubbo
|
||||
dubbo:
|
||||
application:
|
||||
name: order-service
|
||||
registry:
|
||||
address: zookeeper://127.0.0.1:2181
|
||||
protocol:
|
||||
port: -1
|
||||
name: dubbo
|
||||
scan:
|
||||
base-packages: cn.iocoder.mall.order.biz.service
|
||||
provider:
|
||||
filter: -exception
|
||||
CartService:
|
||||
version: 1.0.0
|
||||
OrderService:
|
||||
version: 1.0.0
|
||||
OrderReturnService:
|
||||
version: 1.0.0
|
||||
OrderLogisticsService:
|
||||
version: 1.0.0
|
||||
<<<<<<< Updated upstream
|
||||
OrderCommentService:
|
||||
version: 1.0.0
|
||||
=======
|
||||
>>>>>>> Stashed changes
|
||||
consumer:
|
||||
timeout: 120000 # 设置长一点,方便调试代码
|
||||
ProductSpuService:
|
||||
version: 1.0.0
|
||||
PromotionActivityService:
|
||||
version: 1.0.0
|
||||
CouponService:
|
||||
version: 1.0.0
|
||||
PayRefundService:
|
||||
version: 1.0.0
|
||||
UserAddressService:
|
||||
version: 1.0.0
|
||||
PayTransactionService:
|
||||
version: 1.0.0
|
||||
DataDictService:
|
||||
version: 1.0.0
|
||||
|
||||
# logging
|
||||
logging:
|
||||
level:
|
||||
# dao 开启 debug 模式 mybatis 输入 sql
|
||||
cn.iocoder.mall.order.biz.dao: debug
|
||||
|
||||
# seata
|
||||
seata:
|
||||
tx-service-group: my_test_tx_group
|
|
@ -1,69 +0,0 @@
|
|||
transport {
|
||||
# tcp udt unix-domain-socket
|
||||
type = "TCP"
|
||||
#NIO NATIVE
|
||||
server = "NIO"
|
||||
#enable heartbeat
|
||||
heartbeat = true
|
||||
#thread factory for netty
|
||||
thread-factory {
|
||||
boss-thread-prefix = "NettyBoss"
|
||||
worker-thread-prefix = "NettyServerNIOWorker"
|
||||
server-executor-thread-prefix = "NettyServerBizHandler"
|
||||
share-boss-worker = false
|
||||
client-selector-thread-prefix = "NettyClientSelector"
|
||||
client-selector-thread-size = 1
|
||||
client-worker-thread-prefix = "NettyClientWorkerThread"
|
||||
# netty boss thread size,will not be used for UDT
|
||||
boss-thread-size = 1
|
||||
#auto default pin or 8
|
||||
worker-thread-size = 8
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
#vgroup->rgroup
|
||||
vgroup_mapping.my_test_tx_group = "default"
|
||||
#only support single node
|
||||
default.grouplist = "180.167.213.26:8091"
|
||||
#degrade current not support
|
||||
enableDegrade = false
|
||||
#disable
|
||||
disable = false
|
||||
}
|
||||
|
||||
client {
|
||||
async.commit.buffer.limit = 10000
|
||||
lock {
|
||||
retry.internal = 10
|
||||
retry.times = 30
|
||||
}
|
||||
}
|
||||
## transaction log store
|
||||
store {
|
||||
## store mode: file、db
|
||||
mode = "file"
|
||||
|
||||
## file store
|
||||
file {
|
||||
dir = "file_store/data"
|
||||
|
||||
# branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions
|
||||
max-branch-session-size = 16384
|
||||
# globe session size , if exceeded throws exceptions
|
||||
max-global-session-size = 512
|
||||
# file buffer size , if exceeded allocate new buffer
|
||||
file-write-buffer-cache-size = 16384
|
||||
# when recover batch read size
|
||||
session.reload.read_size = 100
|
||||
}
|
||||
|
||||
## database store
|
||||
db {
|
||||
driver_class = ""
|
||||
url = ""
|
||||
user = ""
|
||||
password = ""
|
||||
}
|
||||
}
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.CartMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, status, delete_time, selected, user_id,
|
||||
spu_id, sku_id, quantity, order_id, order_create_time,
|
||||
create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectById" parameterType="Integer" resultType="CartItemDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM cart_item
|
||||
WHERE id = #{id}
|
||||
-- AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByIds" resultType="CartItemDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM cart_item
|
||||
WHERE id IN
|
||||
<foreach item="id" collection="ids" separator="," open="(" close=")" index="">
|
||||
#{id}
|
||||
</foreach>
|
||||
-- AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectByUserIdAndSkuIdAndStatus" resultType="CartItemDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM cart_item
|
||||
WHERE user_id = #{userId}
|
||||
AND sku_id = #{skuId}
|
||||
AND status = #{status}
|
||||
-- AND deleted = 0
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="selectByUserIdAndStatusAndSelected" resultType="CartItemDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM cart_item
|
||||
WHERE user_id = #{userId}
|
||||
AND status = #{status}
|
||||
<if test="selected != null">
|
||||
AND selected = #{selected}
|
||||
</if>
|
||||
-- AND deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="selectQuantitySumByUserIdAndStatus" resultType="Integer">
|
||||
SELECT
|
||||
SUM(quantity)
|
||||
FROM cart_item
|
||||
WHERE user_id = #{userId}
|
||||
AND status = #{status}
|
||||
-- AND deleted = 0
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="CartItemDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO cart_item (
|
||||
status, delete_time, selected, user_id,
|
||||
spu_id, sku_id, quantity, order_id, order_create_time,
|
||||
create_time
|
||||
) VALUES (
|
||||
#{status}, #{deleteTime}, #{selected}, #{userId},
|
||||
#{spuId}, #{skuId}, #{quantity}, #{orderId}, #{orderCreateTime},
|
||||
#{createTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="CartItemDO">
|
||||
UPDATE cart_item
|
||||
<set>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
<if test="deleteTime != null">
|
||||
delete_time = #{deleteTime},
|
||||
</if>
|
||||
<if test="selected != null">
|
||||
selected = #{selected},
|
||||
</if>
|
||||
<if test="quantity != null">
|
||||
quantity = #{quantity},
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
order_id = #{orderId},
|
||||
</if>
|
||||
<if test="orderCreateTime != null">
|
||||
order_create_time = #{orderCreateTime},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price = #{price},
|
||||
</if>
|
||||
<if test="quantity != null">
|
||||
quantity = #{quantity},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateQuantity" parameterType="CartItemDO">
|
||||
UPDATE cart_item
|
||||
SET quantity = quantity + #{quantityIncr}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateListByUserIdAndSkuId">
|
||||
UPDATE cart_item
|
||||
<set>
|
||||
<if test="selected != null">
|
||||
selected = #{selected},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status},
|
||||
</if>
|
||||
</set>
|
||||
WHERE user_id = #{userId}
|
||||
AND sku_id IN
|
||||
<foreach item="skuId" collection="skuIds" separator="," open="(" close=")" index="">
|
||||
#{skuId}
|
||||
</foreach>
|
||||
-- AND deleted = 0
|
||||
</update>
|
||||
|
||||
</mapper>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderCancelMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, order_id, order_no, reason, other_reason,
|
||||
create_time, update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入数据
|
||||
-->
|
||||
<insert id="insert" parameterType="OrderCancelDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO `order_cancel` (
|
||||
order_id, order_no, reason, other_reason,
|
||||
create_time, update_time
|
||||
) VALUES (
|
||||
#{orderId}, #{orderNo}, #{reason}, #{otherReason},
|
||||
#{createTime}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
|
@ -1,52 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderCommentMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id,order_id,order_no,product_spu_id,product_spu_name,product_sku_id,product_sku_attrs,product_sku_price,product_sku_pic_url,
|
||||
user_id,user_avatar,user_nick_name,star,product_description_star,logistics_star,merchant_star,replay_count,like_count,comment_content,
|
||||
comment_pics,create_time,update_time
|
||||
</sql>
|
||||
|
||||
<!--插入-->
|
||||
<insert id="insert" parameterType="OrderCommentDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO order_comment(order_id,order_no,product_spu_id,product_spu_name,product_sku_id,
|
||||
product_sku_attrs,product_sku_price,product_sku_pic_url,user_id,user_avatar,user_nick_name,star,
|
||||
product_description_star,logistics_star,merchant_star,comment_content,comment_pics,create_time,update_time)
|
||||
VALUES (#{orderId},#{orderNo},#{productSpuId},#{productSpuName},#{productSkuId},#{productSkuAttrs},
|
||||
#{productSkuPrice},#{productSkuPicUrl},#{userId},#{userAvatar},#{userNickName},#{star},
|
||||
#{productDescriptionStar},#{logisticsStar},#{merchantStar},#{commentContent},#{commentPics},#{createTime}, #{updateTime});
|
||||
</insert>
|
||||
|
||||
<!--根据 sku id 获取评论总数-->
|
||||
<select id="selectCommentTotalCountByProductSkuId" parameterType="Integer" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT (*)
|
||||
FROM order_comment
|
||||
WHERE
|
||||
product_sku_id = #{productSkuId}
|
||||
</select>
|
||||
|
||||
<!--分页获取评论分页-->
|
||||
<select id="selectCommentPage" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment
|
||||
WHERE
|
||||
product_sku_id = #{productSkuId}
|
||||
ORDER BY create_time DESC
|
||||
LIMIT ${pageNo * pageSize}, ${pageSize}
|
||||
</select>
|
||||
|
||||
<!--根据评论 id 获取用户详情-->
|
||||
<select id="selectCommentInfoByCommentId" parameterType="Integer" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment
|
||||
WHERE
|
||||
id = #{id}
|
||||
ORDER BY create_time DESC
|
||||
LIMIT ${pageNo * pageSize}, ${pageSize}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,67 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderCommentReplayMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id,comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,
|
||||
reply_user_id,reply_user_nick_name,reply_user_avatar,user_type,reply_like_count,create_time,update_time
|
||||
</sql>
|
||||
|
||||
<!--插入-->
|
||||
<insert id="insert" parameterType="OrderCommentReplyDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
<<<<<<< Updated upstream
|
||||
INSERT INTO order_comment_replay(comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,reply_user_id
|
||||
=======
|
||||
INSERT INTO `order_comment_replay`(comment_id,reply_type,parent_id,parent_user_id,parent_user_nick_name,parent_user_avatar,reply_content,reply_user_id
|
||||
>>>>>>> Stashed changes
|
||||
reply_user_nick_name,reply_user_avatar,user_type,create_time,update_time)
|
||||
VALUES (#{commentId},#{replyType},#{parentId},#{parentUserId},#{parentUserNickName},#{parentUserAvatar},#{replyContent},#{replyUserId},
|
||||
#{replyUserNickName},#{replyUserAvatar},#{userType},#{createTime},#{updateTime})
|
||||
</insert>
|
||||
|
||||
<!--根据评论 id 和用户类型获取商家回复列表-->
|
||||
<select id="selectCommentMerchantReplyByCommentId" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment_replay
|
||||
WHERE
|
||||
comment_id = #{commentId}
|
||||
AND
|
||||
user_type = #{userType}
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!--根据评论 id 和用户类型获取评论总数-->
|
||||
<select id="selectCommentReplyTotalCountByCommentId" parameterType="Integer" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT (*)
|
||||
FROM order_comment_replay
|
||||
WHERE
|
||||
comment_id = #{commentId}
|
||||
AND
|
||||
user_type = #{userType}
|
||||
</select>
|
||||
|
||||
<!--分页用户回复-->
|
||||
<select id="selectCommentReplyPage" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_comment_replay
|
||||
WHERE
|
||||
comment_id = #{commentId}
|
||||
AND
|
||||
user_type = #{userType}
|
||||
ORDER BY create_time DESC
|
||||
LIMIT ${pageNo * pageSize}, ${pageSize}
|
||||
</select>
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
|
||||
<!--根据评论 id 查询商家最新的评论列表-->
|
||||
<select id="selectCommentNewMerchantReplyByCommentIds" resultType="cn.iocoder.mall.order.biz.dataobject.OrderCommentReplyDO">
|
||||
|
||||
</select>
|
||||
|
||||
=======
|
||||
>>>>>>> Stashed changes
|
||||
</mapper>
|
|
@ -1,172 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderItemMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, order_id, order_no, sku_id, sku_name, sku_image, order_logistics_id,
|
||||
quantity, origin_price, buy_price, present_price, buy_total, discount_total, present_total,
|
||||
payment_time, delivery_time, receiver_time, closing_time,
|
||||
has_return_exchange, delivery_type, status,
|
||||
create_time, update_time, deleted
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入数据
|
||||
-->
|
||||
<insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO `order_item` (
|
||||
order_id, order_no, sku_id, sku_name, sku_image, order_logistics_id,
|
||||
quantity, origin_price, buy_price, present_price, buy_total, discount_total, present_total,
|
||||
payment_time, delivery_time, receiver_time, closing_time,
|
||||
has_return_exchange, delivery_type, status,
|
||||
create_time, update_time, deleted
|
||||
) VALUES
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orderId}, #{item.orderNo}, #{item.skuId}, #{item.skuName}, #{item.skuImage}, #{item.orderLogisticsId},
|
||||
#{item.quantity}, #{item.originPrice}, #{item.buyPrice}, #{item.presentPrice}, #{item.buyTotal}, #{item.discountTotal}, #{item.presentTotal},
|
||||
#{item.paymentTime}, #{item.deliveryTime}, #{item.receiverTime}, #{item.closingTime},
|
||||
#{item.hasReturnExchange}, #{item.deliveryType}, #{item.status},
|
||||
#{item.createTime}, #{item.updateTime}, #{item.deleted})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<!--
|
||||
更新 - 可更新的字段
|
||||
-->
|
||||
<sql id="updateFieldSql" >
|
||||
<set>
|
||||
<if test="orderItemDO.orderId != null">
|
||||
, order_id = #{orderItemDO.orderId}
|
||||
</if>
|
||||
<if test="orderItemDO.orderNo != null">
|
||||
, order_no = #{orderItemDO.orderNo}
|
||||
</if>
|
||||
<if test="orderItemDO.orderLogisticsId != null">
|
||||
, order_logistics_id = #{orderItemDO.orderLogisticsId}
|
||||
</if>
|
||||
<if test="orderItemDO.skuId != null">
|
||||
, sku_id = #{orderItemDO.skuId}
|
||||
</if>
|
||||
<if test="orderItemDO.skuName != null">
|
||||
, sku_name = #{orderItemDO.skuName}
|
||||
</if>
|
||||
<if test="orderItemDO.skuImage != null">
|
||||
, sku_image = #{orderItemDO.skuImage}
|
||||
</if>
|
||||
<if test="orderItemDO.quantity != null">
|
||||
, quantity = #{orderItemDO.quantity}
|
||||
</if>
|
||||
<!-- TODO 芋艿 需要改 -->
|
||||
<!-- <if test="orderItemDO.price != null">-->
|
||||
<!-- , price = #{orderItemDO.price}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="orderItemDO.payAmount != null">-->
|
||||
<!-- , pay_amount = #{orderItemDO.payAmount}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<if test="orderItemDO.paymentTime != null">
|
||||
, payment_time = #{orderItemDO.paymentTime}
|
||||
</if>
|
||||
<if test="orderItemDO.deliveryTime != null">
|
||||
, delivery_time = #{orderItemDO.deliveryTime}
|
||||
</if>
|
||||
<if test="orderItemDO.receiverTime != null">
|
||||
, receiver_time = #{orderItemDO.receiverTime}
|
||||
</if>
|
||||
<if test="orderItemDO.closingTime != null">
|
||||
, closing_time = #{orderItemDO.closingTime}
|
||||
</if>
|
||||
|
||||
<if test="orderItemDO.hasReturnExchange != null">
|
||||
, has_return_exchange = #{orderItemDO.hasReturnExchange}
|
||||
</if>
|
||||
<if test="orderItemDO.status != null">
|
||||
, status = #{orderItemDO.status}
|
||||
</if>
|
||||
<if test="orderItemDO.deliveryType != null">
|
||||
, delivery_type = #{orderItemDO.deliveryType}
|
||||
</if>
|
||||
<if test="orderItemDO.deleted != null">
|
||||
, `deleted` = #{orderItemDO.deleted}
|
||||
</if>
|
||||
<if test="orderItemDO.createTime != null">
|
||||
, create_time = #{orderItemDO.createTime}
|
||||
</if>
|
||||
<if test="orderItemDO.updateTime != null">
|
||||
, update_time = #{orderItemDO.updateTime}
|
||||
</if>
|
||||
</set>
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
更新 - 根据 id 更新
|
||||
-->
|
||||
<update id="updateById" parameterType="OrderDO">
|
||||
UPDATE `order_item`
|
||||
<include refid="updateFieldSql" />
|
||||
WHERE id = #{orderItemDO.id}
|
||||
</update>
|
||||
|
||||
<!--
|
||||
更新 - 根据 ids 更新
|
||||
-->
|
||||
<update id="updateByIds">
|
||||
UPDATE `order_item`
|
||||
<include refid="updateFieldSql" />
|
||||
WHERE id IN
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!--
|
||||
更新 - 根据 orderId
|
||||
-->
|
||||
<update id="updateByOrderId">
|
||||
UPDATE `order_item`
|
||||
<include refid="updateFieldSql" />
|
||||
WHERE order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<!--
|
||||
获取 - 根据 ids 查询
|
||||
-->
|
||||
<select id="selectByIds" resultType="cn.iocoder.mall.order.biz.dataobject.OrderItemDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM order_item
|
||||
WHERE `id` IN
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 orderId 下的 item
|
||||
-->
|
||||
<select id="selectByDeletedAndOrderId" resultType="cn.iocoder.mall.order.biz.dataobject.OrderItemDO">
|
||||
SELECT * FROM `order_item`
|
||||
WHERE 1=1
|
||||
<if test="deleted != null">
|
||||
AND deleted = #{deleted}
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
AND order_id = #{orderId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 orderIds 和 status
|
||||
-->
|
||||
<select id="selectByDeletedAndOrderIds" resultType="cn.iocoder.mall.order.biz.dataobject.OrderItemDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_item`
|
||||
WHERE `deleted` = #{deleted}
|
||||
AND `order_id`
|
||||
IN
|
||||
<foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,76 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderLogisticsDetailMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id,
|
||||
order_logistics_id,
|
||||
logistics_time,
|
||||
logistics_information,
|
||||
create_time,
|
||||
update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入
|
||||
-->
|
||||
<insert id="insert" parameterType="CartItemDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO cart_item (order_logistics_id, logistics_time, logistics_information,
|
||||
create_time, update_time)
|
||||
VALUES (#{orderLogisticsId}, #{logisticsTime}, #{logisticsInformation},
|
||||
#{createTime}, #{updateTime})
|
||||
</insert>
|
||||
|
||||
<!--
|
||||
查询 - 根据 物流id
|
||||
-->
|
||||
<select id="selectByOrderLogisticsId"
|
||||
resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM order_logistics_detail
|
||||
WHERE order_logistics_id = #{orderLogisticsId}
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 物流ids
|
||||
-->
|
||||
<select id="selectByOrderLogisticsIds"
|
||||
resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM order_logistics_detail
|
||||
WHERE order_logistics_id IN
|
||||
<foreach collection="orderLogisticsIds" item="orderLogisticsId" separator="," open="(" close=")">
|
||||
#{orderLogisticsId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 最新的物流信息
|
||||
-->
|
||||
<select id="selectLast" resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM order_logistics_detail
|
||||
WHERE order_logistics_id IN
|
||||
<foreach collection="orderLogisticsIds" item="orderLogisticsId" separator="," open="(" close=")">
|
||||
#{orderLogisticsId}
|
||||
</foreach>
|
||||
ORDER BY create_time DESC
|
||||
LIMIT 0, 1
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 last 根据物理id
|
||||
-->
|
||||
<select id="selectLastByLogisticsId"
|
||||
resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM order_logistics_detail
|
||||
WHERE order_logistics_id = #{orderLogisticsId}
|
||||
ORDER BY create_time DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,80 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderLogisticsMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, area_no, `name`, mobile, address, logistics, logistics_no, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入数据
|
||||
-->
|
||||
<insert id="insert" parameterType="OrderLogisticsDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO `order_logistics` (
|
||||
area_no, `name`, mobile, address, logistics, logistics_no, create_time, update_time
|
||||
) VALUES (
|
||||
#{areaNo}, #{name}, #{mobile}, #{address},
|
||||
#{logistics}, #{logisticsNo}, #{createTime}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!--
|
||||
可更新字段
|
||||
-->
|
||||
<sql id="updateFieldSql" >
|
||||
<set>
|
||||
<if test="areaNo != null">
|
||||
, area_no = #{areaNo}
|
||||
</if>
|
||||
<if test="name != null">
|
||||
, `name` = #{name}
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
, mobile = #{mobile}
|
||||
</if>
|
||||
<if test="address != null">
|
||||
, address = #{address}
|
||||
</if>
|
||||
<if test="logistics != null">
|
||||
, logistics = #{logistics}
|
||||
</if>
|
||||
<if test="logisticsNo != null">
|
||||
, logistics_no = #{logisticsNo}
|
||||
</if>
|
||||
</set>
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
更新 - 根据id
|
||||
-->
|
||||
<update id="updateById">
|
||||
UPDATE `order_logistics`
|
||||
<include refid="updateFieldSql" />
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!--
|
||||
查询 - 根据 ids
|
||||
-->
|
||||
<select id="selectByIds" resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_logistics`
|
||||
WHERE `id`
|
||||
IN
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 ids
|
||||
-->
|
||||
<select id="selectById" resultType="cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_logistics`
|
||||
WHERE `id` = #{id}
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,141 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, user_id, order_no, buy_price, discount_price, logistics_price, present_price, pay_amount,
|
||||
payment_time, delivery_time, receiver_time, closing_time,
|
||||
has_return_exchange,
|
||||
status, remark, create_time, update_time, `deleted`
|
||||
</sql>
|
||||
|
||||
<sql id="updateFieldSql" >
|
||||
<set>
|
||||
<if test="orderNo != null">
|
||||
, order_no = #{orderNo}
|
||||
</if>
|
||||
<if test="buyPrice != null">
|
||||
, buy_price = #{buyPrice}
|
||||
</if>
|
||||
<if test="discountPrice != null">
|
||||
, discount_price = #{discountPrice}
|
||||
</if>
|
||||
<if test="logisticsPrice != null">
|
||||
, logistics_price = #{logisticsPrice}
|
||||
</if>
|
||||
<if test="logisticsPrice != null">
|
||||
, logistics_price = #{logisticsPrice}
|
||||
</if>
|
||||
<if test="presentPrice != null">
|
||||
, present_price = #{presentPrice}
|
||||
</if>
|
||||
<if test="payAmount != null">
|
||||
, pay_amount = #{payAmount}
|
||||
</if>
|
||||
<if test="deliveryTime != null">
|
||||
, delivery_time = #{deliveryTime}
|
||||
</if>
|
||||
<if test="paymentTime != null">
|
||||
, payment_time = #{paymentTime}
|
||||
</if>
|
||||
<if test="receiverTime != null">
|
||||
, receiver_time = #{receiverTime}
|
||||
</if>
|
||||
<if test="closingTime != null">
|
||||
, closing_time = #{closingTime}
|
||||
</if>
|
||||
<if test="hasReturnExchange != null">
|
||||
, has_return_exchange = #{hasReturnExchange}
|
||||
</if>
|
||||
|
||||
<if test="status != null">
|
||||
, status = #{status}
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
, remark = #{remark}
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
, `deleted` = #{deleted}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
, create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
, update_time = #{updateTime}
|
||||
</if>
|
||||
</set>
|
||||
</sql>
|
||||
|
||||
<update id="updateById" parameterType="OrderDO">
|
||||
UPDATE `orders`
|
||||
<include refid="updateFieldSql" />
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateByIdAndStatus">
|
||||
UPDATE `orders`
|
||||
<set>
|
||||
<if test="updateObj.payAmount != null">
|
||||
, pay_amount = #{updateObj.payAmount}
|
||||
</if>
|
||||
<if test="updateObj.paymentTime != null">
|
||||
, payment_time = #{updateObj.paymentTime}
|
||||
</if>
|
||||
<if test="updateObj.status != null">
|
||||
, status = #{updateObj.status}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
AND status = #{status}
|
||||
</update>
|
||||
|
||||
<select id="selectById" resultType="cn.iocoder.mall.order.biz.dataobject.OrderDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `orders`
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<sql id="selectWhere">
|
||||
<if test="status != null">
|
||||
AND `status` = #{status}
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
AND `user_id` = #{userId}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
AND `id` = #{id}
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
AND `order_no` = #{orderNo}
|
||||
</if>
|
||||
<if test="hasReturnExchange != null">
|
||||
AND `has_return_exchange` = #{hasReturnExchange}
|
||||
</if>
|
||||
<if test="startCreateTime != null and endCreateTime != null">
|
||||
AND `create_time` >= #{startCreateTime}
|
||||
AND `create_time` <= #{endCreateTime}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectPageCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM `orders`
|
||||
<where>
|
||||
<include refid="selectWhere" />
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultType="cn.iocoder.mall.order.biz.dataobject.OrderDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `orders`
|
||||
<where>
|
||||
<include refid="selectWhere" />
|
||||
</where>
|
||||
LIMIT ${pageNo * pageSize}, ${pageSize}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderRecipientMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id, order_id, `area_no`, `name`, mobile, address, `type`,
|
||||
create_time, update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入数据
|
||||
-->
|
||||
<insert id="insert" parameterType="OrderRecipientDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO `order_recipient` (
|
||||
order_id, `area_no`, `name`, mobile, address,
|
||||
`type`, create_time, update_time
|
||||
) VALUES (
|
||||
#{orderId}, #{areaNo}, #{name}, #{mobile}, #{address},
|
||||
#{type}, #{createTime,jdbcType=TIMESTAMP} , #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!--
|
||||
查询 - 根据 orderId
|
||||
-->
|
||||
<select id="selectByOrderId" resultType="cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_recipient`
|
||||
WHERE order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 orderIds
|
||||
-->
|
||||
<select id="selectByOrderIds" resultType="cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO">
|
||||
SELECT
|
||||
<include refid="FIELDS" />
|
||||
FROM `order_recipient`
|
||||
WHERE order_id IN
|
||||
<foreach collection="orderIds" item="orderId" separator="," open="(" close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,165 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.mall.order.biz.dao.OrderReturnMapper">
|
||||
|
||||
<sql id="FIELDS">
|
||||
id,
|
||||
service_number,
|
||||
order_id,
|
||||
order_no,
|
||||
order_logistics_id,
|
||||
refund_price,
|
||||
reason,
|
||||
`describe`,
|
||||
approval_time,
|
||||
refuse_time,
|
||||
logistics_time,
|
||||
receiver_time,
|
||||
closing_time,
|
||||
service_type,
|
||||
status,
|
||||
create_time,
|
||||
update_time
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
插入数据
|
||||
-->
|
||||
<insert id="insert" parameterType="OrderReturnDO" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
||||
INSERT INTO `order_return` (
|
||||
service_number, order_id, order_no, order_logistics_id,
|
||||
refund_price, reason, `describe`,
|
||||
approval_time, refuse_time, logistics_time, receiver_time, closing_time,
|
||||
service_type, status,
|
||||
create_time, update_time)
|
||||
VALUES (
|
||||
#{serviceNumber}, #{orderId}, #{orderNo}, #{orderLogisticsId},
|
||||
${refundPrice}, #{reason}, #{describe},
|
||||
#{approvalTime}, #{refuse_time}, #{logisticsTime}, #{receiverTime}, #{closingTime},
|
||||
#{serviceType}, #{status}, #{createTime}, #{updateTime})
|
||||
</insert>
|
||||
|
||||
<!--
|
||||
更新 - 可更新的字段
|
||||
-->
|
||||
<sql id="updateFieldSql">
|
||||
<set>
|
||||
<if test="orderLogisticsId != null">
|
||||
, order_logistics_id = #{orderLogisticsId}
|
||||
</if>
|
||||
<if test="refundPrice != null">
|
||||
, refund_price = #{refundPrice}
|
||||
</if>
|
||||
<if test="reason != null">
|
||||
, reason = #{reason}
|
||||
</if>
|
||||
<if test="describe != null">
|
||||
, `describe` = #{describe}
|
||||
</if>
|
||||
<if test="approvalTime != null">
|
||||
, approval_time = #{approvalTime}
|
||||
</if>
|
||||
<if test="refuseTime != null">
|
||||
, refuse_time = #{refuseTime}
|
||||
</if>
|
||||
<if test="logisticsTime != null">
|
||||
, logistics_time = #{logisticsTime}
|
||||
</if>
|
||||
<if test="receiverTime != null">
|
||||
, receiver_time = #{receiverTime}
|
||||
</if>
|
||||
<if test="closingTime != null">
|
||||
, closing_time = #{closingTime}
|
||||
</if>
|
||||
<if test="serviceType != null">
|
||||
, service_type = #{serviceType}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
, status = #{status}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
, create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
, update_time = #{updateTime}
|
||||
</if>
|
||||
</set>
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
更新 - 根据 id 更新
|
||||
-->
|
||||
<update id="updateById" parameterType="OrderReturnDO">
|
||||
UPDATE `order_return`
|
||||
<include refid="updateFieldSql"/>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!--
|
||||
查询 - 根据id 查询
|
||||
-->
|
||||
<select id="selectByOrderId" resultType="cn.iocoder.mall.order.biz.dataobject.OrderReturnDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM `order_return`
|
||||
WHERE order_id = #{orderId}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!--
|
||||
列表查询 - where
|
||||
-->
|
||||
<sql id="selectListWhere">
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="serviceNumber != null">
|
||||
AND service_number = #{serviceNumber}
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
AND order_id = #{orderId}
|
||||
</if>
|
||||
<if test="orderId != null">
|
||||
AND order_no = #{orderNo}
|
||||
</if>
|
||||
<if test="startCreateTime != null and endCreateTime != null">
|
||||
AND create_time >= #{startCreateTime}
|
||||
AND create_time <= #{endCreateTime}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<!--
|
||||
列表查询 - count
|
||||
-->
|
||||
<select id="selectListCount" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM `order_return`
|
||||
WHERE 1 = 1
|
||||
<include refid="selectListWhere" />
|
||||
</select>
|
||||
|
||||
|
||||
<!--
|
||||
列表查询 - queryDTO
|
||||
-->
|
||||
<select id="selectList" resultType="cn.iocoder.mall.order.biz.dataobject.OrderReturnDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM `order_return`
|
||||
WHERE 1 = 1
|
||||
<include refid="selectListWhere" />
|
||||
<bind name="limitIndex" value="pageSize * (index - 1)"/>
|
||||
LIMIT #{limitIndex}, #{pageSize}
|
||||
</select>
|
||||
|
||||
<!--
|
||||
查询 - 根据 id 查询
|
||||
-->
|
||||
<select id="selectById" resultType="cn.iocoder.mall.order.biz.dataobject.OrderReturnDO">
|
||||
SELECT
|
||||
<include refid="FIELDS"/>
|
||||
FROM `order_return`
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,14 +0,0 @@
|
|||
registry {
|
||||
type = "file"
|
||||
|
||||
file {
|
||||
name = "file.conf"
|
||||
}
|
||||
|
||||
zk {
|
||||
cluster = "default"
|
||||
serverAddr = "192.168.88.10:2181"
|
||||
session.timeout = 6000
|
||||
connect.timeout = 2000
|
||||
}
|
||||
}
|
|
@ -1,121 +0,0 @@
|
|||
DROP TABLE `order`;
|
||||
DROP TABLE `order_item`;
|
||||
DROP TABLE `order_exchange`;
|
||||
DROP TABLE `order_return`;
|
||||
DROP TABLE `order_logistics`;
|
||||
DROP TABLE `order_logistics_detail`;
|
||||
|
||||
CREATE TABLE `order` (
|
||||
`id` int NOT NULL AUTO_INCREMENT COMMENT 'Id,自增长',
|
||||
`order_logistics_id` int NOT NULL COMMENT '物流id',
|
||||
`order_no` varchar(50) NOT NULL COMMENT '订单单号',
|
||||
`price` int(10) NULL COMMENT '金额(分)',
|
||||
`payment_time` datetime NULL COMMENT '付款时间',
|
||||
`delivery_time` datetime NULL COMMENT '发货时间',
|
||||
`receiver_time` datetime NULL COMMENT '收货时间',
|
||||
`closing_time` datetime NULL COMMENT '成交时间',
|
||||
`has_return_exchange` smallint NULL COMMENT '是否退换货',
|
||||
`remark` varchar(255) NULL COMMENT '备注',
|
||||
`status` smallint(2) NULL COMMENT '状态(如果有多个商品分开发货需要全部商品发完才会改变状态) 0、待付款 1、待发货 2、待收货 3、已完成 4、已关闭',
|
||||
`create_time` datetime NULL COMMENT '订单创建时间',
|
||||
`update_time` datetime NULL COMMENT '更新时间',
|
||||
`deleted` smallint NULL COMMENT '删除状态',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
CREATE TABLE `order_item` (
|
||||
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id自增长',
|
||||
`order_id` int NOT NULL COMMENT '订单编号',
|
||||
`order_no` varchar(50) NOT NULL COMMENT '订单号',
|
||||
`sku_id` int NOT NULL COMMENT '商品编号',
|
||||
`quantity` int(3) NOT NULL COMMENT '商品数量',
|
||||
`price` int(255) NOT NULL COMMENT '金额',
|
||||
`payment_time` datetime NULL COMMENT '付款时间',
|
||||
`delivery_time` datetime NULL COMMENT '发货时间',
|
||||
`receiver_time` datetime NULL COMMENT '收货时间',
|
||||
`closing_time` datetime NULL,
|
||||
`has_return_exchange` int NULL COMMENT '是否退换货',
|
||||
`create_time` datetime NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL COMMENT '更新时间',
|
||||
`status` smallint(2) NOT NULL COMMENT '状态:0、代发货 1、已发货 2、已收货 20、换货中 21、换货成功 40、退货中 41、已退货',
|
||||
`delete` smallint(2) NOT NULL COMMENT '删除状态',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `order_exchange` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`order_id` int(11) NOT NULL,
|
||||
`order_no` varchar(50) NOT NULL,
|
||||
`sku_id` int(11) NOT NULL,
|
||||
`exchange_sku_id` int(11) NOT NULL COMMENT '换货商品id',
|
||||
`exchange_order_logistics_id` int(11) NOT NULL COMMENT '换货物流id',
|
||||
`receiver_order_logistics_id` int(11) NOT NULL COMMENT '收件地址',
|
||||
`order_reason_id` int(11) NULL COMMENT '换货原因',
|
||||
`reason` varchar(255) NULL COMMENT '换货原因 (其他的时候)',
|
||||
`payment_time` datetime NULL COMMENT '付款时间',
|
||||
`delivery_time` datetime NULL COMMENT '发货时间',
|
||||
`receiver_time` datetime NULL COMMENT '收货时间',
|
||||
`closing_time` datetime NULL COMMENT '成交时间',
|
||||
`create_time` datetime NULL COMMENT '创建时间',
|
||||
`update_time` datetime NULL COMMENT '更新时间',
|
||||
`delete` smallint(2) NULL COMMENT '删除状态',
|
||||
`order_type` int(2) NULL COMMENT '订单类型 0、为 Order 订单 1、为 OrderItem 订单',
|
||||
`status` int(2) NULL COMMENT '状态 申请换货、申请成功、申请失败、换货中、换货成功',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE `order_return` (
|
||||
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id自增长',
|
||||
`order_id` int NOT NULL COMMENT '订单编号',
|
||||
`order_no` varchar(50) NOT NULL COMMENT '订单号',
|
||||
`sku_id` int NOT NULL COMMENT '商品编号',
|
||||
`order_item_id` int(11) NOT NULL COMMENT '订单item id',
|
||||
`order_logistics_id` int(11) NOT NULL COMMENT '物流 id',
|
||||
|
||||
`order_reason_id` int(11) NULL COMMENT '退货原因',
|
||||
`reason` varchar(255) NULL COMMENT '换货原因 (其他的时候)',
|
||||
`create_time` datetime NULL COMMENT '创建时间',
|
||||
`approval_time` datetime NULL COMMENT '同意时间',
|
||||
`logistics_time` datetime NULL COMMENT '物流时间(填写物流单号时间)',
|
||||
`receiver_time` datetime NULL COMMENT '收货时间',
|
||||
`closing_time` datetime NULL COMMENT '成交时间',
|
||||
`order_type` int(2) NULL COMMENT '订单类型 0、为 Order 订单 1、为 OrderItem 订单',
|
||||
|
||||
`update_time` datetime NULL COMMENT '更新时间',
|
||||
`delete` smallint(2) NULL COMMENT '删除状态',
|
||||
`status` int(2) NULL COMMENT '状态 申请换货、申请成功、申请失败、退货中、退货成功',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE `order_logistics` (
|
||||
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id自增长',
|
||||
`area_no` int NOT NULL COMMENT '订单编号',
|
||||
`name` VARCHAR(20) NOT NULL COMMENT '名称',
|
||||
`mobile` VARCHAR(20) NOT NULL COMMENT '手机号',
|
||||
`address` VARCHAR(255) NOT NULL COMMENT '详细地址',
|
||||
`logistics_no` VARCHAR(20) NOT NULL COMMENT '物流单号',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE `order_logistics_detail` (
|
||||
`id` int NOT NULL AUTO_INCREMENT COMMENT 'id自增长',
|
||||
`order_logistics_id` int NOT NULL COMMENT '物流编号',
|
||||
`logistics_time` datetime NOT NULL COMMENT '物流时间',
|
||||
`logistics_information` VARCHAR(20) NOT NULL COMMENT '物流信息',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.CalcOrderPriceBO.Item;
|
||||
import cn.iocoder.mall.order.api.bo.CartItemBO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.CartItemDO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductAttrAndValuePairBO;
|
||||
import cn.iocoder.mall.product.api.bo.ProductSkuDetailBO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:07+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class CartConvertImpl implements CartConvert {
|
||||
|
||||
@Override
|
||||
public Item convert(ProductSkuDetailBO sku) {
|
||||
if ( sku == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Item item = new Item();
|
||||
|
||||
item.setId( sku.getId() );
|
||||
item.setSpu( sku.getSpu() );
|
||||
item.setPicURL( sku.getPicURL() );
|
||||
List<ProductAttrAndValuePairBO> list = sku.getAttrs();
|
||||
if ( list != null ) {
|
||||
item.setAttrs( new ArrayList<ProductAttrAndValuePairBO>( list ) );
|
||||
}
|
||||
item.setPrice( sku.getPrice() );
|
||||
item.setQuantity( sku.getQuantity() );
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CartItemBO> convert(List<CartItemDO> items) {
|
||||
if ( items == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<CartItemBO> list = new ArrayList<CartItemBO>( items.size() );
|
||||
for ( CartItemDO cartItemDO : items ) {
|
||||
list.add( cartItemDOToCartItemBO( cartItemDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected CartItemBO cartItemDOToCartItemBO(CartItemDO cartItemDO) {
|
||||
if ( cartItemDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
CartItemBO cartItemBO = new CartItemBO();
|
||||
|
||||
cartItemBO.setId( cartItemDO.getId() );
|
||||
cartItemBO.setStatus( cartItemDO.getStatus() );
|
||||
cartItemBO.setSelected( cartItemDO.getSelected() );
|
||||
cartItemBO.setUserId( cartItemDO.getUserId() );
|
||||
cartItemBO.setSpuId( cartItemDO.getSpuId() );
|
||||
cartItemBO.setSkuId( cartItemDO.getSkuId() );
|
||||
cartItemBO.setQuantity( cartItemDO.getQuantity() );
|
||||
cartItemBO.setOrderId( cartItemDO.getOrderId() );
|
||||
cartItemBO.setOrderCreateTime( cartItemDO.getOrderCreateTime() );
|
||||
cartItemBO.setCreateTime( cartItemDO.getCreateTime() );
|
||||
|
||||
return cartItemBO;
|
||||
}
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentCreateBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderCommentPageBO.OrderCommentItem;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCommentCreateDTO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderCommentDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-31T18:14:19+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderCommentConvertImpl implements OrderCommentConvert {
|
||||
|
||||
@Override
|
||||
public OrderCommentDO convert(OrderCommentCreateDTO orderCommentCreateDTO) {
|
||||
if ( orderCommentCreateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderCommentDO orderCommentDO = new OrderCommentDO();
|
||||
|
||||
orderCommentDO.setOrderId( orderCommentCreateDTO.getOrderId() );
|
||||
orderCommentDO.setOrderNo( orderCommentCreateDTO.getOrderNo() );
|
||||
orderCommentDO.setProductSpuId( orderCommentCreateDTO.getProductSpuId() );
|
||||
orderCommentDO.setProductSpuName( orderCommentCreateDTO.getProductSpuName() );
|
||||
orderCommentDO.setProductSkuId( orderCommentCreateDTO.getProductSkuId() );
|
||||
orderCommentDO.setProductSkuAttrs( orderCommentCreateDTO.getProductSkuAttrs() );
|
||||
orderCommentDO.setProductSkuPrice( orderCommentCreateDTO.getProductSkuPrice() );
|
||||
orderCommentDO.setProductSkuPicUrl( orderCommentCreateDTO.getProductSkuPicUrl() );
|
||||
orderCommentDO.setUserId( orderCommentCreateDTO.getUserId() );
|
||||
orderCommentDO.setUserAvatar( orderCommentCreateDTO.getUserAvatar() );
|
||||
orderCommentDO.setUserNickName( orderCommentCreateDTO.getUserNickName() );
|
||||
orderCommentDO.setStar( orderCommentCreateDTO.getStar() );
|
||||
orderCommentDO.setProductDescriptionStar( orderCommentCreateDTO.getProductDescriptionStar() );
|
||||
orderCommentDO.setLogisticsStar( orderCommentCreateDTO.getLogisticsStar() );
|
||||
orderCommentDO.setMerchantStar( orderCommentCreateDTO.getMerchantStar() );
|
||||
orderCommentDO.setCommentContent( orderCommentCreateDTO.getCommentContent() );
|
||||
orderCommentDO.setCommentPics( orderCommentCreateDTO.getCommentPics() );
|
||||
|
||||
return orderCommentDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderCommentCreateBO convert(OrderCommentDO orderCommentDO) {
|
||||
if ( orderCommentDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderCommentCreateBO orderCommentCreateBO = new OrderCommentCreateBO();
|
||||
|
||||
orderCommentCreateBO.setId( orderCommentDO.getId() );
|
||||
|
||||
return orderCommentCreateBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderCommentItem> convert(List<OrderCommentDO> orderCommentDOList) {
|
||||
if ( orderCommentDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderCommentItem> list = new ArrayList<OrderCommentItem>( orderCommentDOList.size() );
|
||||
for ( OrderCommentDO orderCommentDO : orderCommentDOList ) {
|
||||
list.add( orderCommentDOToOrderCommentItem( orderCommentDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected OrderCommentItem orderCommentDOToOrderCommentItem(OrderCommentDO orderCommentDO) {
|
||||
if ( orderCommentDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderCommentItem orderCommentItem = new OrderCommentItem();
|
||||
|
||||
orderCommentItem.setId( orderCommentDO.getId() );
|
||||
orderCommentItem.setUserAvatar( orderCommentDO.getUserAvatar() );
|
||||
orderCommentItem.setUserNickName( orderCommentDO.getUserNickName() );
|
||||
orderCommentItem.setStar( orderCommentDO.getStar() );
|
||||
orderCommentItem.setCommentContent( orderCommentDO.getCommentContent() );
|
||||
orderCommentItem.setCommentPics( orderCommentDO.getCommentPics() );
|
||||
orderCommentItem.setReplayCount( orderCommentDO.getReplayCount() );
|
||||
orderCommentItem.setCreateTime( orderCommentDO.getCreateTime() );
|
||||
|
||||
return orderCommentItem;
|
||||
}
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderInfoBO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:07+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderConvertImpl implements OrderConvert {
|
||||
|
||||
@Override
|
||||
public List<OrderBO> convertPageBO(List<OrderDO> orderDOList) {
|
||||
if ( orderDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderBO> list = new ArrayList<OrderBO>( orderDOList.size() );
|
||||
for ( OrderDO orderDO : orderDOList ) {
|
||||
list.add( orderDOToOrderBO( orderDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderInfoBO convert(OrderDO orderDO) {
|
||||
if ( orderDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderInfoBO orderInfoBO = new OrderInfoBO();
|
||||
|
||||
orderInfoBO.setId( orderDO.getId() );
|
||||
orderInfoBO.setOrderNo( orderDO.getOrderNo() );
|
||||
orderInfoBO.setBuyPrice( orderDO.getBuyPrice() );
|
||||
orderInfoBO.setDiscountPrice( orderDO.getDiscountPrice() );
|
||||
orderInfoBO.setLogisticsPrice( orderDO.getLogisticsPrice() );
|
||||
orderInfoBO.setPresentPrice( orderDO.getPresentPrice() );
|
||||
orderInfoBO.setPayAmount( orderDO.getPayAmount() );
|
||||
orderInfoBO.setPaymentTime( orderDO.getPaymentTime() );
|
||||
orderInfoBO.setDeliveryTime( orderDO.getDeliveryTime() );
|
||||
orderInfoBO.setReceiverTime( orderDO.getReceiverTime() );
|
||||
orderInfoBO.setClosingTime( orderDO.getClosingTime() );
|
||||
orderInfoBO.setHasReturnExchange( orderDO.getHasReturnExchange() );
|
||||
orderInfoBO.setStatus( orderDO.getStatus() );
|
||||
orderInfoBO.setRemark( orderDO.getRemark() );
|
||||
|
||||
return orderInfoBO;
|
||||
}
|
||||
|
||||
protected OrderBO orderDOToOrderBO(OrderDO orderDO) {
|
||||
if ( orderDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderBO orderBO = new OrderBO();
|
||||
|
||||
orderBO.setId( orderDO.getId() );
|
||||
orderBO.setUserId( orderDO.getUserId() );
|
||||
orderBO.setOrderNo( orderDO.getOrderNo() );
|
||||
orderBO.setBuyPrice( orderDO.getBuyPrice() );
|
||||
orderBO.setDiscountPrice( orderDO.getDiscountPrice() );
|
||||
orderBO.setLogisticsPrice( orderDO.getLogisticsPrice() );
|
||||
orderBO.setPresentPrice( orderDO.getPresentPrice() );
|
||||
orderBO.setPayAmount( orderDO.getPayAmount() );
|
||||
orderBO.setPaymentTime( orderDO.getPaymentTime() );
|
||||
orderBO.setDeliveryTime( orderDO.getDeliveryTime() );
|
||||
orderBO.setReceiverTime( orderDO.getReceiverTime() );
|
||||
orderBO.setClosingTime( orderDO.getClosingTime() );
|
||||
orderBO.setHasReturnExchange( orderDO.getHasReturnExchange() );
|
||||
orderBO.setStatus( orderDO.getStatus() );
|
||||
orderBO.setRemark( orderDO.getRemark() );
|
||||
|
||||
return orderBO;
|
||||
}
|
||||
}
|
|
@ -1,156 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderItemBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCreateDTO.OrderItem;
|
||||
import cn.iocoder.mall.order.api.dto.OrderItemUpdateDTO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderItemDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:07+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderItemConvertImpl implements OrderItemConvert {
|
||||
|
||||
@Override
|
||||
public OrderItemDO convert(OrderItemUpdateDTO orderItemUpdateDTO) {
|
||||
if ( orderItemUpdateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderItemDO orderItemDO = new OrderItemDO();
|
||||
|
||||
orderItemDO.setId( orderItemUpdateDTO.getId() );
|
||||
orderItemDO.setSkuId( orderItemUpdateDTO.getSkuId() );
|
||||
orderItemDO.setQuantity( orderItemUpdateDTO.getQuantity() );
|
||||
|
||||
return orderItemDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderItemBO> convertOrderItemBO(List<OrderItemDO> orderItemDOList) {
|
||||
if ( orderItemDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderItemBO> list = new ArrayList<OrderItemBO>( orderItemDOList.size() );
|
||||
for ( OrderItemDO orderItemDO : orderItemDOList ) {
|
||||
list.add( orderItemDOToOrderItemBO( orderItemDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderItemDO> convert(List<OrderItem> orderCreateItemDTOList) {
|
||||
if ( orderCreateItemDTOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderItemDO> list = new ArrayList<OrderItemDO>( orderCreateItemDTOList.size() );
|
||||
for ( OrderItem orderItem : orderCreateItemDTOList ) {
|
||||
list.add( orderItemToOrderItemDO( orderItem ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderItemBO> convertOrderItemDO(List<OrderItemDO> orderItemDOList) {
|
||||
if ( orderItemDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderItemBO> list = new ArrayList<OrderItemBO>( orderItemDOList.size() );
|
||||
for ( OrderItemDO orderItemDO : orderItemDOList ) {
|
||||
list.add( orderItemDOToOrderItemBO( orderItemDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<cn.iocoder.mall.order.api.bo.OrderInfoBO.OrderItem> convertOrderInfoWithOrderItem(List<OrderItemDO> orderItemDOList) {
|
||||
if ( orderItemDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<cn.iocoder.mall.order.api.bo.OrderInfoBO.OrderItem> list = new ArrayList<cn.iocoder.mall.order.api.bo.OrderInfoBO.OrderItem>( orderItemDOList.size() );
|
||||
for ( OrderItemDO orderItemDO : orderItemDOList ) {
|
||||
list.add( orderItemDOToOrderItem( orderItemDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected OrderItemBO orderItemDOToOrderItemBO(OrderItemDO orderItemDO) {
|
||||
if ( orderItemDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderItemBO orderItemBO = new OrderItemBO();
|
||||
|
||||
orderItemBO.setId( orderItemDO.getId() );
|
||||
orderItemBO.setOrderId( orderItemDO.getOrderId() );
|
||||
orderItemBO.setOrderNo( orderItemDO.getOrderNo() );
|
||||
orderItemBO.setSkuId( orderItemDO.getSkuId() );
|
||||
orderItemBO.setSkuName( orderItemDO.getSkuName() );
|
||||
orderItemBO.setSkuImage( orderItemDO.getSkuImage() );
|
||||
orderItemBO.setQuantity( orderItemDO.getQuantity() );
|
||||
orderItemBO.setOriginPrice( orderItemDO.getOriginPrice() );
|
||||
orderItemBO.setBuyPrice( orderItemDO.getBuyPrice() );
|
||||
orderItemBO.setPresentPrice( orderItemDO.getPresentPrice() );
|
||||
orderItemBO.setBuyTotal( orderItemDO.getBuyTotal() );
|
||||
orderItemBO.setDiscountTotal( orderItemDO.getDiscountTotal() );
|
||||
orderItemBO.setPresentTotal( orderItemDO.getPresentTotal() );
|
||||
orderItemBO.setPaymentTime( orderItemDO.getPaymentTime() );
|
||||
orderItemBO.setDeliveryTime( orderItemDO.getDeliveryTime() );
|
||||
orderItemBO.setReceiverTime( orderItemDO.getReceiverTime() );
|
||||
orderItemBO.setClosingTime( orderItemDO.getClosingTime() );
|
||||
orderItemBO.setHasReturnExchange( orderItemDO.getHasReturnExchange() );
|
||||
orderItemBO.setDeliveryType( orderItemDO.getDeliveryType() );
|
||||
orderItemBO.setStatus( orderItemDO.getStatus() );
|
||||
orderItemBO.setCreateTime( orderItemDO.getCreateTime() );
|
||||
orderItemBO.setUpdateTime( orderItemDO.getUpdateTime() );
|
||||
orderItemBO.setDeleted( orderItemDO.getDeleted() );
|
||||
|
||||
return orderItemBO;
|
||||
}
|
||||
|
||||
protected OrderItemDO orderItemToOrderItemDO(OrderItem orderItem) {
|
||||
if ( orderItem == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderItemDO orderItemDO = new OrderItemDO();
|
||||
|
||||
orderItemDO.setSkuId( orderItem.getSkuId() );
|
||||
orderItemDO.setQuantity( orderItem.getQuantity() );
|
||||
|
||||
return orderItemDO;
|
||||
}
|
||||
|
||||
protected cn.iocoder.mall.order.api.bo.OrderInfoBO.OrderItem orderItemDOToOrderItem(OrderItemDO orderItemDO) {
|
||||
if ( orderItemDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.order.api.bo.OrderInfoBO.OrderItem orderItem = new cn.iocoder.mall.order.api.bo.OrderInfoBO.OrderItem();
|
||||
|
||||
orderItem.setSkuId( orderItemDO.getSkuId() );
|
||||
orderItem.setSkuName( orderItemDO.getSkuName() );
|
||||
orderItem.setSkuImage( orderItemDO.getSkuImage() );
|
||||
orderItem.setQuantity( orderItemDO.getQuantity() );
|
||||
orderItem.setOriginPrice( orderItemDO.getOriginPrice() );
|
||||
orderItem.setBuyPrice( orderItemDO.getBuyPrice() );
|
||||
orderItem.setPresentPrice( orderItemDO.getPresentPrice() );
|
||||
orderItem.setBuyTotal( orderItemDO.getBuyTotal() );
|
||||
orderItem.setDiscountTotal( orderItemDO.getDiscountTotal() );
|
||||
orderItem.setPresentTotal( orderItemDO.getPresentTotal() );
|
||||
|
||||
return orderItem;
|
||||
}
|
||||
}
|
|
@ -1,217 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderLastLogisticsInfoBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderLogisticsInfoBO;
|
||||
import cn.iocoder.mall.order.api.bo.OrderLogisticsInfoWithOrderBO.Logistics;
|
||||
import cn.iocoder.mall.order.api.bo.OrderLogisticsInfoWithOrderBO.LogisticsDetail;
|
||||
import cn.iocoder.mall.order.api.dto.OrderDeliveryDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderLogisticsUpdateDTO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:07+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderLogisticsConvertImpl implements OrderLogisticsConvert {
|
||||
|
||||
@Override
|
||||
public OrderLogisticsDO convert(OrderDeliveryDTO orderDelivery) {
|
||||
if ( orderDelivery == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderLogisticsDO orderLogisticsDO = new OrderLogisticsDO();
|
||||
|
||||
orderLogisticsDO.setLogistics( orderDelivery.getLogistics() );
|
||||
orderLogisticsDO.setLogisticsNo( orderDelivery.getLogisticsNo() );
|
||||
|
||||
return orderLogisticsDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderLogisticsDO convert(OrderLogisticsUpdateDTO orderLogisticsDTO) {
|
||||
if ( orderLogisticsDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderLogisticsDO orderLogisticsDO = new OrderLogisticsDO();
|
||||
|
||||
orderLogisticsDO.setId( orderLogisticsDTO.getId() );
|
||||
orderLogisticsDO.setAreaNo( orderLogisticsDTO.getAreaNo() );
|
||||
orderLogisticsDO.setName( orderLogisticsDTO.getName() );
|
||||
orderLogisticsDO.setMobile( orderLogisticsDTO.getMobile() );
|
||||
orderLogisticsDO.setAddress( orderLogisticsDTO.getAddress() );
|
||||
orderLogisticsDO.setLogisticsNo( orderLogisticsDTO.getLogisticsNo() );
|
||||
|
||||
return orderLogisticsDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderLogisticsDO convert(OrderRecipientDO orderRecipientDO) {
|
||||
if ( orderRecipientDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderLogisticsDO orderLogisticsDO = new OrderLogisticsDO();
|
||||
|
||||
orderLogisticsDO.setCreateTime( orderRecipientDO.getCreateTime() );
|
||||
orderLogisticsDO.setUpdateTime( orderRecipientDO.getUpdateTime() );
|
||||
orderLogisticsDO.setId( orderRecipientDO.getId() );
|
||||
orderLogisticsDO.setAreaNo( orderRecipientDO.getAreaNo() );
|
||||
orderLogisticsDO.setName( orderRecipientDO.getName() );
|
||||
orderLogisticsDO.setMobile( orderRecipientDO.getMobile() );
|
||||
orderLogisticsDO.setAddress( orderRecipientDO.getAddress() );
|
||||
|
||||
return orderLogisticsDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Logistics> convertLogistics(List<OrderLogisticsDO> orderLogisticsDOList) {
|
||||
if ( orderLogisticsDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<Logistics> list = new ArrayList<Logistics>( orderLogisticsDOList.size() );
|
||||
for ( OrderLogisticsDO orderLogisticsDO : orderLogisticsDOList ) {
|
||||
list.add( orderLogisticsDOToLogistics( orderLogisticsDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LogisticsDetail> convertLogisticsDetail(List<OrderLogisticsDetailDO> orderLogisticsDOList) {
|
||||
if ( orderLogisticsDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<LogisticsDetail> list = new ArrayList<LogisticsDetail>( orderLogisticsDOList.size() );
|
||||
for ( OrderLogisticsDetailDO orderLogisticsDetailDO : orderLogisticsDOList ) {
|
||||
list.add( orderLogisticsDetailDOToLogisticsDetail( orderLogisticsDetailDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderLogisticsInfoBO convert(OrderLogisticsDO orderLogisticsDO) {
|
||||
if ( orderLogisticsDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderLogisticsInfoBO orderLogisticsInfoBO = new OrderLogisticsInfoBO();
|
||||
|
||||
orderLogisticsInfoBO.setId( orderLogisticsDO.getId() );
|
||||
orderLogisticsInfoBO.setAreaNo( orderLogisticsDO.getAreaNo() );
|
||||
orderLogisticsInfoBO.setName( orderLogisticsDO.getName() );
|
||||
orderLogisticsInfoBO.setMobile( orderLogisticsDO.getMobile() );
|
||||
orderLogisticsInfoBO.setAddress( orderLogisticsDO.getAddress() );
|
||||
orderLogisticsInfoBO.setLogistics( orderLogisticsDO.getLogistics() );
|
||||
orderLogisticsInfoBO.setLogisticsNo( orderLogisticsDO.getLogisticsNo() );
|
||||
|
||||
return orderLogisticsInfoBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<cn.iocoder.mall.order.api.bo.OrderLogisticsInfoBO.LogisticsDetail> convert(List<OrderLogisticsDetailDO> orderLogisticsDetailDOList) {
|
||||
if ( orderLogisticsDetailDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<cn.iocoder.mall.order.api.bo.OrderLogisticsInfoBO.LogisticsDetail> list = new ArrayList<cn.iocoder.mall.order.api.bo.OrderLogisticsInfoBO.LogisticsDetail>( orderLogisticsDetailDOList.size() );
|
||||
for ( OrderLogisticsDetailDO orderLogisticsDetailDO : orderLogisticsDetailDOList ) {
|
||||
list.add( orderLogisticsDetailDOToLogisticsDetail1( orderLogisticsDetailDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderLastLogisticsInfoBO convertOrderLastLogisticsInfoBO(OrderLogisticsDO orderLogisticsDO) {
|
||||
if ( orderLogisticsDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderLastLogisticsInfoBO orderLastLogisticsInfoBO = new OrderLastLogisticsInfoBO();
|
||||
|
||||
orderLastLogisticsInfoBO.setId( orderLogisticsDO.getId() );
|
||||
orderLastLogisticsInfoBO.setAreaNo( orderLogisticsDO.getAreaNo() );
|
||||
orderLastLogisticsInfoBO.setName( orderLogisticsDO.getName() );
|
||||
orderLastLogisticsInfoBO.setMobile( orderLogisticsDO.getMobile() );
|
||||
orderLastLogisticsInfoBO.setAddress( orderLogisticsDO.getAddress() );
|
||||
orderLastLogisticsInfoBO.setLogistics( orderLogisticsDO.getLogistics() );
|
||||
orderLastLogisticsInfoBO.setLogisticsNo( orderLogisticsDO.getLogisticsNo() );
|
||||
|
||||
return orderLastLogisticsInfoBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public cn.iocoder.mall.order.api.bo.OrderLastLogisticsInfoBO.LogisticsDetail convertLastLogisticsDetail(OrderLogisticsDetailDO orderLogisticsDetailDO) {
|
||||
if ( orderLogisticsDetailDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.order.api.bo.OrderLastLogisticsInfoBO.LogisticsDetail logisticsDetail = new cn.iocoder.mall.order.api.bo.OrderLastLogisticsInfoBO.LogisticsDetail();
|
||||
|
||||
logisticsDetail.setId( orderLogisticsDetailDO.getId() );
|
||||
logisticsDetail.setOrderLogisticsId( orderLogisticsDetailDO.getOrderLogisticsId() );
|
||||
logisticsDetail.setLogisticsTime( orderLogisticsDetailDO.getLogisticsTime() );
|
||||
logisticsDetail.setLogisticsInformation( orderLogisticsDetailDO.getLogisticsInformation() );
|
||||
|
||||
return logisticsDetail;
|
||||
}
|
||||
|
||||
protected Logistics orderLogisticsDOToLogistics(OrderLogisticsDO orderLogisticsDO) {
|
||||
if ( orderLogisticsDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Logistics logistics = new Logistics();
|
||||
|
||||
logistics.setId( orderLogisticsDO.getId() );
|
||||
logistics.setAreaNo( orderLogisticsDO.getAreaNo() );
|
||||
logistics.setName( orderLogisticsDO.getName() );
|
||||
logistics.setMobile( orderLogisticsDO.getMobile() );
|
||||
logistics.setAddress( orderLogisticsDO.getAddress() );
|
||||
logistics.setLogistics( orderLogisticsDO.getLogistics() );
|
||||
logistics.setLogisticsNo( orderLogisticsDO.getLogisticsNo() );
|
||||
|
||||
return logistics;
|
||||
}
|
||||
|
||||
protected LogisticsDetail orderLogisticsDetailDOToLogisticsDetail(OrderLogisticsDetailDO orderLogisticsDetailDO) {
|
||||
if ( orderLogisticsDetailDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
LogisticsDetail logisticsDetail = new LogisticsDetail();
|
||||
|
||||
logisticsDetail.setId( orderLogisticsDetailDO.getId() );
|
||||
logisticsDetail.setOrderLogisticsId( orderLogisticsDetailDO.getOrderLogisticsId() );
|
||||
logisticsDetail.setLogisticsTime( orderLogisticsDetailDO.getLogisticsTime() );
|
||||
logisticsDetail.setLogisticsInformation( orderLogisticsDetailDO.getLogisticsInformation() );
|
||||
|
||||
return logisticsDetail;
|
||||
}
|
||||
|
||||
protected cn.iocoder.mall.order.api.bo.OrderLogisticsInfoBO.LogisticsDetail orderLogisticsDetailDOToLogisticsDetail1(OrderLogisticsDetailDO orderLogisticsDetailDO) {
|
||||
if ( orderLogisticsDetailDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
cn.iocoder.mall.order.api.bo.OrderLogisticsInfoBO.LogisticsDetail logisticsDetail = new cn.iocoder.mall.order.api.bo.OrderLogisticsInfoBO.LogisticsDetail();
|
||||
|
||||
logisticsDetail.setId( orderLogisticsDetailDO.getId() );
|
||||
logisticsDetail.setOrderLogisticsId( orderLogisticsDetailDO.getOrderLogisticsId() );
|
||||
logisticsDetail.setLogisticsTime( orderLogisticsDetailDO.getLogisticsTime() );
|
||||
logisticsDetail.setLogisticsInformation( orderLogisticsDetailDO.getLogisticsInformation() );
|
||||
|
||||
return logisticsDetail;
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderInfoBO.LogisticsDetail;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderLogisticsDetailDO;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:07+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderLogisticsDetailConvertImpl implements OrderLogisticsDetailConvert {
|
||||
|
||||
@Override
|
||||
public LogisticsDetail convertLogisticsDetail(OrderLogisticsDetailDO orderLogisticsDetailDO) {
|
||||
if ( orderLogisticsDetailDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
LogisticsDetail logisticsDetail = new LogisticsDetail();
|
||||
|
||||
logisticsDetail.setId( orderLogisticsDetailDO.getId() );
|
||||
logisticsDetail.setOrderLogisticsId( orderLogisticsDetailDO.getOrderLogisticsId() );
|
||||
logisticsDetail.setLogisticsTime( orderLogisticsDetailDO.getLogisticsTime() );
|
||||
logisticsDetail.setLogisticsInformation( orderLogisticsDetailDO.getLogisticsInformation() );
|
||||
|
||||
return logisticsDetail;
|
||||
}
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderInfoBO.Recipient;
|
||||
import cn.iocoder.mall.order.api.bo.OrderRecipientBO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderCreateDTO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderRecipientDO;
|
||||
import cn.iocoder.mall.user.api.bo.UserAddressBO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:07+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderRecipientConvertImpl implements OrderRecipientConvert {
|
||||
|
||||
@Override
|
||||
public OrderRecipientDO convert(OrderCreateDTO orderCreateDTO) {
|
||||
if ( orderCreateDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderRecipientDO orderRecipientDO = new OrderRecipientDO();
|
||||
|
||||
return orderRecipientDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderRecipientDO convert(UserAddressBO userAddressBO) {
|
||||
if ( userAddressBO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderRecipientDO orderRecipientDO = new OrderRecipientDO();
|
||||
|
||||
orderRecipientDO.setId( userAddressBO.getId() );
|
||||
orderRecipientDO.setAreaNo( userAddressBO.getAreaNo() );
|
||||
orderRecipientDO.setName( userAddressBO.getName() );
|
||||
orderRecipientDO.setMobile( userAddressBO.getMobile() );
|
||||
orderRecipientDO.setAddress( userAddressBO.getAddress() );
|
||||
|
||||
return orderRecipientDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderRecipientBO convert(OrderRecipientDO orderRecipientDO) {
|
||||
if ( orderRecipientDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderRecipientBO orderRecipientBO = new OrderRecipientBO();
|
||||
|
||||
orderRecipientBO.setCreateTime( orderRecipientDO.getCreateTime() );
|
||||
orderRecipientBO.setUpdateTime( orderRecipientDO.getUpdateTime() );
|
||||
orderRecipientBO.setId( orderRecipientDO.getId() );
|
||||
orderRecipientBO.setOrderId( orderRecipientDO.getOrderId() );
|
||||
orderRecipientBO.setAreaNo( orderRecipientDO.getAreaNo() );
|
||||
orderRecipientBO.setName( orderRecipientDO.getName() );
|
||||
orderRecipientBO.setMobile( orderRecipientDO.getMobile() );
|
||||
orderRecipientBO.setType( orderRecipientDO.getType() );
|
||||
orderRecipientBO.setAddress( orderRecipientDO.getAddress() );
|
||||
|
||||
return orderRecipientBO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderRecipientBO> convert(List<OrderRecipientDO> orderRecipientDOList) {
|
||||
if ( orderRecipientDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderRecipientBO> list = new ArrayList<OrderRecipientBO>( orderRecipientDOList.size() );
|
||||
for ( OrderRecipientDO orderRecipientDO : orderRecipientDOList ) {
|
||||
list.add( convert( orderRecipientDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Recipient convertOrderInfoRecipient(OrderRecipientDO orderRecipientDO) {
|
||||
if ( orderRecipientDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Recipient recipient = new Recipient();
|
||||
|
||||
recipient.setId( orderRecipientDO.getId() );
|
||||
recipient.setOrderId( orderRecipientDO.getOrderId() );
|
||||
recipient.setAreaNo( orderRecipientDO.getAreaNo() );
|
||||
recipient.setName( orderRecipientDO.getName() );
|
||||
recipient.setMobile( orderRecipientDO.getMobile() );
|
||||
recipient.setType( orderRecipientDO.getType() );
|
||||
recipient.setAddress( orderRecipientDO.getAddress() );
|
||||
|
||||
return recipient;
|
||||
}
|
||||
}
|
|
@ -1,145 +0,0 @@
|
|||
package cn.iocoder.mall.order.biz.convert;
|
||||
|
||||
import cn.iocoder.mall.order.api.bo.OrderReturnInfoBO.OrderItem;
|
||||
import cn.iocoder.mall.order.api.bo.OrderReturnInfoBO.ReturnInfo;
|
||||
import cn.iocoder.mall.order.api.bo.OrderReturnListBO.OrderReturn;
|
||||
import cn.iocoder.mall.order.api.dto.OrderReturnApplyDTO;
|
||||
import cn.iocoder.mall.order.api.dto.OrderReturnCreateDTO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderItemDO;
|
||||
import cn.iocoder.mall.order.biz.dataobject.OrderReturnDO;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated(
|
||||
value = "org.mapstruct.ap.MappingProcessor",
|
||||
date = "2019-05-24T11:39:07+0800",
|
||||
comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_121 (Oracle Corporation)"
|
||||
)
|
||||
public class OrderReturnConvertImpl implements OrderReturnConvert {
|
||||
|
||||
@Override
|
||||
public OrderReturnDO convert(OrderReturnCreateDTO orderReturnCreate) {
|
||||
if ( orderReturnCreate == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderReturnDO orderReturnDO = new OrderReturnDO();
|
||||
|
||||
orderReturnDO.setOrderId( orderReturnCreate.getOrderId() );
|
||||
|
||||
return orderReturnDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderReturnDO convert(OrderReturnApplyDTO orderReturnApplyDTO) {
|
||||
if ( orderReturnApplyDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderReturnDO orderReturnDO = new OrderReturnDO();
|
||||
|
||||
orderReturnDO.setOrderId( orderReturnApplyDTO.getOrderId() );
|
||||
orderReturnDO.setReason( orderReturnApplyDTO.getReason() );
|
||||
orderReturnDO.setDescribe( orderReturnApplyDTO.getDescribe() );
|
||||
|
||||
return orderReturnDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnInfo convert(OrderReturnDO orderReturnDO) {
|
||||
if ( orderReturnDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ReturnInfo returnInfo = new ReturnInfo();
|
||||
|
||||
returnInfo.setId( orderReturnDO.getId() );
|
||||
returnInfo.setServiceNumber( orderReturnDO.getServiceNumber() );
|
||||
returnInfo.setOrderId( orderReturnDO.getOrderId() );
|
||||
returnInfo.setOrderNo( orderReturnDO.getOrderNo() );
|
||||
returnInfo.setOrderLogisticsId( orderReturnDO.getOrderLogisticsId() );
|
||||
returnInfo.setRefundPrice( orderReturnDO.getRefundPrice() );
|
||||
returnInfo.setReason( orderReturnDO.getReason() );
|
||||
returnInfo.setDescribe( orderReturnDO.getDescribe() );
|
||||
returnInfo.setApprovalTime( orderReturnDO.getApprovalTime() );
|
||||
returnInfo.setLogisticsTime( orderReturnDO.getLogisticsTime() );
|
||||
returnInfo.setReceiverTime( orderReturnDO.getReceiverTime() );
|
||||
returnInfo.setClosingTime( orderReturnDO.getClosingTime() );
|
||||
returnInfo.setServiceType( orderReturnDO.getServiceType() );
|
||||
returnInfo.setStatus( orderReturnDO.getStatus() );
|
||||
|
||||
return returnInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderItem> convert(List<OrderItemDO> orderItemDOList) {
|
||||
if ( orderItemDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderItem> list = new ArrayList<OrderItem>( orderItemDOList.size() );
|
||||
for ( OrderItemDO orderItemDO : orderItemDOList ) {
|
||||
list.add( orderItemDOToOrderItem( orderItemDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderReturn> convertListBO(List<OrderReturnDO> orderReturnDOList) {
|
||||
if ( orderReturnDOList == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
List<OrderReturn> list = new ArrayList<OrderReturn>( orderReturnDOList.size() );
|
||||
for ( OrderReturnDO orderReturnDO : orderReturnDOList ) {
|
||||
list.add( orderReturnDOToOrderReturn( orderReturnDO ) );
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
protected OrderItem orderItemDOToOrderItem(OrderItemDO orderItemDO) {
|
||||
if ( orderItemDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderItem orderItem = new OrderItem();
|
||||
|
||||
orderItem.setSkuId( orderItemDO.getSkuId() );
|
||||
orderItem.setSkuName( orderItemDO.getSkuName() );
|
||||
orderItem.setSkuImage( orderItemDO.getSkuImage() );
|
||||
orderItem.setQuantity( orderItemDO.getQuantity() );
|
||||
orderItem.setPresentTotal( orderItemDO.getPresentTotal() );
|
||||
|
||||
return orderItem;
|
||||
}
|
||||
|
||||
protected OrderReturn orderReturnDOToOrderReturn(OrderReturnDO orderReturnDO) {
|
||||
if ( orderReturnDO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
OrderReturn orderReturn = new OrderReturn();
|
||||
|
||||
orderReturn.setId( orderReturnDO.getId() );
|
||||
orderReturn.setServiceNumber( orderReturnDO.getServiceNumber() );
|
||||
orderReturn.setOrderId( orderReturnDO.getOrderId() );
|
||||
orderReturn.setOrderNo( orderReturnDO.getOrderNo() );
|
||||
orderReturn.setOrderLogisticsId( orderReturnDO.getOrderLogisticsId() );
|
||||
orderReturn.setRefundPrice( orderReturnDO.getRefundPrice() );
|
||||
orderReturn.setReason( orderReturnDO.getReason() );
|
||||
orderReturn.setDescribe( orderReturnDO.getDescribe() );
|
||||
orderReturn.setApprovalTime( orderReturnDO.getApprovalTime() );
|
||||
orderReturn.setLogisticsTime( orderReturnDO.getLogisticsTime() );
|
||||
orderReturn.setReceiverTime( orderReturnDO.getReceiverTime() );
|
||||
orderReturn.setClosingTime( orderReturnDO.getClosingTime() );
|
||||
orderReturn.setServiceType( orderReturnDO.getServiceType() );
|
||||
orderReturn.setStatus( orderReturnDO.getStatus() );
|
||||
orderReturn.setCreateTime( orderReturnDO.getCreateTime() );
|
||||
orderReturn.setUpdateTime( orderReturnDO.getUpdateTime() );
|
||||
|
||||
return orderReturn;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue