Ver código fonte

Merge branch 'refs/heads/xiaolu' into master

# Conflicts:
#	ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierInfoService.java
#	ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierInfoServiceImpl.java
肖路 2 meses atrás
pai
commit
be6e3c1836
66 arquivos alterados com 3711 adições e 66 exclusões
  1. 5 0
      ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteCustomerService.java
  2. 9 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/model/LoginUser.java
  3. 5 0
      ruoyi-auth/pom.xml
  4. 0 1
      ruoyi-auth/src/main/java/org/dromara/auth/controller/TokenController.java
  5. 1 1
      ruoyi-auth/src/main/java/org/dromara/auth/service/IAuthStrategy.java
  6. 50 1
      ruoyi-auth/src/main/java/org/dromara/auth/service/impl/PasswordAuthStrategy.java
  7. 16 2
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/CustomerRegisterController.java
  8. 22 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteCustomerServiceImpl.java
  9. 32 4
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteErpCustomerServiceImpl.java
  10. 7 0
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierInfoService.java
  11. 118 1
      ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierInfoServiceImpl.java
  12. 1 1
      ruoyi-modules/ruoyi-external/src/main/java/org/dromara/external/controller/zhongche/ZhongChePullController.java
  13. 1 1
      ruoyi-modules/ruoyi-external/src/main/java/org/dromara/external/controller/zhongche/ZhongChePushController.java
  14. 106 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductBrowsingHistoryController.java
  15. 106 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductCollectController.java
  16. 106 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductFavoritesController.java
  17. 106 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductShoppingCartController.java
  18. 121 6
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/pc/IndexProductController.java
  19. 199 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/pc/MyProductController.java
  20. 51 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductBrowsingHistory.java
  21. 56 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductCollect.java
  22. 56 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductFavorites.java
  23. 67 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductShoppingCart.java
  24. 54 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/PcProductBo.java
  25. 5 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductBrandBo.java
  26. 53 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductBrowsingHistoryBo.java
  27. 59 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductCollectBo.java
  28. 59 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductFavoritesBo.java
  29. 65 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductShoppingCartBo.java
  30. 68 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/PcProductVo.java
  31. 62 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductBrowsingHistoryVo.java
  32. 68 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductCollectVo.java
  33. 68 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductFavoritesVo.java
  34. 75 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductShoppingCartVo.java
  35. 74 7
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/dubbo/RemoteErpProductServiceImpl.java
  36. 15 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/mapper/ProductBrowsingHistoryMapper.java
  37. 15 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/mapper/ProductCollectMapper.java
  38. 15 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/mapper/ProductFavoritesMapper.java
  39. 15 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/mapper/ProductShoppingCartMapper.java
  40. 40 6
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductBaseService.java
  41. 16 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductBrandService.java
  42. 70 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductBrowsingHistoryService.java
  43. 9 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductCategoryService.java
  44. 70 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductCollectService.java
  45. 70 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductFavoritesService.java
  46. 70 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductShoppingCartService.java
  47. 6 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IServiceCaseService.java
  48. 269 13
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductBaseServiceImpl.java
  49. 52 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductBrandServiceImpl.java
  50. 136 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductBrowsingHistoryServiceImpl.java
  51. 45 1
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductCategoryServiceImpl.java
  52. 137 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductCollectServiceImpl.java
  53. 137 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductFavoritesServiceImpl.java
  54. 138 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductShoppingCartServiceImpl.java
  55. 26 0
      ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ServiceCaseServiceImpl.java
  56. 7 0
      ruoyi-modules/ruoyi-product/src/main/resources/mapper/product/ProductBrowsingHistoryMapper.xml
  57. 7 0
      ruoyi-modules/ruoyi-product/src/main/resources/mapper/product/ProductCollectMapper.xml
  58. 7 0
      ruoyi-modules/ruoyi-product/src/main/resources/mapper/product/ProductFavoritesMapper.xml
  59. 7 0
      ruoyi-modules/ruoyi-product/src/main/resources/mapper/product/ProductShoppingCartMapper.xml
  60. 226 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/pc/IndexSystemController.java
  61. 146 19
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteErpSystemServiceImpl.java
  62. 1 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteUserServiceImpl.java
  63. 2 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysAnnouncementService.java
  64. 3 1
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysDeptService.java
  65. 1 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysAnnouncementServiceImpl.java
  66. 2 1
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java

+ 5 - 0
ruoyi-api/ruoyi-api-customer/src/main/java/org/dromara/customer/api/RemoteCustomerService.java

@@ -16,4 +16,9 @@ public interface RemoteCustomerService {
      * 根据ids查询客户信息(编号+名称)
      */
     Map<Long, CustomerApiVo> selectCustomerByIds(Set<Long> ids);
+
+    /**
+     * 根据userId查询客户id
+     */
+    Long selectCustomerIdByUserId(Long userId);
 }

+ 9 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/model/LoginUser.java

@@ -135,6 +135,15 @@ public class LoginUser implements Serializable {
      */
     private String deviceType;
 
+    /**
+     * 用户子类型 用户子类型(0=平台用户,1=供应商,2=伙伴商,3=商城用户)
+     */
+    private String userSonType;
+    /**
+     * 客户ID
+     */
+    private Long customerId;
+
     /**
      * 获取登录id
      */

+ 5 - 0
ruoyi-auth/pom.xml

@@ -96,6 +96,11 @@
             <artifactId>ruoyi-api-external</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.dromara</groupId>
+            <artifactId>ruoyi-api-customer</artifactId>
+        </dependency>
+
         <!-- 自定义负载均衡(多团队开发使用) -->
 <!--        <dependency>-->
 <!--            <groupId>org.dromara</groupId>-->

+ 0 - 1
ruoyi-auth/src/main/java/org/dromara/auth/controller/TokenController.java

@@ -250,7 +250,6 @@ public class TokenController {
         // 登录
         LoginVo loginVo = IAuthStrategy.clientLogin(body, clientVo, grantType);
 
-        Long userId = LoginHelper.getUserId();
         return R.ok(loginVo);
     }
 

+ 1 - 1
ruoyi-auth/src/main/java/org/dromara/auth/service/IAuthStrategy.java

@@ -44,7 +44,7 @@ public interface IAuthStrategy {
             throw new ServiceException("授权类型不正确!");
         }
         IAuthStrategy instance = SpringUtils.getBean(beanName);
-        return instance.login(body, client);
+        return instance.clientLogin(body, client);
     }
 
     /**

+ 50 - 1
ruoyi-auth/src/main/java/org/dromara/auth/service/impl/PasswordAuthStrategy.java

@@ -17,6 +17,7 @@ import org.dromara.common.core.constant.Constants;
 import org.dromara.common.core.constant.GlobalConstants;
 import org.dromara.common.core.constant.SystemConstants;
 import org.dromara.common.core.enums.LoginType;
+import org.dromara.common.core.exception.ServiceException;
 import org.dromara.common.core.exception.user.CaptchaException;
 import org.dromara.common.core.exception.user.CaptchaExpireException;
 import org.dromara.common.core.utils.MessageUtils;
@@ -26,12 +27,15 @@ import org.dromara.common.json.utils.JsonUtils;
 import org.dromara.common.redis.utils.RedisUtils;
 import org.dromara.common.satoken.utils.LoginHelper;
 import org.dromara.common.tenant.helper.TenantHelper;
+import org.dromara.customer.api.RemoteCustomerService;
 import org.dromara.system.api.RemoteClientService;
 import org.dromara.system.api.RemoteUserService;
 import org.dromara.system.api.domain.vo.RemoteClientVo;
 import org.dromara.system.api.model.LoginUser;
 import org.springframework.stereotype.Service;
 
+import java.util.Objects;
+
 /**
  * 密码认证策略
  *
@@ -52,6 +56,9 @@ public class PasswordAuthStrategy implements IAuthStrategy {
     @DubboReference
     private RemoteClientService remoteClientService;
 
+    @DubboReference
+    private RemoteCustomerService remoteCustomerService;
+
     @Override
     public LoginVo login(String body, RemoteClientVo client) {
         PasswordLoginBody loginBody = JsonUtils.parseObject(body, PasswordLoginBody.class);
@@ -99,7 +106,49 @@ public class PasswordAuthStrategy implements IAuthStrategy {
      */
     @Override
     public LoginVo clientLogin(String body, RemoteClientVo client) {
-        return null;
+        PasswordLoginBody loginBody = JsonUtils.parseObject(body, PasswordLoginBody.class);
+        ValidatorUtils.validate(loginBody);
+        String tenantId = loginBody.getTenantId();
+        String username = loginBody.getUsername();
+        String password = loginBody.getPassword();
+        String code = loginBody.getCode();
+        String uuid = loginBody.getUuid();
+
+        // 验证码开关
+        if (captchaProperties.getEnabled()) {
+            validateCaptcha(tenantId, username, code, uuid);
+        }
+        LoginUser loginUser = TenantHelper.dynamic(tenantId, () -> {
+            LoginUser user = remoteUserService.getUserInfo(username, tenantId);
+//            if(!Objects.equals(user.getUserSonType(), "3")){
+//                throw new ServiceException("不存在该账号");
+//            }
+            loginService.checkLogin(LoginType.PASSWORD, tenantId, username, () -> !BCrypt.checkpw(password, user.getPassword()));
+            return user;
+        });
+        //获取客户信息
+        Long customerId = remoteCustomerService.selectCustomerIdByUserId(loginUser.getUserId());
+        if (Objects.isNull(customerId)){
+            throw new ServiceException("不存在该账号");
+        }
+        loginUser.setClientKey(client.getClientKey());
+        loginUser.setDeviceType(client.getDeviceType());
+        loginUser.setCustomerId(customerId);
+        SaLoginParameter model = new SaLoginParameter();
+        model.setDeviceType(client.getDeviceType());
+        // 自定义分配 不同用户体系 不同 token 授权时间 不设置默认走全局 yml 配置
+        // 例如: 后台用户30分钟过期 app用户1天过期
+        model.setTimeout(client.getTimeout());
+        model.setActiveTimeout(client.getActiveTimeout());
+        model.setExtra(LoginHelper.CLIENT_KEY, client.getClientId());
+        // 生成token
+        LoginHelper.login(loginUser, model);
+
+        LoginVo loginVo = new LoginVo();
+        loginVo.setAccessToken(StpUtil.getTokenValue());
+        loginVo.setExpireIn(StpUtil.getTokenTimeout());
+        loginVo.setClientId(client.getClientId());
+        return loginVo;
     }
 
     /**

+ 16 - 2
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/controller/pc/CustomerRegisterController.java

@@ -9,23 +9,37 @@ import lombok.RequiredArgsConstructor;
 import org.dromara.common.core.domain.R;
 import org.dromara.customer.domain.bo.CustomerRegisterBo;
 import org.dromara.customer.service.ICustomerInfoService;
+import org.dromara.customer.service.ISupplierInfoService;
 import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 @Validated
 @RequiredArgsConstructor
 @RestController
-@RequestMapping("/customerContact")
+@RequestMapping("/pcCustomer")
 public class CustomerRegisterController {
 
     private final ICustomerInfoService customerInfoService;
 
+    private final ISupplierInfoService supplierInfoService;
+
     /**
     * 企业注册
     * */
-    public R<Void> register(CustomerRegisterBo bo) {
+    @PostMapping("/registerCustomer")
+    public R<Void> register(@RequestBody CustomerRegisterBo bo) {
         customerInfoService.register(bo);
         return R.ok();
     }
+    /**
+    * 供应商注册
+    * */
+    @PostMapping("/registerSupplier")
+    public R<Void> registerSupplier(@RequestBody CustomerRegisterBo bo) {
+        supplierInfoService.register(bo);
+        return R.ok();
+    }
 }

+ 22 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/dubbo/RemoteCustomerServiceImpl.java

@@ -1,13 +1,16 @@
 package org.dromara.customer.dubbo;
 
 import cn.hutool.core.collection.CollUtil;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.dromara.customer.api.RemoteCustomerService;
 import org.dromara.customer.api.domain.CustomerApiVo;
+import org.dromara.customer.domain.CustomerContact;
 import org.dromara.customer.domain.CustomerInfo;
 import org.dromara.customer.mapper.CustomerInfoMapper;
+import org.dromara.customer.service.ICustomerContactService;
 import org.dromara.customer.service.ICustomerInfoService;
 import org.springframework.stereotype.Service;
 
@@ -24,6 +27,8 @@ import java.util.stream.Collectors;
 public class RemoteCustomerServiceImpl implements RemoteCustomerService {
 
     private final ICustomerInfoService customerInfoService;
+
+    private final ICustomerContactService customerContactService;
     private final CustomerInfoMapper customerInfoMapper;
 
     @Override
@@ -49,4 +54,21 @@ public class RemoteCustomerServiceImpl implements RemoteCustomerService {
             (v1, v2) -> v1
         ));
     }
+
+    /**
+     * 根据userId查询客户id
+     *
+     * @param userId
+     */
+    @Override
+    public Long selectCustomerIdByUserId(Long userId) {
+        CustomerContact one = customerContactService.getOne(Wrappers.lambdaQuery(CustomerContact.class)
+            .eq(CustomerContact::getId, userId)
+            .last("limit 1")
+        );
+        if (one != null) {
+            return one.getCustomerId();
+        }
+        return null;
+    }
 }

+ 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()));
     }
 }

+ 7 - 0
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/ISupplierInfoService.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import jakarta.validation.constraints.NotNull;
 import org.dromara.customer.domain.SupplierInfo;
+import org.dromara.customer.domain.bo.CustomerRegisterBo;
 import org.dromara.customer.domain.bo.SupplierAuthorizeBo;
 import org.dromara.customer.domain.vo.SupplierInfoVo;
 import org.dromara.customer.domain.bo.SupplierInfoBo;
@@ -106,4 +107,10 @@ public interface ISupplierInfoService extends IService<SupplierInfo>{
 
     /*根据ids查询供应商名称*/
     Map<Long, String> selectSupplierNameByIds(Set<Long> ids);
+
+    /**
+     * 注册供应商
+     * @param bo
+     */
+    Boolean register(CustomerRegisterBo bo);
 }

+ 118 - 1
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/SupplierInfoServiceImpl.java

@@ -1,6 +1,7 @@
 package org.dromara.customer.service.impl;
 
 import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.crypto.digest.BCrypt;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -10,6 +11,9 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.common.core.constant.GlobalConstants;
+import org.dromara.common.core.exception.ServiceException;
+import org.dromara.common.core.utils.DateUtils;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -19,7 +23,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.dromara.common.redis.utils.RedisUtils;
+import org.dromara.common.satoken.utils.LoginHelper;
 import org.dromara.customer.domain.*;
+import org.dromara.customer.domain.bo.CustomerRegisterBo;
 import org.dromara.customer.domain.bo.EnterpriseScaleBo;
 import org.dromara.customer.domain.bo.SupplierAuthorizeBo;
 import org.dromara.customer.domain.bo.SupplyAreaBo;
@@ -27,17 +34,23 @@ import org.dromara.customer.domain.vo.*;
 import org.dromara.customer.enums.SupplierStatusEnum;
 import org.dromara.customer.mapper.SupplierAuthorizeMapper;
 import org.dromara.customer.mapper.SupplierBusinessInfoMapper;
+import org.dromara.customer.mapper.SupplierContactMapper;
 import org.dromara.customer.service.*;
+import org.dromara.customer.utils.qcc.QccUtils;
+import org.dromara.customer.utils.qcc.domain.CompanyInfoResponse;
 import org.dromara.product.api.RemoteCategoryService;
 import org.dromara.product.api.RemoteProductService;
 import org.dromara.product.api.domain.RemoteProductBrand;
 import org.dromara.system.api.RemoteComStaffService;
 import org.dromara.system.api.RemoteSupplierTypeService;
+import org.dromara.system.api.RemoteUserService;
+import org.dromara.system.api.domain.bo.RemoteUserBo;
 import org.dromara.system.api.domain.vo.RemoteSupplierTypeVo;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.dromara.customer.domain.bo.SupplierInfoBo;
 import org.dromara.customer.domain.vo.SupplierInfoVo;
+import org.dromara.customer.domain.SupplierInfo;
 import org.dromara.customer.mapper.SupplierInfoMapper;
 import org.springframework.util.CollectionUtils;
 
@@ -69,6 +82,15 @@ public class SupplierInfoServiceImpl  extends ServiceImpl<SupplierInfoMapper, Su
 
     private final ISupplierInfoTemporaryService supplierInfoTemporaryService;
 
+    /**
+     *
+    * 供应商联系人信息
+    * */
+    private final SupplierContactMapper supplierContactMapper;
+
+    @DubboReference
+    private final RemoteUserService remoteUserService;
+
     @DubboReference
     private final RemoteComStaffService remoteComStaffService;
 
@@ -621,7 +643,7 @@ public class SupplierInfoServiceImpl  extends ServiceImpl<SupplierInfoMapper, Su
         if (bo.getOperatingBrand() != null && StringUtils.isNotBlank(bo.getOperatingBrand())) {
             if (StringUtils.isNotBlank(bo.getOperatingBrand())) {
                 Long productBrandIdByName = remoteProductService.getProductBrandIdByName(bo.getOperatingBrand());
-                if (productBrandIdByName != null) {
+                if (productBrandIdByName != null){
                     lqw.like(SupplierInfo::getOperatingBrand, productBrandIdByName);
                 }
             }
@@ -1911,4 +1933,99 @@ public class SupplierInfoServiceImpl  extends ServiceImpl<SupplierInfoMapper, Su
         lqw.eq(bo.getCooperative() != null, SupplierInfo::getCooperative, bo.getCooperative());
         return lqw;
     }
+
+    /**
+     * 注册供应商
+     *
+     * @param bo
+     */
+    @Override
+    public Boolean register(CustomerRegisterBo bo) {
+        //先校验验证码是否正确
+        String code = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY + bo.getPurchasePhone());
+        code = "123456";
+        if (!code.equals(bo.getCode())) {
+            throw new ServiceException("验证码错误");
+        }
+
+        //校验密码与确认密码是否一致
+        if (!bo.getPassword().equals(bo.getConfirmPassword())) {
+            throw new ServiceException("密码与确认密码不一致");
+        }
+
+        //查询数据库是否存在企业,已存在则提示客户已存在
+        SupplierInfo one = baseMapper.selectOne(new LambdaQueryWrapper<SupplierInfo>()
+            .eq(SupplierInfo::getSupplierName, bo.getCustomerName())
+        );
+        if (one != null) {
+            throw new ServiceException("客户已存在");
+        }
+
+        //查询企查查是否存在企业,如果企查查不存在则提示企业不存在
+        CompanyInfoResponse companyInfo = QccUtils.getCompanyInfo(bo.getCustomerName());
+        if (companyInfo == null || companyInfo.getResult() == null) {
+            throw new ServiceException("请检查企业名是否正确");
+        }
+
+        //构建客户信息实体
+        SupplierInfo supplierInfo = new SupplierInfo();
+        supplierInfo.setSupplierName(bo.getCustomerName());
+        supplierInfo.setSupplierName(companyInfo.getResult().getName());
+        supplierInfo.setShortName(companyInfo.getResult().getName());
+
+        // 设置其他工商信息
+        if (baseMapper.insert(supplierInfo) <= 0) {
+            throw new ServiceException("供应商信息注册失败");
+        }
+
+        Long supplierId = supplierInfo.getId();
+
+        // 添加客户工商信息
+        SupplierBusinessInfo businessInfo = new SupplierBusinessInfo();
+        businessInfo.setSupplierId(supplierId);
+        businessInfo.setBusinessName(companyInfo.getResult().getName());
+        businessInfo.setSocialCreditCode(companyInfo.getResult().getCreditCode());
+        businessInfo.setLegalPersonName(companyInfo.getResult().getOperName());
+        businessInfo.setRegisteredCapital(companyInfo.getResult().getRegistCapi());
+        businessInfo.setEstablishmentDate(DateUtils.parseDate((companyInfo.getResult().getStartDate())));
+        businessInfo.setRegistrationStatus(companyInfo.getResult().getStatus());
+        businessInfo.setBusinessAddress(companyInfo.getResult().getAddress());
+        businessInfo.setBussinessRange(companyInfo.getResult().getScope());
+        businessInfo.setStatus("0");
+        businessInfo.setDelFlag("0");
+
+        if (supplierBusinessInfoMapper.insert(businessInfo) <= 0) {
+            throw new ServiceException("客户工商信息新增失败");
+        }
+
+        // 添加客户联系人信息
+        SupplierContact contact = new SupplierContact();
+        contact.setSupplierId(supplierId);
+        contact.setUserName(bo.getPurchaseName());
+        contact.setPhone(bo.getPurchasePhone());
+        contact.setPhone(bo.getPurchasePhone());
+        contact.setIsPrimaryContact("1"); // 设为主联系人
+        contact.setIsRegister("1");
+        contact.setStatus("0");
+        contact.setDelFlag("0");
+
+        if (supplierContactMapper.insert(contact) <= 0) {
+            throw new ServiceException("客户联系人信息新增失败");
+        }
+
+        // 创建系统用户
+        RemoteUserBo remoteUserBo = new RemoteUserBo();
+        remoteUserBo.setUserName(bo.getPurchasePhone());
+        remoteUserBo.setNickName(bo.getCustomerName());
+        remoteUserBo.setPhonenumber(bo.getPurchasePhone());
+        remoteUserBo.setPassword(BCrypt.hashpw(bo.getPassword()));
+        remoteUserBo.setUserSonType("3"); // 商城用户
+        remoteUserBo.setTenantId(LoginHelper.getTenantId());
+        remoteUserBo.setStatus("0"); // 正常状态
+
+        remoteUserService.addUser(remoteUserBo);
+
+        log.info("客户注册成功,客户ID:{},客户名称:{}", supplierId, bo.getCustomerName());
+        return true;
+    }
 }

+ 1 - 1
ruoyi-modules/ruoyi-external/src/main/java/org/dromara/external/controller/zhongche/ZhongChePullController.java

@@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
 import java.nio.charset.StandardCharsets;
 
 /**
- * author
+ * 中车拉取接口
  * 时间:2026/1/5,19:03
  */
 @Validated

+ 1 - 1
ruoyi-modules/ruoyi-external/src/main/java/org/dromara/external/controller/zhongche/ZhongChePushController.java

@@ -36,7 +36,7 @@ import java.util.stream.Collectors;
 import static org.dromara.common.core.constant.GlobalConstants.GLOBAL_REDIS_KEY;
 
 /**
- * author
+ * 中车推送接口
  * 时间:2026/1/5,19:03
  */
 @Validated

+ 106 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductBrowsingHistoryController.java

@@ -0,0 +1,106 @@
+package org.dromara.product.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.product.domain.vo.ProductBrowsingHistoryVo;
+import org.dromara.product.domain.bo.ProductBrowsingHistoryBo;
+import org.dromara.product.service.IProductBrowsingHistoryService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 商品浏览记录
+ * 前端访问路由地址为:/product/browsingHistory
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/browsingHistory")
+public class ProductBrowsingHistoryController extends BaseController {
+
+    private final IProductBrowsingHistoryService productBrowsingHistoryService;
+
+    /**
+     * 查询商品浏览记录列表
+     */
+    //@SaCheckPermission("product:browsingHistory:list")
+    @GetMapping("/list")
+    public TableDataInfo<ProductBrowsingHistoryVo> list(ProductBrowsingHistoryBo bo, PageQuery pageQuery) {
+        return productBrowsingHistoryService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 导出商品浏览记录列表
+     */
+    //@SaCheckPermission("product:browsingHistory:export")
+    @Log(title = "商品浏览记录", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(ProductBrowsingHistoryBo bo, HttpServletResponse response) {
+        List<ProductBrowsingHistoryVo> list = productBrowsingHistoryService.queryList(bo);
+        ExcelUtil.exportExcel(list, "商品浏览记录", ProductBrowsingHistoryVo.class, response);
+    }
+
+    /**
+     * 获取商品浏览记录详细信息
+     *
+     * @param id 主键
+     */
+    //@SaCheckPermission("product:browsingHistory:query")
+    @GetMapping("/{id}")
+    public R<ProductBrowsingHistoryVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable("id") Long id) {
+        return R.ok(productBrowsingHistoryService.queryById(id));
+    }
+
+    /**
+     * 新增商品浏览记录
+     */
+    //@SaCheckPermission("product:browsingHistory:add")
+    @Log(title = "商品浏览记录", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody ProductBrowsingHistoryBo bo) {
+        return toAjax(productBrowsingHistoryService.insertByBo(bo));
+    }
+
+    /**
+     * 修改商品浏览记录
+     */
+    //@SaCheckPermission("product:browsingHistory:edit")
+    @Log(title = "商品浏览记录", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProductBrowsingHistoryBo bo) {
+        return toAjax(productBrowsingHistoryService.updateByBo(bo));
+    }
+
+    /**
+     * 删除商品浏览记录
+     *
+     * @param ids 主键串
+     */
+    //@SaCheckPermission("product:browsingHistory:remove")
+    @Log(title = "商品浏览记录", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable("ids") Long[] ids) {
+        return toAjax(productBrowsingHistoryService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 106 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductCollectController.java

@@ -0,0 +1,106 @@
+package org.dromara.product.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.product.domain.vo.ProductCollectVo;
+import org.dromara.product.domain.bo.ProductCollectBo;
+import org.dromara.product.service.IProductCollectService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 商品收藏
+ * 前端访问路由地址为:/product/collect
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/collect")
+public class ProductCollectController extends BaseController {
+
+    private final IProductCollectService productCollectService;
+
+    /**
+     * 查询商品收藏列表
+     */
+    //@SaCheckPermission("product:collect:list")
+    @GetMapping("/list")
+    public TableDataInfo<ProductCollectVo> list(ProductCollectBo bo, PageQuery pageQuery) {
+        return productCollectService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 导出商品收藏列表
+     */
+    //@SaCheckPermission("product:collect:export")
+    @Log(title = "商品收藏", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(ProductCollectBo bo, HttpServletResponse response) {
+        List<ProductCollectVo> list = productCollectService.queryList(bo);
+        ExcelUtil.exportExcel(list, "商品收藏", ProductCollectVo.class, response);
+    }
+
+    /**
+     * 获取商品收藏详细信息
+     *
+     * @param id 主键
+     */
+    //@SaCheckPermission("product:collect:query")
+    @GetMapping("/{id}")
+    public R<ProductCollectVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable("id") Long id) {
+        return R.ok(productCollectService.queryById(id));
+    }
+
+    /**
+     * 新增商品收藏
+     */
+    //@SaCheckPermission("product:collect:add")
+    @Log(title = "商品收藏", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody ProductCollectBo bo) {
+        return toAjax(productCollectService.insertByBo(bo));
+    }
+
+    /**
+     * 修改商品收藏
+     */
+    //@SaCheckPermission("product:collect:edit")
+    @Log(title = "商品收藏", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProductCollectBo bo) {
+        return toAjax(productCollectService.updateByBo(bo));
+    }
+
+    /**
+     * 删除商品收藏
+     *
+     * @param ids 主键串
+     */
+    //@SaCheckPermission("product:collect:remove")
+    @Log(title = "商品收藏", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable("ids") Long[] ids) {
+        return toAjax(productCollectService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 106 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductFavoritesController.java

@@ -0,0 +1,106 @@
+package org.dromara.product.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.product.domain.vo.ProductFavoritesVo;
+import org.dromara.product.domain.bo.ProductFavoritesBo;
+import org.dromara.product.service.IProductFavoritesService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 商品收藏夹
+ * 前端访问路由地址为:/product/favorites
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/favorites")
+public class ProductFavoritesController extends BaseController {
+
+    private final IProductFavoritesService productFavoritesService;
+
+    /**
+     * 查询商品收藏夹列表
+     */
+    //@SaCheckPermission("product:favorites:list")
+    @GetMapping("/list")
+    public TableDataInfo<ProductFavoritesVo> list(ProductFavoritesBo bo, PageQuery pageQuery) {
+        return productFavoritesService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 导出商品收藏夹列表
+     */
+    //@SaCheckPermission("product:favorites:export")
+    @Log(title = "商品收藏夹", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(ProductFavoritesBo bo, HttpServletResponse response) {
+        List<ProductFavoritesVo> list = productFavoritesService.queryList(bo);
+        ExcelUtil.exportExcel(list, "商品收藏夹", ProductFavoritesVo.class, response);
+    }
+
+    /**
+     * 获取商品收藏夹详细信息
+     *
+     * @param id 主键
+     */
+    //@SaCheckPermission("product:favorites:query")
+    @GetMapping("/{id}")
+    public R<ProductFavoritesVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable("id") Long id) {
+        return R.ok(productFavoritesService.queryById(id));
+    }
+
+    /**
+     * 新增商品收藏夹
+     */
+    //@SaCheckPermission("product:favorites:add")
+    @Log(title = "商品收藏夹", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody ProductFavoritesBo bo) {
+        return toAjax(productFavoritesService.insertByBo(bo));
+    }
+
+    /**
+     * 修改商品收藏夹
+     */
+    //@SaCheckPermission("product:favorites:edit")
+    @Log(title = "商品收藏夹", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProductFavoritesBo bo) {
+        return toAjax(productFavoritesService.updateByBo(bo));
+    }
+
+    /**
+     * 删除商品收藏夹
+     *
+     * @param ids 主键串
+     */
+    //@SaCheckPermission("product:favorites:remove")
+    @Log(title = "商品收藏夹", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable("ids") Long[] ids) {
+        return toAjax(productFavoritesService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 106 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/ProductShoppingCartController.java

@@ -0,0 +1,106 @@
+package org.dromara.product.controller;
+
+import java.util.List;
+
+import lombok.RequiredArgsConstructor;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.validation.constraints.*;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.idempotent.annotation.RepeatSubmit;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.web.core.BaseController;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import org.dromara.common.log.enums.BusinessType;
+import org.dromara.common.excel.utils.ExcelUtil;
+import org.dromara.product.domain.vo.ProductShoppingCartVo;
+import org.dromara.product.domain.bo.ProductShoppingCartBo;
+import org.dromara.product.service.IProductShoppingCartService;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+
+/**
+ * 商品购物车
+ * 前端访问路由地址为:/product/shoppingCart
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/shoppingCart")
+public class ProductShoppingCartController extends BaseController {
+
+    private final IProductShoppingCartService productShoppingCartService;
+
+    /**
+     * 查询商品购物车列表
+     */
+    //@SaCheckPermission("product:shoppingCart:list")
+    @GetMapping("/list")
+    public TableDataInfo<ProductShoppingCartVo> list(ProductShoppingCartBo bo, PageQuery pageQuery) {
+        return productShoppingCartService.queryPageList(bo, pageQuery);
+    }
+
+    /**
+     * 导出商品购物车列表
+     */
+    //@SaCheckPermission("product:shoppingCart:export")
+    @Log(title = "商品购物车", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(ProductShoppingCartBo bo, HttpServletResponse response) {
+        List<ProductShoppingCartVo> list = productShoppingCartService.queryList(bo);
+        ExcelUtil.exportExcel(list, "商品购物车", ProductShoppingCartVo.class, response);
+    }
+
+    /**
+     * 获取商品购物车详细信息
+     *
+     * @param id 主键
+     */
+    //@SaCheckPermission("product:shoppingCart:query")
+    @GetMapping("/{id}")
+    public R<ProductShoppingCartVo> getInfo(@NotNull(message = "主键不能为空")
+                                     @PathVariable("id") Long id) {
+        return R.ok(productShoppingCartService.queryById(id));
+    }
+
+    /**
+     * 新增商品购物车
+     */
+    //@SaCheckPermission("product:shoppingCart:add")
+    @Log(title = "商品购物车", businessType = BusinessType.INSERT)
+    @RepeatSubmit()
+    @PostMapping()
+    public R<Void> add(@Validated(AddGroup.class) @RequestBody ProductShoppingCartBo bo) {
+        return toAjax(productShoppingCartService.insertByBo(bo));
+    }
+
+    /**
+     * 修改商品购物车
+     */
+    //@SaCheckPermission("product:shoppingCart:edit")
+    @Log(title = "商品购物车", businessType = BusinessType.UPDATE)
+    @RepeatSubmit()
+    @PutMapping()
+    public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProductShoppingCartBo bo) {
+        return toAjax(productShoppingCartService.updateByBo(bo));
+    }
+
+    /**
+     * 删除商品购物车
+     *
+     * @param ids 主键串
+     */
+    //@SaCheckPermission("product:shoppingCart:remove")
+    @Log(title = "商品购物车", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public R<Void> remove(@NotEmpty(message = "主键不能为空")
+                          @PathVariable("ids") Long[] ids) {
+        return toAjax(productShoppingCartService.deleteWithValidByIds(List.of(ids), true));
+    }
+}

+ 121 - 6
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/pc/IndexProductController.java

@@ -3,7 +3,13 @@ package org.dromara.product.controller.pc;
 import cn.hutool.core.lang.tree.Tree;
 import lombok.RequiredArgsConstructor;
 import org.dromara.common.core.domain.R;
-import org.dromara.product.service.IProductCategoryService;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.product.domain.bo.PcProductBo;
+import org.dromara.product.domain.bo.ProductBrandBo;
+import org.dromara.product.domain.bo.ProductCategoryBo;
+import org.dromara.product.domain.vo.*;
+import org.dromara.product.service.*;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -13,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
 import java.util.List;
 
 /**
+ * 首页
  * @author
  * @date 2026/1/26 下午6:41
  */
@@ -21,17 +28,125 @@ import java.util.List;
 @RestController
 @RequestMapping("/indexProduct")
 public class IndexProductController {
-
+    //商品
+    private final IProductBaseService productBaseService;
+    //商品分类
     private final IProductCategoryService productCategoryService;
+    //商品品牌
+    private final IProductBrandService productBrandService;
+    //主题页面
+    private final IProductThemeService productThemeService;
+    //产品解决方案
+    private final IProductProgramService productProgramService;
+    //福利分类
+    private final IProductGiftCategoryService productGiftCategoryService;
+    //福利分类下的商品
+    private final IProductGiftCategoryLinkService productGiftCategoryLinkService;
+    //福利楼层广告
+    private final IProductGiftFloorService productGiftFloorService;
+    //福利楼层广告下的商品
+    private final IProductGiftFloorLinkService productGiftFloorLinkService;
+    //福利公告管理
+    private final IProductGiftNoticeService productGiftNoticeService;
+    //推荐商品
+    private final IProductRecommendService productRecommendService;
+    //工业品牌楼层
+    private final IProductIndustrialFloorService productIndustrialFloorService;
+    //分类楼层商品
+    private final IProductDecorationFloorLinkService productDecorationFloorLinkService;
+    //项目案例
+    private final IServiceCaseService serviceCaseService;
+    //收藏
+
+    /**
+    * 商品列表接口
+    * */
+    @GetMapping("getPcProductPage")
+    public TableDataInfo<PcProductVo> getPcProductPage(PcProductBo bo, PageQuery pageQuery) {
+        return productBaseService.getPcProductPage(bo,pageQuery);
+    }
+
+    /**
+    * 商品详情
+    * */
+    @GetMapping("getProductDetail/{productId}")
+    public R<ProductBaseVo> getProductDetail(@PathVariable Long productId) {
+        return R.ok(productBaseService.queryById(productId));
+    }
+
+
 
     /**
-     * 查询产品分类树(排除节点)
+     * 查询产品分类树
      * */
-    @GetMapping("getProductCategoryTree/{excludeIds}")
-    public R<List<Tree<Long>>> getProductCategoryTree(@PathVariable("excludeIds") String excludeIds) {
-        return R.ok(productCategoryService.queryPageListExclude(excludeIds));
+    @GetMapping("getProductCategoryTree")
+    public R<List<Tree<Long>>> getProductCategoryTree() {
+        ProductCategoryBo bo = new ProductCategoryBo();
+        bo.setDataSource("youyi");
+        return R.ok(productCategoryService.selectCategoryTreeList(bo));
+    }
+
+    /**
+    * 查询行家精选商品列表(平台装修-特价管理)
+    * */
+    @GetMapping("getExpertSelectionList")
+    public R<List<PcProductVo>> getExpertSelectionList() {
+        Long recommendId = 2001108545239650390L;
+        return R.ok(productBaseService.getExpertSelectionList(recommendId));
     }
 
+    /**
+    * 分类楼层详情(平台装修-分类楼层-详情)
+    * */
+    @GetMapping("getClassificationFloorDetail/{floorNo}")
+    public R<List<PcProductVo>> getClassificationFloorDetail(@PathVariable Long floorNo) {
+        return R.ok( productBaseService.getClassificationFloorDetail(floorNo));
+    }
+
+    /**
+    * 平台闪购品牌(平台装修-品牌闪购)
+    * */
+    @GetMapping("getPlatformFlashSaleBrand")
+    public R<List<ProductBrandVo>> getPlatformFlashSaleBrand() {
+        Long recommendId = 2017077989313064961L;
+        List<ProductBrandVo> productBrandVos = productBrandService.getPlatformFlashSaleBrand(recommendId);
+        return R.ok(productBrandVos);
+    }
+
+    /**
+    * 项目案例列表(平台装修-项目案例)
+    * */
+    @GetMapping("getProjectCaseList")
+    public R<List<ServiceCaseVo>> getProjectCaseList() {
+        Long recommendId = 2017076803025481729L;
+        return R.ok(serviceCaseService.getProjectCaseList(recommendId));
+    }
+
+    /**
+     * 查询父级下一级的子集商品分类
+     * */
+    @GetMapping("/getProductCategoryList/{categoryId}")
+    public R<List<ProductCategoryVo>> getProductCategoryList(@PathVariable Long categoryId) {
+        return R.ok(productCategoryService.getProductCategoryList(categoryId));
+    }
+
+    /**
+     * 查询顶级分类下的的品牌列表
+     * */
+    @GetMapping("/getBrandPage/{categoryId}")
+    public R<TableDataInfo<ProductBrandVo>> getBrandPage(@PathVariable Long categoryId, PageQuery pageQuery) {
+        ProductBrandBo bo = new ProductBrandBo();
+        bo.setCategoryId(categoryId);
+        return R.ok(productBrandService.getBrandPage(bo,pageQuery));
+    }
+
+    /**
+    * 查询分类下推荐的商品
+    * */
+    @GetMapping("/getCategoryRecommendProductList/{categoryId}")
+    public TableDataInfo<PcProductVo> getCategoryRecommendProductList(@PathVariable Long categoryId, PageQuery pageQuery) {
+        return productBaseService.getCategoryRecommendProductPage(categoryId, pageQuery);
+    }
 
 
 

+ 199 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/controller/pc/MyProductController.java

@@ -0,0 +1,199 @@
+package org.dromara.product.controller.pc;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.satoken.utils.LoginHelper;
+import org.dromara.product.domain.ProductCollect;
+import org.dromara.product.domain.ProductFavorites;
+import org.dromara.product.domain.ProductShoppingCart;
+import org.dromara.product.domain.bo.ProductBrowsingHistoryBo;
+import org.dromara.product.domain.bo.ProductCollectBo;
+import org.dromara.product.domain.bo.ProductFavoritesBo;
+import org.dromara.product.domain.bo.ProductShoppingCartBo;
+import org.dromara.product.domain.vo.PcProductVo;
+import org.dromara.product.domain.vo.ProductFavoritesVo;
+import org.dromara.product.service.*;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 我的商品相关接口
+ * @author
+ * @date 2026/1/26 下午6:41
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/myProduct")
+public class MyProductController {
+
+    //商品
+    private final IProductBaseService productBaseService;
+    //商品浏览记录
+    private final IProductBrowsingHistoryService productBrowsingHistoryService;
+    //商品收藏
+    private final IProductCollectService productCollectService;
+    //商品收藏夹
+    private final IProductFavoritesService productFavoritesService;
+    //购物车
+    private final IProductShoppingCartService productShoppingCartService;
+
+
+    /**
+    * 新增商品浏览记录
+    * */
+    @PostMapping("/addProductBrowsingHistory/{productId}")
+    public R addProductBrowsingHistory(@PathVariable Long productId) {
+        ProductBrowsingHistoryBo productBrowsingHistoryBo = new ProductBrowsingHistoryBo();
+        productBrowsingHistoryService.insertByBo(productBrowsingHistoryBo);
+        return R.ok();
+    }
+
+    /**
+    * 浏览记录的商品
+    * */
+    @GetMapping("/getProductBrowsingHistoryPage")
+    public TableDataInfo<PcProductVo> getProductBrowsingHistoryPage(PageQuery pageQuery) {
+        return productBaseService.getProductBrowsingHistoryPage(LoginHelper.getUserId(),pageQuery);
+    }
+
+    /**
+    * 新增商品收藏夹
+    * */
+    @PostMapping("/addProductFavorites")
+    public R addProductFavorites(@RequestBody ProductFavoritesBo bo) {
+        bo.setUserId(LoginHelper.getUserId());
+        productFavoritesService.insertByBo(bo);
+        return R.ok();
+    }
+
+    /**
+     * 查看商品收藏夹
+     */
+    @GetMapping("/getProductFavoritesPage")
+    public TableDataInfo<ProductFavoritesVo> getProductFavoritesPage(ProductFavoritesBo bo, PageQuery pageQuery) {
+        return productFavoritesService.queryPageList(bo, pageQuery);
+    }
+    /**
+    * 删除收藏夹
+    * */
+    @DeleteMapping("/deleteProductFavorites/{favoritesId}")
+    public R deleteProductFavorites(@PathVariable Long favoritesId) {
+        //做校验是否存在收藏商品
+        if(productCollectService.exists(Wrappers.lambdaQuery(ProductCollect.class)
+            .eq(ProductCollect::getFavoritesId, favoritesId))){
+            return R.fail("收藏夹下有收藏商品,请先取消收藏商品");
+        }
+        productFavoritesService.deleteWithValidByIds(List.of(favoritesId), false);
+        return R.ok();
+    }
+    /**
+    * 收藏商品
+    * */
+    @PostMapping("/addProductCollect")
+    public R addProductCollect(@RequestBody ProductCollectBo bo) {
+        //如果未传收藏夹id,则查询有没有默认收藏夹,如果没有就新增收藏夹
+        if(bo.getFavoritesId() == null){
+            ProductFavorites one = productFavoritesService.getOne(Wrappers.lambdaQuery(ProductFavorites.class)
+                .eq(ProductFavorites::getUserId, LoginHelper.getUserId())
+                .eq(ProductFavorites::getIsDefault, "0")
+            );
+            if(one == null){
+                one = new ProductFavorites();
+                one.setUserId(LoginHelper.getUserId());
+                one.setTitle("默认收藏夹");
+                one.setIsDefault("0");
+                productFavoritesService.save(one);
+            }
+            bo.setFavoritesId(one.getId());
+        }
+        bo.setUserId(LoginHelper.getUserId());
+
+        productCollectService.insertByBo(bo);
+        return R.ok();
+    }
+
+    /**
+    * 取消收藏
+    * */
+    @DeleteMapping("/cancelProductCollect/{collectId}")
+    public R cancelProductCollect(@PathVariable Long collectId) {
+        productCollectService.deleteWithValidByIds(List.of(collectId), false);
+        return R.ok();
+    }
+
+    /**
+    * 收藏夹商品
+    * */
+    @GetMapping("/getProductFavoritesPage/{favoritesId}")
+    public TableDataInfo<PcProductVo> getProductFavoritesPage(@PathVariable Long favoritesId,PageQuery pageQuery) {
+        return productBaseService.getProductFavoritesPage(favoritesId, LoginHelper.getUserId(),pageQuery);
+    }
+
+    /**
+    * 查询商品是否在默认收藏夹收藏
+    * */
+    @GetMapping("/isProductInDefaultCollect/{productIds}")
+    public R isProductInDefaultCollect(@PathVariable List<Long> productIds) {
+        //查询商品是否在默认收藏夹收藏
+        ProductFavorites one = productFavoritesService.getOne(Wrappers.lambdaQuery(ProductFavorites.class)
+            .eq(ProductFavorites::getUserId, LoginHelper.getUserId())
+            .eq(ProductFavorites::getIsDefault, "0")
+        );
+        if(one == null){
+            one = new ProductFavorites();
+            one.setUserId(LoginHelper.getUserId());
+            one.setTitle("默认收藏夹");
+            one.setIsDefault("0");
+            productFavoritesService.save(one);
+        }
+        return R.ok(productCollectService.exists(Wrappers.lambdaQuery(ProductCollect.class)
+            .eq(ProductCollect::getUserId, LoginHelper.getUserId())
+            .eq(ProductCollect::getFavoritesId, one.getId())
+            .in(ProductCollect::getProductId, productIds)));
+    }
+
+
+    /**
+    * 将商品添加到购物车
+    * */
+    @PostMapping("/addProductShoppingCart")
+    public R addProductShoppingCart(@RequestBody ProductShoppingCartBo bo) {
+
+        bo.setUserId(LoginHelper.getUserId());
+        productShoppingCartService.insertByBo(bo);
+        return R.ok();
+    }
+
+    /**
+    * 删除购物车商品
+    * */
+    @DeleteMapping("/deleteProductShoppingCart/{ids}")
+    public R deleteProductShoppingCart(@PathVariable List<Long> ids) {
+        productShoppingCartService.removeByIds(ids);
+        return R.ok();
+    }
+
+    /**
+    * 查询购物车的商品
+    * */
+    @GetMapping("/getProductShoppingCartPage")
+    public TableDataInfo<PcProductVo> getProductShoppingCartPage(PageQuery pageQuery) {
+        return productBaseService.getProductShoppingCartPage(LoginHelper.getUserId(),pageQuery);
+    }
+
+
+
+
+
+
+
+
+
+}

+ 51 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductBrowsingHistory.java

@@ -0,0 +1,51 @@
+package org.dromara.product.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * 商品浏览记录对象 product_browsing_history
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("product_browsing_history")
+public class ProductBrowsingHistory extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 商品id
+     */
+    private Long productId;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 客户id
+     */
+    private Long customerId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 56 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductCollect.java

@@ -0,0 +1,56 @@
+package org.dromara.product.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * 商品收藏对象 product_collect
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("product_collect")
+public class ProductCollect extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 商品id
+     */
+    private Long productId;
+
+    /**
+     * 收藏夹id
+     */
+    private Long favoritesId;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 客户id
+     */
+    private Long customerId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 56 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductFavorites.java

@@ -0,0 +1,56 @@
+package org.dromara.product.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * 商品收藏夹对象 product_favorites
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("product_favorites")
+public class ProductFavorites extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 收藏夹名称
+     */
+    private String title;
+
+    /**
+     * 是否默认 0是 1否
+     */
+    private String isDefault;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 客户id
+     */
+    private Long customerId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 67 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/ProductShoppingCart.java

@@ -0,0 +1,67 @@
+package org.dromara.product.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * 商品购物车对象 product_shopping_cart
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("product_shopping_cart")
+public class ProductShoppingCart extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 商品id
+     */
+    private Long productId;
+
+    /**
+     * 客户id
+     */
+    private Long customerId;
+
+    /**
+     * 商品数量
+     */
+    private Long productNum;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    private String status;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    @TableLogic
+    private String delFlag;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+
+}

+ 54 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/PcProductBo.java

@@ -0,0 +1,54 @@
+package org.dromara.product.domain.bo;
+
+import lombok.Data;
+
+/**
+ * 商品查询参数
+ * @author
+ * @date 2026/2/2 下午4:09
+ */
+@Data
+public class PcProductBo {
+
+    /**
+     * 搜索关键字
+     * */
+    private String searchKeyword;
+    /**
+    * 品牌id
+    * */
+    private Long brandId;
+    /**
+    * 顶级分类id
+    * */
+    private Long topCategoryId;
+    /**
+    * 中级分类id
+    * */
+    private Long middleCategoryId;
+    /**
+    * 底层分类id
+    * */
+    private Long bottomCategoryId;
+    /**
+    * 价格区间 1:1-100 2:100-500 3:500-1000 4:1000以上
+    * */
+    private String priceRange;
+    /**
+    * 是否可定制 0:不可定制 1:可定制
+    * */
+    private String isCustomize;
+    /**
+    * 排序字段 1:智能排序 2:库存匹配 3:价格排序
+    * */
+    private String sortField;
+    /**
+    * 排序方式上面排序字段有几个想下面方式就有几个《多个排序字段,分隔
+     * Asc:升序  Desc:降序
+    * */
+    private String sortOrder;
+
+
+
+
+}

+ 5 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductBrandBo.java

@@ -140,5 +140,10 @@ public class ProductBrandBo extends BaseEntity {
     //@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
     private String remark;
 
+    /**
+    * 分类id
+    * */
+    private Long categoryId;
+
 
 }

+ 53 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductBrowsingHistoryBo.java

@@ -0,0 +1,53 @@
+package org.dromara.product.domain.bo;
+
+import org.dromara.product.domain.ProductBrowsingHistory;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+/**
+ * 商品浏览记录业务对象 product_browsing_history
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = ProductBrowsingHistory.class, reverseConvertGenerate = false)
+public class ProductBrowsingHistoryBo extends BaseEntity {
+
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 商品id
+     */
+    //@NotNull(message = "商品id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long productId;
+
+    /**
+     * 用户id
+     */
+    //@NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long userId;
+
+    /**
+     * 客户id
+     */
+    //@NotNull(message = "客户id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long customerId;
+
+    /**
+     * 备注
+     */
+    //@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String remark;
+
+
+}

+ 59 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductCollectBo.java

@@ -0,0 +1,59 @@
+package org.dromara.product.domain.bo;
+
+import org.dromara.product.domain.ProductCollect;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+/**
+ * 商品收藏业务对象 product_collect
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = ProductCollect.class, reverseConvertGenerate = false)
+public class ProductCollectBo extends BaseEntity {
+
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 商品id
+     */
+    //@NotNull(message = "商品id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long productId;
+
+    /**
+     * 收藏夹id
+     */
+    //@NotNull(message = "收藏夹id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long favoritesId;
+
+    /**
+     * 用户id
+     */
+    //@NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long userId;
+
+    /**
+     * 客户id
+     */
+    //@NotNull(message = "客户id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long customerId;
+
+    /**
+     * 备注
+     */
+    //@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String remark;
+
+
+}

+ 59 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductFavoritesBo.java

@@ -0,0 +1,59 @@
+package org.dromara.product.domain.bo;
+
+import org.dromara.product.domain.ProductFavorites;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+/**
+ * 商品收藏夹业务对象 product_favorites
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = ProductFavorites.class, reverseConvertGenerate = false)
+public class ProductFavoritesBo extends BaseEntity {
+
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 收藏夹名称
+     */
+    //@NotBlank(message = "收藏夹名称不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String title;
+
+    /**
+     * 是否默认 0是 1否
+     */
+    //@NotBlank(message = "是否默认 0是 1否不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String isDefault;
+
+    /**
+     * 用户id
+     */
+    //@NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long userId;
+
+    /**
+     * 客户id
+     */
+    //@NotNull(message = "客户id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long customerId;
+
+    /**
+     * 备注
+     */
+    //@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String remark;
+
+
+}

+ 65 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/bo/ProductShoppingCartBo.java

@@ -0,0 +1,65 @@
+package org.dromara.product.domain.bo;
+
+import org.dromara.product.domain.ProductShoppingCart;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+/**
+ * 商品购物车业务对象 product_shopping_cart
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = ProductShoppingCart.class, reverseConvertGenerate = false)
+public class ProductShoppingCartBo extends BaseEntity {
+
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 用户id
+     */
+    //@NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long userId;
+
+    /**
+     * 商品id
+     */
+    //@NotNull(message = "商品id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long productId;
+
+    /**
+     * 客户id
+     */
+    //@NotNull(message = "客户id不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long customerId;
+
+    /**
+     * 商品数量
+     */
+    //@NotNull(message = "商品数量不能为空", groups = { AddGroup.class, EditGroup.class })
+    private Long productNum;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    //@NotBlank(message = "状态(0正常 1停用)不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String status;
+
+    /**
+     * 备注
+     */
+    //@NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
+    private String remark;
+
+
+}

+ 68 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/PcProductVo.java

@@ -0,0 +1,68 @@
+package org.dromara.product.domain.vo;
+
+import cn.idev.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @author
+ * @date 2026/1/30 上午9:49
+ */
+@Data
+public class PcProductVo {
+    /**
+     * 商品ID
+     */
+    private Long id;
+    /**
+     * 产品名称
+     */
+    private String itemName;
+    /**
+     * 产品编号
+     */
+    private String productNo;
+    /**
+     * 商品图片
+     */
+    private String productImage;
+    /**
+     * 商品价格
+     */
+    private String price;
+    /**
+     * 单位名称(如:件、箱、千克等)
+     */
+    private String unitName;
+    /**
+     * 市场价
+     * */
+    private BigDecimal marketPrice;
+
+    /**
+     * 会员价格
+     */
+    private BigDecimal memberPrice;
+
+    /**
+     * 最低销售价格
+     */
+    private BigDecimal minSellingPrice;
+
+    /**
+     * 最低起订量
+     */
+    private Long minOrderQuantity;
+
+    /**
+    * 产品数量
+    * */
+    private Long productNum;
+
+    /**
+    * 产品状态 0-下架 1-上架 2 上架中
+    * */
+    private String productStatus;
+
+}

+ 62 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductBrowsingHistoryVo.java

@@ -0,0 +1,62 @@
+package org.dromara.product.domain.vo;
+
+import org.dromara.product.domain.ProductBrowsingHistory;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+
+/**
+ * 商品浏览记录视图对象 product_browsing_history
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = ProductBrowsingHistory.class)
+public class ProductBrowsingHistoryVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    @ExcelProperty(value = "")
+    private Long id;
+
+    /**
+     * 商品id
+     */
+    @ExcelProperty(value = "商品id")
+    private Long productId;
+
+    /**
+     * 用户id
+     */
+    @ExcelProperty(value = "用户id")
+    private Long userId;
+
+    /**
+     * 客户id
+     */
+    @ExcelProperty(value = "客户id")
+    private Long customerId;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+
+}

+ 68 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductCollectVo.java

@@ -0,0 +1,68 @@
+package org.dromara.product.domain.vo;
+
+import org.dromara.product.domain.ProductCollect;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+
+/**
+ * 商品收藏视图对象 product_collect
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = ProductCollect.class)
+public class ProductCollectVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    @ExcelProperty(value = "")
+    private Long id;
+
+    /**
+     * 商品id
+     */
+    @ExcelProperty(value = "商品id")
+    private Long productId;
+
+    /**
+     * 收藏夹id
+     */
+    @ExcelProperty(value = "收藏夹id")
+    private Long favoritesId;
+
+    /**
+     * 用户id
+     */
+    @ExcelProperty(value = "用户id")
+    private Long userId;
+
+    /**
+     * 客户id
+     */
+    @ExcelProperty(value = "客户id")
+    private Long customerId;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+
+}

+ 68 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductFavoritesVo.java

@@ -0,0 +1,68 @@
+package org.dromara.product.domain.vo;
+
+import org.dromara.product.domain.ProductFavorites;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+
+/**
+ * 商品收藏夹视图对象 product_favorites
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = ProductFavorites.class)
+public class ProductFavoritesVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    @ExcelProperty(value = "")
+    private Long id;
+
+    /**
+     * 收藏夹名称
+     */
+    @ExcelProperty(value = "收藏夹名称")
+    private String title;
+
+    /**
+     * 是否默认 0是 1否
+     */
+    @ExcelProperty(value = "是否默认 0是 1否")
+    private String isDefault;
+
+    /**
+     * 用户id
+     */
+    @ExcelProperty(value = "用户id")
+    private Long userId;
+
+    /**
+     * 客户id
+     */
+    @ExcelProperty(value = "客户id")
+    private Long customerId;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+
+}

+ 75 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/domain/vo/ProductShoppingCartVo.java

@@ -0,0 +1,75 @@
+package org.dromara.product.domain.vo;
+
+import org.dromara.product.domain.ProductShoppingCart;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+
+/**
+ * 商品购物车视图对象 product_shopping_cart
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = ProductShoppingCart.class)
+public class ProductShoppingCartVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     */
+    @ExcelProperty(value = "")
+    private Long id;
+
+    /**
+     * 用户id
+     */
+    @ExcelProperty(value = "用户id")
+    private Long userId;
+
+    /**
+     * 商品id
+     */
+    @ExcelProperty(value = "商品id")
+    private Long productId;
+
+    /**
+     * 客户id
+     */
+    @ExcelProperty(value = "客户id")
+    private Long customerId;
+
+    /**
+     * 商品数量
+     */
+    @ExcelProperty(value = "商品数量")
+    private Long productNum;
+
+    /**
+     * 状态(0正常 1停用)
+     */
+    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
+    @ExcelDictFormat(readConverterExp = "0=正常,1=停用")
+    private String status;
+
+    /**
+     * 备注
+     */
+    @ExcelProperty(value = "备注")
+    private String remark;
+
+
+}

+ 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;
     }
 }
 

+ 15 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/mapper/ProductBrowsingHistoryMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.product.mapper;
+
+import org.dromara.product.domain.ProductBrowsingHistory;
+import org.dromara.product.domain.vo.ProductBrowsingHistoryVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 商品浏览记录Mapper接口
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+public interface ProductBrowsingHistoryMapper extends BaseMapperPlus<ProductBrowsingHistory, ProductBrowsingHistoryVo> {
+
+}

+ 15 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/mapper/ProductCollectMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.product.mapper;
+
+import org.dromara.product.domain.ProductCollect;
+import org.dromara.product.domain.vo.ProductCollectVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 商品收藏Mapper接口
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+public interface ProductCollectMapper extends BaseMapperPlus<ProductCollect, ProductCollectVo> {
+
+}

+ 15 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/mapper/ProductFavoritesMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.product.mapper;
+
+import org.dromara.product.domain.ProductFavorites;
+import org.dromara.product.domain.vo.ProductFavoritesVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 商品收藏夹Mapper接口
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+public interface ProductFavoritesMapper extends BaseMapperPlus<ProductFavorites, ProductFavoritesVo> {
+
+}

+ 15 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/mapper/ProductShoppingCartMapper.java

@@ -0,0 +1,15 @@
+package org.dromara.product.mapper;
+
+import org.dromara.product.domain.ProductShoppingCart;
+import org.dromara.product.domain.vo.ProductShoppingCartVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * 商品购物车Mapper接口
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+public interface ProductShoppingCartMapper extends BaseMapperPlus<ProductShoppingCart, ProductShoppingCartVo> {
+
+}

+ 40 - 6
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductBaseService.java

@@ -2,16 +2,13 @@ package org.dromara.product.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.dromara.product.domain.ProductBase;
-import org.dromara.product.domain.vo.ProductBaseVo;
-import org.dromara.product.domain.vo.ProductBaseSimpleVo;
-import org.dromara.product.domain.vo.ProductOperationVo;
-import org.dromara.product.domain.vo.RecommendProductVo;
-import org.dromara.product.domain.vo.SiteProductVo;
+import org.dromara.product.domain.bo.PcProductBo;
+import org.dromara.product.domain.bo.ProductCategoryBo;
+import org.dromara.product.domain.vo.*;
 import org.dromara.product.domain.bo.ProductBaseBo;
 import org.dromara.product.domain.bo.SiteProductBo;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.mybatis.core.page.PageQuery;
-import org.dromara.product.domain.vo.StatusCountVo;
 
 import java.util.Collection;
 import java.util.List;
@@ -137,4 +134,41 @@ public interface IProductBaseService extends IService<ProductBase>{
     * 商品类型改变
     * */
     void changeProductType(ProductBaseBo bo);
+
+    /**
+    * 行家精选商品列表
+    * */
+    List<PcProductVo> getExpertSelectionList(Long recommendId);
+
+
+    /**
+    * 分类楼层详情
+    * */
+    List<PcProductVo> getClassificationFloorDetail(Long floorNo);
+
+
+    /**
+    * PC端商品列表
+    * */
+    TableDataInfo<PcProductVo> getPcProductPage(PcProductBo bo,PageQuery pageQuery);
+
+    /**
+    * PC端商品浏览记录
+    * */
+    TableDataInfo<PcProductVo> getProductBrowsingHistoryPage(Long userId,PageQuery pageQuery);
+
+    /**
+    * PC端商品收藏夹
+    * */
+    TableDataInfo<PcProductVo> getProductFavoritesPage(Long favoritesId, Long userId,PageQuery pageQuery);
+
+    /**
+    * PC端分类推荐商品
+    * */
+    TableDataInfo<PcProductVo> getCategoryRecommendProductPage(Long categoryId, PageQuery pageQuery);
+
+    /**
+    * PC端商品购物车
+    * */
+    TableDataInfo<PcProductVo> getProductShoppingCartPage(Long userId, PageQuery pageQuery);
 }

+ 16 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductBrandService.java

@@ -67,4 +67,20 @@ public interface IProductBrandService extends IService<ProductBrand>{
      * @return 是否删除成功
      */
     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    /**
+     * 平台闪购品牌
+     *
+     * @return
+     */
+    List<ProductBrandVo> getPlatformFlashSaleBrand(Long recommendId);
+
+    /**
+     * 品牌列表
+     *
+     * @param bo
+     * @param pageQuery
+     * @return
+     */
+    TableDataInfo<ProductBrandVo> getBrandPage(ProductBrandBo bo, PageQuery pageQuery);
 }

+ 70 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductBrowsingHistoryService.java

@@ -0,0 +1,70 @@
+package org.dromara.product.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.dromara.product.domain.ProductBrowsingHistory;
+import org.dromara.product.domain.vo.ProductBrowsingHistoryVo;
+import org.dromara.product.domain.bo.ProductBrowsingHistoryBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 商品浏览记录Service接口
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+public interface IProductBrowsingHistoryService extends IService<ProductBrowsingHistory>{
+
+    /**
+     * 查询商品浏览记录
+     *
+     * @param id 主键
+     * @return 商品浏览记录
+     */
+    ProductBrowsingHistoryVo queryById(Long id);
+
+    /**
+     * 分页查询商品浏览记录列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 商品浏览记录分页列表
+     */
+    TableDataInfo<ProductBrowsingHistoryVo> queryPageList(ProductBrowsingHistoryBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的商品浏览记录列表
+     *
+     * @param bo 查询条件
+     * @return 商品浏览记录列表
+     */
+    List<ProductBrowsingHistoryVo> queryList(ProductBrowsingHistoryBo bo);
+
+    /**
+     * 新增商品浏览记录
+     *
+     * @param bo 商品浏览记录
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(ProductBrowsingHistoryBo bo);
+
+    /**
+     * 修改商品浏览记录
+     *
+     * @param bo 商品浏览记录
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(ProductBrowsingHistoryBo bo);
+
+    /**
+     * 校验并批量删除商品浏览记录信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 9 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductCategoryService.java

@@ -3,6 +3,7 @@ package org.dromara.product.service;
 import cn.hutool.core.lang.tree.Tree;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.dromara.product.domain.ProductCategory;
+import org.dromara.product.domain.vo.PcProductVo;
 import org.dromara.product.domain.vo.ProductCategoryVo;
 import org.dromara.product.domain.bo.ProductCategoryBo;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -100,4 +101,12 @@ public interface IProductCategoryService extends IService<ProductCategory>{
      * @return 产品分类列表
      */
     List<Tree<Long>> queryPageListExclude(String excludeIds);
+
+    /**
+     * 获取分类下一级的分类列表
+     *
+     * @param categoryId 分类id
+     * @return 商品列表
+     */
+    List<ProductCategoryVo> getProductCategoryList(Long categoryId);
 }

+ 70 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductCollectService.java

@@ -0,0 +1,70 @@
+package org.dromara.product.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.dromara.product.domain.ProductCollect;
+import org.dromara.product.domain.vo.ProductCollectVo;
+import org.dromara.product.domain.bo.ProductCollectBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 商品收藏Service接口
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+public interface IProductCollectService extends IService<ProductCollect>{
+
+    /**
+     * 查询商品收藏
+     *
+     * @param id 主键
+     * @return 商品收藏
+     */
+    ProductCollectVo queryById(Long id);
+
+    /**
+     * 分页查询商品收藏列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 商品收藏分页列表
+     */
+    TableDataInfo<ProductCollectVo> queryPageList(ProductCollectBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的商品收藏列表
+     *
+     * @param bo 查询条件
+     * @return 商品收藏列表
+     */
+    List<ProductCollectVo> queryList(ProductCollectBo bo);
+
+    /**
+     * 新增商品收藏
+     *
+     * @param bo 商品收藏
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(ProductCollectBo bo);
+
+    /**
+     * 修改商品收藏
+     *
+     * @param bo 商品收藏
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(ProductCollectBo bo);
+
+    /**
+     * 校验并批量删除商品收藏信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 70 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductFavoritesService.java

@@ -0,0 +1,70 @@
+package org.dromara.product.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.dromara.product.domain.ProductFavorites;
+import org.dromara.product.domain.vo.ProductFavoritesVo;
+import org.dromara.product.domain.bo.ProductFavoritesBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 商品收藏夹Service接口
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+public interface IProductFavoritesService extends IService<ProductFavorites>{
+
+    /**
+     * 查询商品收藏夹
+     *
+     * @param id 主键
+     * @return 商品收藏夹
+     */
+    ProductFavoritesVo queryById(Long id);
+
+    /**
+     * 分页查询商品收藏夹列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 商品收藏夹分页列表
+     */
+    TableDataInfo<ProductFavoritesVo> queryPageList(ProductFavoritesBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的商品收藏夹列表
+     *
+     * @param bo 查询条件
+     * @return 商品收藏夹列表
+     */
+    List<ProductFavoritesVo> queryList(ProductFavoritesBo bo);
+
+    /**
+     * 新增商品收藏夹
+     *
+     * @param bo 商品收藏夹
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(ProductFavoritesBo bo);
+
+    /**
+     * 修改商品收藏夹
+     *
+     * @param bo 商品收藏夹
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(ProductFavoritesBo bo);
+
+    /**
+     * 校验并批量删除商品收藏夹信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 70 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IProductShoppingCartService.java

@@ -0,0 +1,70 @@
+package org.dromara.product.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.dromara.product.domain.ProductShoppingCart;
+import org.dromara.product.domain.vo.ProductShoppingCartVo;
+import org.dromara.product.domain.bo.ProductShoppingCartBo;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * 商品购物车Service接口
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+public interface IProductShoppingCartService extends IService<ProductShoppingCart>{
+
+    /**
+     * 查询商品购物车
+     *
+     * @param id 主键
+     * @return 商品购物车
+     */
+    ProductShoppingCartVo queryById(Long id);
+
+    /**
+     * 分页查询商品购物车列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 商品购物车分页列表
+     */
+    TableDataInfo<ProductShoppingCartVo> queryPageList(ProductShoppingCartBo bo, PageQuery pageQuery);
+
+    /**
+     * 查询符合条件的商品购物车列表
+     *
+     * @param bo 查询条件
+     * @return 商品购物车列表
+     */
+    List<ProductShoppingCartVo> queryList(ProductShoppingCartBo bo);
+
+    /**
+     * 新增商品购物车
+     *
+     * @param bo 商品购物车
+     * @return 是否新增成功
+     */
+    Boolean insertByBo(ProductShoppingCartBo bo);
+
+    /**
+     * 修改商品购物车
+     *
+     * @param bo 商品购物车
+     * @return 是否修改成功
+     */
+    Boolean updateByBo(ProductShoppingCartBo bo);
+
+    /**
+     * 校验并批量删除商品购物车信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+}

+ 6 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/IServiceCaseService.java

@@ -2,6 +2,7 @@ package org.dromara.product.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.dromara.product.domain.ServiceCase;
+import org.dromara.product.domain.vo.PcProductVo;
 import org.dromara.product.domain.vo.ServiceCaseVo;
 import org.dromara.product.domain.bo.ServiceCaseBo;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -67,4 +68,9 @@ public interface IServiceCaseService extends IService<ServiceCase>{
      * @return 是否删除成功
      */
     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    /**
+    * 项目案例列表
+    * */
+    List<ServiceCaseVo> getProjectCaseList(Long recommendId);
 }

+ 269 - 13
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductBaseServiceImpl.java

@@ -1,5 +1,7 @@
 package org.dromara.product.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ObjectUtil;
 import co.elastic.clients.elasticsearch._types.FieldValue;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -22,30 +24,26 @@ import org.dromara.easyes.core.conditions.select.LambdaEsQueryWrapper;
 import org.dromara.external.api.service.RemoteExternalProductService;
 import org.dromara.product.api.domain.ProductVo;
 import org.dromara.product.domain.*;
-import org.dromara.product.domain.vo.ProductBrandVo;
-import org.dromara.product.domain.vo.StatusCountVo;
+import org.dromara.product.domain.bo.PcProductBo;
+import org.dromara.product.domain.bo.ProductCategoryBo;
+import org.dromara.product.domain.vo.*;
 import org.dromara.product.esmapper.ProductEsMapper;
 import org.dromara.product.mapper.*;
+import org.springframework.beans.BeanUtils;
 import org.springframework.boot.ApplicationArguments;
 import org.springframework.boot.ApplicationRunner;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.dromara.product.domain.bo.ProductBaseBo;
 import org.dromara.product.domain.bo.SiteProductBo;
-import org.dromara.product.domain.vo.ProductBaseVo;
-import org.dromara.product.domain.vo.ProductBaseSimpleVo;
-import org.dromara.product.domain.vo.ProductOperationVo;
-import org.dromara.product.domain.vo.RecommendProductVo;
-import org.dromara.product.domain.vo.SiteProductVo;
 import org.dromara.product.domain.ProductBase;
 import org.dromara.product.domain.ProductExtend;
 import org.dromara.product.domain.ProductClassification;
 import org.dromara.product.domain.ProductCustomization;
 import org.dromara.product.service.IProductBaseService;
 
-import java.util.List;
-import java.util.Map;
-import java.util.Collection;
+import java.util.*;
+
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.core.type.TypeReference;
 import java.math.BigDecimal;
@@ -109,9 +107,21 @@ public class ProductBaseServiceImpl extends ServiceImpl<ProductBaseMapper, Produ
     private final ProductBrandMapper brandMapper;
     //单位信息
     private final ProductUnitMapper unitMapper;
+    //推荐位
+    private final ProductRecommendLinkMapper productRecommendLinkMapper;
+    //平台装修楼层商品
+    private final ProductDecorationFloorLinkMapper decorationFloorLinkMapper;
 
     private final ProductPhotosMapper photosMapper;
 
+    private final ProductCategoryRecommendedLinkMapper productCategoryRecommendedLinkMapper;
+
+    private final ProductCollectMapper productCollectMapper;
+
+    private final ProductBrowsingHistoryMapper productBrowsingHistoryMapper;
+
+    private final ProductShoppingCartMapper productShoppingCartMapper;
+
     private final ProductEsMapper esMapper;
 
     @DubboReference
@@ -356,9 +366,9 @@ public class ProductBaseServiceImpl extends ServiceImpl<ProductBaseMapper, Produ
         int limit = pageQuery.getPageSize() + 1;
         lqw.last("limit "+ limit );
         List<ProductBaseVo> result = baseMapper.selectAllList(lqw);
-        result.forEach(vo -> {
-
-        });
+//        result.forEach(vo -> {
+//
+//        });
         int size = result.size();
         if (size > pageQuery.getPageSize()) {
             result.remove(result.size() - 1);
@@ -1137,5 +1147,251 @@ public class ProductBaseServiceImpl extends ServiceImpl<ProductBaseMapper, Produ
         Page<ProductBaseSimpleVo> page = baseMapper.selectSimplePage(pageQuery.build(), bo);
         return TableDataInfo.build(page);
     }
+
+    /**
+     * 行家精选商品列表
+     */
+    @Override
+    public List<PcProductVo> getExpertSelectionList(Long recommendId) {
+        //获取行家精选商品Id
+        List<ProductRecommendLinkVo> productRecommendLinkVos = productRecommendLinkMapper.selectVoList(Wrappers.lambdaQuery(ProductRecommendLink.class)
+            .eq(ProductRecommendLink::getRecommendId, recommendId));
+        if (CollUtil.isNotEmpty(productRecommendLinkVos)) {
+            List<Long> productIds = productRecommendLinkVos.stream().map(ProductRecommendLinkVo::getProductId).toList();
+            //获取行家精选商品
+            List<ProductBaseVo> productBaseVos = baseMapper.selectAllList(Wrappers.query(ProductBase.class)
+                .in("b.id", productIds));
+            if (CollUtil.isNotEmpty(productBaseVos)) {
+                List<PcProductVo> pcProductVos = BeanUtil.copyToList(productBaseVos, PcProductVo.class);
+                return pcProductVos;
+            }
+        }
+        return List.of();
+    }
+
+    /**
+     * 分类楼层详情
+     *
+     * @param floorNo
+     */
+    @Override
+    public List<PcProductVo> getClassificationFloorDetail(Long floorNo) {
+        List<ProductDecorationFloorLinkVo> productDecorationFloorLinkVos = decorationFloorLinkMapper.selectVoList(Wrappers.lambdaQuery(ProductDecorationFloorLink.class)
+            .eq(ProductDecorationFloorLink::getFloorNo, floorNo)
+        );
+        if (CollUtil.isNotEmpty(productDecorationFloorLinkVos)) {
+            List<String> productNos = productDecorationFloorLinkVos.stream().map(ProductDecorationFloorLinkVo::getProductNo).toList();
+            //获取分类楼层商品
+            List<ProductBaseVo> productBaseVos = baseMapper.selectAllList(Wrappers.query(ProductBase.class)
+                .in("b.product_no", productNos));
+            if (CollUtil.isNotEmpty(productBaseVos)) {
+                List<PcProductVo> pcProductVos = BeanUtil.copyToList(productBaseVos, PcProductVo.class);
+                return pcProductVos;
+            }
+        }
+        return List.of();
+    }
+
+    /**
+     * PC端商品列表
+     *
+     * @param bo
+     */
+    @Override
+    public TableDataInfo<PcProductVo> getPcProductPage(PcProductBo bo, PageQuery pageQuery) {
+        QueryWrapper<ProductBase> lqw = Wrappers.query(ProductBase.class);
+        lqw.ge(ObjectUtil.isNotEmpty(pageQuery.getFirstSeenId()) && pageQuery.getWay() == 0,"b.id", pageQuery.getFirstSeenId());
+        lqw.gt(ObjectUtil.isNotEmpty(pageQuery.getLastSeenId()) && pageQuery.getWay() == 1,"b.id", pageQuery.getLastSeenId());
+        lqw.eq("b.product_status", 1);
+        lqw.and(ObjectUtil.isNotEmpty(bo.getSearchKeyword())
+            , (queryWrapper) -> queryWrapper.and(qw ->
+                qw.like("b.item_name", bo.getSearchKeyword())
+                .or().like("tc.category_name", bo.getSearchKeyword())
+                .or().like("mc.category_name", bo.getSearchKeyword())
+                .or().like("bc.category_name", bo.getSearchKeyword())
+                .or().like("br.brand_name", bo.getSearchKeyword())
+            )
+        );
+        lqw.eq(ObjectUtil.isNotEmpty(bo.getBrandId()), "b.brand_id", bo.getBrandId());
+        lqw.eq(ObjectUtil.isNotEmpty(bo.getTopCategoryId()), "b.top_category_id", bo.getTopCategoryId());
+        lqw.eq(ObjectUtil.isNotEmpty(bo.getMiddleCategoryId()), "b.middle_category_id", bo.getMiddleCategoryId());
+        lqw.eq(ObjectUtil.isNotEmpty(bo.getBottomCategoryId()), "b.bottom_category_id", bo.getBottomCategoryId());
+        lqw.eq(ObjectUtil.isNotEmpty(bo.getIsCustomize()), "e.is_customize", bo.getIsCustomize());
+        if(bo.getPriceRange() != null){
+            //价格区间 1:1-100 2:100-500 3:500-1000 4:1000以上
+            switch (bo.getPriceRange()) {
+                case "1":
+                    lqw.between("b.market_price", 1, 100);
+                case "2":
+                    lqw.between("b.market_price", 100, 500);
+                case "3":
+                    lqw.between("b.market_price", 500, 1000);
+                case "4":
+                    lqw.ge("b.market_price", 1000);
+            }
+        }
+        if(bo.getSortField() != null && bo.getSortOrder() != null){
+            String[] sortFields = bo.getSortField().split(",");
+            String[] sortOrders = bo.getSortOrder().split(",");
+            for (int i = 0; i < sortFields.length; i++) {
+                switch (bo.getPriceRange()) {
+                    case "1":
+                        lqw.orderBy( true, sortOrders[i].equals("asc"),"b.id");
+                    case "2":
+                        lqw.orderBy( true, sortOrders[i].equals("asc"),"p.total_inventory");
+                    case "3":
+                        lqw.orderBy( true, sortOrders[i].equals("asc"),"p.market_price");
+                }
+            }
+        }
+        lqw.select("b.id","b.product_image","p.market_price","p.member_price","p.min_selling_price","p.min_order_quantity","b.item_name","u.unit_name");
+        int limit = pageQuery.getPageSize() + 1;
+        lqw.last("limit "+ limit );
+        List<ProductBaseVo> productBaseVos = baseMapper.selectAllList(lqw);
+        if (CollUtil.isNotEmpty(productBaseVos)) {
+            List<PcProductVo> pcProductVos = BeanUtil.copyToList(productBaseVos, PcProductVo.class);
+            int size = productBaseVos.size();
+            if (size > pageQuery.getPageSize()) {
+                productBaseVos.remove(productBaseVos.size() - 1);
+            }
+            TableDataInfo<ProductBaseVo> tableDataInfo = TableDataInfo.build(productBaseVos);
+            tableDataInfo.setTotal(size);
+            return TableDataInfo.build(pcProductVos);
+        }
+        return TableDataInfo.build();
+    }
+
+    /**
+     * PC端商品浏览记录
+     *
+     * @param userId
+     */
+    @Override
+    public TableDataInfo<PcProductVo> getProductBrowsingHistoryPage(Long userId, PageQuery pageQuery) {
+        List<ProductBrowsingHistoryVo> productBrowsingHistoryVos = productBrowsingHistoryMapper.selectVoList(Wrappers.lambdaQuery(ProductBrowsingHistory.class)
+            .eq(ProductBrowsingHistory::getUserId, userId)
+        );
+        if (CollUtil.isNotEmpty(productBrowsingHistoryVos)) {
+            List<Long> productIds = productBrowsingHistoryVos.stream().map(ProductBrowsingHistoryVo::getProductId).toList();
+            //获取商品浏览记录
+            QueryWrapper<ProductBase> lqw = Wrappers.query(ProductBase.class);
+            lqw.in("b.id", productIds);
+            lqw.eq("b.product_status", 1);
+            int limit = pageQuery.getPageSize() + 1;
+            lqw.last("limit "+ limit );
+            List<ProductBaseVo> productBaseVos = baseMapper.selectAllList(lqw);
+            if (CollUtil.isNotEmpty(productBaseVos)) {
+                List<PcProductVo> pcProductVos = BeanUtil.copyToList(productBaseVos, PcProductVo.class);
+                int size = productBaseVos.size();
+                if (size > pageQuery.getPageSize()) {
+                    productBaseVos.remove(productBaseVos.size() - 1);
+                }
+                TableDataInfo<ProductBaseVo> tableDataInfo = TableDataInfo.build(productBaseVos);
+                tableDataInfo.setTotal(size);
+                return TableDataInfo.build(pcProductVos);
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * PC端商品收藏夹
+     *
+     * @param favoritesId
+     * @param userId
+     */
+    @Override
+    public TableDataInfo<PcProductVo> getProductFavoritesPage(Long favoritesId, Long userId, PageQuery pageQuery) {
+        //获取收藏夹商品id
+        List<ProductCollectVo> productFavoritesLinkVos = productCollectMapper.selectVoList(Wrappers.lambdaQuery(ProductCollect.class)
+            .eq(ProductCollect::getFavoritesId, favoritesId)
+            .eq(ProductCollect::getUserId, userId)
+        );
+        if (CollUtil.isNotEmpty(productFavoritesLinkVos)) {
+            List<Long> productIds = productFavoritesLinkVos.stream().map(ProductCollectVo::getProductId).toList();
+            //获取收藏夹商品
+            QueryWrapper<ProductBase> lqw = Wrappers.query(ProductBase.class);
+            lqw.in("b.id", productIds);
+            lqw.eq("b.product_status", 1);
+            int limit = pageQuery.getPageSize() + 1;
+            lqw.last("limit "+ limit );
+            List<ProductBaseVo> productBaseVos = baseMapper.selectAllList(lqw);
+            if (CollUtil.isNotEmpty(productBaseVos)) {
+                List<PcProductVo> pcProductVos = BeanUtil.copyToList(productBaseVos, PcProductVo.class);
+
+//                productBaseVos.forEach(vo -> {
+//                });
+                int size = productBaseVos.size();
+                if (size > pageQuery.getPageSize()) {
+                    productBaseVos.remove(productBaseVos.size() - 1);
+                }
+                TableDataInfo<ProductBaseVo> tableDataInfo = TableDataInfo.build(productBaseVos);
+                tableDataInfo.setTotal( size);
+                return TableDataInfo.build(pcProductVos);
+            }
+        }
+        return TableDataInfo.build();
+    }
+
+    /**
+     * PC端分类推荐商品
+     *
+     * @param categoryId
+     */
+    @Override
+    public TableDataInfo<PcProductVo> getCategoryRecommendProductPage(Long categoryId, PageQuery pageQuery) {
+        //获取推荐的商品id
+        List<ProductCategoryRecommendedLinkVo> productCategoryRecommendedLinkVos = productCategoryRecommendedLinkMapper.selectVoList(
+                Wrappers.lambdaQuery(ProductCategoryRecommendedLink.class)
+                    .eq(ProductCategoryRecommendedLink::getCategoryId, categoryId)
+            );
+        if (CollUtil.isNotEmpty(productCategoryRecommendedLinkVos)) {
+            List<Long> productIds = productCategoryRecommendedLinkVos.stream().map(ProductCategoryRecommendedLinkVo::getProductId).toList();
+            QueryWrapper<ProductBase> lqw = Wrappers.query(ProductBase.class);
+            lqw.in("b.id", productIds);
+            lqw.eq("b.product_status", 1);
+            int limit = pageQuery.getPageSize() + 1;
+            lqw.last("limit "+ limit );
+            List<ProductBaseVo> productBaseVos = baseMapper.selectAllList(lqw);
+            if (CollUtil.isNotEmpty(productBaseVos)) {
+                List<PcProductVo> pcProductVos = BeanUtil.copyToList(productBaseVos, PcProductVo.class);
+                return TableDataInfo.build(pcProductVos);
+            }
+        }
+        return TableDataInfo.build();
+    }
+
+    /**
+     * PC端商品购物车
+     *
+     * @param userId
+     * @param pageQuery
+     */
+    @Override
+    public TableDataInfo<PcProductVo> getProductShoppingCartPage(Long userId, PageQuery pageQuery) {
+        Page<ProductShoppingCart> productShoppingCartPage = productShoppingCartMapper.selectPage(pageQuery.build(), Wrappers.lambdaQuery(ProductShoppingCart.class)
+            .eq(ProductShoppingCart::getUserId, userId)
+        );
+        if (CollUtil.isNotEmpty(productShoppingCartPage.getRecords())) {
+            List<PcProductVo> productVos = new ArrayList<>();
+            for (ProductShoppingCart productShoppingCart : productShoppingCartPage.getRecords()) {
+                PcProductVo productVo = new PcProductVo();
+                List<ProductBaseVo> productBaseVos = baseMapper.selectAllList(Wrappers.query(ProductBase.class)
+                    .eq("b.id", productShoppingCart.getProductId())
+                );
+                if (CollUtil.isNotEmpty(productBaseVos)) {
+                    BeanUtil.copyProperties(productBaseVos.get(0), productVo);
+                    productVo.setProductNum(productShoppingCart.getProductNum());
+                    productVos.add(productVo);
+                }
+            }
+            TableDataInfo<PcProductVo> build = TableDataInfo.build(productVos);
+            build.setTotal(productShoppingCartPage.getTotal());
+            return build;
+        }
+
+        return TableDataInfo.build();
+    }
 }
 

+ 52 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductBrandServiceImpl.java

@@ -1,7 +1,9 @@
 package org.dromara.product.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
@@ -13,7 +15,14 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.dromara.easyes.core.conditions.select.LambdaEsQueryWrapper;
+import org.dromara.product.domain.ProductBase;
+import org.dromara.product.domain.ProductRecommendLink;
+import org.dromara.product.domain.vo.PcProductVo;
+import org.dromara.product.domain.vo.ProductBaseVo;
+import org.dromara.product.domain.vo.ProductRecommendLinkVo;
 import org.dromara.product.esmapper.ProductBrandEsMapper;
+import org.dromara.product.mapper.ProductRecommendLinkMapper;
+import org.dromara.product.service.IProductRecommendLinkService;
 import org.springframework.boot.ApplicationArguments;
 import org.springframework.stereotype.Service;
 import org.dromara.product.domain.bo.ProductBrandBo;
@@ -43,6 +52,8 @@ public class ProductBrandServiceImpl  extends ServiceImpl<ProductBrandMapper, Pr
 
     private final ProductBrandEsMapper esMapper;
 
+    private final ProductRecommendLinkMapper productRecommendLinkMapper;
+
     @Override
     public void run(ApplicationArguments args) throws Exception {
         // 检查索引是否存在,不存在则创建
@@ -202,5 +213,46 @@ public class ProductBrandServiceImpl  extends ServiceImpl<ProductBrandMapper, Pr
         return baseMapper.deleteByIds(ids) > 0;
     }
 
+    /**
+     * 平台闪购品牌
+     *
+     * @return
+     */
+    @Override
+    public List<ProductBrandVo> getPlatformFlashSaleBrand(Long recommendId) {
+        //获取平台闪购品牌Id
+        List<ProductRecommendLinkVo> productRecommendLinkVos = productRecommendLinkMapper.selectVoList(Wrappers.lambdaQuery(ProductRecommendLink.class)
+            .eq(ProductRecommendLink::getRecommendId, recommendId));
+        if (CollUtil.isNotEmpty(productRecommendLinkVos)) {
+            List<Long> brandIds = productRecommendLinkVos.stream().map(ProductRecommendLinkVo::getBrandId).toList();
+            //获取平台闪购品牌
+            List<ProductBrandVo> productBaseVos = baseMapper.selectVoList(Wrappers.lambdaQuery(ProductBrand.class)
+                .in(ProductBrand::getId, brandIds));
+            if (CollUtil.isNotEmpty(productBaseVos)) {
+                List<ProductBrandVo> productBrandVos = BeanUtil.copyToList(productBaseVos, ProductBrandVo.class);
+                return productBrandVos;
+            }
+        }
+        return List.of();
+    }
 
+    /**
+     * 品牌列表
+     *
+     * @param bo
+     * @param pageQuery
+     * @return
+     */
+    @Override
+    public TableDataInfo<ProductBrandVo> getBrandPage(ProductBrandBo bo, PageQuery pageQuery) {
+        Page<ProductBrandVo> productBrandVoIPage = baseMapper.selectVoPage(pageQuery.build(), Wrappers.lambdaQuery(ProductBrand.class)
+                .eq(ProductBrand::getIsShow, 1)
+                .inSql(ProductBrand::getId,
+                "SELECT" +
+                    "product.brand_id " +
+                    "FROM product_base product " +
+                    "INNER JOIN product_category category ON product.top_category_id = category.id " +
+                    "WHERE category.id=  " + bo.getCategoryId()));
+        return TableDataInfo.build(productBrandVoIPage);
+    }
 }

+ 136 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductBrowsingHistoryServiceImpl.java

@@ -0,0 +1,136 @@
+package org.dromara.product.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.dromara.product.domain.bo.ProductBrowsingHistoryBo;
+import org.dromara.product.domain.vo.ProductBrowsingHistoryVo;
+import org.dromara.product.domain.ProductBrowsingHistory;
+import org.dromara.product.mapper.ProductBrowsingHistoryMapper;
+import org.dromara.product.service.IProductBrowsingHistoryService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 商品浏览记录Service业务层处理
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class ProductBrowsingHistoryServiceImpl  extends ServiceImpl<ProductBrowsingHistoryMapper, ProductBrowsingHistory> implements IProductBrowsingHistoryService {
+
+    private final ProductBrowsingHistoryMapper baseMapper;
+
+    /**
+     * 查询商品浏览记录
+     *
+     * @param id 主键
+     * @return 商品浏览记录
+     */
+    @Override
+    public ProductBrowsingHistoryVo queryById(Long id){
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 分页查询商品浏览记录列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 商品浏览记录分页列表
+     */
+    @Override
+    public TableDataInfo<ProductBrowsingHistoryVo> queryPageList(ProductBrowsingHistoryBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<ProductBrowsingHistory> lqw = buildQueryWrapper(bo);
+        Page<ProductBrowsingHistoryVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的商品浏览记录列表
+     *
+     * @param bo 查询条件
+     * @return 商品浏览记录列表
+     */
+    @Override
+    public List<ProductBrowsingHistoryVo> queryList(ProductBrowsingHistoryBo bo) {
+        LambdaQueryWrapper<ProductBrowsingHistory> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<ProductBrowsingHistory> buildQueryWrapper(ProductBrowsingHistoryBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<ProductBrowsingHistory> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(ProductBrowsingHistory::getId);
+        lqw.eq(bo.getProductId() != null, ProductBrowsingHistory::getProductId, bo.getProductId());
+        lqw.eq(bo.getUserId() != null, ProductBrowsingHistory::getUserId, bo.getUserId());
+        lqw.eq(bo.getCustomerId() != null, ProductBrowsingHistory::getCustomerId, bo.getCustomerId());
+        lqw.eq(StringUtils.isNotBlank(bo.getPlatformCode()), ProductBrowsingHistory::getPlatformCode, bo.getPlatformCode());
+        return lqw;
+    }
+
+    /**
+     * 新增商品浏览记录
+     *
+     * @param bo 商品浏览记录
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(ProductBrowsingHistoryBo bo) {
+        ProductBrowsingHistory add = MapstructUtils.convert(bo, ProductBrowsingHistory.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改商品浏览记录
+     *
+     * @param bo 商品浏览记录
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(ProductBrowsingHistoryBo bo) {
+        ProductBrowsingHistory update = MapstructUtils.convert(bo, ProductBrowsingHistory.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(ProductBrowsingHistory entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除商品浏览记录信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+}

+ 45 - 1
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductCategoryServiceImpl.java

@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.dromara.common.mybatis.helper.DataBaseHelper;
+import org.dromara.product.domain.vo.PcProductVo;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.dromara.product.domain.bo.ProductCategoryBo;
@@ -182,6 +183,7 @@ public class ProductCategoryServiceImpl  extends ServiceImpl<ProductCategoryMapp
         if (CollUtil.isEmpty(productCategorys)) {
             return CollUtil.newArrayList();
         }
+
         return TreeBuildUtils.buildMultiRoot(
             productCategorys,
             ProductCategoryVo::getId,
@@ -191,10 +193,36 @@ public class ProductCategoryServiceImpl  extends ServiceImpl<ProductCategoryMapp
                 .setParentId(node.getParentId())
                 .setName(node.getCategoryName())
                 .setWeight(node.getSort())
-                .putExtra("isShow", node.getIsShow())
+                .putExtra("extra", createExtraMap(node))
         );
     }
 
+    /**
+     * 创建额外信息Map,避免null值导致的异常
+     *
+     * @param node 产品分类节点
+     * @return 额外信息Map
+     */
+    private java.util.Map<String, Object> createExtraMap(ProductCategoryVo node) {
+        java.util.Map<String, Object> extraMap = new java.util.HashMap<>();
+        if (node.getOneLable1() != null) {
+            extraMap.put("oneLable1", node.getOneLable1());
+        }
+        if (node.getOneLable2() != null) {
+            extraMap.put("oneLable2", node.getOneLable2());
+        }
+        if (node.getOneLink1() != null) {
+            extraMap.put("oneLink1", node.getOneLink1());
+        }
+        if (node.getOneLink2() != null) {
+            extraMap.put("oneLink2", node.getOneLink2());
+        }
+        if (node.getIsShow() != null) {
+            extraMap.put("isShow", node.getIsShow());
+        }
+        return extraMap;
+    }
+
     /**
      * 设置审核人员
      *
@@ -221,4 +249,20 @@ public class ProductCategoryServiceImpl  extends ServiceImpl<ProductCategoryMapp
         lqw.ne(StringUtils.isNotBlank(excludeIds), ProductCategory::getId, excludeIds);
         return buildTreeSelect(baseMapper.selectVoList(lqw));
     }
+
+    /**
+     * 获取分类下一级的分类列表
+     *
+     * @param categoryId 分类id
+     * @return 商品列表
+     */
+    @Override
+    public List<ProductCategoryVo> getProductCategoryList(Long categoryId) {
+        List<ProductCategoryVo> productCategoryVos = baseMapper.selectVoList(Wrappers.lambdaQuery(ProductCategory.class)
+            .eq(ProductCategory::getParentId, categoryId)
+            .eq(ProductCategory::getIsShow, 1)
+            .orderByAsc(ProductCategory::getId)
+        );
+        return productCategoryVos;
+    }
 }

+ 137 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductCollectServiceImpl.java

@@ -0,0 +1,137 @@
+package org.dromara.product.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.dromara.product.domain.bo.ProductCollectBo;
+import org.dromara.product.domain.vo.ProductCollectVo;
+import org.dromara.product.domain.ProductCollect;
+import org.dromara.product.mapper.ProductCollectMapper;
+import org.dromara.product.service.IProductCollectService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 商品收藏Service业务层处理
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class ProductCollectServiceImpl  extends ServiceImpl<ProductCollectMapper, ProductCollect> implements IProductCollectService {
+
+    private final ProductCollectMapper baseMapper;
+
+    /**
+     * 查询商品收藏
+     *
+     * @param id 主键
+     * @return 商品收藏
+     */
+    @Override
+    public ProductCollectVo queryById(Long id){
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 分页查询商品收藏列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 商品收藏分页列表
+     */
+    @Override
+    public TableDataInfo<ProductCollectVo> queryPageList(ProductCollectBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<ProductCollect> lqw = buildQueryWrapper(bo);
+        Page<ProductCollectVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的商品收藏列表
+     *
+     * @param bo 查询条件
+     * @return 商品收藏列表
+     */
+    @Override
+    public List<ProductCollectVo> queryList(ProductCollectBo bo) {
+        LambdaQueryWrapper<ProductCollect> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<ProductCollect> buildQueryWrapper(ProductCollectBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<ProductCollect> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(ProductCollect::getId);
+        lqw.eq(bo.getProductId() != null, ProductCollect::getProductId, bo.getProductId());
+        lqw.eq(bo.getFavoritesId() != null, ProductCollect::getFavoritesId, bo.getFavoritesId());
+        lqw.eq(bo.getUserId() != null, ProductCollect::getUserId, bo.getUserId());
+        lqw.eq(bo.getCustomerId() != null, ProductCollect::getCustomerId, bo.getCustomerId());
+        lqw.eq(StringUtils.isNotBlank(bo.getPlatformCode()), ProductCollect::getPlatformCode, bo.getPlatformCode());
+        return lqw;
+    }
+
+    /**
+     * 新增商品收藏
+     *
+     * @param bo 商品收藏
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(ProductCollectBo bo) {
+        ProductCollect add = MapstructUtils.convert(bo, ProductCollect.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改商品收藏
+     *
+     * @param bo 商品收藏
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(ProductCollectBo bo) {
+        ProductCollect update = MapstructUtils.convert(bo, ProductCollect.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(ProductCollect entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除商品收藏信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+}

+ 137 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductFavoritesServiceImpl.java

@@ -0,0 +1,137 @@
+package org.dromara.product.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.dromara.product.domain.bo.ProductFavoritesBo;
+import org.dromara.product.domain.vo.ProductFavoritesVo;
+import org.dromara.product.domain.ProductFavorites;
+import org.dromara.product.mapper.ProductFavoritesMapper;
+import org.dromara.product.service.IProductFavoritesService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 商品收藏夹Service业务层处理
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class ProductFavoritesServiceImpl  extends ServiceImpl<ProductFavoritesMapper, ProductFavorites> implements IProductFavoritesService {
+
+    private final ProductFavoritesMapper baseMapper;
+
+    /**
+     * 查询商品收藏夹
+     *
+     * @param id 主键
+     * @return 商品收藏夹
+     */
+    @Override
+    public ProductFavoritesVo queryById(Long id){
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 分页查询商品收藏夹列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 商品收藏夹分页列表
+     */
+    @Override
+    public TableDataInfo<ProductFavoritesVo> queryPageList(ProductFavoritesBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<ProductFavorites> lqw = buildQueryWrapper(bo);
+        Page<ProductFavoritesVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的商品收藏夹列表
+     *
+     * @param bo 查询条件
+     * @return 商品收藏夹列表
+     */
+    @Override
+    public List<ProductFavoritesVo> queryList(ProductFavoritesBo bo) {
+        LambdaQueryWrapper<ProductFavorites> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<ProductFavorites> buildQueryWrapper(ProductFavoritesBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<ProductFavorites> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(ProductFavorites::getId);
+        lqw.eq(StringUtils.isNotBlank(bo.getTitle()), ProductFavorites::getTitle, bo.getTitle());
+        lqw.eq(StringUtils.isNotBlank(bo.getIsDefault()), ProductFavorites::getIsDefault, bo.getIsDefault());
+        lqw.eq(bo.getUserId() != null, ProductFavorites::getUserId, bo.getUserId());
+        lqw.eq(bo.getCustomerId() != null, ProductFavorites::getCustomerId, bo.getCustomerId());
+        lqw.eq(StringUtils.isNotBlank(bo.getPlatformCode()), ProductFavorites::getPlatformCode, bo.getPlatformCode());
+        return lqw;
+    }
+
+    /**
+     * 新增商品收藏夹
+     *
+     * @param bo 商品收藏夹
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(ProductFavoritesBo bo) {
+        ProductFavorites add = MapstructUtils.convert(bo, ProductFavorites.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改商品收藏夹
+     *
+     * @param bo 商品收藏夹
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(ProductFavoritesBo bo) {
+        ProductFavorites update = MapstructUtils.convert(bo, ProductFavorites.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(ProductFavorites entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除商品收藏夹信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+}

+ 138 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ProductShoppingCartServiceImpl.java

@@ -0,0 +1,138 @@
+package org.dromara.product.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.dromara.common.core.utils.StringUtils;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import org.dromara.product.domain.bo.ProductShoppingCartBo;
+import org.dromara.product.domain.vo.ProductShoppingCartVo;
+import org.dromara.product.domain.ProductShoppingCart;
+import org.dromara.product.mapper.ProductShoppingCartMapper;
+import org.dromara.product.service.IProductShoppingCartService;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Collection;
+
+/**
+ * 商品购物车Service业务层处理
+ *
+ * @author LionLi
+ * @date 2026-02-02
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class ProductShoppingCartServiceImpl  extends ServiceImpl<ProductShoppingCartMapper, ProductShoppingCart> implements IProductShoppingCartService {
+
+    private final ProductShoppingCartMapper baseMapper;
+
+    /**
+     * 查询商品购物车
+     *
+     * @param id 主键
+     * @return 商品购物车
+     */
+    @Override
+    public ProductShoppingCartVo queryById(Long id){
+        return baseMapper.selectVoById(id);
+    }
+
+    /**
+     * 分页查询商品购物车列表
+     *
+     * @param bo        查询条件
+     * @param pageQuery 分页参数
+     * @return 商品购物车分页列表
+     */
+    @Override
+    public TableDataInfo<ProductShoppingCartVo> queryPageList(ProductShoppingCartBo bo, PageQuery pageQuery) {
+        LambdaQueryWrapper<ProductShoppingCart> lqw = buildQueryWrapper(bo);
+        Page<ProductShoppingCartVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+        return TableDataInfo.build(result);
+    }
+
+    /**
+     * 查询符合条件的商品购物车列表
+     *
+     * @param bo 查询条件
+     * @return 商品购物车列表
+     */
+    @Override
+    public List<ProductShoppingCartVo> queryList(ProductShoppingCartBo bo) {
+        LambdaQueryWrapper<ProductShoppingCart> lqw = buildQueryWrapper(bo);
+        return baseMapper.selectVoList(lqw);
+    }
+
+    private LambdaQueryWrapper<ProductShoppingCart> buildQueryWrapper(ProductShoppingCartBo bo) {
+        Map<String, Object> params = bo.getParams();
+        LambdaQueryWrapper<ProductShoppingCart> lqw = Wrappers.lambdaQuery();
+        lqw.orderByAsc(ProductShoppingCart::getId);
+        lqw.eq(bo.getUserId() != null, ProductShoppingCart::getUserId, bo.getUserId());
+        lqw.eq(bo.getProductId() != null, ProductShoppingCart::getProductId, bo.getProductId());
+        lqw.eq(bo.getCustomerId() != null, ProductShoppingCart::getCustomerId, bo.getCustomerId());
+        lqw.eq(bo.getProductNum() != null, ProductShoppingCart::getProductNum, bo.getProductNum());
+        lqw.eq(StringUtils.isNotBlank(bo.getStatus()), ProductShoppingCart::getStatus, bo.getStatus());
+        lqw.eq(StringUtils.isNotBlank(bo.getPlatformCode()), ProductShoppingCart::getPlatformCode, bo.getPlatformCode());
+        return lqw;
+    }
+
+    /**
+     * 新增商品购物车
+     *
+     * @param bo 商品购物车
+     * @return 是否新增成功
+     */
+    @Override
+    public Boolean insertByBo(ProductShoppingCartBo bo) {
+        ProductShoppingCart add = MapstructUtils.convert(bo, ProductShoppingCart.class);
+        validEntityBeforeSave(add);
+        boolean flag = baseMapper.insert(add) > 0;
+        if (flag) {
+            bo.setId(add.getId());
+        }
+        return flag;
+    }
+
+    /**
+     * 修改商品购物车
+     *
+     * @param bo 商品购物车
+     * @return 是否修改成功
+     */
+    @Override
+    public Boolean updateByBo(ProductShoppingCartBo bo) {
+        ProductShoppingCart update = MapstructUtils.convert(bo, ProductShoppingCart.class);
+        validEntityBeforeSave(update);
+        return baseMapper.updateById(update) > 0;
+    }
+
+    /**
+     * 保存前的数据校验
+     */
+    private void validEntityBeforeSave(ProductShoppingCart entity){
+        //TODO 做一些数据校验,如唯一约束
+    }
+
+    /**
+     * 校验并批量删除商品购物车信息
+     *
+     * @param ids     待删除的主键集合
+     * @param isValid 是否进行有效性校验
+     * @return 是否删除成功
+     */
+    @Override
+    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
+        if(isValid){
+            //TODO 做一些业务上的校验,判断是否需要校验
+        }
+        return baseMapper.deleteByIds(ids) > 0;
+    }
+}

+ 26 - 0
ruoyi-modules/ruoyi-product/src/main/java/org/dromara/product/service/impl/ServiceCaseServiceImpl.java

@@ -1,5 +1,6 @@
 package org.dromara.product.service.impl;
 
+import cn.hutool.core.collection.CollUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
@@ -10,6 +11,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.dromara.product.domain.ProductRecommendLink;
+import org.dromara.product.domain.vo.PcProductVo;
+import org.dromara.product.domain.vo.ProductRecommendLinkVo;
+import org.dromara.product.mapper.ProductRecommendLinkMapper;
 import org.springframework.stereotype.Service;
 import org.dromara.product.domain.bo.ServiceCaseBo;
 import org.dromara.product.domain.vo.ServiceCaseVo;
@@ -33,6 +38,8 @@ public class ServiceCaseServiceImpl extends ServiceImpl<ServiceCaseMapper, Servi
 
     private final ServiceCaseMapper baseMapper;
 
+    private final ProductRecommendLinkMapper productRecommendLinkMapper;
+
     /**
      * 查询服务案例
      *
@@ -134,4 +141,23 @@ public class ServiceCaseServiceImpl extends ServiceImpl<ServiceCaseMapper, Servi
         }
         return baseMapper.deleteByIds(ids) > 0;
     }
+
+    /**
+     * 项目案例列表
+     *
+     * @param recommendId
+     */
+    @Override
+    public List<ServiceCaseVo> getProjectCaseList(Long recommendId) {
+        //获取行家精选商品Id
+        List<ProductRecommendLinkVo> productRecommendLinkVos = productRecommendLinkMapper.selectVoList(Wrappers.lambdaQuery(ProductRecommendLink.class)
+            .eq(ProductRecommendLink::getRecommendId, recommendId));
+        if (CollUtil.isNotEmpty(productRecommendLinkVos)) {
+            List<Long> serviceCaseIds = productRecommendLinkVos.stream().map(ProductRecommendLinkVo::getServiceCaseId).toList();
+            return baseMapper.selectVoList(Wrappers.lambdaQuery(ServiceCase.class)
+                .eq(ServiceCase::getIsShow, "1")
+                .in(ServiceCase::getId, serviceCaseIds));
+        }
+        return List.of();
+    }
 }

+ 7 - 0
ruoyi-modules/ruoyi-product/src/main/resources/mapper/product/ProductBrowsingHistoryMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.dromara.product.mapper.ProductBrowsingHistoryMapper">
+
+</mapper>

+ 7 - 0
ruoyi-modules/ruoyi-product/src/main/resources/mapper/product/ProductCollectMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.dromara.product.mapper.ProductCollectMapper">
+
+</mapper>

+ 7 - 0
ruoyi-modules/ruoyi-product/src/main/resources/mapper/product/ProductFavoritesMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.dromara.product.mapper.ProductFavoritesMapper">
+
+</mapper>

+ 7 - 0
ruoyi-modules/ruoyi-product/src/main/resources/mapper/product/ProductShoppingCartMapper.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.dromara.product.mapper.ProductShoppingCartMapper">
+
+</mapper>

+ 226 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/pc/IndexSystemController.java

@@ -0,0 +1,226 @@
+package org.dromara.system.controller.pc;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.mybatis.core.page.PageQuery;
+import org.dromara.common.mybatis.core.page.TableDataInfo;
+import org.dromara.system.domain.*;
+import org.dromara.system.domain.bo.SysAnnouncementBo;
+import org.dromara.system.domain.vo.SysAnnouncementVo;
+import org.dromara.system.service.*;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 首页
+ * @author
+ * @date 2026/1/29 下午3:31
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/indexSystem")
+public class IndexSystemController {
+    //平台公告
+    private final ISysAnnouncementService sysAnnouncementService;
+    //自定义海报
+    private final ISysCustomPosterService sysCustomPosterService;
+    //轮播广告
+    private final ISysAdContentService sysAdContentService;
+    //楼层标题配置
+    private final ISysFloorTitleService sysFloorTitleService;
+    //楼层广告管理
+    private final ISysFloorAdvertManageService sysFloorAdvertManageService;
+    //分类楼层
+    private final ISysFloorService sysFloorService;
+    //分类楼层详情
+    private final ISysFloorAdvertiseService sysFloorAdvertiseService;
+    //分类楼层标签
+    private final ISysFloorLabelService sysFloorLabelService;
+
+    /**
+    * 轮播广告(平台装修-轮播广告)
+    * */
+    @GetMapping("/getHomeAdList")
+    public R<List<SysAdContent>> getHomeAdList() {
+        List<SysAdContent> list = sysAdContentService.list(Wrappers.<SysAdContent>lambdaQuery(SysAdContent.class)
+            .eq(SysAdContent::getAdType, "decoration_banner")
+            .eq(SysAdContent::getStatus, 1)
+        );
+        return R.ok(list);
+    }
+
+    /**
+    * 优易咨迅(平台公告)
+    * */
+    @GetMapping("/getYouYiZiXunPage")
+    public R<List<SysAnnouncement>> getYouYiZiXunPage(PageQuery pageQuery) {
+        List<SysAnnouncement> list = sysAnnouncementService.list(Wrappers.<SysAnnouncement>lambdaQuery(SysAnnouncement.class)
+            .eq(SysAnnouncement::getIsShow, 1)
+        );
+        return R.ok(list);
+    }
+
+    /**
+    * 企业会员权益(平台装修-楼层广告-首页图标广告)
+    * */
+    @GetMapping("/getEnterpriseMemberEquityList")
+    public R<List<SysAdContent>> getEnterpriseMemberEquityList() {
+        List<SysAdContent> list = sysAdContentService.list(Wrappers.<SysAdContent>lambdaQuery(SysAdContent.class)
+            .eq(SysAdContent::getAdType, "decoration_ad_icon")
+            .eq(SysAdContent::getStatus, 1)
+        );
+        return R.ok(list);
+    }
+    /**
+     * 首页三联广告(平台装修-楼层广告-首页三联广告)
+     * */
+    @GetMapping("/getHomeThreeAdList")
+    public R<List<SysAdContent>> getHomeThreeAdList() {
+        List<SysAdContent> list = sysAdContentService.list(Wrappers.<SysAdContent>lambdaQuery(SysAdContent.class)
+            .eq(SysAdContent::getAdType, "decoration_ad_triple")
+            .eq(SysAdContent::getStatus, 1)
+        );
+
+        return R.ok(list);
+    }
+
+    /**
+     * 热门方案标题(平台装修-方案管理)
+     * */
+    @GetMapping("/getHotSchemeTitle")
+    public R<SysFloorTitle> getHotSchemeTitle() {
+        SysFloorTitle sysFloorTitle = sysFloorTitleService.getById(1);
+        return R.ok(sysFloorTitle);
+    }
+    /**
+    * 热门方案列表(平台装修-方案管理)
+    * */
+    @GetMapping("/getHotSchemeList")
+    public R<List<SysFloorAdvertManage>> getHotSchemeList() {
+        List<SysFloorAdvertManage> list = sysFloorAdvertManageService.list(Wrappers.lambdaQuery(SysFloorAdvertManage.class)
+            .eq(SysFloorAdvertManage::getAdvertPosition, 3)
+        );
+        return R.ok(list);
+    }
+    /**
+     * 场景采购标题(平台装修-产品推荐)
+     * */
+    @GetMapping("/getScenePurchaseTitle")
+    public R<SysFloorTitle> getScenePurchaseTitle() {
+        SysFloorTitle sysFloorTitle = sysFloorTitleService.getById(7);
+        return R.ok(sysFloorTitle);
+    }
+    /**
+     * 场景采购列表(平台装修-产品推荐)
+     * */
+    @GetMapping("/getScenePurchaseList")
+    public R<List<SysFloorAdvertManage>> getScenePurchaseList() {
+        List<SysFloorAdvertManage> list = sysFloorAdvertManageService.list(Wrappers.lambdaQuery(SysFloorAdvertManage.class)
+            .eq(SysFloorAdvertManage::getAdvertPosition, 5)
+        );
+        return R.ok(list);
+    }
+    /**
+     * 平台闪购标题(平台装修-品牌闪购)
+     * */
+    @GetMapping("/getPlatformFlashSaleTitle")
+    public R<SysFloorTitle> getPlatformFlashSaleTitle() {
+        SysFloorTitle sysFloorTitle = sysFloorTitleService.getById(4);
+        return R.ok(sysFloorTitle);
+    }
+    /**
+     * 平台闪购列表(平台装修-品牌闪购)
+     * */
+    @GetMapping("/getPlatformFlashSaleList")
+    public R<List<SysFloorAdvertManage>> getPlatformFlashSaleList() {
+        List<SysFloorAdvertManage> list = sysFloorAdvertManageService.list(Wrappers.lambdaQuery(SysFloorAdvertManage.class)
+            .eq(SysFloorAdvertManage::getAdvertPosition, 4)
+        );
+        return R.ok(list);
+    }
+
+    /**
+     * 行家精选标题(平台装修-特价管理)
+     * */
+    @GetMapping("/getExpertSelectionTitle")
+    public R<SysFloorTitle> getExpertSelectionTitle() {
+        SysFloorTitle sysFloorTitle = sysFloorTitleService.getById(5);
+        return R.ok(sysFloorTitle);
+    }
+
+    /**
+     * 采购指南标题(平台装修-采购指南)
+     * */
+    @GetMapping("/getPurchaseGuideTitle")
+    public R<SysFloorTitle> getPurchaseGuideTitle() {
+        SysFloorTitle sysFloorTitle = sysFloorTitleService.getById(6);
+        return R.ok(sysFloorTitle);
+    }
+
+    /**
+    * 首页横幅广告(平台装修-楼层广告-首页横幅广告)
+    * */
+    @GetMapping ("/getHomeBannerAd")
+    public R<List<SysAdContent>> getHomeBannerAd() {
+        List<SysAdContent> list = sysAdContentService.list(Wrappers.<SysAdContent>lambdaQuery(SysAdContent.class)
+            .eq(SysAdContent::getAdType, "decoration_ad_banner")
+        );
+        return R.ok(list);
+    }
+
+    /**
+    * 分类楼层列表(平台装修-分类楼层)
+    * */
+    @GetMapping("/getClassificationFloorList")
+    public R<List<SysFloor>> getClassificationFloorList() {
+        List<SysFloor> list = sysFloorService.list(Wrappers.<SysFloor>lambdaQuery(SysFloor.class)
+            .eq(SysFloor::getIsShow, 1)
+        );
+        return R.ok(list);
+    }
+    /**
+     * 分类楼层标签(平台装修-分类楼层-标签)
+     * */
+    @GetMapping("/getClassificationFloorLabel/{floorNo}")
+    public R<List<SysFloorLabel>> getClassificationFloorLabel(@PathVariable Long floorNo) {
+        List<SysFloorLabel> list = sysFloorLabelService.list(Wrappers.lambdaQuery(SysFloorLabel.class)
+            .eq(SysFloorLabel::getIsShow, 1)
+            .eq(SysFloorLabel::getFloorNo, floorNo)
+            .eq(SysFloorLabel::getPosition, 0L)
+        );
+        return R.ok(list);
+    }
+
+    /**
+    * 分类楼层详情(平台装修-分类楼层-详情)
+    * */
+    @GetMapping("/getClassificationFloorDetail/{floorNo}")
+    public R<List<SysFloorAdvertise>> getClassificationFloorDetail(@PathVariable Long floorNo) {
+        List<SysFloorAdvertise> list = sysFloorAdvertiseService.list(Wrappers.lambdaQuery(SysFloorAdvertise.class)
+            .eq(SysFloorAdvertise::getFloorNo, floorNo)
+        );
+        return R.ok(list);
+    }
+
+    /**
+     * 项目案例标题(平台装修-项目案例)
+     * */
+    @GetMapping("/getProjectCaseTitle")
+    public R<SysFloorTitle> getProjectCaseTitle() {
+        SysFloorTitle sysFloorTitle = sysFloorTitleService.getById(8);
+        return R.ok(sysFloorTitle);
+    }
+
+
+
+
+
+}

+ 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()));
     }
 }

+ 1 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteUserServiceImpl.java

@@ -272,6 +272,7 @@ public class RemoteUserServiceImpl implements RemoteUserService {
         loginUser.setUserType(userVo.getUserType());
         loginUser.setMenuPermission(permissionService.getMenuPermission(userId));
         loginUser.setRolePermission(permissionService.getRolePermission(userId));
+        loginUser.setUserSonType(userVo.getUserSonType());
         if (ObjectUtil.isNotNull(userVo.getDeptId())) {
             Opt<SysDeptVo> deptOpt = Opt.of(userVo.getDeptId()).map(deptService::selectDeptById);
             loginUser.setDeptName(deptOpt.map(SysDeptVo::getDeptName).orElse(StringUtils.EMPTY));

+ 2 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysAnnouncementService.java

@@ -67,4 +67,6 @@ public interface ISysAnnouncementService extends IService<SysAnnouncement>{
      * @return 是否删除成功
      */
     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+
 }

+ 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> {
 
     /**
      * 分页查询部门管理数据

+ 1 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysAnnouncementServiceImpl.java

@@ -138,4 +138,5 @@ public class SysAnnouncementServiceImpl  extends ServiceImpl<SysAnnouncementMapp
         }
         return baseMapper.deleteByIds(ids) > 0;
     }
+
 }

+ 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;