package com.sw.mes.fb.checkout.service.impl;


import com.sw.mes.core.base.BaseServiceImpl;
import com.sw.mes.fb.checkout.dao.FieldExtensionRecordDao;
import com.sw.mes.fb.checkout.entity.FieldExtensionRecord;
import com.sw.mes.fb.checkout.service.FieldExtensionRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
* @Author
* @Description：
* @Date: Create in
* @Modified By:
*/
@Service
@Transactional
public class FieldExtensionRecordServiceImpl extends BaseServiceImpl<FieldExtensionRecord> implements FieldExtensionRecordService {
    FieldExtensionRecordDao dao;
	@Autowired
    public void setDao(FieldExtensionRecordDao dao) {
        super.setBaseDao(dao);
        this.dao=dao;
    }

    @Override
    public List<FieldExtensionRecord> findByAssociatedId(Long associatedId) {
        return dao.findByAssociatedId(associatedId);
    }

    @Override
    public void deleteByAssociatedId(Long associatedId) {
	    if (null != associatedId){
            dao.deleteByProductModelId(associatedId);
        }
    }
}
