package cn.com.poc.thirdparty.resource.demand.pay.convert;


import cn.com.poc.thirdparty.resource.demand.pay.dto.OrderDetailDto;
import cn.com.poc.thirdparty.resource.demand.pay.entity.OrderDetailEntity;
import cn.com.poc.thirdparty.resource.demand.pay.query.OrderInfoListQueryItem;

/**
 * @author Roger Wu
 */
@Deprecated
public class OrderConvert {

    public static OrderDetailEntity convertOrderDetailItem2Entity(OrderInfoListQueryItem orderInfoListQueryItem) {
        OrderDetailEntity orderDetailEntity = new OrderDetailEntity();
        orderDetailEntity.setOrderSn(orderInfoListQueryItem.getOrderSn());
        orderDetailEntity.setOrderType(orderInfoListQueryItem.getOrderType());
        orderDetailEntity.setMemberId(orderInfoListQueryItem.getMemberId());
        orderDetailEntity.setTotalAmount(orderInfoListQueryItem.getTotalAmount());
        orderDetailEntity.setPaidAmount(orderInfoListQueryItem.getPaidAmount());
        orderDetailEntity.setNeedPayAmount(orderInfoListQueryItem.getNeedPayAmount());
        orderDetailEntity.setCurrency(orderInfoListQueryItem.getCurrency());
        orderDetailEntity.setOrderStatus(orderInfoListQueryItem.getOrderStatus());
        orderDetailEntity.setPayStatus(orderInfoListQueryItem.getPayStatus());
        orderDetailEntity.setPayTime(orderInfoListQueryItem.getPayTime());
        orderDetailEntity.setCancelTime(orderInfoListQueryItem.getCancelTime());
        orderDetailEntity.setMerchantName(orderInfoListQueryItem.getMerchantName());
        orderDetailEntity.setNickName(orderInfoListQueryItem.getNickName());
        orderDetailEntity.setMobilePhone(orderInfoListQueryItem.getMobilePhone());
        orderDetailEntity.setRelationType(orderInfoListQueryItem.getRelationType());
        orderDetailEntity.setRelationId(orderInfoListQueryItem.getRelationId());
        orderDetailEntity.setRelationName(orderInfoListQueryItem.getRelationName());
        orderDetailEntity.setCreatedTime(orderInfoListQueryItem.getCreatedTime());
        return orderDetailEntity;
    }

    public static OrderDetailEntity convertOrderDetailDto2Entity(OrderDetailDto orderDetailDto) {
        OrderDetailEntity orderDetailEntity = new OrderDetailEntity();
        orderDetailEntity.setOrderSn(orderDetailDto.getOrderSn());
        orderDetailEntity.setOrderType(orderDetailDto.getOrderType());
        orderDetailEntity.setMemberId(orderDetailDto.getMemberId());
        orderDetailEntity.setTotalAmount(orderDetailDto.getTotalAmount());
        orderDetailEntity.setPaidAmount(orderDetailDto.getPaidAmount());
        orderDetailEntity.setNeedPayAmount(orderDetailDto.getNeedPayAmount());
        orderDetailEntity.setCurrency(orderDetailDto.getCurrency());
        orderDetailEntity.setOrderStatus(orderDetailDto.getOrderStatus());
        orderDetailEntity.setPayStatus(orderDetailDto.getPayStatus());
        orderDetailEntity.setPayTime(orderDetailDto.getPayTime());
        orderDetailEntity.setCancelTime(orderDetailDto.getCancelTime());
        orderDetailEntity.setMerchantName(orderDetailDto.getMerchantName());
        orderDetailEntity.setNickName(orderDetailDto.getNickName());
        orderDetailEntity.setMobilePhone(orderDetailDto.getMobilePhone());
        orderDetailEntity.setOrderDetailId(orderDetailDto.getOrderDetailId());
        orderDetailEntity.setOrderId(orderDetailDto.getOrderId());
        orderDetailEntity.setRelationType(orderDetailDto.getRelationType());
        orderDetailEntity.setRelationId(orderDetailDto.getRelationId());
        orderDetailEntity.setRelationName(orderDetailDto.getRelationName());
        orderDetailEntity.setCreatedTime(orderDetailDto.getCreatedTime());
        return orderDetailEntity;

    }

    public static OrderDetailDto convertOrderEntity2Dto(OrderDetailEntity orderDetailEntity) {
        OrderDetailDto orderDetailDto = new OrderDetailDto();
        orderDetailDto.setOrderDetailId(orderDetailEntity.getOrderDetailId());
        orderDetailDto.setOrderId(orderDetailEntity.getOrderId());
        orderDetailDto.setRelationType(orderDetailEntity.getRelationType());
        orderDetailDto.setRelationId(orderDetailEntity.getRelationId());
        orderDetailDto.setRelationName(orderDetailEntity.getRelationName());
        orderDetailDto.setOrderSn(orderDetailEntity.getOrderSn());
        orderDetailDto.setOrderType(orderDetailEntity.getOrderType());
        orderDetailDto.setMemberId(orderDetailEntity.getMemberId());
        orderDetailDto.setTotalAmount(orderDetailEntity.getTotalAmount());
        orderDetailDto.setPaidAmount(orderDetailEntity.getPaidAmount());
        orderDetailDto.setNeedPayAmount(orderDetailEntity.getNeedPayAmount());
        orderDetailDto.setCurrency(orderDetailEntity.getCurrency());
        orderDetailDto.setOrderStatus(orderDetailEntity.getOrderStatus());
        orderDetailDto.setPayStatus(orderDetailEntity.getPayStatus());
        orderDetailDto.setPayTime(orderDetailEntity.getPayTime());
        orderDetailDto.setCancelTime(orderDetailEntity.getCancelTime());
        orderDetailDto.setMerchantName(orderDetailEntity.getMerchantName());
        orderDetailDto.setNickName(orderDetailEntity.getNickName());
        orderDetailDto.setMobilePhone(orderDetailEntity.getMobilePhone());
        orderDetailDto.setCreatedTime(orderDetailEntity.getCreatedTime());
        return orderDetailDto;
    }

}
