PickUpPersonDaoImpl.java 1.71 KB
package com.diligrp.website.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.diligrp.website.dao.PickUpPersonDao;
import com.diligrp.website.domain.PickUpPerson;
import com.diligrp.website.domain.PickUpPointDomain;
import com.diligrp.website.util.dao.impl.BaseDaoImpl;


/**
 * <B>Description</B> TODO <br />
 * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
 * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
 * <B>Company</B> 地利集团
 * @createTime 2014年8月13日 下午4:36:10
 * @author liujie
 */
@Repository
public class PickUpPersonDaoImpl extends BaseDaoImpl<PickUpPointDomain> implements PickUpPersonDao {
    private static final String PREFIX = PickUpPersonDaoImpl.class
            .getCanonicalName();
    /* (non-Javadoc)
     * @see com.diligrp.website.dao.PickUpPersonDao#getPickUpList(java.lang.Long)
     */
    @Override
    public List<PickUpPerson> getPickUpList(Long pickId) {
        return getSqlSessionTemplate().selectList(PREFIX + ".SELECT-PICK-UP-PERSON-INFO", pickId);
    }

    /* (non-Javadoc)
     * @see com.diligrp.website.dao.PickUpPersonDao#savePickUpPerson(com.diligrp.website.domain.PickUpPerson)
     */
    @Override
    public boolean savePickUpPerson(PickUpPerson pickUpPerson) {
        return getSqlSessionTemplate().insert(PREFIX + ".INSERT-PICKUP-PERSON-INFO", pickUpPerson)>0;
    }

    /* (non-Javadoc)
     * @see com.diligrp.website.dao.PickUpPersonDao#deletePickUpPerson(java.lang.Long)
     */
    @Override
    public boolean deletePickUpPerson(Long pickId) {
        return getSqlSessionTemplate().delete(PREFIX + ".DELETE-PICKUP-PERSON-BY-PICKID", pickId)>0;
    }

}