package com.huatek.busi.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.huatek.busi.entity.RBlqDataRecord;
import com.huatek.busi.entity.RDlDataRecord;
import com.huatek.busi.entity.RMasterDataRecord;
import com.huatek.busi.service.IRBlqDataRecordService;
import com.huatek.busi.service.IRDlDataRecordService;
import com.huatek.busi.service.IRMasterDataRecordService;
import com.huatek.frame.base.util.BeanUtils;
import com.huatek.torch.sql.dao.impl.BaseDao;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
@Service(interfaceClass = IRDlDataRecordService.class)
@Transactional(rollbackFor = Exception.class)
public class RDlDataRecordServiceImpl extends BaseDao<RDlDataRecord, String> implements IRDlDataRecordService {

    @Override
    public int insert(RMasterDataRecord rMasterDataRecord){
        RDlDataRecord rDlDataRecord = new RDlDataRecord();
        BeanUtils.copyProperties(rMasterDataRecord, rDlDataRecord);
        return this.addLocal(rDlDataRecord);
    }
}
