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 custUseDays = tdCCustUseDaySMapper.selectCustUseDayByUserPhone(record); if(CollectionUtils.isEmpty(custUseDays)){ return 0; } return custUseDays.size(); } }