Преглед на файлове

门店新增和列表展示基本完成

Huanyi преди 1 месец
родител
ревизия
bb533b1c33
променени са 35 файла, в които са добавени 428 реда и са изтрити 10 реда
  1. 1 0
      ruoyi-api/pom.xml
  2. 6 0
      ruoyi-api/ruoyi-api-bom/pom.xml
  3. 5 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteAreaStationService.java
  4. 5 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteTenantCatergoriesService.java
  5. 1 0
      ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteTenantService.java
  6. 24 0
      ruoyi-api/yingpaipay-api-service/pom.xml
  7. 12 0
      ruoyi-api/yingpaipay-api-service/src/main/java/org/dromara/service/api/RemoteStoreServiceService.java
  8. 18 0
      ruoyi-api/yingpaipay-api-service/src/main/java/org/dromara/service/api/domain/bo/RemoteStoreServiceBo.java
  9. 8 0
      ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/constant/CacheNames.java
  10. 12 0
      ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java
  11. 24 0
      ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/AreaStationTranslationImpl.java
  12. 22 0
      ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/TenantCatergoriesNameTranslationImpl.java
  13. 21 0
      ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/TenantNameTranslationImpl.java
  14. 3 0
      ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  15. 1 1
      ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/handler/GlobalExceptionHandler.java
  16. 5 0
      ruoyi-modules/ruoyi-system/pom.xml
  17. 7 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysStoreController.java
  18. 2 3
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysStoreBo.java
  19. 20 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysStoreStatusVo.java
  20. 17 3
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysStoreVo.java
  21. 23 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteAreaStationServiceImpl.java
  22. 23 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteTenantCatergoriesServiceImpl.java
  23. 5 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteTenantServiceImpl.java
  24. 25 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/enums/SysStoreStatusEnum.java
  25. 3 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysStoreService.java
  26. 1 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysTenantService.java
  27. 5 0
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysAreaStationServiceImpl.java
  28. 43 1
      ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysStoreServiceImpl.java
  29. 5 0
      ruoyi-modules/yingpaipay-service/pom.xml
  30. 2 0
      ruoyi-modules/yingpaipay-service/src/main/java/org/dromara/service/YingpaipayServiceApplication.java
  31. 22 0
      ruoyi-modules/yingpaipay-service/src/main/java/org/dromara/service/domain/SysStoreService.java
  32. 46 0
      ruoyi-modules/yingpaipay-service/src/main/java/org/dromara/service/dubbo/RemoteStoreServiceServiceImpl.java
  33. 7 0
      ruoyi-modules/yingpaipay-service/src/main/java/org/dromara/service/mapper/SysStoreServiceMapper.java
  34. 4 2
      script/sql/business/create.sql
  35. 0 0
      sessionStore/8091/root.data

+ 1 - 0
ruoyi-api/pom.xml

@@ -13,6 +13,7 @@
         <module>ruoyi-api-system</module>
         <module>ruoyi-api-resource</module>
         <module>ruoyi-api-workflow</module>
+        <module>yingpaipay-api-service</module>
     </modules>
 
     <artifactId>ruoyi-api</artifactId>

+ 6 - 0
ruoyi-api/ruoyi-api-bom/pom.xml

@@ -41,6 +41,12 @@
                 <version>${revision}</version>
             </dependency>
 
+            <dependency>
+                <groupId>org.dromara</groupId>
+                <artifactId>yingpaipay-api-service</artifactId>
+                <version>${revision}</version>
+            </dependency>
+
         </dependencies>
     </dependencyManagement>
 </project>

+ 5 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteAreaStationService.java

@@ -0,0 +1,5 @@
+package org.dromara.system.api;
+
+public interface RemoteAreaStationService {
+    String selectNameById(Long id);
+}

+ 5 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteTenantCatergoriesService.java

@@ -0,0 +1,5 @@
+package org.dromara.system.api;
+
+public interface RemoteTenantCatergoriesService {
+    String getNameById(Long id);
+}

+ 1 - 0
ruoyi-api/ruoyi-api-system/src/main/java/org/dromara/system/api/RemoteTenantService.java

@@ -25,4 +25,5 @@ public interface RemoteTenantService {
      */
     List<RemoteTenantVo> queryList();
 
+    String queryNameByTenantId(String tenantId);
 }

+ 24 - 0
ruoyi-api/yingpaipay-api-service/pom.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.dromara</groupId>
+        <artifactId>ruoyi-api</artifactId>
+        <version>${revision}</version>
+    </parent>
+
+    <artifactId>yingpaipay-api-service</artifactId>
+
+    <dependencies>
+
+        <!-- RuoYi Common Core-->
+        <dependency>
+            <groupId>org.dromara</groupId>
+            <artifactId>ruoyi-common-core</artifactId>
+        </dependency>
+
+    </dependencies>
+
+</project>

+ 12 - 0
ruoyi-api/yingpaipay-api-service/src/main/java/org/dromara/service/api/RemoteStoreServiceService.java

@@ -0,0 +1,12 @@
+package org.dromara.service.api;
+
+import org.dromara.service.api.domain.bo.RemoteStoreServiceBo;
+
+import java.util.List;
+import java.util.Map;
+
+public interface RemoteStoreServiceService {
+    boolean insertBatch(List<RemoteStoreServiceBo> list);
+
+    Map<Long, List<Long>> getByIds(List<Long> storeIds);
+}

+ 18 - 0
ruoyi-api/yingpaipay-api-service/src/main/java/org/dromara/service/api/domain/bo/RemoteStoreServiceBo.java

@@ -0,0 +1,18 @@
+package org.dromara.service.api.domain.bo;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Data
+public class RemoteStoreServiceBo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    private Long storeId;
+
+    private Long serviceId;
+
+}

+ 8 - 0
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/constant/CacheNames.java

@@ -86,4 +86,12 @@ public interface CacheNames {
      */
     String ONLINE_TOKEN = "online_tokens";
 
+    /**
+     * 区域站点
+     */
+    String SYS_AREA_STATION_NAME = "sys_area_station_name#30d";
+
+    String SYS_TENANT_NAME = "sys_tenant_name#30d";
+
+    String SYS_TENANT_CATERGORIES_NAME = "sys_tenant_catergories_name#30d";
 }

+ 12 - 0
ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/constant/TransConstant.java

@@ -33,4 +33,16 @@ public interface TransConstant {
      */
     String OSS_ID_TO_URL = "oss_id_to_url";
 
+    /**
+     * tenantId转公司名
+     * @Author Huanyi
+     */
+    String TENANT_ID_TO_NAME = "tenant_id_to_name";
+
+    /**
+     * 区域站点ID转站点名
+     */
+    String AREA_STATION_ID_TO_NAME = "area_station_id_to_name";
+
+    String TENANT_CATERORIES_ID_TO_NAME = "tenant_catergories_id_to_name";
 }

+ 24 - 0
ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/AreaStationTranslationImpl.java

@@ -0,0 +1,24 @@
+package org.dromara.common.translation.core.impl;
+
+import cn.hutool.core.convert.Convert;
+import lombok.AllArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.common.translation.annotation.TranslationType;
+import org.dromara.common.translation.constant.TransConstant;
+import org.dromara.common.translation.core.TranslationInterface;
+import org.dromara.system.api.RemoteAreaStationService;
+
+@AllArgsConstructor
+@TranslationType(type = TransConstant.AREA_STATION_ID_TO_NAME)
+public class AreaStationTranslationImpl implements TranslationInterface<String> {
+
+    @DubboReference
+    private RemoteAreaStationService areaStationService;
+
+    @Override
+    public String translation(Object key, String other) {
+        Long id = Convert.toLong(key);
+        return areaStationService.selectNameById(id);
+    }
+
+}

+ 22 - 0
ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/TenantCatergoriesNameTranslationImpl.java

@@ -0,0 +1,22 @@
+package org.dromara.common.translation.core.impl;
+
+import cn.hutool.core.convert.Convert;
+import lombok.AllArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.common.translation.annotation.TranslationType;
+import org.dromara.common.translation.constant.TransConstant;
+import org.dromara.common.translation.core.TranslationInterface;
+import org.dromara.system.api.RemoteTenantCatergoriesService;
+
+@AllArgsConstructor
+@TranslationType(type = TransConstant.TENANT_CATERORIES_ID_TO_NAME)
+public class TenantCatergoriesNameTranslationImpl implements TranslationInterface<String> {
+
+    @DubboReference
+    private RemoteTenantCatergoriesService tenantCatergoriesService;
+
+    @Override
+    public String translation(Object key, String other) {
+        return tenantCatergoriesService.getNameById(Convert.toLong(key));
+    }
+}

+ 21 - 0
ruoyi-common/ruoyi-common-translation/src/main/java/org/dromara/common/translation/core/impl/TenantNameTranslationImpl.java

@@ -0,0 +1,21 @@
+package org.dromara.common.translation.core.impl;
+
+import lombok.AllArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.dromara.common.translation.annotation.TranslationType;
+import org.dromara.common.translation.constant.TransConstant;
+import org.dromara.common.translation.core.TranslationInterface;
+import org.dromara.system.api.RemoteTenantService;
+
+@AllArgsConstructor
+@TranslationType(type = TransConstant.TENANT_ID_TO_NAME)
+public class TenantNameTranslationImpl implements TranslationInterface<String> {
+
+    @DubboReference
+    private RemoteTenantService tenantService;
+
+    @Override
+    public String translation(Object key, String other) {
+        return tenantService.queryNameByTenantId(key.toString());
+    }
+}

+ 3 - 0
ruoyi-common/ruoyi-common-translation/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

@@ -4,3 +4,6 @@ org.dromara.common.translation.core.impl.DictTypeTranslationImpl
 org.dromara.common.translation.core.impl.OssUrlTranslationImpl
 org.dromara.common.translation.core.impl.UserNameTranslationImpl
 org.dromara.common.translation.core.impl.NicknameTranslationImpl
+org.dromara.common.translation.core.impl.AreaStationTranslationImpl
+org.dromara.common.translation.core.impl.TenantNameTranslationImpl
+org.dromara.common.translation.core.impl.TenantCatergoriesNameTranslationImpl

+ 1 - 1
ruoyi-common/ruoyi-common-web/src/main/java/org/dromara/common/web/handler/GlobalExceptionHandler.java

@@ -150,7 +150,7 @@ public class GlobalExceptionHandler {
     public R<Void> handleRuntimeException(RuntimeException e, HttpServletRequest request) {
         String requestURI = request.getRequestURI();
         log.error("请求地址'{}',发生未知异常.", requestURI, e);
-        return R.fail(e.getMessage());
+        return R.fail("系统错误");
     }
 
     /**

+ 5 - 0
ruoyi-modules/ruoyi-system/pom.xml

@@ -105,6 +105,11 @@
             <artifactId>ruoyi-api-workflow</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.dromara</groupId>
+            <artifactId>yingpaipay-api-service</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>

+ 7 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysStoreController.java

@@ -6,6 +6,7 @@ import lombok.RequiredArgsConstructor;
 import jakarta.servlet.http.HttpServletResponse;
 import jakarta.validation.constraints.*;
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import org.dromara.system.domain.vo.SysStoreStatusVo;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.validation.annotation.Validated;
 import org.dromara.common.idempotent.annotation.RepeatSubmit;
@@ -103,4 +104,10 @@ public class SysStoreController extends BaseController {
                           @PathVariable("ids") Long[] ids) {
         return toAjax(sysStoreService.deleteWithValidByIds(List.of(ids), true));
     }
+
+    @GetMapping("/listStatus")
+    public R<List<SysStoreStatusVo>> listStatus() {
+        return R.ok(sysStoreService.listStatus());
+    }
+
 }

+ 2 - 3
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/bo/SysStoreBo.java

@@ -1,5 +1,6 @@
 package org.dromara.system.domain.bo;
 
+import org.dromara.common.tenant.core.TenantEntity;
 import org.dromara.system.domain.SysStore;
 import org.dromara.common.mybatis.core.domain.BaseEntity;
 import org.dromara.common.core.validate.AddGroup;
@@ -22,7 +23,7 @@ import java.util.List;
 @Data
 @EqualsAndHashCode(callSuper = true)
 @AutoMapper(target = SysStore.class, reverseConvertGenerate = false)
-public class SysStoreBo extends BaseEntity {
+public class SysStoreBo extends TenantEntity {
 
     /**
      * 序号
@@ -101,7 +102,6 @@ public class SysStoreBo extends BaseEntity {
     /**
      * 经度
      */
-    @Null(groups = {AddGroup.class, EditGroup.class})
     @DecimalMax(value = "180.000000", message = "经度最大值为180", groups = {AddGroup.class, EditGroup.class})
     @DecimalMin(value = "-180.000000", message = "经度最小值为-180", groups = {AddGroup.class, EditGroup.class})
     private BigDecimal longitude;
@@ -109,7 +109,6 @@ public class SysStoreBo extends BaseEntity {
     /**
      * 维度
      */
-    @Null(groups = {AddGroup.class, EditGroup.class})
     @DecimalMin(value = "-90.000000", message = "纬度最小值为-90", groups = {AddGroup.class, EditGroup.class})
     @DecimalMax(value = "90.000000", message = "纬度最大值为90", groups = {AddGroup.class, EditGroup.class})
     private BigDecimal latitude;

+ 20 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysStoreStatusVo.java

@@ -0,0 +1,20 @@
+package org.dromara.system.domain.vo;
+
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+@Data
+public class SysStoreStatusVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    private Integer value;
+
+    private String label;
+
+    private String style;
+
+}

+ 17 - 3
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/domain/vo/SysStoreVo.java

@@ -17,7 +17,7 @@ import lombok.Data;
 import java.io.Serial;
 import java.io.Serializable;
 import java.util.Date;
-
+import java.util.List;
 
 
 /**
@@ -71,8 +71,18 @@ public class SysStoreVo implements Serializable {
     /**
      * 商户分类
      */
-    @ExcelProperty(value = "商户分类")
     private Long tenantCatergories;
+    @ExcelProperty(value = "商户分类")
+    @Translation(type = TransConstant.TENANT_CATERORIES_ID_TO_NAME, mapper = "tenantCatergories")
+    private String tenantCatergoriesName;
+
+    /**
+     * 所属品牌
+     */
+    private String tenantId;
+    @ExcelProperty(value = "所属品牌")
+    @Translation(type = TransConstant.TENANT_ID_TO_NAME, mapper = "tenantId")
+    private String tenantName;
 
     /**
      * 开始营业时间
@@ -107,8 +117,10 @@ public class SysStoreVo implements Serializable {
     /**
      * 归属站点
      */
-    @ExcelProperty(value = "归属站点")
     private Long site;
+    @ExcelProperty(value = "归属站点")
+    @Translation(type = TransConstant.AREA_STATION_ID_TO_NAME, mapper = "site")
+    private String siteName;
 
     /**
      * 详细地址
@@ -132,4 +144,6 @@ public class SysStoreVo implements Serializable {
      */
     private BigDecimal latitude;
 
+    private List<Long> services;
+
 }

+ 23 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteAreaStationServiceImpl.java

@@ -0,0 +1,23 @@
+package org.dromara.system.dubbo;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.dromara.common.core.constant.CacheNames;
+import org.dromara.system.api.RemoteAreaStationService;
+import org.dromara.system.mapper.SysAreaStationMapper;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
+@DubboService
+@Service
+@RequiredArgsConstructor
+public class RemoteAreaStationServiceImpl implements RemoteAreaStationService {
+
+    private final SysAreaStationMapper baseMapper;
+
+    @Cacheable(value = CacheNames.SYS_AREA_STATION_NAME, key = "#id")
+    @Override
+    public String selectNameById(Long id) {
+        return baseMapper.selectById(id).getName();
+    }
+}

+ 23 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteTenantCatergoriesServiceImpl.java

@@ -0,0 +1,23 @@
+package org.dromara.system.dubbo;
+
+import lombok.RequiredArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.dromara.common.core.constant.CacheNames;
+import org.dromara.system.api.RemoteTenantCatergoriesService;
+import org.dromara.system.mapper.SysTenantCategoriesMapper;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
+@RequiredArgsConstructor
+@Service
+@DubboService
+public class RemoteTenantCatergoriesServiceImpl implements RemoteTenantCatergoriesService {
+
+    private final SysTenantCategoriesMapper baseMapper;
+
+    @Cacheable(cacheNames = CacheNames.SYS_TENANT_CATERGORIES_NAME, key = "#id")
+    @Override
+    public String getNameById(Long id) {
+        return baseMapper.selectById(id).getName();
+    }
+}

+ 5 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/dubbo/RemoteTenantServiceImpl.java

@@ -42,4 +42,9 @@ public class RemoteTenantServiceImpl implements RemoteTenantService {
         return MapstructUtils.convert(list, RemoteTenantVo.class);
     }
 
+    @Override
+    public String queryNameByTenantId(String tenantId) {
+        return tenantService.queryByTenantId(tenantId).getCompanyName();
+    }
+
 }

+ 25 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/enums/SysStoreStatusEnum.java

@@ -0,0 +1,25 @@
+package org.dromara.system.enums;
+
+import lombok.AccessLevel;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+import java.util.List;
+
+@Getter
+@AllArgsConstructor(access = AccessLevel.PRIVATE)
+public enum SysStoreStatusEnum {
+
+    UNDER_REVIEW(0, "待审核", "warning"),
+    IN_OPERATION(1, "营业中", "success"),
+    DUE(2, "已到期", "info"),
+    ;
+    private final Integer value;
+    private final String label;
+    private final String style;
+
+    public static List<SysStoreStatusEnum> list() {
+        return Arrays.stream(values()).toList();
+    }
+}

+ 3 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/ISysStoreService.java

@@ -1,6 +1,7 @@
 package org.dromara.system.service;
 
 import org.dromara.system.domain.SysStore;
+import org.dromara.system.domain.vo.SysStoreStatusVo;
 import org.dromara.system.domain.vo.SysStoreVo;
 import org.dromara.system.domain.bo.SysStoreBo;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -66,4 +67,6 @@ public interface ISysStoreService {
      * @return 是否删除成功
      */
     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    List<SysStoreStatusVo> listStatus();
 }

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

@@ -92,4 +92,5 @@ public interface ISysTenantService {
     void syncTenantConfig();
 
     TableDataInfo<SysTenantOnStoreVo> listOnStore(PageQuery pageQuery);
+
 }

+ 5 - 0
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysAreaStationServiceImpl.java

@@ -1,11 +1,13 @@
 package org.dromara.system.service.impl;
 
+import org.dromara.common.core.constant.CacheNames;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
 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.CacheUtils;
 import org.dromara.system.domain.vo.SysAreaStationOnStoreVo;
 import org.dromara.system.domain.vo.SysAreaStationStatusVo;
 import org.dromara.system.domain.vo.SysAreaStationTypeVo;
@@ -80,6 +82,7 @@ public class SysAreaStationServiceImpl implements ISysAreaStationService {
         if (flag) {
             bo.setId(add.getId());
         }
+        CacheUtils.put(CacheNames.SYS_AREA_STATION_NAME, bo.getId(), bo.getName());
         return flag;
     }
 
@@ -93,6 +96,7 @@ public class SysAreaStationServiceImpl implements ISysAreaStationService {
     public Boolean updateByBo(SysAreaStationBo bo) {
         SysAreaStation update = MapstructUtils.convert(bo, SysAreaStation.class);
         validEntityBeforeSave(update);
+        CacheUtils.put(CacheNames.SYS_AREA_STATION_NAME, bo.getId(), bo.getName());
         return baseMapper.updateById(update) > 0;
     }
 
@@ -115,6 +119,7 @@ public class SysAreaStationServiceImpl implements ISysAreaStationService {
         if(isValid){
             //TODO 做一些业务上的校验,判断是否需要校验
         }
+        ids.forEach(id -> CacheUtils.evict(CacheNames.SYS_AREA_STATION_NAME, id));
         return baseMapper.deleteByIds(ids) > 0;
     }
 

+ 43 - 1
ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysStoreServiceImpl.java

@@ -1,5 +1,7 @@
 package org.dromara.system.service.impl;
 
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.apache.seata.spring.annotation.GlobalTransactional;
 import org.dromara.common.core.utils.MapstructUtils;
 import org.dromara.common.core.utils.StringUtils;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -9,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.service.api.RemoteStoreServiceService;
+import org.dromara.service.api.domain.bo.RemoteStoreServiceBo;
+import org.dromara.system.domain.vo.SysStoreStatusVo;
+import org.dromara.system.enums.SysStoreStatusEnum;
 import org.springframework.stereotype.Service;
 import org.dromara.system.domain.bo.SysStoreBo;
 import org.dromara.system.domain.vo.SysStoreVo;
@@ -16,6 +22,7 @@ import org.dromara.system.domain.SysStore;
 import org.dromara.system.mapper.SysStoreMapper;
 import org.dromara.system.service.ISysStoreService;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Collection;
@@ -33,6 +40,9 @@ public class SysStoreServiceImpl implements ISysStoreService {
 
     private final SysStoreMapper baseMapper;
 
+    @DubboReference
+    private final RemoteStoreServiceService storeServiceService;
+
     /**
      * 查询门店管理
      *
@@ -55,6 +65,11 @@ public class SysStoreServiceImpl implements ISysStoreService {
     public TableDataInfo<SysStoreVo> queryPageList(SysStoreBo bo, PageQuery pageQuery) {
         LambdaQueryWrapper<SysStore> lqw = buildQueryWrapper(bo);
         Page<SysStoreVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
+
+        List<Long> storeIds = new ArrayList<>();
+        result.getRecords().forEach(e -> storeIds.add(e.getId()));
+        Map<Long, List<Long>> map = storeServiceService.getByIds(storeIds);
+        result.getRecords().forEach(e -> e.setServices(map.get(e.getId())));
         return TableDataInfo.build(result);
     }
 
@@ -90,6 +105,7 @@ public class SysStoreServiceImpl implements ISysStoreService {
      * @param bo 门店管理
      * @return 是否新增成功
      */
+    @GlobalTransactional(rollbackFor = Exception.class)
     @Override
     public Boolean insertByBo(SysStoreBo bo) {
         SysStore add = MapstructUtils.convert(bo, SysStore.class);
@@ -98,7 +114,20 @@ public class SysStoreServiceImpl implements ISysStoreService {
         if (flag) {
             bo.setId(add.getId());
         }
-        return flag;
+
+        boolean storeServiceFlag = storeServiceService.insertBatch(
+            bo.getServices().stream().map(e -> {
+                RemoteStoreServiceBo storeService = new RemoteStoreServiceBo();
+                storeService.setStoreId(bo.getId());
+                storeService.setServiceId(e);
+                return storeService;
+            }).toList()
+        );
+        if (!storeServiceFlag) {
+            throw new RuntimeException("批量插入关系失败");
+        }
+
+        return true;
     }
 
     /**
@@ -135,4 +164,17 @@ public class SysStoreServiceImpl implements ISysStoreService {
         }
         return baseMapper.deleteByIds(ids) > 0;
     }
+
+    @Override
+    public List<SysStoreStatusVo> listStatus() {
+        return SysStoreStatusEnum.list().stream()
+            .map(e -> {
+                SysStoreStatusVo vo = new SysStoreStatusVo();
+                vo.setValue(e.getValue());
+                vo.setLabel(e.getLabel());
+                vo.setStyle(e.getStyle());
+                return vo;
+            })
+            .toList();
+    }
 }

+ 5 - 0
ruoyi-modules/yingpaipay-service/pom.xml

@@ -95,6 +95,11 @@
             <artifactId>ruoyi-api-resource</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.dromara</groupId>
+            <artifactId>yingpaipay-api-service</artifactId>
+        </dependency>
+
         <!-- RuoYi Api System -->
         <dependency>
             <groupId>org.dromara</groupId>

+ 2 - 0
ruoyi-modules/yingpaipay-service/src/main/java/org/dromara/service/YingpaipayServiceApplication.java

@@ -1,10 +1,12 @@
 package org.dromara.service;
 
 import lombok.extern.slf4j.Slf4j;
+import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
 
+@EnableDubbo
 @SpringBootApplication
 @Slf4j
 public class YingpaipayServiceApplication {

+ 22 - 0
ruoyi-modules/yingpaipay-service/src/main/java/org/dromara/service/domain/SysStoreService.java

@@ -0,0 +1,22 @@
+package org.dromara.service.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+/**
+ * 门店服务关系表
+ * @Author Huanyi
+ */
+
+@Data
+@TableName("sys_store_service")
+public class SysStoreService {
+
+    @TableId(type = IdType.INPUT)
+    private Long storeId;
+
+    private Long serviceId;
+
+}

+ 46 - 0
ruoyi-modules/yingpaipay-service/src/main/java/org/dromara/service/dubbo/RemoteStoreServiceServiceImpl.java

@@ -0,0 +1,46 @@
+package org.dromara.service.dubbo;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import lombok.RequiredArgsConstructor;
+import org.apache.dubbo.config.annotation.DubboService;
+import org.dromara.service.api.RemoteStoreServiceService;
+import org.dromara.service.api.domain.bo.RemoteStoreServiceBo;
+import org.dromara.service.domain.SysStoreService;
+import org.dromara.service.mapper.SysStoreServiceMapper;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+@RequiredArgsConstructor
+@Service
+@DubboService
+public class RemoteStoreServiceServiceImpl implements RemoteStoreServiceService {
+
+    private final SysStoreServiceMapper baseMapper;
+
+    @Override
+    public boolean insertBatch(List<RemoteStoreServiceBo> list) {
+        return baseMapper.insertBatch(
+            list.stream().map(e -> {
+                SysStoreService entity = new SysStoreService();
+                entity.setStoreId(e.getStoreId());
+                entity.setServiceId(e.getServiceId());
+                return entity;
+            }).toList()
+        );
+    }
+
+    @Override
+    public Map<Long, List<Long>> getByIds(List<Long> storeIds) {
+
+        if (storeIds == null || storeIds.isEmpty()) {
+            return Collections.emptyMap();
+        }
+
+        List<SysStoreService> sysStoreServices = baseMapper.selectList(Wrappers.lambdaQuery(SysStoreService.class).in(SysStoreService::getStoreId, storeIds));
+        Map<Long, List<Long>> map = new HashMap<>();
+        sysStoreServices.forEach(e -> map.computeIfAbsent(e.getStoreId(), k -> new ArrayList<>()).add(e.getServiceId()));
+
+        return map;
+    }
+}

+ 7 - 0
ruoyi-modules/yingpaipay-service/src/main/java/org/dromara/service/mapper/SysStoreServiceMapper.java

@@ -0,0 +1,7 @@
+package org.dromara.service.mapper;
+
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+import org.dromara.service.domain.SysStoreService;
+
+public interface SysStoreServiceMapper extends BaseMapperPlus<SysStoreService, SysStoreService> {
+}

+ 4 - 2
script/sql/business/create.sql

@@ -80,8 +80,10 @@ CREATE TABLE `pet_system`.`sys_area_station`
     `update_time`   datetime COMMENT '更新时间'
 ) ENGINE = innoDB COMMENT = '区域站点表';
 
+# 2026/02/26
 CREATE TABLE `pet_system`.`sys_store_service`
 (
-    `store_id`       bigint PRIMARY KEY  NOT NULL COMMENT '门店ID',
-    `service_ids`    varchar(255)        NOT NULL COMMENT '服务ID'
+    `store_id`   bigint NOT NULL COMMENT '门店ID',
+    `service_id` bigint NOT NULL COMMENT '服务ID',
+    PRIMARY KEY (`store_id`, `service_id`)
 ) ENGINE = innoDB COMMENT = '门店服务关系表';

+ 0 - 0
sessionStore/8091/root.data