TdCCustUseDayDaoImpl.java
1.42 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
package com.zteits.pay.dao.impl;
import com.zteits.pay.dao.TdCCustUseDayDao;
import com.zteits.pay.domain.TdCCustUseDay;
import com.zteits.pay.mapper.TdCCustUseDayMapper;
import com.zteits.pay.mapper.smapper.TdCCustUseDaySMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.util.List;
/**
* Copyright: Copyright (c) 2019 zteits
*
* @Description:
* @version: v1.0.0
* @author: xiejianpeng
* @date: 2019/2/18 11
* Modification History:
* Date Author Version Description
* ---------------------------------------------------------*
* 2019/2/18 xiejianpeng v1.0.0 创建
*/
@Component
public class TdCCustUseDayDaoImpl implements TdCCustUseDayDao {
@Autowired
private TdCCustUseDayMapper tdCCustUseDayMapper;
@Autowired
private TdCCustUseDaySMapper tdCCustUseDaySMapper;
@Override
public int saveCustUseDay(TdCCustUseDay record){
int flg = tdCCustUseDayMapper.insertSelective(record);
return flg;
}
@Override
public int selectCustUseDayByUserPhone(TdCCustUseDay record){
List<TdCCustUseDay> custUseDays = tdCCustUseDaySMapper.selectCustUseDayByUserPhone(record);
if(CollectionUtils.isEmpty(custUseDays)){
return 0;
}
return custUseDays.size();
}
}