TVipAreaCardCustInfoRelDaoImpl.java
5.03 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
package com.zteits.bill.dao.impl;
import com.zteits.bill.dao.TVipAreaCardCustInfoRelDao;
import com.zteits.bill.domain.TVipAreaCardCustInfoRel;
import com.zteits.bill.domain.TVipAreaCardCustInfoRelExample;
import com.zteits.bill.domain.TVipCardCustInfo;
import com.zteits.bill.mapper.TVipAreaCardCustInfoRelMapper;
import com.zteits.bill.mapper.smapper.TVipAreaCardCustInfoRelSMapper;
import com.zteits.clouds.api.apibase.constants.DataStatusEnum;
import com.zteits.clouds.api.dto.bill.param.DeleteAreaCardByCustCardNoReq;
import com.zteits.clouds.api.dto.bill.vipcard.param.QueryVipCardPlNoListRequest;
import com.zteits.clouds.api.dto.bill.vipcard.param.VipCardInfoReq;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
@Component
public class TVipAreaCardCustInfoRelDaoImpl implements TVipAreaCardCustInfoRelDao {
@Autowired
private TVipAreaCardCustInfoRelMapper tVipAreaCardCustInfoRelMapper;
@Autowired
private TVipAreaCardCustInfoRelSMapper tVipAreaCardCustInfoRelSMapper;
@Override
public int saveTVipAreaCardCustInfoRel(TVipAreaCardCustInfoRel tVipAreaCardCustInfoRel) {
return tVipAreaCardCustInfoRelMapper.insertSelective(tVipAreaCardCustInfoRel);
}
@Override
public int bathSaveTVipAreaCardCustInfoRel(List<TVipAreaCardCustInfoRel> tVipAreaCardCustInfoRels) {
return tVipAreaCardCustInfoRelSMapper.bathSaveTVipAreaCardCustInfoRel(tVipAreaCardCustInfoRels);
}
@Override
public int updateByExampleSelective(TVipAreaCardCustInfoRel record, TVipAreaCardCustInfoRelExample example) {
return tVipAreaCardCustInfoRelMapper.updateByExampleSelective(record,example);
}
@Override
public int updateByPrimaryKeySelective(TVipAreaCardCustInfoRel record) {
return tVipAreaCardCustInfoRelMapper.updateByPrimaryKeySelective(record);
}
@Override
public List<TVipAreaCardCustInfoRel> selectByExample(TVipAreaCardCustInfoRelExample example) {
return tVipAreaCardCustInfoRelMapper.selectByExample(example);
}
@Override
public TVipAreaCardCustInfoRel queryByPrimaryKey(Long id) {
return tVipAreaCardCustInfoRelMapper.selectByPrimaryKey(id);
}
@Override
public List<TVipAreaCardCustInfoRel> queryTVipAreaCardCustInfoRel(List<String> custCardNos) {
TVipAreaCardCustInfoRelExample example = new TVipAreaCardCustInfoRelExample();
example.createCriteria().andDataStateEqualTo(DataStatusEnum.DATA_STATUS_VALID.value())
.andCustCardNoIn(custCardNos);
List<TVipAreaCardCustInfoRel> list = tVipAreaCardCustInfoRelMapper.selectByExample(example);
return list;
}
@Override
public int batchDeleteTVipAreaCardCustInfoRelByPrimaryKey(List<Long> ids, String opId, String opName) {
TVipAreaCardCustInfoRel record = new TVipAreaCardCustInfoRel();
record.setDataState(DataStatusEnum.DATA_STATUS_NO_VALID.value());
TVipAreaCardCustInfoRelExample example = new TVipAreaCardCustInfoRelExample();
example.createCriteria().andIdIn(ids);
return tVipAreaCardCustInfoRelMapper.updateByExampleSelective(record,example);
}
@Override
public List<String> queryHotParkListForVipCard(QueryVipCardPlNoListRequest request) {
return tVipAreaCardCustInfoRelSMapper.queryHotParkListForVipCard(request);
}
@Override
public int updateAreaCardPushState(DeleteAreaCardByCustCardNoReq request) {
TVipAreaCardCustInfoRel record = new TVipAreaCardCustInfoRel();
record.setPushState(0);
TVipAreaCardCustInfoRelExample example = new TVipAreaCardCustInfoRelExample();
example.createCriteria().andCustCardNoEqualTo(request.getCustCardNo())
.andDataStateEqualTo(DataStatusEnum.DATA_STATUS_VALID.value())
.andPushStateEqualTo(1);
return tVipAreaCardCustInfoRelMapper.updateByExampleSelective(record,example);
}
@Override
public Integer queryParkAreaCardCountByPlNo(String plNo) {
return tVipAreaCardCustInfoRelSMapper.queryParkAreaCardCountByPlNo(plNo);
}
/**
* 根据停车场编号与车牌号码查询当前有效的会员车信息
*
* @param request
* @return
*/
@Override
public TVipCardCustInfo queryCardCustInfoByParkcodeAndCarnumber(VipCardInfoReq request) {
return tVipAreaCardCustInfoRelMapper.queryCardCustInfoByParkcodeAndCarnumber(request);
}
/*@Override
public PageInfo<TVipAreaCardCustInfoRel> queryTVipAreaCardCustInfoRelForPage(TVipAreaCardCustInfoRelRequest request) {
PageHelper.startPage(request.getBaseRequest().getPageNum(), request.getBaseRequest().getPageSize());
//TODO 编写smapper实现
*//*List<TVipAreaCardCustInfoRel> list = tVipAreaCardCustInfoRelSMapper.queryTVipAreaCardCustInfoRel(request);
if (CollectionUtils.isNotEmpty(list)) {
return new PageInfo<TVipAreaCardCustInfoRel>(list);
}*//*
return new PageInfo<TVipAreaCardCustInfoRel>(new ArrayList<TVipAreaCardCustInfoRel>());
}*/
}