DiliServiceDaoImpl.java 1.17 KB

package com.diligrp.website.dao.impl;


import java.util.List;

import com.diligrp.website.util.dao.BaseQuery;
import org.springframework.stereotype.Component;

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


import com.diligrp.website.domain.DiliService;

/**
 * <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 DiliServiceDaoImpl extends BaseDaoImpl<DiliService> implements DiliServiceDao{

    public List<DiliService> listAll(BaseQuery baseQuery) {
        return getSqlSessionTemplate().selectList(this.getClass().getCanonicalName() + ".listAll", baseQuery);
    }

    @Override
    public DiliService findByCode(String code) {
        List<DiliService> list = getSqlSessionTemplate().selectList(this.getClass().getCanonicalName() + ".findByCode", code);
        if (list == null || list.size() <= 0) {
            return null;
        }
        return list.get(0);
    }

}