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 selectByExample(TdCCustPersonFreezeExample example) { return tdCCustPersonFreezeMapper.selectByExample(example); } @Override public TdCCustPersonFreeze queryByPrimaryKey(Long id) { return tdCCustPersonFreezeMapper.selectByPrimaryKey(id); } @Override public List queryTdCCustPersonFreeze(TdCCustPersonFreezeRequest request) { //TODO 编写smapper实现 //return tdCCustPersonFreezeSMapper.queryTdCCustPersonFreeze(request); return null; } @Override public int batchDeleteTdCCustPersonFreezeByPrimaryKey(List 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 queryTdCCustPersonFreezeForPage(TdCCustPersonFreezeRequest request) { PageHelper.startPage(request.getBaseRequest().getPageNum(), request.getBaseRequest().getPageSize()); //TODO 编写smapper实现 *//*List list = tdCCustPersonFreezeSMapper.queryTdCCustPersonFreeze(request); if (CollectionUtils.isNotEmpty(list)) { return new PageInfo(list); }*//* return new PageInfo(new ArrayList()); }*/ }