对比新文件 |
| | |
| | | package com.gk.firework.Service.ServiceImpl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gk.firework.Domain.TransportCertProduct; |
| | | import com.gk.firework.Mapper.TransportCertProductMapper; |
| | | import com.gk.firework.Service.TransportCertProductService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service("transportCertProductService") |
| | | public class TransportCertProductServiceImpl extends ServiceImpl<TransportCertProductMapper, TransportCertProduct> implements TransportCertProductService { |
| | | |
| | | @Autowired |
| | | private TransportCertProductMapper transportCertProductMapper; |
| | | /** |
| | | * @Description: 获取运输证下所有产品 |
| | | * @date 2021/4/25 15:43 |
| | | */ |
| | | @Override |
| | | public List<TransportCertProduct> selectProduct(String code) { |
| | | LambdaQueryWrapper<TransportCertProduct> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(TransportCertProduct::getValidflag, true) |
| | | .eq(TransportCertProduct::getCertificatecode, code); |
| | | return transportCertProductMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteProductByCode(String code) { |
| | | LambdaUpdateWrapper<TransportCertProduct> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.set(TransportCertProduct::getValidflag,false) |
| | | .eq(TransportCertProduct::getCertificatecode,code) |
| | | .eq(TransportCertProduct::getValidflag,true); |
| | | this.update(updateWrapper); |
| | | } |
| | | } |