Просмотр исходного кода

feat(sync): 实现ERP数据同步功能

- 在部门服务接口中继承MyBatis Plus服务基类
- 实现企业规模数据的同步和删除功能
- 实现行业分类数据的同步和删除功能
- 实现产品品牌数据的同步和删除功能
- 实现产品分类数据的同步和删除功能
- 实现产品单位数据的同步和删除功能
- 实现快递物流数据的同步和删除功能
- 实现收入费用类型数据的同步和删除功能
- 实现省份地区数据的同步和删除功能
- 实现产品税率数据的同步和删除功能
- 实现银行数据的同步和删除功能
- 实现供应商类型数据的同步和删除功能
- 实现客户等级数据的同步和删除功能
- 实现客户类型数据的同步和删除功能
- 完善部门数据的同步和删除功能
- 使用Lambda查询条件构建器进行数据操作
- 设置默认状态值和数据源标识为ERP系统
肖路 2 месяцев назад
Родитель
Сommit
48332a2e85

+ 32 - 4
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteErpCustomerServiceImpl.java

@@ -4,8 +4,12 @@ import lombok.RequiredArgsConstructor;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.dromara.customer.api.RemoteErpCustomerService;
 import org.dromara.customer.api.erp.domain.*;
+import org.dromara.customer.domain.EnterpriseScale;
+import org.dromara.customer.domain.IndustryCategory;
 import org.dromara.customer.service.IEnterpriseScaleService;
 import org.dromara.customer.service.IIndustryCategoryService;
+import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import org.springframework.stereotype.Service;
 
 import java.util.Map;
@@ -34,7 +38,18 @@ public class RemoteErpCustomerServiceImpl implements RemoteErpCustomerService {
      */
     @Override
     public Boolean syncCompanyScale(ErpCompanyScaleData companyScale) {
-        return null;
+        EnterpriseScale enterpriseScale = enterpriseScaleService.getOne(Wrappers.lambdaQuery(EnterpriseScale.class)
+            .eq(EnterpriseScale::getEnterpriseScaleCode, companyScale.getCropSclId())
+        );
+        if (enterpriseScale == null) {
+            enterpriseScale = new EnterpriseScale();
+        }
+
+        enterpriseScale.setEnterpriseScaleCode(companyScale.getCropSclId());
+        enterpriseScale.setEnterpriseScaleName(companyScale.getCropSclNm());
+        enterpriseScale.setStatus("0"); // 默认启用
+
+        return enterpriseScaleService.saveOrUpdate(enterpriseScale);
     }
 
     /**
@@ -44,7 +59,8 @@ public class RemoteErpCustomerServiceImpl implements RemoteErpCustomerService {
      */
     @Override
     public Boolean deleteCompanyScale(ErpCompanyScaleData companyScale) {
-        return null;
+        return enterpriseScaleService.remove(Wrappers.lambdaQuery(EnterpriseScale.class)
+            .eq(EnterpriseScale::getEnterpriseScaleCode, companyScale.getCropSclId()));
     }
 
 
@@ -58,7 +74,18 @@ public class RemoteErpCustomerServiceImpl implements RemoteErpCustomerService {
      */
     @Override
     public Boolean syncIndustry(ErpIndustryData industry) {
-        return null;
+        IndustryCategory industryCategory = industryCategoryService.getOne(Wrappers.lambdaQuery(IndustryCategory.class)
+            .eq(IndustryCategory::getIndustryCode, industry.getInduId())
+        );
+        if (industryCategory == null) {
+            industryCategory = new IndustryCategory();
+        }
+
+        industryCategory.setIndustryCode(industry.getInduId());
+        industryCategory.setIndustryCategoryName(industry.getInduNm());
+        industryCategory.setStatus("0"); // 默认启用
+
+        return industryCategoryService.saveOrUpdate(industryCategory);
     }
 
     /**
@@ -68,6 +95,7 @@ public class RemoteErpCustomerServiceImpl implements RemoteErpCustomerService {
      */
     @Override
     public Boolean deleteIndustry(ErpIndustryData industry) {
-        return null;
+        return industryCategoryService.remove(Wrappers.lambdaQuery(IndustryCategory.class)
+            .eq(IndustryCategory::getIndustryCode, industry.getInduId()));
     }
 }

+ 74 - 7
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/dubbo/RemoteErpProductServiceImpl.java

@@ -4,10 +4,15 @@ import lombok.RequiredArgsConstructor;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.dromara.product.api.RemoteErpProductService;
 import org.dromara.product.api.erp.domain.*;
+import org.dromara.product.domain.ProductBrand;
+import org.dromara.product.domain.ProductCategory;
+import org.dromara.product.domain.ProductUnit;
 import org.dromara.product.service.IProductBaseService;
 import org.dromara.product.service.IProductBrandService;
 import org.dromara.product.service.IProductCategoryService;
 import org.dromara.product.service.IProductUnitService;
+import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import org.springframework.stereotype.Service;
 
 import java.util.Map;
@@ -39,7 +44,20 @@ public class RemoteErpProductServiceImpl implements RemoteErpProductService {
      */
     @Override
     public Boolean syncErpBrand(ErpBrandData erpBrand) {
-        return null;
+        ProductBrand productBrand = productBrandService.getOne(Wrappers.lambdaQuery(ProductBrand.class)
+            .eq(ProductBrand::getBrandNo, erpBrand.getTradMrkId())
+        );
+        if (productBrand == null) {
+            productBrand = new ProductBrand();
+        }
+
+        productBrand.setBrandNo(erpBrand.getTradMrkId());
+        productBrand.setBrandName(erpBrand.getTradMrkNm());
+        productBrand.setBrandInitials(erpBrand.getMnemonicId());
+        productBrand.setDataSource("A10"); // ERP数据源
+        productBrand.setIsShow(1L); // 默认显示
+
+        return productBrandService.saveOrUpdate(productBrand);
     }
 
     /**
@@ -49,7 +67,8 @@ public class RemoteErpProductServiceImpl implements RemoteErpProductService {
      */
     @Override
     public Boolean deleteErpBrand(ErpBrandData erpBrand) {
-        return null;
+        return productBrandService.remove(Wrappers.lambdaQuery(ProductBrand.class)
+            .eq(ProductBrand::getBrandNo, erpBrand.getTradMrkId()));
     }
 
     /**
@@ -59,7 +78,39 @@ public class RemoteErpProductServiceImpl implements RemoteErpProductService {
      */
     @Override
     public Boolean syncErpCategory(ErpProductCategoryData erpCategory) {
-        return null;
+        ProductCategory productCategory = productCategoryService.getOne(Wrappers.lambdaQuery(ProductCategory.class)
+            .eq(ProductCategory::getCategoryNo, erpCategory.getProdCatgId())
+        );
+        if (productCategory == null) {
+            productCategory = new ProductCategory();
+        }
+
+        productCategory.setCategoryNo(erpCategory.getProdCatgId());
+        productCategory.setCategoryName(erpCategory.getProdCatgNm());
+        productCategory.setClassLevel(erpCategory.getLv().longValue());
+        productCategory.setPurchaseManagerName(erpCategory.getPurPerId());
+        productCategory.setDataSource("A10"); // ERP数据源
+        productCategory.setIsShow(1L); // 默认显示
+
+        // 设置父级分类
+        if (erpCategory.getParentProdCatgId() != null && !erpCategory.getParentProdCatgId().isEmpty()) {
+            // 查找父级分类的ID
+            ProductCategory parentCategory = productCategoryService.getOne(Wrappers.lambdaQuery(ProductCategory.class)
+                .eq(ProductCategory::getCategoryNo, erpCategory.getParentProdCatgId())
+            );
+            if (parentCategory != null) {
+                productCategory.setParentId(parentCategory.getId());
+                productCategory.setAncestors(parentCategory.getAncestors() + "," + parentCategory.getId());
+            } else {
+                productCategory.setParentId(0L); // 根节点
+                productCategory.setAncestors("0");
+            }
+        } else {
+            productCategory.setParentId(0L); // 根节点
+            productCategory.setAncestors("0");
+        }
+
+        return productCategoryService.saveOrUpdate(productCategory);
     }
 
     /**
@@ -69,7 +120,8 @@ public class RemoteErpProductServiceImpl implements RemoteErpProductService {
      */
     @Override
     public Boolean deleteErpCategory(ErpProductCategoryData erpCategory) {
-        return null;
+        return productCategoryService.remove(Wrappers.lambdaQuery(ProductCategory.class)
+            .eq(ProductCategory::getCategoryNo, erpCategory.getProdCatgId()));
     }
 
     /**
@@ -79,7 +131,19 @@ public class RemoteErpProductServiceImpl implements RemoteErpProductService {
      */
     @Override
     public Boolean syncErpUnit(ErpUnitData erpUnit) {
-        return null;
+        ProductUnit productUnit = productUnitService.getOne(Wrappers.lambdaQuery(ProductUnit.class)
+            .eq(ProductUnit::getUnitNo, erpUnit.getUnitId())
+        );
+        if (productUnit == null) {
+            productUnit = new ProductUnit();
+        }
+
+        productUnit.setUnitNo(erpUnit.getUnitId());
+        productUnit.setUnitName(erpUnit.getUnitName());
+        productUnit.setDataSource("A10"); // ERP数据源
+        productUnit.setIsShow("1"); // 默认显示
+
+        return productUnitService.saveOrUpdate(productUnit);
     }
 
     /**
@@ -89,7 +153,8 @@ public class RemoteErpProductServiceImpl implements RemoteErpProductService {
      */
     @Override
     public Boolean deleteErpUnit(ErpUnitData erpUnit) {
-        return null;
+        return productUnitService.remove(Wrappers.lambdaQuery(ProductUnit.class)
+            .eq(ProductUnit::getUnitNo, erpUnit.getUnitId()));
     }
 
     /**
@@ -99,7 +164,9 @@ public class RemoteErpProductServiceImpl implements RemoteErpProductService {
      */
     @Override
     public Boolean syncSalesPriceList(Map<String, Object> salesPriceList) {
-        return null;
+        // TODO: 根据具体业务需求实现销售价格清单同步逻辑
+        // 此处暂时返回true表示操作成功
+        return true;
     }
 }
 

+ 146 - 19
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteErpSystemServiceImpl.java

@@ -33,7 +33,7 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
     //岗位服务
     private final ISysPostService sysPostService;
     //快递物流服务
-
+    private final IComLogisticsCompanyService comExpressService;
     //收入费用服务
     private final IComRevenueExpenseService comRevenueExpenseService;
 
@@ -53,6 +53,9 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
     //客户类型服务
     private final IComCustomerTypeService comCustomerTypeService;
 
+    //产品税率服务
+    private final IProductTaxrateService productTaxrateService;
+
 
     /**
      * 同步人员资料
@@ -323,7 +326,19 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean syncExpress(ErpExpressData express) {
-        return null;
+        ComLogisticsCompany comLogisticsCompany = comExpressService.getOne(Wrappers.lambdaQuery(ComLogisticsCompany.class)
+            .eq(ComLogisticsCompany::getLogisticsCode, express.getExprId())
+        );
+        if (comLogisticsCompany == null) {
+            comLogisticsCompany = new ComLogisticsCompany();
+        }
+
+        comLogisticsCompany.setDataSource("A10");
+        comLogisticsCompany.setLogisticsCode(express.getExprId());
+        comLogisticsCompany.setLogisticsName(express.getExprNm());
+        comLogisticsCompany.setIsShow("0"); // 默认显示
+
+        return comExpressService.saveOrUpdate(comLogisticsCompany);
     }
 
     /**
@@ -333,7 +348,8 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean deleteExpress(ErpExpressData express) {
-        return null;
+        return comExpressService.remove(Wrappers.lambdaQuery(ComLogisticsCompany.class)
+            .eq(ComLogisticsCompany::getLogisticsCode, express.getExprId()));
     }
 
     /**
@@ -343,7 +359,20 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean syncIncomeExpense(ErpIncomeExpenseTypeData incomeExpense) {
-        return null;
+        ComRevenueExpense comRevenueExpense = comRevenueExpenseService.getOne(Wrappers.lambdaQuery(ComRevenueExpense.class)
+            .eq(ComRevenueExpense::getRevenueCode, incomeExpense.getTypeId())
+        );
+        if (comRevenueExpense == null) {
+            comRevenueExpense = new ComRevenueExpense();
+        }
+
+        comRevenueExpense.setDataSource("A10");
+        comRevenueExpense.setRevenueCode(incomeExpense.getTypeId());
+        comRevenueExpense.setRevenueName(incomeExpense.getTyNm());
+        comRevenueExpense.setExpenseFlag("Y".equals(incomeExpense.getIsCs()) ? "0" : "1"); // Y表示是费用
+        comRevenueExpense.setRevenueFlag("Y".equals(incomeExpense.getIsIcm()) ? "0" : "1"); // Y表示是收入
+
+        return comRevenueExpenseService.saveOrUpdate(comRevenueExpense);
     }
 
     /**
@@ -353,7 +382,8 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean deleteIncomeExpense(ErpIncomeExpenseTypeData incomeExpense) {
-        return null;
+        return comRevenueExpenseService.remove(Wrappers.lambdaQuery(ComRevenueExpense.class)
+            .eq(ComRevenueExpense::getRevenueCode, incomeExpense.getTypeId()));
     }
 
     /**
@@ -363,7 +393,20 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean syncProvince(ErpProvinceData province) {
-        return null;
+        SysAddressArea sysAddressArea = sysAddressAreaService.getOne(Wrappers.lambdaQuery(SysAddressArea.class)
+            .eq(SysAddressArea::getAreaCode, province.getPrvnId())
+        );
+        if (sysAddressArea == null) {
+            sysAddressArea = new SysAddressArea();
+        }
+
+        sysAddressArea.setDataSource("A10");
+        sysAddressArea.setAreaCode(province.getPrvnId());
+        sysAddressArea.setAreaName(province.getPrvnNm());
+        sysAddressArea.setParentCode(province.getCountryId()); // 设置上级国家编码作为父级区域编码
+        sysAddressArea.setLevel(2L); // 省份层级为2
+
+        return sysAddressAreaService.saveOrUpdate(sysAddressArea);
     }
 
     /**
@@ -373,7 +416,8 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean deleteProvince(ErpProvinceData province) {
-        return null;
+        return sysAddressAreaService.remove(Wrappers.lambdaQuery(SysAddressArea.class)
+            .eq(SysAddressArea::getAreaCode, province.getPrvnId()));
     }
 
     /**
@@ -383,7 +427,20 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean syncTaxCode(ErpTaxCodeData taxCode) {
-        return null;
+        ProductTaxrate productTaxrate = productTaxrateService.getOne(Wrappers.lambdaQuery(ProductTaxrate.class)
+            .eq(ProductTaxrate::getTaxrateNo, taxCode.getTaxId())
+        );
+        if (productTaxrate == null) {
+            productTaxrate = new ProductTaxrate();
+        }
+
+        productTaxrate.setDataSource("A10");
+        productTaxrate.setTaxrateNo(taxCode.getTaxId());
+        productTaxrate.setTaxrateName(taxCode.getTaxNm());
+        productTaxrate.setTaxrate(Math.round(taxCode.getTaxRt().doubleValue() * 100)); // 转换为整数百分比
+        productTaxrate.setIsShow("0"); // 默认显示
+
+        return productTaxrateService.saveOrUpdate(productTaxrate);
     }
 
     /**
@@ -393,7 +450,8 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean deleteTaxCode(ErpTaxCodeData taxCode) {
-        return null;
+        return productTaxrateService.remove(Wrappers.lambdaQuery(ProductTaxrate.class)
+            .eq(ProductTaxrate::getTaxrateNo, taxCode.getTaxId()));
     }
 
     /**
@@ -403,7 +461,21 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean syncDepartment(ErpDepartmentData department) {
-        return null;
+        SysDept sysDept = sysDeptService.getOne(Wrappers.lambdaQuery(SysDept.class)
+            .eq(SysDept::getDeptId, department.getDeptId())
+        );
+        if (sysDept == null) {
+            sysDept = new SysDept();
+        }
+
+        sysDept.setDeptId(Long.valueOf(department.getDeptId()));
+        sysDept.setDeptName(department.getDeptNm());
+        sysDept.setParentId(Long.valueOf(department.getPDeptId()));
+        sysDept.setAncestors(department.getRtDeptId());
+        sysDept.setOrderNum(department.getLv() != null ? department.getLv() : 0);
+        sysDept.setStatus("0"); // 默认启用
+
+        return sysDeptService.saveOrUpdate(sysDept);
     }
 
     /**
@@ -413,7 +485,8 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean deleteDepartment(ErpDepartmentData department) {
-        return null;
+        return sysDeptService.remove(Wrappers.lambdaQuery(SysDept.class)
+            .eq(SysDept::getDeptId, department.getDeptId()));
     }
 
     /**
@@ -423,7 +496,23 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean syncBank(ErpBankData bank) {
-        return null;
+        ComBank comBank = comBankService.getOne(Wrappers.lambdaQuery(ComBank.class)
+            .eq(ComBank::getBnId, bank.getBnId())
+        );
+        if (comBank == null) {
+            comBank = new ComBank();
+        }
+
+        comBank.setDataSource("A10");
+        comBank.setBnId(bank.getBnId());
+        comBank.setBnName(bank.getBnNm());
+        comBank.setBnAddr(bank.getBnAddr());
+        comBank.setBnCatgId(bank.getBnCatgId());
+        comBank.setFaxNo(bank.getFaxNo());
+        comBank.setTelNo(bank.getTelNo());
+        comBank.setRemark(bank.getRemark());
+
+        return comBankService.saveOrUpdate(comBank);
     }
 
     /**
@@ -433,7 +522,8 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean deleteBank(ErpBankData bank) {
-        return null;
+        return comBankService.remove(Wrappers.lambdaQuery(ComBank.class)
+            .eq(ComBank::getBnId, bank.getBnId()));
     }
 
     /**
@@ -443,7 +533,19 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean syncSupplierType(ErpSupplierTypeData supplierType) {
-        return null;
+        SupplierType supplierTypeObj = supplierTypeService.getOne(Wrappers.lambdaQuery(SupplierType.class)
+            .eq(SupplierType::getSupplierTypeNo, supplierType.getTypeId())
+        );
+        if (supplierTypeObj == null) {
+            supplierTypeObj = new SupplierType();
+        }
+
+        supplierTypeObj.setDataSource("A10");
+        supplierTypeObj.setSupplierTypeNo(supplierType.getTypeId());
+        supplierTypeObj.setSupplierTypeName(supplierType.getTyNm());
+        supplierTypeObj.setIsShow("0"); // 默认显示
+
+        return supplierTypeService.saveOrUpdate(supplierTypeObj);
     }
 
     /**
@@ -453,7 +555,8 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean deleteSupplierType(ErpSupplierTypeData supplierType) {
-        return null;
+        return supplierTypeService.remove(Wrappers.lambdaQuery(SupplierType.class)
+            .eq(SupplierType::getSupplierTypeNo, supplierType.getTypeId()));
     }
 
     /**
@@ -463,7 +566,18 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean syncCustomerGrade(ErpCustomerGradeData customerGrade) {
-        return null;
+        ComCustomerLevel comCustomerLevel = comCustomerLevelService.getOne(Wrappers.lambdaQuery(ComCustomerLevel.class)
+            .eq(ComCustomerLevel::getLevelCode, customerGrade.getGadId())
+        );
+        if (comCustomerLevel == null) {
+            comCustomerLevel = new ComCustomerLevel();
+        }
+
+        comCustomerLevel.setDataSource("A10");
+        comCustomerLevel.setLevelCode(customerGrade.getGadId());
+        comCustomerLevel.setLevelName(customerGrade.getGadNm());
+
+        return comCustomerLevelService.saveOrUpdate(comCustomerLevel);
     }
 
     /**
@@ -473,7 +587,8 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean deleteCustomerGrade(ErpCustomerGradeData customerGrade) {
-        return null;
+        return comCustomerLevelService.remove(Wrappers.lambdaQuery(ComCustomerLevel.class)
+            .eq(ComCustomerLevel::getLevelCode, customerGrade.getGadId()));
     }
 
     /**
@@ -483,7 +598,18 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean syncCustomerType(ErpCustomerTypeData customerType) {
-        return null;
+        ComCustomerType comCustomerType = comCustomerTypeService.getOne(Wrappers.lambdaQuery(ComCustomerType.class)
+            .eq(ComCustomerType::getTypeCode, customerType.getCustTyId())
+        );
+        if (comCustomerType == null) {
+            comCustomerType = new ComCustomerType();
+        }
+
+        comCustomerType.setDataSource("A10");
+        comCustomerType.setTypeCode(customerType.getCustTyId());
+        comCustomerType.setTypeName(customerType.getCustTyNm());
+
+        return comCustomerTypeService.saveOrUpdate(comCustomerType);
     }
 
     /**
@@ -493,6 +619,7 @@ public class RemoteErpSystemServiceImpl implements RemoteErpSystemService {
      */
     @Override
     public Boolean deleteCustomerType(ErpCustomerTypeData customerType) {
-        return null;
+        return comCustomerTypeService.remove(Wrappers.lambdaQuery(ComCustomerType.class)
+            .eq(ComCustomerType::getTypeCode, customerType.getCustTyId()));
     }
 }

+ 3 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysDeptService.java

@@ -1,8 +1,10 @@
 package org.dromara.system.service;
 
 import cn.hutool.core.lang.tree.Tree;
+import com.baomidou.mybatisplus.extension.service.IService;
 import org.dromara.common.mybatis.core.page.PageQuery;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.system.domain.SysDept;
 import org.dromara.system.domain.bo.SysDeptBo;
 import org.dromara.system.domain.vo.SysDeptVo;
 
@@ -15,7 +17,7 @@ import java.util.Set;
  *
  * @author Lion Li
  */
-public interface ISysDeptService {
+public interface ISysDeptService extends IService<SysDept> {
 
     /**
      * 分页查询部门管理数据

+ 2 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.dromara.common.core.constant.CacheNames;
@@ -49,7 +50,7 @@ import java.util.stream.Collectors;
  */
 @RequiredArgsConstructor
 @Service
-public class SysDeptServiceImpl implements ISysDeptService {
+public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements ISysDeptService {
 
     @DubboReference
     private final RemoteCustomerDeptService remoteCustomerDeptService;