Blame view

parking-module-park/src/main/java/com/zteits/park/dao/impl/ParkingLotCredentialsDaoImpl.java 1.67 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
  package com.zteits.park.dao.impl;
  
  import java.util.List;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Component;
  
  import com.zteits.clouds.api.apibase.constants.DataStatusEnum;
  import com.zteits.park.dao.ParkingLotCredentialsDao;
  import com.zteits.park.domain.ParkingLotCredentials;
  import com.zteits.park.domain.ParkingLotCredentialsExample;
  import com.zteits.park.mapper.ParkingLotCredentialsMapper;
  @Component
  public class ParkingLotCredentialsDaoImpl implements ParkingLotCredentialsDao {
  	@Autowired
  	private ParkingLotCredentialsMapper parkingLotCredentialsMapper;
  	
  	@Override
  	public int deleteByPrimaryKeys(List<Long> plIds) {
  		ParkingLotCredentialsExample example = new ParkingLotCredentialsExample();
  		ParkingLotCredentials record = new ParkingLotCredentials();
  		record.setDataStatus(DataStatusEnum.DATA_STATUS_NO_VALID.value());
  		example.createCriteria().andPlIdIn(plIds).andDataStatusEqualTo(DataStatusEnum.DATA_STATUS_VALID.value());
  		return parkingLotCredentialsMapper.updateByExampleSelective(record , example);
  	}
  
  	@Override
  	public int insertSelective(ParkingLotCredentials record) {
  		return parkingLotCredentialsMapper.insertSelective(record);
  	}
  
  	@Override
  	public ParkingLotCredentials selectByPrimaryKey(Long plId) {
  		return parkingLotCredentialsMapper.selectByPrimaryKey(plId);
  	}
  
  	@Override
  	public int updateByPrimaryKeySelective(ParkingLotCredentials record) {
  		return parkingLotCredentialsMapper.updateByPrimaryKeySelective(record);
  	}
  
  	@Override
  	public List<ParkingLotCredentials> queryParkingLotCredentials(ParkingLotCredentialsExample record) {
  		return parkingLotCredentialsMapper.selectByExample(record);
  	}
  
  }