Blame view

parking-module-bill/src/main/java/com/zteits/bill/dao/impl/TBlackRuleParkRelDaoImpl.java 3.32 KB
55f68655   王彪总   新项目
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.bill.dao.impl;
  import com.zteits.bill.domain.TBlackRuleParkRel;
  import com.zteits.bill.domain.TBlackRuleParkRelExample;
  import com.zteits.clouds.api.dto.bill.param.TBlackRuleParkRelRequest;
  import com.zteits.bill.dao.TBlackRuleParkRelDao;
  import com.zteits.bill.mapper.TBlackRuleParkRelMapper;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Component;
  
  import java.util.Date;
  import java.util.List;
  
  @Component
  public class TBlackRuleParkRelDaoImpl implements  TBlackRuleParkRelDao {
      @Autowired
      private TBlackRuleParkRelMapper tBlackRuleParkRelMapper;
      @Override
      public int deleteTBlackRuleParkRelByPrimaryKey(Long id, String opId, String opName) {
          TBlackRuleParkRel record = new TBlackRuleParkRel();
          record.setId(id);
          record.setModifyEmpid(opId);
          record.setModifyDate(new Date());
          return tBlackRuleParkRelMapper.updateByPrimaryKeySelective(record);
      }
  
      @Override
      public int saveTBlackRuleParkRel(TBlackRuleParkRel tBlackRuleParkRel) {
          if(tBlackRuleParkRel.getCreateDate()==null){
              tBlackRuleParkRel.setCreateDate(new Date());
          }
          if(tBlackRuleParkRel.getCreateDate()==null){
              tBlackRuleParkRel.setModifyDate(new Date());
          }
          return tBlackRuleParkRelMapper.insertSelective(tBlackRuleParkRel);
      }
  
      @Override
      public int updateByExampleSelective(TBlackRuleParkRel record, TBlackRuleParkRelExample example) {
          return tBlackRuleParkRelMapper.updateByExampleSelective(record,example);
      }
  
      @Override
      public int updateByPrimaryKeySelective(TBlackRuleParkRel record) {
          return tBlackRuleParkRelMapper.updateByPrimaryKeySelective(record);
      }
  
      @Override
      public List<TBlackRuleParkRel> selectByExample(TBlackRuleParkRelExample example) {
          return tBlackRuleParkRelMapper.selectByExample(example);
      }
  
      @Override
      public TBlackRuleParkRel queryByPrimaryKey(Long id) {
          return tBlackRuleParkRelMapper.selectByPrimaryKey(id);
      }
  
      @Override
      public List<TBlackRuleParkRel> queryTBlackRuleParkRel(TBlackRuleParkRelRequest request) {
          //TODO 编写smapper实现
          //return tBlackRuleParkRelSMapper.queryTBlackRuleParkRel(request);
          return null;
      }
  
      @Override
      public int batchDeleteTBlackRuleParkRelByPrimaryKey(List<Long> ids, String opId, String opName) {
          TBlackRuleParkRel record = new TBlackRuleParkRel();
          record.setModifyEmpid(opId);
          record.setModifyDate(new Date());
          //where条件
          TBlackRuleParkRelExample example = new TBlackRuleParkRelExample();
          example.createCriteria().andIdIn(ids);
          return tBlackRuleParkRelMapper.updateByExampleSelective(record,example);
      }
  
      /*@Override
      public PageInfo<TBlackRuleParkRel> queryTBlackRuleParkRelForPage(TBlackRuleParkRelRequest request) {
          PageHelper.startPage(request.getBaseRequest().getPageNum(), request.getBaseRequest().getPageSize());
          //TODO 编写smapper实现
          *//*List<TBlackRuleParkRel> list = tBlackRuleParkRelSMapper.queryTBlackRuleParkRel(request);
          if (CollectionUtils.isNotEmpty(list)) {
              return new PageInfo<TBlackRuleParkRel>(list);
          }*//*
          return new PageInfo<TBlackRuleParkRel>(new ArrayList<TBlackRuleParkRel>());
      }*/
  }