package com.huatek.busi.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.huatek.busi.entity.RDlDataRecord;
import com.huatek.busi.entity.RKggDataRecord;
import com.huatek.busi.entity.RMasterDataRecord;
import com.huatek.busi.service.IRDlDataRecordService;
import com.huatek.busi.service.IRKggDataRecordService;
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 = IRKggDataRecordService.class)
@Transactional(rollbackFor = Exception.class)
public class RKggDataRecordServiceImpl extends BaseDao<RKggDataRecord, String> implements IRKggDataRecordService {

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