TdCCustPersonFreezeDaoImpl.java
3.41 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
package com.zteits.pay.dao.impl;
import com.zteits.pay.domain.TdCCustPersonFreeze;
import com.zteits.pay.domain.TdCCustPersonFreezeExample;
import com.zteits.clouds.api.dto.pay.param.TdCCustPersonFreezeRequest;
import com.zteits.pay.dao.TdCCustPersonFreezeDao;
import com.zteits.pay.mapper.TdCCustPersonFreezeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.List;
@Component
public class TdCCustPersonFreezeDaoImpl implements TdCCustPersonFreezeDao {
@Autowired
private TdCCustPersonFreezeMapper tdCCustPersonFreezeMapper;
@Override
public int deleteTdCCustPersonFreezeByPrimaryKey(Long id, String opId, String opName) {
TdCCustPersonFreeze record = new TdCCustPersonFreeze();
record.setId(id);
record.setModfiyEmpid(opId);
record.setModfiyDate(new Date());
return tdCCustPersonFreezeMapper.updateByPrimaryKeySelective(record);
}
@Override
public int saveTdCCustPersonFreeze(TdCCustPersonFreeze tdCCustPersonFreeze) {
if(tdCCustPersonFreeze.getCreateDate()==null){
tdCCustPersonFreeze.setCreateDate(new Date());
}
if(tdCCustPersonFreeze.getCreateDate()==null){
tdCCustPersonFreeze.setModfiyDate(new Date());
}
return tdCCustPersonFreezeMapper.insertSelective(tdCCustPersonFreeze);
}
@Override
public int updateByExampleSelective(TdCCustPersonFreeze record, TdCCustPersonFreezeExample example) {
return tdCCustPersonFreezeMapper.updateByExampleSelective(record,example);
}
@Override
public int updateByPrimaryKeySelective(TdCCustPersonFreeze record) {
return tdCCustPersonFreezeMapper.updateByPrimaryKeySelective(record);
}
@Override
public List<TdCCustPersonFreeze> selectByExample(TdCCustPersonFreezeExample example) {
return tdCCustPersonFreezeMapper.selectByExample(example);
}
@Override
public TdCCustPersonFreeze queryByPrimaryKey(Long id) {
return tdCCustPersonFreezeMapper.selectByPrimaryKey(id);
}
@Override
public List<TdCCustPersonFreeze> queryTdCCustPersonFreeze(TdCCustPersonFreezeRequest request) {
//TODO 编写smapper实现
//return tdCCustPersonFreezeSMapper.queryTdCCustPersonFreeze(request);
return null;
}
@Override
public int batchDeleteTdCCustPersonFreezeByPrimaryKey(List<Long> ids, String opId, String opName) {
TdCCustPersonFreeze record = new TdCCustPersonFreeze();
record.setModfiyEmpid(opId);
record.setModfiyDate(new Date());
//where条件
TdCCustPersonFreezeExample example = new TdCCustPersonFreezeExample();
example.createCriteria().andIdIn(ids);
return tdCCustPersonFreezeMapper.updateByExampleSelective(record,example);
}
/*@Override
public PageInfo<TdCCustPersonFreeze> queryTdCCustPersonFreezeForPage(TdCCustPersonFreezeRequest request) {
PageHelper.startPage(request.getBaseRequest().getPageNum(), request.getBaseRequest().getPageSize());
//TODO 编写smapper实现
*//*List<TdCCustPersonFreeze> list = tdCCustPersonFreezeSMapper.queryTdCCustPersonFreeze(request);
if (CollectionUtils.isNotEmpty(list)) {
return new PageInfo<TdCCustPersonFreeze>(list);
}*//*
return new PageInfo<TdCCustPersonFreeze>(new ArrayList<TdCCustPersonFreeze>());
}*/
}