|
|
@@ -23,15 +23,32 @@ public class SupplierServiceImpl implements SupplierService {
|
|
|
|
|
|
private final SupplierMapper supplierMapper;
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询供应商信息
|
|
|
+ * @param supplierBo
|
|
|
+ * @param pageQuery
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
public TableDataInfo<SupplierVo> selectPageSupplierList(SupplierBo supplierBo, PageQuery pageQuery) {
|
|
|
QueryWrapper<Supplier> qw = new QueryWrapper<>();
|
|
|
- qw.eq(StringUtils.isNotBlank(supplierBo.getSupplyerCode()), "supplyer_code", supplierBo.getSupplyerCode());
|
|
|
- qw.eq(StringUtils.isNotBlank(supplierBo.getSupplyerName()), "supplyer_name", supplierBo.getSupplyerName());
|
|
|
+ qw.like(StringUtils.isNotBlank(supplierBo.getSupplyerCode()), "supplyer_code", supplierBo.getSupplyerCode());
|
|
|
+ qw.like(StringUtils.isNotBlank(supplierBo.getSupplyerName()), "supplyer_name", supplierBo.getSupplyerName());
|
|
|
qw.eq(StringUtils.isNotBlank(supplierBo.getStatus()), "status", supplierBo.getStatus());
|
|
|
-// Supplier supplier = MapstructUtils.convert(supplierBo, Supplier.class);
|
|
|
List<Supplier> page = supplierMapper.selectList(pageQuery.build(), qw);
|
|
|
List<SupplierVo> supplierVoList = MapstructUtils.convert(page, SupplierVo.class);
|
|
|
return TableDataInfo.build(supplierVoList);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批量删除供应商信息
|
|
|
+ * @param supplyertypeId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int deleteRecycleFactoryByIds(List<Integer> supplyertypeId) {
|
|
|
+ QueryWrapper<Supplier> qw = new QueryWrapper<>();
|
|
|
+ qw.in("supplyertype_id",supplyertypeId);
|
|
|
+ return supplierMapper.delete(qw);
|
|
|
+ }
|
|
|
}
|