PickUpPointDaoImpl.java
7.02 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
package com.diligrp.website.dao.impl;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.diligrp.website.dao.PickUpPointDao;
import com.diligrp.website.domain.PickUpPointDomain;
import com.diligrp.website.util.dao.BaseQuery;
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日 下午3:55:58
* @author liujie
*/
@Repository
public class PickUpPointDaoImpl extends BaseDaoImpl<PickUpPointDomain>
implements PickUpPointDao {
private static final String PREFIX = PickUpPointDaoImpl.class
.getCanonicalName();
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#getPickInfo(com.diligrp.website
* .util.dao.BaseQuery)
*/
@Override
public List<PickUpPointDomain> getPickInfo(BaseQuery bq) throws Exception {
return getSqlSessionTemplate().selectList(
PREFIX + ".SELECT-PICK-UP-INFO", bq);
}
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#getCountPickInfo(com.diligrp.website
* .util.dao.BaseQuery)
*/
@Override
public Integer getCountPickInfo(BaseQuery bq) throws Exception {
return getSqlSessionTemplate().selectOne(
PREFIX + ".SELECT-COUNT-PICK-UP-INFO", bq);
}
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#savePickUpInfo(com.diligrp.website
* .domain.PickUpPointDomain)
*/
@Override
public Long savePickUpInfo(PickUpPointDomain pickUpPointDomain)
throws Exception {
getSqlSessionTemplate().insert(PREFIX + ".INSERT-PICKUP-INFO", pickUpPointDomain);
return pickUpPointDomain.getId();
}
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#modifyPickUpInfo(com.diligrp.website
* .domain.PickUpPointDomain)
*/
@Override
public boolean modifyPickUpInfo(PickUpPointDomain pickUpPointDomain)
throws Exception {
return getSqlSessionTemplate().update(PREFIX + ".UPDATE-PICKUP-INFO",
pickUpPointDomain) > 0 ? true : false;
}
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#modifyPickUpInfoDeafult(com.diligrp
* .website.domain.PickUpPointDomain)
*/
@Override
public boolean modifyPickUpInfoDeafult() throws Exception {
return getSqlSessionTemplate().update(
PREFIX + ".UPDATE-PICKUP-INFO-STATE-NOT-DEAFULT") > 0;
}
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#getPickUpPointDomainInfo(java.
* lang.Long)
*/
@Override
public PickUpPointDomain getPickUpPointDomainInfo(Long id) throws Exception {
return getSqlSessionTemplate().selectOne(
PREFIX + ".SELECT-ONE-PICK-UP-INFO", id);
}
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#modifyStateByPickUpId(java.lang
* .Long)
*/
@Override
public boolean modifyStateByPickUpId(Long id) throws Exception {
return getSqlSessionTemplate().update(
PREFIX + ".UPDATE-PICKUP-INFO-STATE", id) > 0;
}
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#getRelationPickInfo(java.lang.
* Long)
*/
@Override
public List<PickUpPointDomain> getRelationPickInfo(Long id) {
return getSqlSessionTemplate().selectList(
PREFIX + ".SELECT-RELATION-PICKINFO", id);
}
/*
* (non-Javadoc)
* @see com.diligrp.website.dao.PickUpPointDao#getNotMarketPickInfo()
*/
@Override
public List<PickUpPointDomain> getNotMarketPickInfo() {
return getSqlSessionTemplate().selectList(
PREFIX + ".SELECT-IS-MARKET-RELATION-PICKINFO");
}
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#modifyRelationPoint(java.util.Map)
*/
@Override
public boolean modifyRelationPoint(Map<String, Long> map) {
return getSqlSessionTemplate().update(
PREFIX + ".UPDATE-RELATION-PICKINFO", map) > 0;
}
/*
* (non-Javadoc)
* @see
* com.diligrp.website.dao.PickUpPointDao#modifyRelationPointParent(java
* .lang.Long)
*/
@Override
public boolean modifyRelationPointParent(Long id) {
return getSqlSessionTemplate().update(
PREFIX + ".UPDATE-PICKUP-RELATION-INFO-STATE", id) > 0;
}
/*
* (non-Javadoc)
* @see com.diligrp.website.dao.PickUpPointDao#getIsMarketPickUpInfo()
*/
@Override
public List<PickUpPointDomain> getIsMarketPickUpInfo() {
return getSqlSessionTemplate().selectList(
PREFIX + ".SELECT-IS-MARKET-PICKINFO");
}
/* (non-Javadoc)
* @see com.diligrp.website.dao.PickUpPointDao#getIsNotMarketPickUpInfo()
*/
@Override
public List<PickUpPointDomain> getIsNotMarketPickUpInfo() throws Exception {
return getSqlSessionTemplate().selectList(
PREFIX + ".SELECT-IS-NOT-MARKET-PICKINFO");
}
/* (non-Javadoc)
* @see com.diligrp.website.dao.PickUpPointDao#getAllMarketPickUpInfo()
*/
@Override
public List<PickUpPointDomain> getAllMarketPickUpInfo() throws Exception {
return getSqlSessionTemplate().selectList(
PREFIX + ".SELECT-ALL-MARKET-PICKINFO");
}
/* (non-Javadoc)
* @see com.diligrp.website.dao.PickUpPointDao#getCodeByPickUpInfo(java.lang.String)
*/
@Override
public PickUpPointDomain getCodeByPickUpInfo(String code) throws Exception {
return getSqlSessionTemplate().selectOne(
PREFIX + ".SELECT-CODE-BY-PICKINFO",code);
}
@Override
public PickUpPointDomain getDefaultPickUpInfo() throws Exception {
return getSqlSessionTemplate().selectOne(
PREFIX + ".SELECT-DEFALUT-PICK-UP-INFO");
}
@Override
public List<PickUpPointDomain> getPickUpInfoByName(String pickName) {
return getSqlSessionTemplate().selectList(PREFIX + ".getPickUpInfoByName", pickName);
}
@Override
public List<PickUpPointDomain> getRecommendPickUp() {
return getSqlSessionTemplate().selectList(PREFIX + ".getRecommendPickUp");
}
@Override
public List<PickUpPointDomain> getPickUpListByCityId(Long cityId) {
return getSqlSessionTemplate().selectList(PREFIX + ".getPickUpListByCityId", cityId);
}
@Override
public List<PickUpPointDomain> getPickUpInfoByCityName(String cityName) {
return getSqlSessionTemplate().selectList(PREFIX + ".getPickUpInfoByCityName", cityName);
}
@Override
public List<PickUpPointDomain> getAllPickUpListByCityId(Long cityId) {
return getSqlSessionTemplate().selectList(PREFIX + ".getAllPickUpListByCityId", cityId);
}
}