24282 2 éve
szülő
commit
b445b69ffe

+ 1 - 2
hx-service/victoriatourist/src/main/java/com/fjhx/controller/supplier/SupplierPriceController.java

@@ -1,7 +1,6 @@
 package com.fjhx.controller.supplier;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.fjhx.entity.supplier.SupplierPrice;
 import com.fjhx.params.supplier.SupplierPriceVo;
 import com.fjhx.service.supplier.SupplierPriceService;
 import org.springblade.core.tool.api.R;
@@ -30,7 +29,7 @@ public class SupplierPriceController {
 
     @PostMapping("/page")
     public R page(@RequestBody Map<String, Object> condition) {
-        Page<SupplierPrice> result = supplierPriceService.getPage(condition);
+        Page<Map<String, Object>> result = supplierPriceService.getPage(condition);
         return R.success(result);
     }
 

+ 3 - 1
hx-service/victoriatourist/src/main/java/com/fjhx/mapper/supplier/SupplierPriceMapper.java

@@ -6,6 +6,8 @@ import com.fjhx.entity.supplier.SupplierPrice;
 import com.fjhx.utils.wrapperUtil.IWrapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.Map;
+
 /**
  * <p>
  * 供应商价格 Mapper 接口
@@ -16,6 +18,6 @@ import org.apache.ibatis.annotations.Param;
  */
 public interface SupplierPriceMapper extends BaseMapper<SupplierPrice> {
 
-    Page<SupplierPrice> getPage(@Param("page") Page<SupplierPrice> page, @Param("ew") IWrapper<SupplierPrice> wrapper);
+    Page<Map<String, Object>> getPage(@Param("page") Page<SupplierPrice> page, @Param("ew") IWrapper<Map<String, Object>> wrapper);
 
 }

+ 1 - 0
hx-service/victoriatourist/src/main/java/com/fjhx/mapper/supplier/SupplierPriceMapper.xml

@@ -7,6 +7,7 @@
                sp.price,
                sp.material_id,
                sp.supplier_id,
+               s.type    supplierType,
                s.`name`  supplierName,
                pi.`name` materialName,
                pi.`code` materialCode,

+ 2 - 2
hx-service/victoriatourist/src/main/java/com/fjhx/service/supplier/SupplierPriceService.java

@@ -1,9 +1,9 @@
 package com.fjhx.service.supplier;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fjhx.base.BaseService;
 import com.fjhx.entity.supplier.SupplierPrice;
 import com.fjhx.params.supplier.SupplierPriceVo;
-import com.fjhx.base.BaseService;
 
 import java.util.List;
 import java.util.Map;
@@ -18,7 +18,7 @@ import java.util.Map;
  */
 public interface SupplierPriceService extends BaseService<SupplierPrice> {
 
-    Page<SupplierPrice> getPage(Map<String, Object> condition);
+    Page<Map<String, Object>> getPage(Map<String, Object> condition);
 
     void add(SupplierPriceVo supplierPriceVo);
 

+ 3 - 2
hx-service/victoriatourist/src/main/java/com/fjhx/service/supplier/impl/SupplierPriceServiceImpl.java

@@ -31,15 +31,16 @@ import java.util.Map;
 public class SupplierPriceServiceImpl extends ServiceImpl<SupplierPriceMapper, SupplierPrice> implements SupplierPriceService {
 
     @Override
-    public Page<SupplierPrice> getPage(Map<String, Object> condition) {
+    public Page<Map<String, Object>> getPage(Map<String, Object> condition) {
 
-        IWrapper<SupplierPrice> wrapper = IWrapper.getWrapper(condition);
+        IWrapper<Map<String, Object>> wrapper = IWrapper.getWrapper(condition);
         wrapper.orderByDesc(Supplier::getId)
                 .keyword(new KeywordData("s", Supplier::getName),
                         new KeywordData("pi", ProductInfo::getName),
                         new KeywordData("pi", ProductInfo::getCode))
                 .eq("s", Supplier::getId, condition.get("supplierId"))
                 .like("s", Supplier::getName, condition.get("supplierName"))
+                .like("s", Supplier::getType, condition.get("supplierType"))
 
                 .eq("pi", ProductInfo::getId, condition.get("materialId"))
                 .eq("pi", ProductInfo::getType, condition.get("materialType"))