PickUpCityDaoImpl.java
2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.diligrp.website.dao.impl;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.diligrp.website.dao.PickUpCityDao;
import com.diligrp.website.domain.PickUpCity;
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月15日 上午11:08:45
* @author liujie
*/
@Repository
public class PickUpCityDaoImpl extends BaseDaoImpl<PickUpCity> implements PickUpCityDao{
private static final String PREFIX = PickUpCityDaoImpl.class
.getCanonicalName();
/* (non-Javadoc)
* @see com.diligrp.website.dao.PickUpAddressDao#savePickUpCity(com.diligrp.website.domain.PickUpCity)
*/
@Override
public boolean savePickUpCity(PickUpCity pickUpCity) {
return getSqlSessionTemplate().insert(PREFIX + ".INSERT-PICKUP-CITY-INFO", pickUpCity)>0;
}
/* (non-Javadoc)
* @see com.diligrp.website.dao.PickUpAddressDao#getPickUpCityById(java.lang.Long)
*/
@Override
public List<PickUpCity> getPickUpCityById(Long id) {
return getSqlSessionTemplate().selectList(PREFIX + ".SELECT-PICK-UP-CITY-INFO", id);
}
/* (non-Javadoc)
* @see com.diligrp.website.dao.PickUpCityDao#deletePickUpCityById(java.lang.Long)
*/
@Override
public boolean deletePickUpCityById(Long pickId) {
return getSqlSessionTemplate().delete(PREFIX + ".DELETE-PICKUP-CITY-BY-PICKID", pickId)>0;
}
/* (non-Javadoc)
* @see com.diligrp.website.dao.PickUpCityDao#getAllCity()
*/
@Override
public List<PickUpCity> getAllCity() {
return getSqlSessionTemplate().selectList(PREFIX + ".SELECT-All-CITY-INFO");
}
@Override
public PickUpCity getPickIdByCityId(Long cityId) {
return getSqlSessionTemplate().selectOne(PREFIX + ".SELECT-PICKID-BY-CITYID",cityId);
}
@Override
public List<PickUpCity> getPickUpIdListByCityId(Long cityId) {
return getSqlSessionTemplate().selectList(PREFIX + ".SELECT-PICKID-BY-CITYID", cityId);
}
}