|
@@ -0,0 +1,53 @@
|
|
|
+package com.fjhx.service.supplier.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fjhx.entity.supplier.SupplierPrice;
|
|
|
+import com.fjhx.mapper.supplier.SupplierPriceMapper;
|
|
|
+import com.fjhx.params.supplier.SupplierPriceVo;
|
|
|
+import com.fjhx.service.supplier.SupplierPriceService;
|
|
|
+import com.fjhx.utils.WrapperUtil;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 供应商价格维护 服务实现类
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author ${author}
|
|
|
+ * @since 2022-09-07
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class SupplierPriceServiceImpl extends ServiceImpl<SupplierPriceMapper, SupplierPrice> implements SupplierPriceService {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<Map<String, Object>> getPage(Map<String, String> condition) {
|
|
|
+
|
|
|
+ QueryWrapper<?> wrapper = WrapperUtil.init(condition)
|
|
|
+ .keyword("m.name", "m.code")
|
|
|
+ .eq("s.id", "supplierId")
|
|
|
+ .createTimeDesc()
|
|
|
+ .getWrapper();
|
|
|
+
|
|
|
+ return baseMapper.getPage(createPage(condition), wrapper);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void add(SupplierPriceVo supplierPriceVo) {
|
|
|
+ save(supplierPriceVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void edit(SupplierPriceVo supplierPriceVo) {
|
|
|
+ updateById(supplierPriceVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void delete(SupplierPriceVo supplierPriceVo) {
|
|
|
+ removeById(supplierPriceVo.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+}
|