package com.xxfc.platform.order.pojo.account;

import com.alibaba.fastjson.JSON;
import com.xxfc.platform.order.pojo.dto.OrderDTO;
import lombok.Data;
import org.springframework.util.StringUtils;

/**
 * @author libin
 * @version 1.0
 * @description
 * @data 2019/11/14 19:16
 */
@Data
public class OrderAccountBo extends OrderDTO {

    private Integer accountType;
    private String accountDetail;

    private OrderAccountDetail accountDetailEntity;

    public OrderAccountDetail getAccountDetailEntity() {
        return StringUtils.hasText(accountDetail)? JSON.parseObject(accountDetail,OrderAccountDetail.class):new OrderAccountDetail();
    }
}
