package com.sifang.modules.customer.dao;

import com.sifang.modules.customer.entity.CrmCustomerOrderRel;
import com.sifang.modules.sys.common.persistence.BaseDao;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author hongzq
 */
@Repository
public class CrmCustomerOrderRelDao extends BaseDao<CrmCustomerOrderRel> {

    @Transactional(rollbackFor = Exception.class)
    public void createOrderRel(String customerOrderId, String customerEntryId) {
        CrmCustomerOrderRel rel = new CrmCustomerOrderRel();
        rel.setCustomerEntryId(customerEntryId);
        rel.setCustomerOrderId(customerOrderId);
        save(rel);
    }

}
