package com.palmnest.service.estateserve.airconditioner.impl;

import com.palmnest.dao.airconditioner.AirConditionerAddTimeOrderHistoryDao;
import com.palmnest.dao.airconditioner.ConditionerAddTimeOrderExtendDao;
import com.palmnest.model.airconditioner.AirConditionerAddTimeOrderExtend;
import com.palmnest.model.airconditioner.AirConditionerAddTimeOrderHistory;
import com.palmnest.service.estateserve.airconditioner.ConditionerAddTimeOrderExtendManager;
import com.palmnest.service.impl.GenericManagerImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xc
 * @since 2023/8/9 09:39
 */
@Service("conditionerAddTimeOrderExtendManager")
public class ConditionerAddTimeOrderExtendManagerImpl extends GenericManagerImpl<AirConditionerAddTimeOrderExtend, Long> implements ConditionerAddTimeOrderExtendManager {
    private ConditionerAddTimeOrderExtendDao conditionerAddTimeOrderExtendDao;
    private AirConditionerAddTimeOrderHistoryDao airConditionerAddTimeOrderHistoryDao;


    @Autowired
    public void setConditionerAddTimeOrderExtendDao(ConditionerAddTimeOrderExtendDao conditionerAddTimeOrderExtendDao) {
        this.conditionerAddTimeOrderExtendDao = conditionerAddTimeOrderExtendDao;
        this.dao = conditionerAddTimeOrderExtendDao;
    }

    @Autowired
    public void setAirConditionerAddTimeOrderHistoryDao(AirConditionerAddTimeOrderHistoryDao airConditionerAddTimeOrderHistoryDao) {
        this.airConditionerAddTimeOrderHistoryDao = airConditionerAddTimeOrderHistoryDao;
    }

    @Override
    public AirConditionerAddTimeOrderExtend getByOrderNo(String orderNo) {
        return conditionerAddTimeOrderExtendDao.getByOrderNo(orderNo);
    }

    @Override
    public void saveHistory(AirConditionerAddTimeOrderHistory build) {
        airConditionerAddTimeOrderHistoryDao.save(build);
    }

    @Override
    public List<AirConditionerAddTimeOrderHistory> getHistoryListByOrderNo(String code) {
        return airConditionerAddTimeOrderHistoryDao.getByOrderNo(code);
    }
}
