Blame view

parking-module-park/src/main/java/com/zteits/park/dao/impl/ParkBerthAppointmentParkRelDaoImpl.java 4.7 KB
9af4a544   王彪总   新项目
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
  package com.zteits.park.dao.impl;
  import com.github.pagehelper.PageHelper;
  import com.github.pagehelper.PageInfo;
  import com.zteits.clouds.api.dto.park.dto.ParkBerthAppointmentParkRelDTO;
  import com.zteits.clouds.api.dto.park.dto.ParkBerthAppointmentParkRelDTO;
  import com.zteits.park.domain.ParkBerthAppointmentParkRel;
  import com.zteits.park.domain.ParkBerthAppointmentParkRelExample;
  import com.zteits.clouds.api.dto.park.param.ParkBerthAppointmentParkRelRequest;
  import com.zteits.park.dao.ParkBerthAppointmentParkRelDao;
  import com.zteits.park.mapper.ParkBerthAppointmentParkRelMapper;
  
  import com.zteits.park.mapper.smapper.ParkBerthAppointmentParkRelSMapper;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Component;
  
  import com.zteits.clouds.api.apibase.constants.DataStatusEnum;
  
  import java.util.Date;
  import java.util.List;
  
  @Component
  public class ParkBerthAppointmentParkRelDaoImpl implements  ParkBerthAppointmentParkRelDao {
      @Autowired
      private ParkBerthAppointmentParkRelMapper parkBerthAppointmentParkRelMapper;
  
      @Autowired
      private ParkBerthAppointmentParkRelSMapper parkBerthAppointmentParkRelSMapper;
  
      @Override
      public int saveParkBerthAppointmentParkRel(ParkBerthAppointmentParkRel parkBerthAppointmentParkRel) {
          if(parkBerthAppointmentParkRel.getCreateTime()==null){
              parkBerthAppointmentParkRel.setCreateTime(new Date());
          }
          return parkBerthAppointmentParkRelMapper.insertSelective(parkBerthAppointmentParkRel);
      }
  
      @Override
      public int updateByExampleSelective(ParkBerthAppointmentParkRel record, ParkBerthAppointmentParkRelExample example) {
          return parkBerthAppointmentParkRelMapper.updateByExampleSelective(record,example);
      }
  
      @Override
      public int updateByPrimaryKeySelective(ParkBerthAppointmentParkRel record) {
          return parkBerthAppointmentParkRelMapper.updateByPrimaryKeySelective(record);
      }
  
      @Override
      public List<ParkBerthAppointmentParkRel> selectByExample(ParkBerthAppointmentParkRelExample example) {
          return parkBerthAppointmentParkRelMapper.selectByExample(example);
      }
  
      @Override
      public ParkBerthAppointmentParkRel queryByPrimaryKey(Long id) {
          return parkBerthAppointmentParkRelMapper.selectByPrimaryKey(id);
      }
  
      @Override
      public List<ParkBerthAppointmentParkRel> queryParkBerthAppointmentParkRel(ParkBerthAppointmentParkRelRequest request) {
          //TODO 编写smapper实现
          //return parkBerthAppointmentParkRelSMapper.queryParkBerthAppointmentParkRel(request);
          return null;
      }
  
      @Override
      public int batchDeleteParkBerthAppointmentParkRelByPrimaryKey(List<Long> ids) {
          ParkBerthAppointmentParkRelExample example = new ParkBerthAppointmentParkRelExample();
          example.createCriteria().andIdIn(ids);
          return parkBerthAppointmentParkRelMapper.deleteByExample(example);
      }
  
      /**
       * 根据appointmentConfigId删除记录
       * @param plNos
       * @return
       */
      @Override
      public int deleteAppointmentParkRelByAppointmentConfigId(List<String> plNos) {
          ParkBerthAppointmentParkRelExample example = new ParkBerthAppointmentParkRelExample();
          example.createCriteria().andPlNoIn(plNos);
          return parkBerthAppointmentParkRelMapper.deleteByExample(example);
      }
  
      @Override
      public PageInfo<ParkBerthAppointmentParkRelDTO> queryParkBerthAppointmentParkRelForPage(ParkBerthAppointmentParkRelRequest request) {
          PageHelper.startPage(request.getBaseRequest().getPageNum(), request.getBaseRequest().getPageSize());
          List<ParkBerthAppointmentParkRelDTO> parkBerthAppointmentParkRelDTOS = parkBerthAppointmentParkRelMapper.queryParkBerthAppointmentParkRelForList(request);
          return new  PageInfo<ParkBerthAppointmentParkRelDTO>(parkBerthAppointmentParkRelDTOS);
      }
  
      @Override
      public List<ParkBerthAppointmentParkRelDTO> queryAppointmentBerthParkList(ParkBerthAppointmentParkRelRequest request) {
          return parkBerthAppointmentParkRelSMapper.queryAppointmentBerthParkList(request);
  
      }
  
      /*@Override
      public PageInfo<ParkBerthAppointmentParkRel> queryParkBerthAppointmentParkRelForPage(ParkBerthAppointmentParkRelRequest request) {
          PageHelper.startPage(request.getBaseRequest().getPageNum(), request.getBaseRequest().getPageSize());
          //TODO 编写smapper实现
          *//*List<ParkBerthAppointmentParkRel> list = parkBerthAppointmentParkRelSMapper.queryParkBerthAppointmentParkRel(request);
          if (CollectionUtils.isNotEmpty(list)) {
              return new PageInfo<ParkBerthAppointmentParkRel>(list);
          }*//*
          return new PageInfo<ParkBerthAppointmentParkRel>(new ArrayList<ParkBerthAppointmentParkRel>());
      }*/
  }