| | |
| | | package com.ruoyi.cwgl.service.impl; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | { |
| | | return smartLockerApplicationMapper.deleteSmartLockerApplicationById(id); |
| | | } |
| | | |
| | | @Override |
| | | public int invalid(Integer id) { |
| | | SmartLockerApplication smartLockerApplication = smartLockerApplicationMapper.selectSmartLockerApplicationById(id); |
| | | if (smartLockerApplication==null){ |
| | | throw new ServiceException("数据不存在"); |
| | | } |
| | | smartLockerApplication.setCancelTime(new Date()); |
| | | smartLockerApplication.setStatus(1); |
| | | return smartLockerApplicationMapper.updateSmartLockerApplication(smartLockerApplication); |
| | | } |
| | | |
| | | @Override |
| | | @DataSource(DataSourceType.CWSJ) |
| | | public Integer selectCwByLicensePlateNumber(String licensePlateNumber) { |
| | | Integer integer = smartLockerApplicationMapper.selectCwByLicensePlateNumber(licensePlateNumber); |
| | | if (integer==null){ |
| | | throw new ServiceException("查询不到智能柜格口号"); |
| | | } |
| | | return integer; |
| | | } |
| | | } |