ZoneServiceImpl.java
2.21 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
package com.huaheng.pc.config.zone.service;
import com.huaheng.common.utils.security.ShiroUtils;
import com.huaheng.pc.config.zone.domain.Zone;
import com.huaheng.pc.config.zone.mapper.ZoneMapperAuto;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* 库区 服务层实现
*
* @author huaheng
* @date 2018-08-19
*/
@Service("zone")
public class ZoneServiceImpl implements IZoneService {
@Resource
private ZoneMapperAuto aotuMapper;
public List<Zone> selectListEntityByLike(Zone condition) {
return aotuMapper.selectListEntityByLike(condition);
}
public List<Zone> selectListEntityByEqual(Zone condition) {
return aotuMapper.selectListEntityByEqual(condition);
}
public Zone selectFirstEntity(Zone condition) {
Zone item = aotuMapper.selectFirstEntity(condition);
return item;
}
public Zone selectEntityById(Integer id) {
return aotuMapper.selectEntityById(id);
}
public List<Map<String, Object>> selectListMapByEqual(String columns, Zone condition) {
return aotuMapper.selectListMapByEqual(columns, condition);
}
public Map<String, Object> selectFirstMap(String columns, Zone condition) {
Map<String, Object> item = aotuMapper.selectFirstMap(columns, condition);
return item;
}
public int insert(Zone record) {
return aotuMapper.insert(record);
}
public int updateByModel(Zone record) {
return aotuMapper.updateByModel(record);
}
public int updateByCondition(Zone record, Zone condition) {
return aotuMapper.updateByCondition(record, condition);
}
public int deleteById(Integer id) {
return aotuMapper.deleteById(id);
}
public int deleteByCondition(Zone condition) {
return aotuMapper.deleteByCondition(condition);
}
@Override
public List<Map<String, Object>> getZoneCodeList() {
Zone zone=new Zone();
zone.setWarehouseId(ShiroUtils.getWarehouseId());
zone.setDeleted(false);
zone.setEnable(true);
List<Map<String, Object>> result= this.selectListMapByEqual("id, code, name", zone);
return result;
}
}