DiliServiceCoverageDaoImpl.java 1.27 KB

package com.diligrp.website.dao.impl;


import java.util.List;

import org.springframework.stereotype.Component;

import com.diligrp.website.util.dao.impl.BaseDaoImpl;
import com.diligrp.website.dao.DiliServiceCoverageDao;


import com.diligrp.website.domain.DiliServiceCoverage;

/**
 * <B>Description</B>  <br />
 * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
 * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
 * <B>Company</B> 地利集团
 * @createTime 2014-6-3 11:33:00
 * @author template
 */
@Component
public class DiliServiceCoverageDaoImpl extends BaseDaoImpl<DiliServiceCoverage> implements DiliServiceCoverageDao{

    public List<DiliServiceCoverage> findByService(Long serviceId){
        return getSqlSessionTemplate().selectList(this.getClass().getCanonicalName() + ".getByServiceId", serviceId);
    }

    @Override
    public Boolean deleteByServiceId(Long serviceId) {
        getSqlSessionTemplate().delete(this.getClass().getCanonicalName() + ".deleteByServiceId", serviceId);
        return true;
    }
    public List<DiliServiceCoverage> findServiceByPickId(Long pickId){
        return getSqlSessionTemplate().selectList(this.getClass().getCanonicalName() + ".getByPickUpId", pickId);
    }
}