AuthLevelDaoImpl.java
1.73 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
package com.diligrp.website.dao.impl;
import com.diligrp.website.dao.AuthLevelDao;
import com.diligrp.website.domain.AuthLevel;
import com.diligrp.website.domain.PickUpPointDomain;
import com.diligrp.website.util.dao.BaseQuery;
import com.diligrp.website.util.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Component;
import java.util.List;
@Component("authLevelDao")
public class AuthLevelDaoImpl extends BaseDaoImpl<AuthLevel>
implements AuthLevelDao {
private static final String PREFIX = AuthLevelDaoImpl.class
.getCanonicalName();
@Override
public Integer getAuthLevelCount(BaseQuery query) {
return getSqlSessionTemplate().selectOne(
PREFIX + ".getAuthLevelCount", query);
}
@Override
public List<AuthLevel> getAuthLevelList(BaseQuery query) {
return getSqlSessionTemplate().selectList(PREFIX + ".getAuthLevelList",
query);
}
@Override
public boolean save(AuthLevel authLevel) {
return super.save(authLevel);
}
@Override
public boolean modify(AuthLevel authLevel) {
return super.update(authLevel);
}
@Override
public AuthLevel getAuthLevelById(Long id) {
return super.getById(id);
}
@Override
public List<AuthLevel> getAllAuthLevel() {
return getSqlSessionTemplate().selectList(
PREFIX + ".getAllAuthLevel");
}
@Override
public AuthLevel checkName(Long id, String levelName) {
BaseQuery bq = new BaseQuery();
if (id != null) {
bq.addParam("id", id + "");
}
bq.addParam("levelName", levelName);
return getSqlSessionTemplate().selectOne(
PREFIX + ".checkName", bq);
}
}