浏览代码

初始化

zhaoyun 2 月之前
当前提交
dbdbc5f7a7
共有 100 个文件被更改,包括 9636 次插入0 次删除
  1. 43 0
      mer_java/.gitignore
  2. 60 0
      mer_java/README.md
  3. 135 0
      mer_java/crmeb-admin/pom.xml
  4. 56 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/CrmebAdminApplication.java
  5. 52 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/aspect/ControllerAspect.java
  6. 147 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/aspect/SensitiveLogAspect.java
  7. 37 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/CorsConfig.java
  8. 55 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/DruidConfig.java
  9. 36 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/JacksonConfig.java
  10. 55 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/RestTemplateConfig.java
  11. 36 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/SchedulerConfig.java
  12. 155 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/SwaggerConfig.java
  13. 105 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/TaskExecutorConfig.java
  14. 97 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/WebConfig.java
  15. 157 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/WebSecurityConfig.java
  16. 131 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/WxMaConfiguration.java
  17. 45 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/WxMaProperties.java
  18. 108 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/CardSecretController.java
  19. 94 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/CdkeyLibraryController.java
  20. 108 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantAddressController.java
  21. 127 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantAdminController.java
  22. 83 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantAttachmentController.java
  23. 133 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantBaseCategoryController.java
  24. 55 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantCityRegionController.java
  25. 76 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantConfigController.java
  26. 43 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantCopyrightController.java
  27. 114 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantCouponController.java
  28. 52 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantCouponUserController.java
  29. 69 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantDeliveryPersonnelController.java
  30. 72 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantElectController.java
  31. 111 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantEmployeeController.java
  32. 54 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantExportController.java
  33. 135 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantExpressController.java
  34. 99 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantFinanceController.java
  35. 65 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantFormTempController.java
  36. 72 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantHomeController.java
  37. 108 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantInfoController.java
  38. 46 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantLogController.java
  39. 111 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantLoginController.java
  40. 51 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantMenuController.java
  41. 163 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantOrderController.java
  42. 91 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantPageCategoryController.java
  43. 102 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantPageDiyController.java
  44. 89 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantPageLinkController.java
  45. 150 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantPrintController.java
  46. 103 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductCategoryController.java
  47. 342 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductController.java
  48. 80 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductGuaranteeGroupController.java
  49. 79 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductReplyController.java
  50. 95 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductRuleController.java
  51. 105 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantRoleController.java
  52. 131 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantSeckillController.java
  53. 80 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantSystemFormController.java
  54. 74 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantUploadController.java
  55. 58 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantUserController.java
  56. 122 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantWechatLiveAssistantController.java
  57. 149 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantWechatLiveGoodsController.java
  58. 213 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantWechatLiveRoomController.java
  59. 78 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantWechatMediaController.java
  60. 62 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentCatMerchantController.java
  61. 62 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentDeliveryCompanyMerchantController.java
  62. 108 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentDraftMerchantProductController.java
  63. 108 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentProductMerchantController.java
  64. 80 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentShopMerchantController.java
  65. 59 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PlatProductBrandController.java
  66. 48 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PlatProductCategoryController.java
  67. 51 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PlatProductGuaranteeController.java
  68. 111 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/RefundOrderController.java
  69. 93 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/ShippingTemplatesController.java
  70. 156 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/groupbuy/MerchantGroupBuyActivityController.java
  71. 79 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/groupbuy/MerchantGroupBuyRecordController.java
  72. 59 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/groupbuy/MerchantGroupBuyUserController.java
  73. 138 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/ActivityStyleController.java
  74. 226 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/AgreementController.java
  75. 97 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/ArticleCategoryController.java
  76. 111 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/ArticleController.java
  77. 87 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CityRegionController.java
  78. 71 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityCategoryController.java
  79. 48 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityController.java
  80. 94 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityNoteController.java
  81. 64 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityReplyController.java
  82. 72 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityTopicController.java
  83. 56 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CopyrightController.java
  84. 98 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/ExpressController.java
  85. 179 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/FinanceController.java
  86. 65 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/HomeController.java
  87. 62 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/IntegralController.java
  88. 82 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/IntegralIntervalController.java
  89. 110 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/IntegralOrderController.java
  90. 108 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/IntegralProductController.java
  91. 79 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MarketingActivityController.java
  92. 74 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MerchantApplyController.java
  93. 90 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MerchantCategoryController.java
  94. 173 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MerchantController.java
  95. 90 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MerchantTypeController.java
  96. 55 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/OnePassController.java
  97. 123 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/PageCategoryController.java
  98. 173 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/PageDiyController.java
  99. 121 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/PageLayoutController.java
  100. 122 0
      mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/PageLinkController.java

+ 43 - 0
mer_java/.gitignore

@@ -0,0 +1,43 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**
+!**/src/test/**
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+
+### VS Code ###
+.vscode/
+/crmeb_log/log_debug.log
+/crmeb_log/log_error.log
+/crmeb_log/log_info.log
+/crmeb_log/log_warn.log
+/crmeb_log/
+/.idea/
+src/main/java/com/zbkj/.DS_Store
+src/main/java/com/.DS_Store
+src/main/java/.DS_Store
+src/main/.DS_Store
+.DS_Store
+/crmebimage/

+ 60 - 0
mer_java/README.md

@@ -0,0 +1,60 @@
+# 环境
+1. Java Jdk1.8
+2. Redis 5+
+3. Mysql 5.7+
+
+# Java项目框架
+1. SpringBoot 2.2.6.RELEASE
+2. Maven 3.6.1
+3. Swagger 2.9.2
+4. Mybatis Plus 3.3.1
+
+# 文档链接
+admin 开发文档 http://api.admin.merchant.java.crmeb.net/doc.html
+front 开发文档 http://api.front.merchant.java.crmeb.net/doc.html
+安装部署文档 https://doc.crmeb.com/crmebjavalandmer/crmebjavamer/6919
+使用说明 https://doc.crmeb.com/crmebjavalandmer/crmebjavamer/6920
+
+
+# 部署
+1. 拿到jar包,上传到web目录下,(宝塔配置的域名指向的web目录下即可)
+2. 在 jar包同级目录下运行 `start.sh (运行命令为 ./start.sh )` 脚本即可启动项目
+3. shell脚本会自动运行 `tail -f crmeb_out.file` 命令输出当前启动日志
+4. 看到 `Completed 200 OK` 表示启动成功
+5. 默认启动 `20000` 端口号
+
+# 注意事项
+1. web端口号不可以设置为`20000`
+2. 反向代理地址: `http://127.0.0.1:20000` 【外网域名指向这个地址】
+
+
+# 二次开发帮助文档
+##注解参考:
+1. `@NotNull`    注解	作用类型	解释	任何类型	属性不能为 `null`
+2. `@NotEmpty`	集合	集合不能为 `null`,且 `size` 大于 `0`
+3. `@NotBlank`	只能作用在 `String` 上,不能为 `null`,而且调用 `trim()` 后,长度必须大于 `0`
+4. `@AssertTrue`	`Boolean、boolean`	布尔属性必须是 `true`
+5. `@Min`	数字类型(原子和包装)	限定数字的最小值(整型)
+6. `@Max`	同 `@Min`	限定数字的最大值(整型)
+7. `@DecimalMin`	同 `@Min`	限定数字的最小值(字符串,可以是小数)
+8. `@DecimalMax`	同 `@Min`	限定数字的最大值(字符串,可以是小数)
+9. `@Range`	数字类型(原子和包装)	限定数字范围(长整型)
+10. `@Length`	字符串	限定字符串长度
+11. `@Size`	集合	限定集合大小
+12. `@Past`	时间、日期	必须是一个过去的时间或日期
+13. `@Future`	时期、时间	必须是一个未来的时间或日期
+14. `@Email`	字符串	必须是一个邮箱格式
+15. `@Pattern`	字符串、字符	正则匹配字符串
+
+# 产品复制
+1. 设置 [99api](https://www.99api.com "99api") 对应的api到配置表eb_system_config 
+2. 配置baseUrl和key 实际的key可以根据自己的定义修改
+3. 目前支持天猫,京东,淘宝,苏宁,拼多多
+
+# 打印机
+1. [易联云文档](http://doc2.10ss.net/337744 "易联云文档")
+2. [易联云JAVA SDK](http://doc2.10ss.net/337744 "易联云JAVA SDK gitee文档")
+
+
+# 行为验证码 安吉加加
+https://captcha.anji-plus.com/

+ 135 - 0
mer_java/crmeb-admin/pom.xml

@@ -0,0 +1,135 @@
+<?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">
+    <parent>
+        <artifactId>crmeb</artifactId>
+        <groupId>com.zbkj</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>crmeb-admin</artifactId>
+    <packaging>jar</packaging>
+
+    <properties>
+        <crmeb-service>0.0.1-SNAPSHOT</crmeb-service>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.zbkj</groupId>
+            <artifactId>crmeb-service</artifactId>
+            <version>${crmeb-service}</version>
+        </dependency>
+        <!--quartz定时调度依赖-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-quartz</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <!--添加本地加密jar包 不可删除-->
+        <dependency>
+            <groupId>crmeb-encrypt</groupId>
+            <artifactId>crmeb.encrypt</artifactId>
+            <version>1.0</version>
+            <scope>system</scope>
+            <systemPath>${basedir}/src/main/resources/libs/CRMEB-encrypt-1.0-SNAPSHOT-encrypted.jar</systemPath>
+        </dependency>
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>wx-java-miniapp-spring-boot-starter</artifactId>
+            <version>4.4.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <!--打包配置-->
+        <finalName>Crmeb-admin</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.3.0.RELEASE</version>
+<!--                正确打包本地加密jar包,不可删除-->
+                <configuration>
+                    <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
+                    <fork>true</fork>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal><!--可以把依赖的包都打包到生成的Jar包中-->
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <!-- 兼容环境编码导致不能添加jar-->
+                <version>3.1.0</version>
+                <configuration>
+                    <!-- 使用默认的变量标记方法即${*} -->
+                    <useDefaultDelimiters>true</useDefaultDelimiters>
+                    <nonFilteredFileExtensions>
+                        <nonFilteredFileExtension>woff</nonFilteredFileExtension>
+                        <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
+                        <nonFilteredFileExtension>eot</nonFilteredFileExtension>
+                        <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
+                        <nonFilteredFileExtension>svg</nonFilteredFileExtension>
+                    </nonFilteredFileExtensions>
+                </configuration>
+            </plugin>
+        </plugins>
+
+        <resources>
+            <!--            <resource>-->
+            <!--                <directory>src/main/resources</directory>-->
+            <!--                &lt;!&ndash; 处理文件时替换文件中的变量 &ndash;&gt;-->
+            <!--                <filtering>true</filtering>-->
+            <!--                <excludes>-->
+            <!--                    &lt;!&ndash; 打包时排除文件 &ndash;&gt;-->
+            <!--&lt;!&ndash;                    <exclude>application.yml</exclude>&ndash;&gt;-->
+            <!--                    <exclude>application-{profile}.yml</exclude>-->
+            <!--&lt;!&ndash;                    <exclude>application-beta.yml</exclude>&ndash;&gt;-->
+            <!--&lt;!&ndash;                    <exclude>application-prod.yml</exclude>&ndash;&gt;-->
+            <!--                </excludes>-->
+            <!--            </resource>-->
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+            <!--            <resource>-->
+            <!--                <directory>src/main/resources.${spring.profiles.active}</directory>-->
+            <!--                <filtering>false</filtering>-->
+            <!--            </resource>-->
+            <!--这个元素描述了项目相关的所有资源路径列表,例如和项目相关的属性文件,这些资源被包含在最终的打包文件里。-->
+            <resource>
+                <!--   描述存放资源的目录,该路径相对POM路径-->
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                </includes>
+            </resource>
+
+            <resource>
+                <filtering>true</filtering>
+                <directory>src/main/resources</directory>
+                <excludes>
+                    <exclude>**/*.woff</exclude>
+                    <exclude>**/*.ttf</exclude>
+                    <exclude>**/*.eot</exclude>
+                    <exclude>**/*.svg</exclude>
+                </excludes>
+            </resource>
+        </resources>
+    </build>
+
+</project>

+ 56 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/CrmebAdminApplication.java

@@ -0,0 +1,56 @@
+package com.zbkj.admin;
+
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import com.alibaba.fastjson.support.config.FastJsonConfig;
+import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
+import com.binarywang.spring.starter.wxjava.miniapp.config.WxMaAutoConfiguration;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * 程序主入口
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@EnableAsync //开启异步调用
+@EnableSwagger2
+@Configuration
+@EnableTransactionManagement
+//@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) //去掉数据源
+@SpringBootApplication(exclude = {WxMaAutoConfiguration.class}) //去掉数据源
+@ComponentScan(basePackages = {"com.zbkj"})
+@MapperScan(basePackages = {"com.zbkj.**.dao"})
+public class CrmebAdminApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(CrmebAdminApplication.class, args);
+    }
+
+//    @Bean
+//    public HttpMessageConverters fastJsonHttpMessageConverters() {
+//        FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter();
+//        FastJsonConfig fastJsonConfig = new FastJsonConfig();
+//        fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat);
+//        fastConverter.setFastJsonConfig(fastJsonConfig);
+//        HttpMessageConverter<?> converter = fastConverter;
+//        return new HttpMessageConverters(converter);
+//    }
+
+}

+ 52 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/aspect/ControllerAspect.java

@@ -0,0 +1,52 @@
+package com.zbkj.admin.aspect;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import java.util.Arrays;
+
+
+/**
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ * 所有的前端controller层的拦截业务,方法的执行时间长度,
+ */
+@Aspect
+@Component
+public class ControllerAspect {
+
+    Logger logger = LoggerFactory.getLogger(ControllerAspect.class);
+
+    @Pointcut("execution(* com.zbkj.admin.controller.*.*(..))")
+    private void pointCutMethodController() {
+
+    }
+
+    @Around("pointCutMethodController()")
+    public Object doAroundService(ProceedingJoinPoint pjp) throws Throwable {
+
+        long begin = System.nanoTime();
+
+        Object obj = pjp.proceed();
+
+        long end = System.nanoTime();
+
+        logger.info("Controller method:{},prams:{},cost time:{} ns,cost:{} ms",
+
+                pjp.getSignature().toString(), Arrays.toString(pjp.getArgs()), (end - begin), (end - begin) / 1000000);
+
+        return obj;
+    }
+}

+ 147 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/aspect/SensitiveLogAspect.java

@@ -0,0 +1,147 @@
+package com.zbkj.admin.aspect;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.servlet.ServletUtil;
+import com.alibaba.fastjson.JSON;
+import com.zbkj.admin.filter.TokenComponent;
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.admin.service.ActionService;
+import com.zbkj.common.model.record.SensitiveMethodLog;
+import com.zbkj.common.utils.SpringUtil;
+import com.zbkj.common.vo.LoginUserVo;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.Signature;
+import org.aspectj.lang.annotation.AfterReturning;
+import org.aspectj.lang.annotation.AfterThrowing;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.HandlerMapping;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 敏感操作日志记录Aop
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Aspect
+@Component
+public class SensitiveLogAspect {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(SensitiveLogAspect.class);
+
+    @Resource
+    private ActionService actionService;
+
+    @Pointcut("@annotation(com.zbkj.common.annotation.LogControllerAnnotation)")
+    public void controllerAspect() {
+    }
+
+    /**
+     * 处理完请求后执行
+     *
+     * @param joinPoint            切点
+     * @param logServiceAnnotation 注解
+     */
+    @AfterReturning(pointcut = "controllerAspect() && @annotation(logServiceAnnotation)", returning = "jsonResult")
+    public void doAfterReturning(JoinPoint joinPoint, LogControllerAnnotation logServiceAnnotation, Object jsonResult) {
+        addLog(joinPoint, logServiceAnnotation, jsonResult, null);
+    }
+
+    /**
+     * 拦截异常操作
+     *
+     * @param joinPoint            切点
+     * @param logServiceAnnotation 注解
+     * @param e                    异常
+     */
+    @AfterThrowing(pointcut = "controllerAspect() && @annotation(logServiceAnnotation)", throwing = "e")
+    public void doAfterThrowing(JoinPoint joinPoint, LogControllerAnnotation logServiceAnnotation, Exception e) {
+        addLog(joinPoint, logServiceAnnotation, null, e);
+    }
+
+    private void addLog(JoinPoint joinPoint, LogControllerAnnotation logServiceAnnotation, Object jsonResult, Exception e) {
+        if (!logServiceAnnotation.intoDB()) {
+            return;
+        }
+
+        HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
+        // 获取当前用户
+        LoginUserVo loginUser = SpringUtil.getBean(TokenComponent.class).getLoginUser(request);
+        Signature signature = joinPoint.getSignature();
+
+        SensitiveMethodLog methodLog = new SensitiveMethodLog();
+        methodLog.setAdminId(loginUser.getUser().getId());
+        methodLog.setMerId(loginUser.getUser().getMerId());
+        methodLog.setAdminAccount(loginUser.getUser().getAccount());
+        methodLog.setDescription(logServiceAnnotation.description());
+        methodLog.setMethodType(logServiceAnnotation.methodType().getName());
+        methodLog.setMethod(signature.getDeclaringTypeName() + "." + signature.getName() + "()");
+        methodLog.setRequestMethod(request.getMethod());
+        methodLog.setUrl(request.getRequestURI());
+        methodLog.setIp(ServletUtil.getClientIP(request));
+        String requestValue = getRequestValue(joinPoint, request.getMethod(), request);
+        methodLog.setRequestParam(requestValue);
+        if (jsonResult != null) {
+            methodLog.setResult(StrUtil.sub(JSON.toJSONString(jsonResult), 0, 2000));
+        }
+        methodLog.setStatus(0);
+        if (e != null) {
+            methodLog.setStatus(1);
+            methodLog.setErrorMsg(StrUtil.sub(e.getMessage(), 0, 2000));
+        }
+        actionService.addSensitiveLog(methodLog);
+    }
+
+    private String getRequestValue(JoinPoint joinPoint, String requestMethod, HttpServletRequest request) {
+        if (requestMethod.equals("PUT") || requestMethod.equals("POST")) {
+            return StrUtil.sub(argsArrayToString(joinPoint.getArgs()), 0, 2000);
+        } else {
+            Map<?, ?> paramsMap = (Map<?, ?>) request.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE);
+            return StrUtil.sub(paramsMap.toString(), 0, 2000);
+        }
+    }
+
+    /**
+     * 参数拼装
+     */
+    private String argsArrayToString(Object[] paramsArray) {
+        StringBuilder params = new StringBuilder();
+        if (paramsArray != null && paramsArray.length > 0) {
+            for (Object o : paramsArray) {
+                if (!isFilterObject(o)) {
+                    Object jsonObj = JSON.toJSON(o);
+                    params.append(jsonObj.toString()).append(" ");
+                }
+            }
+        }
+        return params.toString().trim();
+    }
+
+    /**
+     * 判断是否需要过滤的对象。
+     *
+     * @param o 对象信息。
+     * @return 如果是需要过滤的对象,则返回true;否则返回false。
+     */
+    public boolean isFilterObject(final Object o) {
+        return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse;
+    }
+}

+ 37 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/CorsConfig.java

@@ -0,0 +1,37 @@
+package com.zbkj.admin.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+/**
+ * 跨域配置
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Configuration
+public class CorsConfig {
+    private CorsConfiguration buildConfig() {
+        CorsConfiguration corsConfiguration = new CorsConfiguration();
+        corsConfiguration.addAllowedOrigin("*"); //允许任何域名
+        corsConfiguration.addAllowedHeader("*"); //允许任何头
+        corsConfiguration.addAllowedMethod("*"); //允许任何方法
+        return corsConfiguration;
+    }
+
+    @Bean
+    public CorsFilter corsFilter() {
+        UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+        source.registerCorsConfiguration("/**", buildConfig()); //注册
+        return new CorsFilter(source);
+    }
+}

+ 55 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/DruidConfig.java

@@ -0,0 +1,55 @@
+package com.zbkj.admin.config;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import com.alibaba.druid.support.http.StatViewServlet;
+import com.alibaba.druid.support.http.WebStatFilter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.boot.web.servlet.ServletRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.sql.DataSource;
+
+/**
+ * Druid配置组件
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Configuration
+public class DruidConfig {
+
+    @Bean
+    public ServletRegistrationBean druidServlet() { // 主要实现WEB监控的配置处理
+        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new StatViewServlet(), "/druid/*"); // 进行druid监控的配置处理操作
+        servletRegistrationBean.addInitParameter("loginUsername", "kf"); // 用户名
+        servletRegistrationBean.addInitParameter("loginPassword", "654321"); // 密码
+        servletRegistrationBean.addInitParameter("resetEnable", "true"); // 是否可以重置数据源
+        return servletRegistrationBean;
+    }
+
+    @Bean
+    public FilterRegistrationBean filterRegistrationBean() {
+        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
+        filterRegistrationBean.setFilter(new WebStatFilter());
+
+        filterRegistrationBean.addUrlPatterns("/*"); // 所有请求进行监控处理
+        //不必监控的请求
+        filterRegistrationBean.addInitParameter("exclusions", "*.html,*.png,*.ico,*.js,*.gif,*.jpg,*.css,/druid/*");
+        return filterRegistrationBean;
+    }
+
+    @Bean("dataSource")
+    @ConfigurationProperties(prefix = "spring.datasource")
+    public DataSource druidDataSource() {
+        return new DruidDataSource();
+    }
+}
+

+ 36 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/JacksonConfig.java

@@ -0,0 +1,36 @@
+package com.zbkj.admin.config;
+
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.math.BigDecimal;
+
+/**
+ * Jackjson配置组件
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Configuration
+public class JacksonConfig {
+
+    /**
+     * Jackson全局转化BigDecimal类型为String,解决jackson序列化时BigDecimal类型缺失精度问题
+     *
+     * @return Jackson2ObjectMapperBuilderCustomizer 注入的对象
+     */
+    @Bean
+    public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
+
+        return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.serializerByType(BigDecimal.class, ToStringSerializer.instance);
+    }
+
+}

+ 55 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/RestTemplateConfig.java

@@ -0,0 +1,55 @@
+package com.zbkj.admin.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.MediaType;
+import org.springframework.http.client.ClientHttpRequestFactory;
+import org.springframework.http.client.SimpleClientHttpRequestFactory;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.client.RestTemplate;
+
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * RestTemplate配置组件
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Configuration
+public class RestTemplateConfig {
+    @Bean
+    public RestTemplate restTemplate(ClientHttpRequestFactory factory) {
+        RestTemplate restTemplate = new RestTemplate(factory);
+        restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8));
+        restTemplate.getMessageConverters().add(new WxMappingJackson2HttpMessageConverter());
+        return restTemplate;
+    }
+
+    @Bean
+    public ClientHttpRequestFactory httpRequestFactory() {
+        SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
+        factory.setReadTimeout(10000);//ms
+        factory.setConnectTimeout(15000);//ms
+        return factory;
+    }
+
+    //解决微信返回json Content-Type 值却是 text/plain 的问题
+    public class WxMappingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter {
+        public WxMappingJackson2HttpMessageConverter() {
+            List<MediaType> mediaTypes = new ArrayList<>();
+            mediaTypes.add(MediaType.TEXT_PLAIN);
+            mediaTypes.add(MediaType.TEXT_HTML);
+            setSupportedMediaTypes(mediaTypes);
+        }
+    }
+}

+ 36 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/SchedulerConfig.java

@@ -0,0 +1,36 @@
+package com.zbkj.admin.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.SchedulingConfigurer;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
+import org.springframework.scheduling.config.ScheduledTaskRegistrar;
+
+/**
+ * Spring 定时任务配置
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+
+@Configuration
+public class SchedulerConfig implements SchedulingConfigurer {
+
+    private final int poolSize = 30;
+
+    @Override
+    public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
+        ThreadPoolTaskScheduler threadPoolTaskScheduler = new ThreadPoolTaskScheduler();
+
+        threadPoolTaskScheduler.setPoolSize(poolSize);
+        threadPoolTaskScheduler.setThreadNamePrefix("crmeb-scheduled-task-pool-");
+        threadPoolTaskScheduler.initialize();
+
+        scheduledTaskRegistrar.setTaskScheduler(threadPoolTaskScheduler);
+    }
+}

+ 155 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/SwaggerConfig.java

@@ -0,0 +1,155 @@
+package com.zbkj.admin.config;
+
+import com.google.common.base.Predicate;
+import com.zbkj.common.constants.Constants;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.*;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spi.service.contexts.SecurityContext;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.google.common.collect.Lists.newArrayList;
+
+/**
+ * Swagger配置组件
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Configuration
+@EnableSwagger2
+@ConfigurationProperties(prefix = "api.doc")
+public class SwaggerConfig {
+
+    //是否开启swagger,正式环境一般是需要关闭的,可根据springboot的多环境配置进行设置
+    Boolean swaggerEnabled = true;
+
+    @Value("${server.port}")
+    private String port;
+
+    @Value("${crmeb.domain}")
+    private String domain;
+
+    @Bean("merchant")
+    public Docket createRestApis() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .groupName("merchant")
+                .host(domain)
+                .apiInfo(apiInfo())
+                // 是否开启
+                .enable(swaggerEnabled)
+                .select()
+                // 扫描的路径包
+                .apis(RequestHandlerSelectors.basePackage("com.zbkj.admin.controller.merchant"))
+                // 指定路径处理PathSelectors.any()代表所有的路径
+                .paths(merchantPathsAnt())
+                .build()
+                .securitySchemes(security())
+                .securityContexts(securityContexts())
+//                .globalOperationParameters(pars) // 针对单个url的验证 如果需要的话
+                .pathMapping("/");
+    }
+
+    @Bean("platform")
+    public Docket create2RestApis() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .groupName("platform")
+                .host(domain)
+                .apiInfo(apiInfo())
+                // 是否开启
+                .enable(swaggerEnabled)
+                .select()
+                // 扫描的路径包
+                .apis(RequestHandlerSelectors.basePackage("com.zbkj.admin.controller.platform"))
+                // 指定路径处理PathSelectors.any()代表所有的路径
+                .paths(platformPathsAnt()) //只监听
+                .build()
+                .securitySchemes(security())
+                .securityContexts(securityContexts())
+//                .globalOperationParameters(pars) // 针对单个url的验证 如果需要的话
+                .pathMapping("/");
+    }
+
+    @Bean("publicly")
+    public Docket create3RestApis() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .groupName("publicly")
+                .host(domain)
+                .apiInfo(apiInfo())
+                // 是否开启
+                .enable(swaggerEnabled)
+                .select()
+                // 扫描的路径包
+                .apis(RequestHandlerSelectors.basePackage("com.zbkj.admin.controller.publicly"))
+                // 指定路径处理PathSelectors.any()代表所有的路径
+                .paths(publicPathsAnt())
+                .build()
+                .securitySchemes(security())
+                .securityContexts(securityContexts())
+//                .globalOperationParameters(pars) // 针对单个url的验证 如果需要的话
+                .pathMapping("/");
+    }
+
+    private Predicate<String> merchantPathsAnt() {
+        return PathSelectors.ant("/api/admin/merchant/**");
+    }
+
+    private Predicate<String> platformPathsAnt() {
+        return PathSelectors.ant("/api/admin/platform/**");
+    }
+
+    private Predicate<String> publicPathsAnt() {
+        return PathSelectors.ant("/api/publicly/**");
+    }
+
+    private List<ApiKey> security() {
+        return newArrayList(
+                new ApiKey(Constants.HEADER_AUTHORIZATION_KEY, Constants.HEADER_AUTHORIZATION_KEY, "header")
+        );
+    }
+
+    private ApiInfo apiInfo() {
+        Contact contact = new Contact("Crmeb","https://www.crmeb.com/index/java_merchant", "278437628@qq.com");
+        return new ApiInfoBuilder()
+                .title("Crmeb Java 多商户管理侧")
+                .description("Java多商户接口文档")
+                .contact(contact)
+                .termsOfServiceUrl("https://www.crmeb.com/index/java_merchant")
+                .version("1.4.0").build();
+    }
+
+
+    private List<SecurityContext> securityContexts() {
+        List<SecurityContext> res = new ArrayList<>();
+        res.add(SecurityContext.builder()
+                .securityReferences(defaultAuth())
+                .forPaths(PathSelectors.regex("/.*"))
+                .build());
+        return res;
+    }
+
+    private List<SecurityReference> defaultAuth() {
+        List<SecurityReference> res = new ArrayList<>();
+        AuthorizationScope authorizationScope = new AuthorizationScope("global", Constants.HEADER_AUTHORIZATION_KEY);
+        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
+        authorizationScopes[0] = authorizationScope;
+        res.add(new SecurityReference(Constants.HEADER_AUTHORIZATION_KEY, authorizationScopes));
+        return res;
+    }
+}

+ 105 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/TaskExecutorConfig.java

@@ -0,0 +1,105 @@
+package com.zbkj.admin.config;
+
+import lombok.Data;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.ThreadPoolExecutor;
+
+/**
+ * Task类的线程配置
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Data
+@Configuration
+public class TaskExecutorConfig {
+
+    //普通模式
+    private final int taskCorePoolSize = 20; //核心线程池数量
+    private final int taskMaxPoolSize = 100; //最大线程
+    private final int taskQueueCapacity = 200; //缓存队列条数
+    private final int taskKeepAliveSecond = 10; //允许的空闲时间
+    private final String taskNamePrefix = "task-executor-"; //线程名称前缀
+
+    //发布订阅模式
+//    private final int listenerCorePoolSize = 3;
+//    private final int listenerMaxPoolSize = 20;
+//    private final int listenerQueueCapacity = 200;
+//    private final int listenerKeepAliveSecond = 10;
+//    private final String listenerNamePrefix = "listener-executor-";
+
+    //普通模式
+    @Bean("taskExecutor")
+    public ThreadPoolTaskExecutor taskExecutor() {
+        return initTaskExecutor(
+                getTaskCorePoolSize(),
+                getTaskMaxPoolSize(),
+                getTaskQueueCapacity(),
+                getTaskKeepAliveSecond(),
+                getTaskNamePrefix()
+        );
+    }
+
+//    //针对发布订阅(pub listener) 的线程池
+//    @Bean("listenerTaskExecutor")
+//    public ThreadPoolTaskExecutor listenerTaskExecutor(){
+//        return initTaskExecutor(getListenerCorePoolSize(), getListenerMaxPoolSize(),
+//                getListenerQueueCapacity(), getListenerKeepAliveSecond(), getListenerNamePrefix());
+//    }
+
+    /**
+     * 初始化TaskExecutor
+     *
+     * @param corePoolSize    int 默认线程数
+     * @param maxPoolSize     int 最大线程数
+     * @param queueCapacity   int 缓冲队列长度
+     * @param keepAliveSecond int 允许空闲时间
+     * @param namePrefix      String  名称的前缀
+     * @return ThreadPoolTaskExecutor
+     */
+    private ThreadPoolTaskExecutor initTaskExecutor(int corePoolSize, int maxPoolSize,
+                                                    int queueCapacity, int keepAliveSecond, String namePrefix) {
+        //callrunspolicy:由调度线程(提交任务的线程)处理该任务CallerRunsPolicy
+        return initTaskExecutor(corePoolSize, maxPoolSize, queueCapacity, keepAliveSecond, namePrefix,
+                new ThreadPoolExecutor.CallerRunsPolicy());
+    }
+
+    /**
+     * 初始化TaskExecutor
+     *
+     * @param corePoolSize             int 默认线程数
+     * @param maxPoolSize              int 最大线程数
+     * @param queueCapacity            int 缓冲队列长度
+     * @param keepAliveSecond          int 允许空闲时间
+     * @param namePrefix               String  名称的前缀
+     * @param rejectedExecutionHandler 线程池满的时候如何处理
+     * @return ThreadPoolTaskExecutor
+     */
+    private ThreadPoolTaskExecutor initTaskExecutor(int corePoolSize, int maxPoolSize,
+                                                    int queueCapacity, int keepAliveSecond, String namePrefix,
+                                                    RejectedExecutionHandler rejectedExecutionHandler) {
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        executor.setCorePoolSize(corePoolSize);//核心线程数(默认线程数)
+        executor.setMaxPoolSize(maxPoolSize);//最大线程数
+        executor.setQueueCapacity(queueCapacity);//缓冲队列数
+        executor.setKeepAliveSeconds(keepAliveSecond);//允许线程空闲时间(单位默认为秒)
+        executor.setThreadNamePrefix(namePrefix);//线程名前缀
+
+        //线程池对拒绝任务的处理策略,
+        executor.setRejectedExecutionHandler(rejectedExecutionHandler);
+
+        //初始化
+        executor.initialize();
+        return executor;
+    }
+}

+ 97 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/WebConfig.java

@@ -0,0 +1,97 @@
+package com.zbkj.admin.config;
+
+import com.zbkj.admin.filter.ResponseFilter;
+import com.zbkj.common.config.CrmebConfig;
+import com.zbkj.common.constants.Constants;
+import com.zbkj.common.constants.UploadConstants;
+import com.zbkj.common.interceptor.ResultInterceptor;
+import com.zbkj.common.interceptor.SwaggerInterceptor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.handler.MappedInterceptor;
+
+/**
+ * token验证拦截器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Configuration
+public class WebConfig implements WebMvcConfigurer {
+
+    // 这里使用一个Bean为的是可以在拦截器中自由注入,也可以在拦截器中使用SpringUtil.getBean 获取
+    // 但是觉得这样更优雅
+
+    @Autowired
+    CrmebConfig crmebConfig;
+
+    @Bean
+    public ResponseFilter responseFilter() {
+        return new ResponseFilter();
+    }
+
+    @Value("${swagger.basic.username}")
+    private String username;
+    @Value("${swagger.basic.password}")
+    private String password;
+    @Value("${swagger.basic.check}")
+    private Boolean check;
+
+    /**
+     * 添加自定义拦截器
+     */
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        //添加token拦截器
+        //addPathPatterns添加需要拦截的命名空间;
+        //excludePathPatterns添加排除拦截命名空间
+        registry.addInterceptor(new ResultInterceptor()).addPathPatterns("/**");
+    }
+
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("/**")
+                .addResourceLocations("classpath:/static/");
+        registry.addResourceHandler("doc.html")
+                .addResourceLocations("classpath:/META-INF/resources/");
+        registry.addResourceHandler("/webjars/**")
+                .addResourceLocations("classpath:/META-INF/resources/webjars/");
+
+        /** 本地文件上传路径 */
+        registry.addResourceHandler(UploadConstants.UPLOAD_FILE_KEYWORD + "/**")
+                .addResourceLocations("file:" + crmebConfig.getImagePath() + "/" + UploadConstants.UPLOAD_FILE_KEYWORD + "/");
+
+        registry.addResourceHandler(UploadConstants.UPLOAD_AFTER_FILE_KEYWORD + "/**")
+                .addResourceLocations("file:" + crmebConfig.getImagePath() + "/" + UploadConstants.UPLOAD_AFTER_FILE_KEYWORD + "/");
+
+    }
+
+    @Bean
+    public FilterRegistrationBean filterRegister() {
+        //注册过滤器
+        FilterRegistrationBean registration = new FilterRegistrationBean(responseFilter());
+        // 仅仅api前缀的请求才会拦截
+        registration.addUrlPatterns("/api/*", "/crmebimage/public/product/2023/07/04/19017f4dd97a446eb8c07a47f4a34346szt5jzynfz.png");
+        return registration;
+    }
+
+    /* 必须在此处配置拦截器,要不然拦不到swagger的静态资源 */
+    @Bean
+    @ConditionalOnProperty(name = "swagger.basic.enable", havingValue = "true")
+    public MappedInterceptor getMappedInterceptor() {
+        return new MappedInterceptor(new String[]{"/doc.html", "/webjars/**"}, new SwaggerInterceptor(username, password, check));
+    }
+}

+ 157 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/WebSecurityConfig.java

@@ -0,0 +1,157 @@
+package com.zbkj.admin.config;
+
+import com.zbkj.admin.filter.JwtAuthenticationTokenFilter;
+import com.zbkj.admin.manager.AuthenticationEntryPointImpl;
+import com.zbkj.admin.manager.CustomAccessDeniedHandler;
+import com.zbkj.admin.manager.CustomAuthenticationProvider;
+import com.zbkj.common.constants.UploadConstants;
+import com.zbkj.service.service.impl.UserDetailServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpMethod;
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+import org.springframework.security.web.authentication.logout.LogoutFilter;
+import org.springframework.web.filter.CorsFilter;
+
+/**
+ * Security配置
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Configuration
+@EnableWebSecurity
+@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
+public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
+
+    /**
+     * 跨域过滤器
+     */
+    @Autowired
+    private CorsFilter corsFilter;
+
+    /**
+     * token认证过滤器
+     */
+    @Bean
+    public JwtAuthenticationTokenFilter jwtAuthenticationTokenFilter() {
+        return new JwtAuthenticationTokenFilter();
+    }
+
+    /**
+     * 认证失败处理类
+     */
+    @Bean
+    public AuthenticationEntryPointImpl unauthorizedHandler() {
+        return new AuthenticationEntryPointImpl();
+    }
+
+    /**
+     * 鉴权失败处理类
+     */
+    @Bean
+    public CustomAccessDeniedHandler accessDeniedHandler() {
+        return new CustomAccessDeniedHandler();
+    }
+
+    /**
+     * 这里将Spring Security自带的authenticationManager声明成Bean,声明它的作用是用它帮我们进行认证操作,
+     * 调用这个Bean的authenticate方法会由Spring Security自动帮我们做认证。
+     */
+//    @Bean
+//    public AuthenticationManager authenticationManager() throws Exception {
+//        return new CusAuthenticationManager(customAuthenticationProvider);
+//    }
+    @Override
+    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+        auth.authenticationProvider(new CustomAuthenticationProvider(new UserDetailServiceImpl()));
+    }
+
+    /**
+     * anyRequest          |   匹配所有请求路径
+     * access              |   SpringEl表达式结果为true时可以访问
+     * anonymous           |   匿名可以访问
+     * denyAll             |   用户不能访问
+     * fullyAuthenticated  |   用户完全认证可以访问(非remember-me下自动登录)
+     * hasAnyAuthority     |   如果有参数,参数表示权限,则其中任何一个权限可以访问
+     * hasAnyRole          |   如果有参数,参数表示角色,则其中任何一个角色可以访问
+     * hasAuthority        |   如果有参数,参数表示权限,则其权限可以访问
+     * hasIpAddress        |   如果有参数,参数表示IP地址,如果用户IP和参数匹配,则可以访问
+     * hasRole             |   如果有参数,参数表示角色,则其角色可以访问
+     * permitAll           |   用户可以任意访问
+     * rememberMe          |   允许通过remember-me登录的用户访问
+     * authenticated       |   用户登录后可访问
+     */
+    @Override
+    protected void configure(HttpSecurity http) throws Exception {
+
+        // CRSF禁用,因为不使用session
+        http.cors().and().csrf().disable()
+                // 认证失败处理类
+                .exceptionHandling().authenticationEntryPoint(unauthorizedHandler())
+                .accessDeniedHandler(accessDeniedHandler()).and()
+                // 基于token,所以不需要session
+                .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and()
+                // 过滤请求
+                .authorizeRequests()
+                // 跨域预检请求
+//            .antMatchers(HttpMethod.OPTIONS, "/**").permitAll()
+                // 对于登录login 验证码captchaImage 和其他放行的目录 允许匿名访问"/citylife/front/**"
+                .antMatchers("/api/publicly/**").permitAll()
+                .antMatchers("/api/admin/platform/getLoginPic").permitAll()
+                .antMatchers("/api/admin/platform/login").permitAll()
+                .antMatchers("/api/admin/platform/login/account/detection").permitAll()
+                .antMatchers("/api/admin/merchant/getLoginPic").permitAll()
+                .antMatchers("/api/admin/merchant/login").permitAll()
+                .antMatchers("/api/admin/merchant/login/account/detection").permitAll()
+                // 放行资源路径
+                .antMatchers("/" + UploadConstants.UPLOAD_FILE_KEYWORD + "/**").permitAll()
+                .antMatchers("/" + UploadConstants.DOWNLOAD_FILE_KEYWORD + "/**").permitAll()
+                .antMatchers("/" + UploadConstants.UPLOAD_AFTER_FILE_KEYWORD + "/**").permitAll()
+                .antMatchers(
+                        HttpMethod.GET,
+                        "/*.html",
+                        "/**/*.html",
+                        "/**/*.css",
+                        "/**/*.js"
+                ).permitAll()
+                .antMatchers("/profile/**").anonymous()
+                .antMatchers("/common/download**").anonymous()
+                .antMatchers("/common/download/resource**").anonymous()
+                .antMatchers("/doc.html").permitAll()
+                .antMatchers("/swagger-resources/**").permitAll()
+                .antMatchers("/webjars/**").permitAll()
+                .antMatchers("/v2/**").permitAll()
+                .antMatchers("/swagger-ui.html/**").permitAll()
+                .antMatchers("/*/api-docs").anonymous()
+                .antMatchers("/druid/**").anonymous()
+                .antMatchers("/captcha/get", "/captcha/check").anonymous()
+                .antMatchers("/api/admin/payment/callback/**").anonymous()
+                .antMatchers("/api/public/**").anonymous()
+                // 除上面外的所有请求全部需要鉴权认证
+                .anyRequest().authenticated()
+                .and()
+                .headers().frameOptions().disable();// 防止iframe 造成跨域
+//        http.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
+        // 添加JWT filter
+        // 开启登录认证流程过滤器
+        http.addFilterBefore(jwtAuthenticationTokenFilter(), UsernamePasswordAuthenticationFilter.class);
+        // 添加CORS filter
+        http.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
+        http.addFilterBefore(corsFilter, LogoutFilter.class);
+    }
+
+}

+ 131 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/WxMaConfiguration.java

@@ -0,0 +1,131 @@
+package com.zbkj.admin.config;
+
+import cn.binarywang.wx.miniapp.api.WxMaService;
+import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
+import cn.binarywang.wx.miniapp.bean.WxMaKefuMessage;
+import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage;
+import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
+import cn.binarywang.wx.miniapp.message.WxMaMessageHandler;
+import cn.binarywang.wx.miniapp.message.WxMaMessageRouter;
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
+import me.chanjar.weixin.common.error.WxErrorException;
+import me.chanjar.weixin.common.error.WxRuntimeException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.io.File;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @author <a href="https://github.com/binarywang">Binary Wang</a>
+ */
+@Slf4j
+@Configuration
+@EnableConfigurationProperties(WxMaProperties.class)
+public class WxMaConfiguration {
+    private final WxMaProperties properties;
+
+    @Autowired
+    public WxMaConfiguration(WxMaProperties properties) {
+        this.properties = properties;
+    }
+
+    @Bean
+    public WxMaService wxMaService() {
+        List<WxMaProperties.Config> configs = this.properties.getConfigs();
+        if (configs == null) {
+            throw new WxRuntimeException("大哥,拜托先看下项目首页的说明(readme文件),添加下相关配置,注意别配错了!");
+        }
+        WxMaService maService = new WxMaServiceImpl();
+        maService.setMultiConfigs(
+            configs.stream()
+                .map(a -> {
+                    WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
+//                WxMaDefaultConfigImpl config = new WxMaRedisConfigImpl(new JedisPool());
+                    // 使用上面的配置时,需要同时引入jedis-lock的依赖,否则会报类无法找到的异常
+                    config.setAppid(a.getAppid());
+                    config.setSecret(a.getSecret());
+                    config.setToken(a.getToken());
+                    config.setAesKey(a.getAesKey());
+                    config.setMsgDataFormat(a.getMsgDataFormat());
+                    return config;
+                }).collect(Collectors.toMap(WxMaDefaultConfigImpl::getAppid, a -> a, (o, n) -> o)));
+        return maService;
+    }
+
+    @Bean
+    public WxMaMessageRouter wxMaMessageRouter(WxMaService wxMaService) {
+        final WxMaMessageRouter router = new WxMaMessageRouter(wxMaService);
+        router
+            .rule().handler(logHandler).next()
+            .rule().async(false).content("订阅消息").handler(subscribeMsgHandler).end()
+            .rule().async(false).content("文本").handler(textHandler).end()
+            .rule().async(false).content("图片").handler(picHandler).end()
+            .rule().async(false).content("二维码").handler(qrcodeHandler).end();
+        return router;
+    }
+
+    private final WxMaMessageHandler subscribeMsgHandler = (wxMessage, context, service, sessionManager) -> {
+        service.getMsgService().sendSubscribeMsg(WxMaSubscribeMessage.builder()
+            .templateId("此处更换为自己的模板id")
+            .data(Lists.newArrayList(
+                new WxMaSubscribeMessage.MsgData("keyword1", "339208499")))
+            .toUser(wxMessage.getFromUser())
+            .build());
+        return null;
+    };
+
+    private final WxMaMessageHandler logHandler = (wxMessage, context, service, sessionManager) -> {
+        log.info("收到消息:" + wxMessage.toString());
+        service.getMsgService().sendKefuMsg(WxMaKefuMessage.newTextBuilder().content("收到信息为:" + wxMessage.toJson())
+            .toUser(wxMessage.getFromUser()).build());
+        return null;
+    };
+
+    private final WxMaMessageHandler textHandler = (wxMessage, context, service, sessionManager) -> {
+        service.getMsgService().sendKefuMsg(WxMaKefuMessage.newTextBuilder().content("回复文本消息")
+            .toUser(wxMessage.getFromUser()).build());
+        return null;
+    };
+
+    private final WxMaMessageHandler picHandler = (wxMessage, context, service, sessionManager) -> {
+        try {
+            WxMediaUploadResult uploadResult = service.getMediaService()
+                .uploadMedia("image", "png",
+                    ClassLoader.getSystemResourceAsStream("tmp.png"));
+            service.getMsgService().sendKefuMsg(
+                WxMaKefuMessage
+                    .newImageBuilder()
+                    .mediaId(uploadResult.getMediaId())
+                    .toUser(wxMessage.getFromUser())
+                    .build());
+        } catch (WxErrorException e) {
+            e.printStackTrace();
+        }
+
+        return null;
+    };
+
+    private final WxMaMessageHandler qrcodeHandler = (wxMessage, context, service, sessionManager) -> {
+        try {
+            final File file = service.getQrcodeService().createQrcode("123", 430);
+            WxMediaUploadResult uploadResult = service.getMediaService().uploadMedia("image", file);
+            service.getMsgService().sendKefuMsg(
+                WxMaKefuMessage
+                    .newImageBuilder()
+                    .mediaId(uploadResult.getMediaId())
+                    .toUser(wxMessage.getFromUser())
+                    .build());
+        } catch (WxErrorException e) {
+            e.printStackTrace();
+        }
+
+        return null;
+    };
+
+}

+ 45 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/config/WxMaProperties.java

@@ -0,0 +1,45 @@
+package com.zbkj.admin.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+import java.util.List;
+
+/**
+ * @author <a href="https://github.com/binarywang">Binary Wang</a>
+ */
+@Data
+@ConfigurationProperties(prefix = "wx.miniapp")
+public class WxMaProperties {
+
+    private List<Config> configs;
+
+    @Data
+    public static class Config {
+        /**
+         * 设置微信小程序的appid
+         */
+        private String appid;
+
+        /**
+         * 设置微信小程序的Secret
+         */
+        private String secret;
+
+        /**
+         * 设置微信小程序消息服务器配置的token
+         */
+        private String token;
+
+        /**
+         * 设置微信小程序消息服务器配置的EncodingAESKey
+         */
+        private String aesKey;
+
+        /**
+         * 消息格式,XML或者JSON
+         */
+        private String msgDataFormat;
+    }
+
+}

+ 108 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/CardSecretController.java

@@ -0,0 +1,108 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.cdkey.CardSecret;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.*;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.CardSecretService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+
+
+/**
+ * 商户卡密控制器 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/card/secret")
+@Api(tags = "商户卡密控制器")
+public class CardSecretController {
+
+    @Autowired
+    private CardSecretService cardSecretService;
+
+    @PreAuthorize("hasAuthority('merchant:card:secret:page:list')")
+    @ApiOperation(value = "卡密分页列表")
+    @RequestMapping(value = "/page/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<CardSecret>> getList(@Validated CardSecretSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(cardSecretService.findPageList(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:card:secret:add')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增卡密")
+    @ApiOperation(value = "新增卡密")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<Object> save(@RequestBody @Validated CardSecretAddRequest request) {
+        if (cardSecretService.add(request)) {
+            return CommonResult.success().setMessage("新增卡密成功");
+        }
+        return CommonResult.failed().setMessage("新增卡密失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:card:secret:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除卡密")
+    @ApiOperation(value = "删除卡密")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> delete(@PathVariable(value = "id") Integer id) {
+        if (cardSecretService.delete(id)) {
+            return CommonResult.success().setMessage("删除卡密成功");
+        }
+        return CommonResult.failed().setMessage("删除卡密失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:cdkey:library:update')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改卡密")
+    @ApiOperation(value = "修改卡密")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<Object> update(@RequestBody @Validated CardSecretSaveRequest request) {
+        if (cardSecretService.edit(request)) {
+            return CommonResult.success().setMessage("修改卡密成功");
+        }
+        return CommonResult.failed().setMessage("修改卡密失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:cdkey:library:import:excel')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "导入卡密")
+    @ApiOperation(value = "导入卡密")
+    @RequestMapping(value = "/import/excel", method = RequestMethod.POST)
+    public CommonResult<Object> addImportExcel(MultipartFile file, @RequestParam(value = "libraryId") Integer libraryId) throws IOException {
+        if (cardSecretService.addImportExcel(file, libraryId)) {
+            return CommonResult.success().setMessage("导入卡密成功");
+        }
+        return CommonResult.failed().setMessage("导入卡密失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:card:secret:batch:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "批量删除卡密")
+    @ApiOperation(value = "批量删除卡密")
+    @RequestMapping(value = "/batch/delete", method = RequestMethod.POST)
+    public CommonResult<Object> batchDelete(@RequestBody @Validated BatchOperationCommonRequest request) {
+        if (cardSecretService.batchDelete(request)) {
+            return CommonResult.success().setMessage("批量删除卡密成功");
+        }
+        return CommonResult.failed().setMessage("批量删除卡密失败");
+    }
+
+}
+
+
+

+ 94 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/CdkeyLibraryController.java

@@ -0,0 +1,94 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.CdkeyLibrarySaveRequest;
+import com.zbkj.common.request.CdkeyLibrarySearchRequest;
+import com.zbkj.common.response.CdkeyLibraryPageResponse;
+import com.zbkj.common.response.CdkeyLibrarySimpleResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.CdkeyLibraryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 商户卡密库控制器 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/cdkey/library")
+@Api(tags = "商户卡密库控制器")
+public class CdkeyLibraryController {
+
+    @Autowired
+    private CdkeyLibraryService cdkeyLibraryService;
+
+    @PreAuthorize("hasAuthority('merchant:cdkey:library:page:list')")
+    @ApiOperation(value = "卡密库分页列表")
+    @RequestMapping(value = "/page/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<CdkeyLibraryPageResponse>> getList(@Validated CdkeyLibrarySearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(cdkeyLibraryService.findPageList(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:cdkey:library:add')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增卡密库")
+    @ApiOperation(value = "新增卡密库")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<Object> save(@RequestBody CdkeyLibrarySaveRequest request) {
+        if (cdkeyLibraryService.add(request)) {
+            return CommonResult.success().setMessage("新增卡密库成功");
+        }
+        return CommonResult.failed().setMessage("新增卡密库失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:cdkey:library:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除卡密库")
+    @ApiOperation(value = "删除卡密库")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> delete(@PathVariable(value = "id") Integer id) {
+        if (cdkeyLibraryService.delete(id)) {
+            return CommonResult.success().setMessage("删除卡密库成功");
+        }
+        return CommonResult.failed().setMessage("删除卡密库失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:cdkey:library:update')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改卡密库")
+    @ApiOperation(value = "修改卡密库")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<Object> update(@RequestBody CdkeyLibrarySaveRequest request) {
+        if (cdkeyLibraryService.updateLibrary(request)) {
+            return CommonResult.success().setMessage("修改卡密库成功");
+        }
+        return CommonResult.failed().setMessage("修改卡密库失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:cdkey:library:unrelated:list')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "未关联卡密库列表")
+    @ApiOperation(value = "未关联卡密库列表")
+    @RequestMapping(value = "/unrelated/list", method = RequestMethod.GET)
+    public CommonResult<List<CdkeyLibrarySimpleResponse>> findUnrelatedList() {
+        return CommonResult.success(cdkeyLibraryService.findUnrelatedList());
+    }
+}
+
+
+

+ 108 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantAddressController.java

@@ -0,0 +1,108 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.merchant.MerchantAddress;
+import com.zbkj.common.request.merchant.MerchantAddressSaveRequest;
+import com.zbkj.common.request.merchant.MerchantAddressSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.MerchantAddressManagerService;
+import com.zbkj.service.service.MerchantAddressService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 商户地址管理 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/address")
+@Api(tags = "商户地址管理控制器")
+public class MerchantAddressController {
+
+    @Autowired
+    private MerchantAddressManagerService addressManagerService;
+
+    @PreAuthorize("hasAuthority('merchant:address:list')")
+    @ApiOperation(value = "商户地址分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<List<MerchantAddress>> getList(@Validated MerchantAddressSearchRequest request) {
+        return CommonResult.success(addressManagerService.findList(request));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:address:add')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增商户地址")
+    @ApiOperation(value = "新增商户地址")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<Object> save(@RequestBody MerchantAddressSaveRequest request) {
+        if (addressManagerService.add(request)) {
+            return CommonResult.success().setMessage("新增商户地址成功");
+        }
+        return CommonResult.failed().setMessage("新增商户地址失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:address:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除商户地址")
+    @ApiOperation(value = "删除商户地址")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
+    public CommonResult<Object> delete(@PathVariable(value = "id") Integer id) {
+        if (addressManagerService.delete(id)) {
+            return CommonResult.success().setMessage("删除商户地址成功");
+        }
+        return CommonResult.failed().setMessage("删除商户地址失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:address:update')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改商户地址")
+    @ApiOperation(value = "修改商户地址")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<Object> update(@RequestBody MerchantAddressSaveRequest request) {
+        if (addressManagerService.updateAddress(request)) {
+            return CommonResult.success().setMessage("修改商户地址成功");
+        }
+        return CommonResult.failed().setMessage("修改商户地址失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:address:set:default')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "设置商户默认地址")
+    @ApiOperation(value = "设置商户默认地址")
+    @RequestMapping(value = "/set/default/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> setDefault(@PathVariable(value = "id") Integer id) {
+        if (addressManagerService.setDefault(id)) {
+            return CommonResult.success().setMessage("设置商户默认地址成功");
+        }
+        return CommonResult.failed().setMessage("设置商户默认地址失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:address:update:show')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "设置商户地址开启状态")
+    @ApiOperation(value = "设置商户地址开启状态")
+    @RequestMapping(value = "/update/show/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> updateShow(@PathVariable(value = "id") Integer id) {
+        if (addressManagerService.updateShow(id)) {
+            return CommonResult.success().setMessage("设置商户地址开启状态成功");
+        }
+        return CommonResult.failed().setMessage("设置商户地址开启状态失败");
+    }
+}
+
+
+

+ 127 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantAdminController.java

@@ -0,0 +1,127 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.admin.SystemAdmin;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.*;
+import com.zbkj.common.response.SystemAdminResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.SystemAdminService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+
+/**
+ * 后台管理员表 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/admin")
+@Api(tags = "商户端管理员服务")
+public class MerchantAdminController {
+
+    @Autowired
+    private SystemAdminService systemAdminService;
+
+    @PreAuthorize("hasAuthority('merchant:admin:list')")
+    @ApiOperation(value = "管理员分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<CommonPage<SystemAdminResponse>> getList(@Validated SystemAdminRequest systemAdminRequest, PageParamRequest pageParamRequest) {
+        CommonPage<SystemAdminResponse> systemAdminCommonPage = CommonPage.restPage(systemAdminService.getList(systemAdminRequest, pageParamRequest));
+        return CommonResult.success(systemAdminCommonPage);
+    }
+
+    @PreAuthorize("hasAuthority('merchant:admin:save')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增后台管理员")
+    @ApiOperation(value = "新增后台管理员")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody SystemAdminAddRequest systemAdminAddRequest) {
+        if (systemAdminService.saveAdmin(systemAdminAddRequest)) {
+            return CommonResult.success("添加管理员成功");
+        }
+        return CommonResult.failed("添加管理员失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:admin:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除管理员")
+    @ApiOperation(value = "删除管理员")
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public CommonResult<String> delete(@RequestParam(value = "id") Integer id) {
+        if (systemAdminService.removeAdmin(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:admin:update')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改管理员")
+    @ApiOperation(value = "修改管理员")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody SystemAdminUpdateRequest systemAdminRequest) {
+        if (systemAdminService.updateAdmin(systemAdminRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:admin:info')")
+    @ApiOperation(value = "后台管理员详情")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<SystemAdmin> info(@RequestParam(value = "id") @Valid Integer id) {
+        return CommonResult.success(systemAdminService.getDetail(id));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:admin:update:status')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改后台管理员状态")
+    @ApiOperation(value = "修改后台管理员状态")
+    @RequestMapping(value = "/updateStatus", method = RequestMethod.GET)
+    public CommonResult<String> updateStatus(@RequestParam(value = "id") @Valid Integer id, @RequestParam(value = "status") @Valid Boolean status) {
+        if (systemAdminService.updateStatus(id, status)) {
+            return CommonResult.success("修改成功");
+        }
+        return CommonResult.failed("修改失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改后台管理员密码")
+    @PreAuthorize("hasAuthority('merchant:admin:update:password')")
+    @ApiOperation(value = "修改后台管理员密码")
+    @RequestMapping(value = "/update/password", method = RequestMethod.POST)
+    public CommonResult<Object> updatePassword(@RequestBody @Validated SystemAdminUpdatePwdRequest request) {
+        if (systemAdminService.updatePassword(request)) {
+            return CommonResult.success("修改成功");
+        }
+        return CommonResult.failed("修改失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商户后台管理员短信开关")
+    @PreAuthorize("hasAuthority('merchant:admin:update:receive:sms')")
+    @ApiOperation(value = "商户后台管理员短信开关")
+    @RequestMapping(value = "/update/receive/sms/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> updateReceiveSms(@PathVariable(name = "id") Integer id) {
+        if (systemAdminService.updateReceiveSms(id)) {
+            return CommonResult.success("修改成功");
+        }
+        return CommonResult.failed("修改失败");
+    }
+}
+
+
+

+ 83 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantAttachmentController.java

@@ -0,0 +1,83 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.system.SystemAttachment;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.SystemAttachmentMoveRequest;
+import com.zbkj.common.request.SystemAttachmentRemoveRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.utils.CrmebUtil;
+import com.zbkj.service.service.SystemAttachmentService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 附件管理表 前端控制器 - 商户端
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ *
+ * @author CRMEB Java
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/attachment")
+@Api(tags = "商户端附件管理") //配合swagger使用
+public class MerchantAttachmentController {
+
+    @Autowired
+    private SystemAttachmentService systemAttachmentService;
+
+    @PreAuthorize("hasAuthority('merchant:attachment:list')")
+    @ApiOperation(value = "附件分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<SystemAttachment>> getList(@RequestParam(value = "pid", required = false) Integer pid,
+                                                              @RequestParam(value = "attType",
+                                                                      defaultValue = "png,jpeg,jpg,audio/mpeg,text/plain,video/mp4,gif",
+                                                                      required = false) String attType,
+                                                              @Validated PageParamRequest pageParamRequest) {
+        // 资源归属方:-1=平台(查看全部),商户或者用户id(仅查看自己上传的素材)
+        CommonPage<SystemAttachment> systemAttachmentCommonPage =
+                CommonPage.restPage(systemAttachmentService.getList(pid, attType, pageParamRequest));
+        return CommonResult.success(systemAttachmentCommonPage);
+    }
+
+
+    @PreAuthorize("hasAuthority('merchant:attachment:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除附件")
+    @ApiOperation(value = "删除附件")
+    @RequestMapping(value = "/delete", method = RequestMethod.POST)
+    public CommonResult<String> delete(@RequestBody @Validated SystemAttachmentRemoveRequest removeRequest) {
+        if (systemAttachmentService.deleteByIds(CrmebUtil.stringToArray(removeRequest.getIds()))) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+
+    @PreAuthorize("hasAuthority('merchant:attachment:move')")
+    @ApiOperation(value = "更改图片目录")
+    @RequestMapping(value = "/move", method = RequestMethod.POST)
+    public CommonResult<String> updateAttrId(@RequestBody @Validated SystemAttachmentMoveRequest move) {
+        if (systemAttachmentService.updateAttrId(move)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+}
+
+
+

+ 133 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantBaseCategoryController.java

@@ -0,0 +1,133 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.category.Category;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.CategoryRequest;
+import com.zbkj.common.request.CategorySearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.utils.CrmebUtil;
+import com.zbkj.common.vo.CategoryTreeVo;
+import com.zbkj.service.service.CategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 分类表 前端控制器 暂时用于素材,设置,文章
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/category")
+@Api(tags = "商户端分类服务")
+public class MerchantBaseCategoryController {
+
+    @Autowired
+    private CategoryService categoryService;
+
+    @PreAuthorize("hasAuthority('merchant:category:list')")
+    @ApiOperation(value = "基础分类分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<Category>> getList(@ModelAttribute CategorySearchRequest request, @ModelAttribute PageParamRequest pageParamRequest) {
+        CommonPage<Category> categoryCommonPage = CommonPage.restPage(categoryService.getList(request, pageParamRequest));
+        return CommonResult.success(categoryCommonPage);
+    }
+
+    @PreAuthorize("hasAuthority('merchant:category:save')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增基础分类")
+    @ApiOperation(value = "新增基础分类")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated CategoryRequest categoryRequest) {
+        if (categoryService.create(categoryRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:category:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除基础分类")
+    @ApiOperation(value = "删除基础分类")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (categoryService.delete(id) > 0) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:category:update')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改基础分类")
+    @ApiOperation(value = "修改基础分类")
+    @RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
+    public CommonResult<String> update(@PathVariable(value = "id") Integer id, @ModelAttribute CategoryRequest categoryRequest) {
+        if (categoryService.update(categoryRequest, id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:category:info')")
+    @ApiOperation(value = "基础分类详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<Category> info(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(categoryService.getBaseCategoryInfo(id));
+    }
+
+
+    @PreAuthorize("hasAuthority('merchant:category:list:tree')")
+    @ApiOperation(value = "获取基础分类tree结构的列表")
+    @RequestMapping(value = "/list/tree", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "类型ID | 类型,1 产品分类,2 附件分类,3 文章分类, 4 设置分类, 5 菜单分类, 6 配置分类, 7 秒杀配置", example = "1"),
+            @ApiImplicitParam(name = "status", value = "-1=全部,0=未生效,1=已生效", example = "1"),
+            @ApiImplicitParam(name = "name", value = "模糊搜索", example = "电视"),
+            @ApiImplicitParam(name = "owner", value = "商户id")
+    })
+    public CommonResult<List<CategoryTreeVo>> getListTree(@RequestParam(name = "type") Integer type,
+                                                          @RequestParam(name = "status") Integer status,
+                                                          @RequestParam(name = "name", required = false) String name) {
+        List<CategoryTreeVo> listTree = categoryService.getListTree(type, status, name);
+        return CommonResult.success(listTree);
+    }
+
+    @PreAuthorize("hasAuthority('merchant:category:list:ids')")
+    @ApiOperation(value = "根据id集合获取基础分类列表")
+    @RequestMapping(value = "/list/ids", method = RequestMethod.GET)
+    @ApiImplicitParam(name = "ids", value = "分类id集合,英文逗号分隔")
+    public CommonResult<List<Category>> getByIds(@Validated @RequestParam(name = "ids") String ids) {
+        return CommonResult.success(categoryService.getByIds(CrmebUtil.stringToArray(ids)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:category:update:status')")
+    @ApiOperation(value = "更改基础分类状态")
+    @RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> getByIds(@PathVariable(name = "id") Integer id) {
+        if (categoryService.updateStatus(id)) {
+            return CommonResult.success("修改成功");
+        }
+        return CommonResult.failed("修改失败");
+    }
+}
+
+
+

+ 55 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantCityRegionController.java

@@ -0,0 +1,55 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.CityVo;
+import com.zbkj.service.service.CityRegionService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 城市表 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/city/region")
+@Api(tags = "商户端城市区域管理")
+public class MerchantCityRegionController {
+
+    @Autowired
+    private CityRegionService cityRegionService;
+
+    @PreAuthorize("hasAuthority('merchant:city:list:tree')")
+    @ApiOperation(value = "获取城市tree结构的列表")
+    @RequestMapping(value = "/city/tree", method = RequestMethod.GET)
+    public CommonResult<List<CityVo>> getCityListTree() {
+        return CommonResult.success(cityRegionService.getCityListTree());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:city:region:list:tree')")
+    @ApiOperation(value = "获取城市区域tree结构的列表")
+    @RequestMapping(value = "/list/tree", method = RequestMethod.GET)
+    public CommonResult<List<CityVo>> getRegionListTree() {
+        return CommonResult.success(cityRegionService.getRegionListTree());
+    }
+}
+
+
+

+ 76 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantConfigController.java

@@ -0,0 +1,76 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.admin.service.PcShoppingService;
+import com.zbkj.common.model.system.SystemConfig;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.MerchantPcShoppingConfigVo;
+import com.zbkj.service.service.SystemConfigService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 配置表 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/config")
+@Api(tags = "商户端设置")
+public class MerchantConfigController {
+
+    @Autowired
+    private SystemConfigService systemConfigService;
+    @Autowired
+    private PcShoppingService pcShoppingService;
+
+//    @PreAuthorize("hasAuthority('merchant:config:getuniq')")
+//    @ApiOperation(value = "表单配置根据key获取")
+//    @RequestMapping(value = "/getuniq", method = RequestMethod.GET)
+//    public CommonResult<Object> justGetUniq(@RequestParam String key) {
+//        return CommonResult.success(systemConfigService.getValueByKey(key));
+//    }
+//
+//    @PreAuthorize("hasAuthority('merchant:config:get')")
+//    @ApiOperation(value = "根据key获取配置")
+//    @RequestMapping(value = "/get", method = RequestMethod.GET)
+//    public CommonResult<List<SystemConfig>> getByKey(@RequestParam String key) {
+//        return CommonResult.success(systemConfigService.getListByKey(key));
+//    }
+
+    @PreAuthorize("hasAuthority('merchant:config:pc:shopping:get')")
+    @ApiOperation(value = "获取商户PC商城设置")
+    @RequestMapping(value = "/get/pc/shopping/config", method = RequestMethod.GET)
+    public CommonResult<MerchantPcShoppingConfigVo> getPcShoppingConfig() {
+        return CommonResult.success(pcShoppingService.getMerchantPcShoppingConfig());
+    }
+
+
+    @PreAuthorize("hasAuthority('merchant:config:pc:shopping:save')")
+    @ApiOperation(value = "编辑商户PC商城设置")
+    @RequestMapping(value = "/save/pc/shopping/config", method = RequestMethod.POST)
+    public CommonResult<Object> updatePcShoppingConfig(@RequestBody @Validated MerchantPcShoppingConfigVo voRequest) {
+        if (pcShoppingService.updateMerchantPcShoppingConfig(voRequest)) {
+            return CommonResult.success().setMessage("编辑成功");
+        }
+        return CommonResult.failed().setMessage("编辑失败");
+    }
+}
+
+
+

+ 43 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantCopyrightController.java

@@ -0,0 +1,43 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.admin.service.CopyrightService;
+import com.zbkj.common.result.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 版权控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/copyright")
+@Api(tags = "商户端版权控制器")
+public class MerchantCopyrightController {
+
+    @Autowired
+    private CopyrightService copyrightService;
+
+    @PreAuthorize("hasAuthority('merchant:copyright:get:company:info')")
+    @ApiOperation(value = "获取商户版权信息")
+    @RequestMapping(value = "/get/company/info", method = RequestMethod.GET)
+    public CommonResult<Object> getCompanyInfo() {
+        return CommonResult.success(copyrightService.getCompanyInfo());
+    }
+
+}

+ 114 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantCouponController.java

@@ -0,0 +1,114 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.coupon.Coupon;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.CouponProductJoinRequest;
+import com.zbkj.common.request.CouponRequest;
+import com.zbkj.common.request.CouponSearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.response.CouponInfoResponse;
+import com.zbkj.common.response.ProductCouponUseResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.CouponService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 优惠券表 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/coupon")
+@Api(tags = "商户端优惠券管理器")
+public class MerchantCouponController {
+
+    @Autowired
+    private CouponService couponService;
+
+    @PreAuthorize("hasAuthority('merchant:coupon:page:list')")
+    @ApiOperation(value = "优惠券分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<Coupon>> getList(@Validated CouponSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(couponService.getMerchantPageList(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:coupon:save')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增优惠券")
+    @ApiOperation(value = "新增优惠券")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated CouponRequest request) {
+        if (couponService.create(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:coupon:update:status')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改优惠券状态")
+    @ApiOperation(value = "修改优惠券状态")
+    @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
+    public CommonResult<String> updateStatus(@PathVariable Integer id) {
+        if (couponService.updateStatus(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:coupon:info')")
+    @ApiOperation(value = "优惠券详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<CouponInfoResponse> info(@PathVariable Integer id) {
+        return CommonResult.success(couponService.info(id));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:coupon:product:usable:list')")
+    @ApiOperation(value = "商品可用优惠券列表")
+    @RequestMapping(value = "/product/usable/list", method = RequestMethod.GET)
+    public CommonResult<List<ProductCouponUseResponse>> getProductUsableList() {
+        return CommonResult.success(couponService.getProductUsableList());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:coupon:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除优惠券")
+    @ApiOperation(value = "删除优惠券")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable Integer id) {
+        if (couponService.delete(id)) {
+            return CommonResult.success("删除成功");
+        }
+        return CommonResult.failed("删除失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:coupon:product:join:edit')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商品券关联商品编辑")
+    @ApiOperation(value = "商品券关联商品编辑")
+    @RequestMapping(value = "/product/join/edit", method = RequestMethod.POST)
+    public CommonResult<String> couponProductJoinEdit(@RequestBody @Validated CouponProductJoinRequest request) {
+        if (couponService.couponProductJoinEdit(request)) {
+            return CommonResult.success("编辑成功");
+        }
+        return CommonResult.failed("编辑失败");
+    }
+}
+
+
+

+ 52 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantCouponUserController.java

@@ -0,0 +1,52 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.CouponUserSearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.response.CouponUserResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.CouponUserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 优惠券发放记录表 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/coupon/user")
+@Api(tags = "商户端用户优惠券控制器")
+public class MerchantCouponUserController {
+
+    @Autowired
+    private CouponUserService couponUserService;
+
+    @PreAuthorize("hasAuthority('merchant:coupon:user:page:list')")
+    @ApiOperation(value = "优惠券领取记录分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<CouponUserResponse>> getList(@Validated CouponUserSearchRequest request,
+                                                                @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(couponUserService.getPageList(request, pageParamRequest)));
+    }
+
+}
+
+
+

+ 69 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantDeliveryPersonnelController.java

@@ -0,0 +1,69 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.MerchantDeliveryPersonnelSaveRequest;
+import com.zbkj.common.request.MerchantDeliveryPersonnelSearchRequest;
+import com.zbkj.common.response.MerchantDeliveryPersonnelPageResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.MerchantDeliveryPersonnelService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 商户配送人员表 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/delivery/personnel")
+@Api(tags = "商户配送人员控制器") //配合swagger使用
+public class MerchantDeliveryPersonnelController {
+
+    @Autowired
+    private MerchantDeliveryPersonnelService merchantDeliveryPersonnelService;
+
+    @PreAuthorize("hasAuthority('merchant:delivery:personnel:page')")
+    @ApiOperation(value = "商户配送人员分页列表") //配合swagger使用
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantDeliveryPersonnelPageResponse>> findPage(@Validated MerchantDeliveryPersonnelSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(merchantDeliveryPersonnelService.findPage(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:delivery:personnel:save')")
+    @ApiOperation(value = "新增商户配送人员")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated MerchantDeliveryPersonnelSaveRequest request) {
+        if (merchantDeliveryPersonnelService.add(request)) {
+            return CommonResult.success("新增成功");
+        }
+        return CommonResult.failed("新增失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:delivery:personnel:delete')")
+    @ApiOperation(value = "删除商户配送人员")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (merchantDeliveryPersonnelService.delete(id)) {
+            return CommonResult.success("删除成功");
+        }
+        return CommonResult.failed("删除失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:delivery:personnel:edit')")
+    @ApiOperation(value = "编辑商户配送人员")
+    @RequestMapping(value = "/edit", method = RequestMethod.POST)
+    public CommonResult<String> edit(@RequestBody @Validated MerchantDeliveryPersonnelSaveRequest request) {
+        if (merchantDeliveryPersonnelService.edit(request)) {
+            return CommonResult.success("编辑成功");
+        }
+        return CommonResult.failed("编辑失败");
+    }
+}
+
+
+

+ 72 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantElectController.java

@@ -0,0 +1,72 @@
+package com.zbkj.admin.controller.merchant;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.zbkj.common.exception.CrmebException;
+import com.zbkj.common.model.admin.SystemAdmin;
+import com.zbkj.common.model.merchant.MerchantElect;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.merchant.MerchantElectRequest;
+import com.zbkj.common.request.merchant.MerchantElectSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.utils.SecurityUtil;
+import com.zbkj.service.service.MerchantElectService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 商户电子面单配置表 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/elect")
+@Api(tags = "商户端 - 电子面单主信息配置") //配合swagger使用
+
+public class MerchantElectController {
+
+    @Autowired
+    private MerchantElectService merchantElectService;
+
+    /**
+     * 修改商户电子面单配置表
+     * @param merchantElectRequest 修改参数
+     * @author dazongzi
+     * @since 2025-02-20
+     */
+    @ApiOperation(value = "修改")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated MerchantElectRequest merchantElectRequest) {
+        MerchantElect merchantElect = new MerchantElect();
+        BeanUtils.copyProperties(merchantElectRequest, merchantElect);
+        if(merchantElect.getOp().equals(1) && ObjectUtil.isEmpty(merchantElect.getCloudPrintNo())){
+            throw new CrmebException("云打印机编号不能为空");
+        }
+        if(merchantElectService.updateMerchantElect(merchantElect)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 查询商户电子面单配置表信息
+     * @author dazongzi
+     * @since 2025-02-20
+     */
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<MerchantElect> info() {
+        SystemAdmin admin = SecurityUtil.getLoginUserVo().getUser();
+        MerchantElect merchantElect = merchantElectService.getMerchantElect(admin);
+        return CommonResult.success(merchantElect);
+    }
+}
+
+
+

+ 111 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantEmployeeController.java

@@ -0,0 +1,111 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.merchant.MerchantEmployee;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.merchant.manage.MerchantEmployeeRequest;
+import com.zbkj.common.request.merchant.manage.MerchantEmployeeSearchRequest;
+
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.MerchantEmployeeService;
+import com.zbkj.service.service.SystemAttachmentService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.BeanUtils;
+import org.springframework.web.bind.annotation.*;
+
+
+
+/**
+ *  前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/employee")
+@Api(tags = "商家端 - 移动端管理员管理") //配合swagger使用
+
+public class MerchantEmployeeController {
+
+    @Autowired
+    private MerchantEmployeeService merchantEmployeeService;
+
+
+    /**
+     * 分页显示
+     * @param request 搜索条件
+     * @author dazongzi
+     * @since 2024-05-24
+     */
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantEmployee>>  getList(@Validated MerchantEmployeeSearchRequest request) {
+        CommonPage<MerchantEmployee> merchantEmployeeCommonPage = CommonPage.restPage(merchantEmployeeService.getList(request));
+        return CommonResult.success(merchantEmployeeCommonPage);
+    }
+
+    /**
+     * 新增
+     * @param merchantEmployeeRequest 新增参数
+     * @author dazongzi
+     * @since 2024-05-24
+     */
+    @ApiOperation(value = "新增")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated MerchantEmployeeRequest merchantEmployeeRequest) {
+        if(merchantEmployeeService.addMerchantEmployee(merchantEmployeeRequest)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 删除
+     * @param id Integer
+     * @author dazongzi
+     * @since 2024-05-24
+     */
+    @ApiOperation(value = "删除")
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public CommonResult<String> delete(@RequestParam(value = "id") Integer id) {
+        if(merchantEmployeeService.deleteById(id)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 修改
+     * @param merchantEmployeeRequest 修改参数
+     * @author dazongzi
+     * @since 2024-05-24
+     */
+    @ApiOperation(value = "修改")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated MerchantEmployeeRequest merchantEmployeeRequest) {
+        if(merchantEmployeeService.editMerchantEmployee(merchantEmployeeRequest)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 查询信息
+     * @param id Integer
+     * @author dazongzi
+     * @since 2024-05-24
+     */
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<MerchantEmployee> info(@RequestParam(value = "id") Integer id) {
+        MerchantEmployee merchantEmployee = merchantEmployeeService.getById(id);
+        return CommonResult.success(merchantEmployee);
+    }
+}
+
+
+

+ 54 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantExportController.java

@@ -0,0 +1,54 @@
+package com.zbkj.admin.controller.merchant;
+
+import cn.hutool.core.collection.CollUtil;
+import com.zbkj.common.request.OrderSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ExportService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.HashMap;
+
+
+/**
+ *  商户端导出控制器
+ *  +----------------------------------------------------------------------
+ *  | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ *  +----------------------------------------------------------------------
+ *  | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+ *  +----------------------------------------------------------------------
+ *  | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ *  +----------------------------------------------------------------------
+ *  | Author: CRMEB Team <admin@crmeb.com>
+ *  +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/export")
+@Api(tags = "商户端导出控制器")
+public class MerchantExportController {
+
+    @Autowired
+    private ExportService exportService;
+
+    @PreAuthorize("hasAuthority('merchant:export:order:excel')")
+    @ApiOperation(value = "导出订单Excel")
+    @RequestMapping(value = "/order/excel", method = RequestMethod.GET)
+    public CommonResult<HashMap<String, String>> exportOrder(@Validated OrderSearchRequest request){
+        String fileName = exportService.exportOrder(request);
+        HashMap<String, String> map = CollUtil.newHashMap();
+        map.put("fileName", fileName);
+        return CommonResult.success(map);
+    }
+
+}
+
+
+

+ 135 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantExpressController.java

@@ -0,0 +1,135 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageInfo;
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.express.Express;
+import com.zbkj.common.model.express.MerchantExpress;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.ExpressUpdateRequest;
+import com.zbkj.common.request.MerchantExpressSearchRequest;
+import com.zbkj.common.request.MerchantRelateExpressRequest;
+import com.zbkj.common.request.merchant.MerchantExpressRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ExpressService;
+import com.zbkj.service.service.MerchantExpressService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 商户端物流公司控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/express")
+@Api(tags = "商户端物流公司控制器")
+public class MerchantExpressController {
+
+    @Autowired
+    private ExpressService expressService;
+    @Autowired
+    private MerchantExpressService merchantExpressService;
+
+    @PreAuthorize("hasAuthority('merchant:express:all')")
+    @ApiOperation(value = "查询全部物流公司")
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ApiImplicitParam(name = "type", value = "类型:normal-普通,elec-电子面单", required = true)
+    public CommonResult<List<Express>> all(@RequestParam(value = "type") String type) {
+        return CommonResult.success(expressService.findAll(type));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:express:template')")
+    @ApiOperation(value = "查询物流公司面单模板")
+    @RequestMapping(value = "/template", method = RequestMethod.GET)
+    @ApiImplicitParam(name = "com", value = "快递公司编号", required = true)
+    public CommonResult<JSONObject> template(@RequestParam(value = "com") String com) {
+        return CommonResult.success(expressService.template(com));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:express:relate')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "商户关联物流公司")
+    @ApiOperation(value = "商户关联物流公司")
+    @RequestMapping(value = "/relate", method = RequestMethod.POST)
+    public CommonResult<String> relate(@RequestBody @Validated MerchantRelateExpressRequest request) {
+        if (merchantExpressService.relate(request.getExpressId())) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:express:update')")
+    @ApiOperation(value = "配置物流月结账号 - 电子面单")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated MerchantExpressRequest expressRequest) {
+        MerchantExpress merchantExpress = new MerchantExpress();
+        BeanUtils.copyProperties(expressRequest, merchantExpress);
+        if (merchantExpressService.updateMerchantExpress(merchantExpress)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:express:search:page')")
+    @ApiOperation(value = "商户物流公司分页列表")
+    @RequestMapping(value = "/search/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantExpress>> searchPage(@Validated MerchantExpressSearchRequest request) {
+        PageInfo<MerchantExpress> pageInfo = merchantExpressService.searchPage(request);
+        return CommonResult.success(CommonPage.restPage(pageInfo));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:express:open:switch')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "商户物流公司开关")
+    @ApiOperation(value = "商户物流公司开关")
+    @RequestMapping(value = "/open/switch/{id}", method = RequestMethod.POST)
+    public CommonResult<String> openSwitch(@PathVariable(name = "id") Integer id) {
+        if (merchantExpressService.openSwitch(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:express:default:switch')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "商户物流公司默认开关")
+    @ApiOperation(value = "商户物流公司默认开关")
+    @RequestMapping(value = "/default/switch/{id}", method = RequestMethod.POST)
+    public CommonResult<String> defaultSwitch(@PathVariable(name = "id") Integer id) {
+        if (merchantExpressService.defaultSwitch(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:express:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "商户物流公司删除")
+    @ApiOperation(value = "商户物流公司删除")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(name = "id") Integer id) {
+        if (merchantExpressService.delete(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+}
+
+
+

+ 99 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantFinanceController.java

@@ -0,0 +1,99 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.admin.service.FinanceService;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.FundsFlowRequest;
+import com.zbkj.common.request.merchant.MerchantClosingApplyRequest;
+import com.zbkj.common.request.merchant.MerchantClosingSearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.response.*;
+import com.zbkj.common.result.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 商户端财务控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/finance")
+@Api(tags = "商户端财务控制器")
+public class MerchantFinanceController {
+
+    @Autowired
+    private FinanceService financeService;
+
+    @PreAuthorize("hasAuthority('merchant:finance:funds:flow')")
+    @ApiOperation(value = "资金流水分页列表")
+    @RequestMapping(value = "/funds/flow", method = RequestMethod.GET)
+    public CommonResult<CommonPage<FundsFlowResponse>> getFundsFlow(@Validated FundsFlowRequest request,
+                                                                      @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.getMerchantFundsFlow(request, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:finance:closing:base:info')")
+    @ApiOperation(value = "获取结算申请基础信息")
+    @RequestMapping(value = "/closing/base/info", method = RequestMethod.GET)
+    public CommonResult<MerchantClosingBaseInfoResponse> getClosingBaseInfo() {
+        return CommonResult.success(financeService.getClosingBaseInfo());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:finance:closing:apply')")
+    @ApiOperation(value = "结算申请")
+    @RequestMapping(value = "/closing/apply", method = RequestMethod.POST)
+    public CommonResult<String> closingApply(@RequestBody @Validated MerchantClosingApplyRequest request) {
+        if (financeService.merchantClosingApply(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:finance:closing:page:list')")
+    @ApiOperation(value = "结算记录分页列表")
+    @RequestMapping(value = "/closing/record/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantClosingPageResponse>> getMerchantClosingPageList(@Validated MerchantClosingSearchRequest request,
+                                                                                            @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.getMerchantClosingRecordPageList(request, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:finance:closing:detail')")
+    @ApiOperation(value = "结算记录详情")
+    @RequestMapping(value = "/closing/record/detail/{closingNo}", method = RequestMethod.GET)
+    public CommonResult<MerchantClosingDetailResponse> getMerchantClosingDetail(@PathVariable(value = "closingNo") String closingNo) {
+        return CommonResult.success(financeService.getMerchantClosingDetailByMerchant(closingNo));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:finance:daily:statement:page:list')")
+    @ApiOperation(value = "日帐单管理分页列表")
+    @RequestMapping(value = "/daily/statement/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantStatementResponse>> getDailyStatementList(@RequestParam(value = "dateLimit", required = false, defaultValue = "") String dateLimit,
+                                                                                     @ModelAttribute PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.getMerchantDailyStatementList(dateLimit, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:finance:month:statement:page:list')")
+    @ApiOperation(value = "月帐单管理分页列表")
+    @RequestMapping(value = "/month/statement/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantStatementResponse>> getMonthStatementList(@RequestParam(value = "dateLimit", required = false, defaultValue = "") String dateLimit,
+                                                                                     @ModelAttribute PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.getMerchantMonthStatementList(dateLimit, pageParamRequest)));
+    }
+}
+
+
+

+ 65 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantFormTempController.java

@@ -0,0 +1,65 @@
+package com.zbkj.admin.controller.merchant;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.zbkj.common.exception.CrmebException;
+import com.zbkj.common.model.system.SystemFormTemp;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.result.SystemConfigResultCode;
+import com.zbkj.service.service.SystemFormTempService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.constraints.NotBlank;
+
+
+/**
+ * 表单模板 前端控制器 商户端
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/form/temp")
+@Api(tags = "商户端设置表单模板")
+public class MerchantFormTempController {
+
+    @Autowired
+    private SystemFormTempService systemFormTempService;
+
+    @PreAuthorize("hasAuthority('merchant:config:form:info')")
+    @ApiOperation(value = "表单组件详情")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<SystemFormTemp> info(@RequestParam(value = "id") Integer id) {
+        return CommonResult.success(systemFormTempService.getByIdException(id));
+   }
+
+    @PreAuthorize("hasAuthority('merchant:system:form:name:info')")
+    @ApiOperation(value = "通过名称查询详情")
+    @RequestMapping(value = "/name/info", method = RequestMethod.GET)
+    @ApiImplicitParam(name="name", value="表单模板Name", required = true)
+    public SystemFormTemp nameInfo(@NotBlank(message = "name不能为空") @RequestParam(value = "name") String name) {
+        SystemFormTemp temp = systemFormTempService.getOneByName(name);
+        if (ObjectUtil.isNull(temp)) {
+            throw new CrmebException(SystemConfigResultCode.FORM_TEMP_NOT_EXIST);
+        }
+        return temp;
+    }
+}
+
+
+

+ 72 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantHomeController.java

@@ -0,0 +1,72 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.admin.service.AdminHomeService;
+import com.zbkj.service.service.HomeService;
+import com.zbkj.common.response.HomeOperatingMerDataResponse;
+import com.zbkj.common.response.HomeRateResponse;
+import com.zbkj.common.response.ProductRankingResponse;
+import com.zbkj.common.result.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 商户端主页控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/statistics/home")
+@Api(tags = "商户端主页控制器")
+public class MerchantHomeController {
+
+    @Autowired
+    private AdminHomeService adminHomeService;
+
+    @PreAuthorize("hasAuthority('merchant:statistics:home:index')")
+    @ApiOperation(value = "首页数据")
+    @RequestMapping(value = "/index", method = RequestMethod.GET)
+    public CommonResult<HomeRateResponse> indexDate() {
+        return CommonResult.success(adminHomeService.indexMerchantDate());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:statistics:home:operating:data')")
+    @ApiOperation(value = "经营数据")
+    @RequestMapping(value = "/operating/data", method = RequestMethod.GET)
+    public CommonResult<HomeOperatingMerDataResponse> operatingData() {
+        return CommonResult.success(adminHomeService.operatingMerchantData());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:statistics:home:product:pay:ranking')")
+    @ApiOperation(value = "商品支付排行榜")
+    @RequestMapping(value = "/product/pay/ranking", method = RequestMethod.GET)
+    public CommonResult<List<ProductRankingResponse>> productPayRanking() {
+        return CommonResult.success(adminHomeService.merchantProductPayRanking());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:statistics:home:product:pageview:ranking')")
+    @ApiOperation(value = "商品浏览量排行榜")
+    @RequestMapping(value = "/product/pageview/ranking", method = RequestMethod.GET)
+    public CommonResult<List<ProductRankingResponse>> productPageviewRanking() {
+        return CommonResult.success(adminHomeService.merchantProductPageviewRanking());
+    }
+}
+
+
+

+ 108 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantInfoController.java

@@ -0,0 +1,108 @@
+package com.zbkj.admin.controller.merchant;
+
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.response.MerchantBaseInfoResponse;
+import com.zbkj.common.response.ProductAuditSwitchInfoResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.MerchantConfigInfoVo;
+import com.zbkj.common.vo.MerchantSettlementInfoVo;
+import com.zbkj.service.service.MerchantService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 商户端商户信息控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant")
+@Api(tags = "商户端商户信息控制器")
+@Validated
+public class MerchantInfoController {
+
+    @Autowired
+    private MerchantService merchantService;
+
+    @PreAuthorize("hasAuthority('merchant:base:info')")
+    @ApiOperation(value = "商户端商户基础信息")
+    @RequestMapping(value = "/base/info", method = RequestMethod.GET)
+    public CommonResult<MerchantBaseInfoResponse> getBaseInfo() {
+        return CommonResult.success(merchantService.getBaseInfo());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:config:info')")
+    @ApiOperation(value = "商户端商户配置信息")
+    @RequestMapping(value = "/config/info", method = RequestMethod.GET)
+    public CommonResult<MerchantConfigInfoVo> getConfigInfo() {
+        return CommonResult.success(merchantService.getConfigInfo());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:settlement:info')")
+    @ApiOperation(value = "商户端商户结算信息")
+    @RequestMapping(value = "/settlement/info", method = RequestMethod.GET)
+    public CommonResult<MerchantSettlementInfoVo> getSettlementInfo() {
+        return CommonResult.success(merchantService.getSettlementInfo());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:config:info:edit')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商户端商户配置信息编辑")
+    @ApiOperation(value = "商户端商户配置信息编辑")
+    @RequestMapping(value = "/config/info/edit", method = RequestMethod.POST)
+    public CommonResult<String> configInfoEdit(@RequestBody @Validated MerchantConfigInfoVo request) {
+        if (merchantService.configInfoEdit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:settlement:info:edit')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商户端商户结算信息编辑")
+    @ApiOperation(value = "商户端商户结算信息编辑")
+    @RequestMapping(value = "/settlement/info/edit", method = RequestMethod.POST)
+    public CommonResult<String> settlementInfoEdit(@RequestBody @Validated MerchantSettlementInfoVo request) {
+        if (merchantService.settlementInfoEdit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:switch:update')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商户端商户开关")
+    @ApiOperation(value = "商户端商户开关")
+    @RequestMapping(value = "/switch/update", method = RequestMethod.POST)
+    public CommonResult<String> updateSwitch() {
+        if (merchantService.updateSwitch()) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:audit:switch:info')")
+    @ApiOperation(value = "获取商户端商户商品审核开关信息")
+    @RequestMapping(value = "/product/audit/switch/info", method = RequestMethod.GET)
+    public CommonResult<ProductAuditSwitchInfoResponse> getProductAuditSwitchInfo() {
+        return CommonResult.success(merchantService.getProductAuditSwitchInfo());
+    }
+}
+
+
+

+ 46 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantLogController.java

@@ -0,0 +1,46 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.record.SensitiveMethodLog;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.SensitiveMethodLogService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 商户端敏感日志控制器
+ *  +----------------------------------------------------------------------
+ *  | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ *  +----------------------------------------------------------------------
+ *  | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ *  +----------------------------------------------------------------------
+ *  | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ *  +----------------------------------------------------------------------
+ *  | Author: CRMEB Team <admin@crmeb.com>
+ *  +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/log")
+@Api(tags = "商户端敏感日志控制器")
+public class MerchantLogController {
+
+    @Autowired
+    private SensitiveMethodLogService sensitiveMethodLogService;
+
+    @PreAuthorize("hasAuthority('merchant:log:sensitive:list')")
+    @ApiOperation(value = "敏感操作日志分页列表")
+    @RequestMapping(value = "/sensitive/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<SensitiveMethodLog>> getList(@Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(sensitiveMethodLogService.getMerchantPageList(pageParamRequest)));
+    }
+
+}

+ 111 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantLoginController.java

@@ -0,0 +1,111 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.admin.service.AdminLoginService;
+import com.zbkj.common.enums.RoleEnum;
+import com.zbkj.common.request.AdminAccountDetectionRequest;
+import com.zbkj.common.request.AjAdminLoginRequest;
+import com.zbkj.common.request.LoginAdminUpdatePasswordRequest;
+import com.zbkj.common.request.LoginAdminUpdateRequest;
+import com.zbkj.common.response.AdminLoginPicResponse;
+import com.zbkj.common.response.LoginAdminResponse;
+import com.zbkj.common.response.MenusResponse;
+import com.zbkj.common.response.SystemLoginResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.utils.CrmebUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * 商户端登录控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant")
+@Api(tags = "商户端登录控制器")
+public class MerchantLoginController {
+
+    @Autowired
+    private AdminLoginService loginService;
+
+    @ApiOperation(value="账号登录检测")
+    @RequestMapping(value = "/login/account/detection", method = RequestMethod.POST)
+    public CommonResult<Integer> accountDetection(@RequestBody @Validated AdminAccountDetectionRequest request) {
+        return CommonResult.success(loginService.accountDetection(request.getAccount(), RoleEnum.MERCHANT_ADMIN.getValue()));
+    }
+
+    @ApiOperation(value="登录")
+    @RequestMapping(value = "/login", method = RequestMethod.POST)
+    public CommonResult<SystemLoginResponse> SystemAdminLogin(@RequestBody @Validated AjAdminLoginRequest systemAdminLoginRequest, HttpServletRequest request) {
+        String ip = CrmebUtil.getClientIp(request);
+        SystemLoginResponse systemAdminResponse = loginService.merchantLogin(systemAdminLoginRequest, ip);
+        return CommonResult.success(systemAdminResponse);
+    }
+
+    @PreAuthorize("hasAuthority('merchant:logout')")
+    @ApiOperation(value="登出")
+    @RequestMapping(value = "/logout", method = RequestMethod.GET)
+    public CommonResult<String> SystemAdminLogout() {
+        loginService.logout();
+        return CommonResult.success("logout success");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:login:user:info')")
+    @ApiOperation(value="获取登录用户详情")
+    @RequestMapping(value = "/getAdminInfoByToken", method = RequestMethod.GET)
+    public CommonResult<LoginAdminResponse> getAdminInfo() {
+        return CommonResult.success(loginService.getInfoByToken());
+    }
+
+    @ApiOperation(value = "获取登录页图片")
+    @RequestMapping(value = "/getLoginPic", method = RequestMethod.GET)
+    public CommonResult<AdminLoginPicResponse> getLoginPic() {
+        return CommonResult.success(loginService.getMerchantLoginPic());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:login:menus')")
+    @ApiOperation(value = "获取管理员可访问目录")
+    @RequestMapping(value = "/getMenus", method = RequestMethod.GET)
+    public CommonResult<List<MenusResponse>> getMenus() {
+        return CommonResult.success(loginService.getMenus());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:login:admin:update')")
+    @ApiOperation(value="修改登录用户信息")
+    @RequestMapping(value = "/login/admin/update", method = RequestMethod.POST)
+    public CommonResult<SystemLoginResponse> loginAdminUpdate(@RequestBody @Validated LoginAdminUpdateRequest request) {
+        if (loginService.loginAdminUpdate(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:login:admin:update:password')")
+    @ApiOperation(value="修改登录用户密码")
+    @RequestMapping(value = "/login/admin/update/password", method = RequestMethod.POST)
+    public CommonResult<SystemLoginResponse> loginAdminUpdatePwd(@RequestBody @Validated LoginAdminUpdatePasswordRequest request) {
+        if (loginService.loginAdminUpdatePwd(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+}

+ 51 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantMenuController.java

@@ -0,0 +1,51 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.MenuCheckVo;
+import com.zbkj.service.service.SystemMenuService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 商户端菜单控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/menu")
+@Api(tags = "商户端菜单控制器")
+public class MerchantMenuController {
+
+    @Autowired
+    private SystemMenuService systemMenuService;
+
+    /**
+     * 菜单缓存树
+     */
+    @PreAuthorize("hasAuthority('merchant:menu:cache:tree')")
+    @ApiOperation(value = "菜单缓存树")
+    @RequestMapping(value = "/cache/tree", method = RequestMethod.GET)
+    public CommonResult<List<MenuCheckVo>> getMerchantMenuCacheTree() {
+        return CommonResult.success(systemMenuService.getMenuCacheList());
+    }
+}
+
+
+

+ 163 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantOrderController.java

@@ -0,0 +1,163 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.admin.service.MerchantOrderManagerService;
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.order.OrderDetail;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.*;
+import com.zbkj.common.response.MerchantOrderPageResponse;
+import com.zbkj.common.response.OrderAdminDetailResponse;
+import com.zbkj.common.response.OrderCountItemResponse;
+import com.zbkj.common.response.OrderInvoiceResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.LogisticsResultVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商户侧订单控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/order")
+@Api(tags = "商户侧订单控制器") //配合swagger使用
+public class MerchantOrderController {
+
+    @Autowired
+    private MerchantOrderManagerService merchantOrderManagerService;
+
+    @PreAuthorize("hasAuthority('merchant:order:page:list')")
+    @ApiOperation(value = "商户端订单分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantOrderPageResponse>> getList(@Validated OrderSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(merchantOrderManagerService.getMerchantAdminPage(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:order:status:num')")
+    @ApiOperation(value = "获取订单各状态数量")
+    @RequestMapping(value = "/status/num", method = RequestMethod.GET)
+    public CommonResult<OrderCountItemResponse> getOrderStatusNum(@Validated OrderTabsHeaderRequest request) {
+        return CommonResult.success(merchantOrderManagerService.getMerchantOrderStatusNum(request));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "商户删除订单")
+    @PreAuthorize("hasAuthority('merchant:order:delete')")
+    @ApiOperation(value = "订单删除")
+    @RequestMapping(value = "/delete/{orderNo}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(name = "orderNo") String orderNo) {
+        if (merchantOrderManagerService.merchantDeleteByOrderNo(orderNo)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商户备注订单")
+    @PreAuthorize("hasAuthority('merchant:order:mark')")
+    @ApiOperation(value = "商户备注订单")
+    @RequestMapping(value = "/mark", method = RequestMethod.POST)
+    public CommonResult<String> mark(@RequestBody @Validated OrderRemarkRequest request) {
+        if (merchantOrderManagerService.merchantMark(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:order:info')")
+    @ApiOperation(value = "订单详情")
+    @RequestMapping(value = "/info/{orderNo}", method = RequestMethod.GET)
+    public CommonResult<OrderAdminDetailResponse> info(@PathVariable(value = "orderNo") String orderNo) {
+        return CommonResult.success(merchantOrderManagerService.adminDetail(orderNo));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:order:detail:list')")
+    @ApiOperation(value = "订单细节详情列表(发货使用)")
+    @RequestMapping(value = "/{orderNo}/detail/list", method = RequestMethod.GET)
+    public CommonResult<List<OrderDetail>> getDetailList(@PathVariable(value = "orderNo") String orderNo) {
+        return CommonResult.success(merchantOrderManagerService.getDetailList(orderNo));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "订单发货")
+    @PreAuthorize("hasAuthority('merchant:order:send')")
+    @ApiOperation(value = "订单发货")
+    @RequestMapping(value = "/send", method = RequestMethod.POST)
+    public CommonResult<Boolean> send(@RequestBody @Validated OrderSendRequest request) {
+        if (merchantOrderManagerService.send(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "小票打印")
+    @PreAuthorize("hasAuthority('merchant:order:print')")
+    @ApiOperation(value = "小票打印")
+    @RequestMapping(value = "/printreceipt/{orderno}", method = RequestMethod.GET)
+    public CommonResult<Boolean> printReceipt(@PathVariable(value = "orderno") String orderno) {
+        merchantOrderManagerService.printReceipt(orderno);
+        return CommonResult.success();
+
+    }
+
+    @PreAuthorize("hasAuthority('merchant:order:invoice:list')")
+    @ApiOperation(value = "获取订单发货单列表")
+    @RequestMapping(value = "/{orderNo}/invoice/list", method = RequestMethod.GET)
+    public CommonResult<List<OrderInvoiceResponse>> getInvoiceList(@PathVariable(value = "orderNo") String orderNo) {
+        return CommonResult.success(merchantOrderManagerService.getInvoiceListByMerchant(orderNo));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:order:logistics:info')")
+    @ApiOperation(value = "订单物流详情")
+    @RequestMapping(value = "/get/{invoiceId}/logistics/info", method = RequestMethod.GET)
+    public CommonResult<LogisticsResultVo> getLogisticsInfo(@PathVariable(value = "invoiceId") Integer invoiceId) {
+        return CommonResult.success(merchantOrderManagerService.getLogisticsInfoByMerchant(invoiceId));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "核销码核销订单")
+    @PreAuthorize("hasAuthority('merchant:order:verification')")
+    @ApiOperation(value = "核销码核销订单")
+    @RequestMapping(value = "/verification", method = RequestMethod.POST)
+    public CommonResult<Object> verificationOrder(@RequestBody @Validated OrderVerificationRequest request) {
+        return CommonResult.success(merchantOrderManagerService.verificationOrderByCode(request.getVerifyCode()));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商户直接退款")
+    @PreAuthorize("hasAuthority('merchant:order:direct:refund')")
+    @ApiOperation(value = "商户直接退款")
+    @RequestMapping(value = "/direct/refund", method = RequestMethod.POST)
+    public CommonResult<Object> directRefund(@RequestBody @Validated MerchantOrderDirectRefundRequest request) {
+        if (merchantOrderManagerService.directRefund(request)) {
+            return CommonResult.success().setMessage("直接退款成功");
+        }
+        return CommonResult.failed().setMessage("直接退款失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改发货单配送信息")
+    @PreAuthorize("hasAuthority('merchant:order:invoice:update')")
+    @ApiOperation(value = "修改发货单配送信息")
+    @RequestMapping(value = "/invoice/update", method = RequestMethod.POST)
+    public CommonResult<Object> updateInvoice(@RequestBody @Validated OrderInvoiceUpdateRequest request) {
+        if (merchantOrderManagerService.updateInvoice(request)) {
+            return CommonResult.success().setMessage("修改发货单配送信息成功");
+        }
+        return CommonResult.failed().setMessage("修改发货单配送信息失败");
+    }
+}
+
+
+

+ 91 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantPageCategoryController.java

@@ -0,0 +1,91 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.page.PageCategory;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.page.PageCategoryRequest;
+import com.zbkj.common.request.page.PageCategorySearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.PageCategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 类的详细说明
+ *
+ * @author Han
+ * @version 1.0.0
+ * @Date 2024/10/28
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/page/category")
+@Api(tags = "商户装修页面链接分类控制器") //配合swagger使用
+public class MerchantPageCategoryController {
+
+    @Autowired
+    private PageCategoryService pageCategoryService;
+
+    @PreAuthorize("hasAuthority('platform:pagecategory:list')")
+    @ApiOperation(value = "页面链接分类分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PageCategory>> getList(@Validated PageCategorySearchRequest request, @Validated PageParamRequest pageParamRequest){
+
+        CommonPage<PageCategory> pageCategoryCommonPage = CommonPage.restPage(pageCategoryService.getList(request, pageParamRequest));
+        return CommonResult.success(pageCategoryCommonPage);
+    }
+
+    @PreAuthorize("hasAuthority('platform:pagecategory:save')")
+    @ApiOperation(value = "新增页面链接分类")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated PageCategoryRequest pageCategoryRequest){
+        PageCategory pageCategory = new PageCategory();
+        BeanUtils.copyProperties(pageCategoryRequest, pageCategory);
+
+        if(pageCategoryService.save(pageCategory)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    @PreAuthorize("hasAuthority('platform:pagecategory:delete')")
+    @ApiOperation(value = "删除页面链接分类")
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public CommonResult<String> delete(@RequestParam(value = "id") Integer id){
+        if(pageCategoryService.removeById(id)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    @PreAuthorize("hasAuthority('platform:pagecategory:update')")
+    @ApiOperation(value = "修改页面链接分类")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated PageCategoryRequest pageCategoryRequest){
+        PageCategory pageCategory = new PageCategory();
+        BeanUtils.copyProperties(pageCategoryRequest, pageCategory);
+
+        if(pageCategoryService.updateById(pageCategory)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    @PreAuthorize("hasAuthority('platform:pagecategory:info')")
+    @ApiOperation(value = "查询页面链接分类信息")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<PageCategory> info(@RequestParam(value = "id") Integer id){
+        PageCategory pageCategory = pageCategoryService.getById(id);
+        return CommonResult.success(pageCategory);
+    }
+
+}

+ 102 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantPageDiyController.java

@@ -0,0 +1,102 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.page.PageDiy;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.CommonSearchRequest;
+import com.zbkj.common.request.page.PageDiyEditNameRequest;
+import com.zbkj.common.request.page.PageDiyRequest;
+import com.zbkj.common.response.page.PageDiyResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.PageDiyService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 商户DIY 控制器
+ *
+ * @author Han
+ * @version 1.0.0
+ * @Date 2024/10/28
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/page/diy")
+@Api(tags = "商户装修控制器") //配合swagger使用
+public class MerchantPageDiyController {
+
+    @Autowired
+    private PageDiyService pageDiyService;
+
+    @PreAuthorize("hasAuthority('merchant:page:diy:page')")
+    @ApiOperation(value = "商户装修模板分页列表") //配合swagger使用
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PageDiy>> findPage(@Validated CommonSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(pageDiyService.findMerchantPage(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:page:diy:set:default')")
+    @ApiOperation(value = "设置商户装修默认首页")
+    @RequestMapping(value = "/set/default/{id}", method = RequestMethod.POST)
+    public CommonResult<String> setDefault(@PathVariable(value = "id") Integer id) {
+        if (pageDiyService.setDiyDefault(id)) {
+            return CommonResult.success("设置成功");
+        }
+        return CommonResult.failed("设置失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:page:diy:get:default:id')")
+    @ApiOperation(value = "获取商户装修默认首页ID")
+    @RequestMapping(value = "/get/default/id", method = RequestMethod.GET)
+    public CommonResult<Integer> getDefaultId() {
+        return CommonResult.success(pageDiyService.getDefaultId());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:page:diy:save')")
+    @ApiOperation(value = "新增商户装修模板")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<PageDiy> save(@RequestBody @Validated PageDiyRequest request) {
+        return CommonResult.success(pageDiyService.saveMerchantPageDiy(request));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:page:diy:delete')")
+    @ApiOperation(value = "删除商户装修模板")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (pageDiyService.deletePageDiy(id)) {
+            return CommonResult.success("删除成功");
+        }
+        return CommonResult.failed("删除失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:page:diy:update')")
+    @ApiOperation(value = "编辑商户装修模板")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated PageDiyRequest request) {
+        if (pageDiyService.editMerchantPageDiy(request)) {
+            return CommonResult.success("编辑成功");
+        }
+        return CommonResult.failed("编辑失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:page:diy:update:name')")
+    @ApiOperation(value = "编辑商户装修模板名称")
+    @RequestMapping(value = "/update/name", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated PageDiyEditNameRequest pageDiyEditNameRequest) {
+        if (pageDiyService.editPageDiyName(pageDiyEditNameRequest)) {
+            return CommonResult.success("编辑成功");
+        }
+        return CommonResult.failed("编辑失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:page:diy:info')")
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<PageDiyResponse> info(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(pageDiyService.getMerchantPageDiyInfo(id));
+    }
+}

+ 89 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantPageLinkController.java

@@ -0,0 +1,89 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.page.PageLink;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.page.PageLinkRequest;
+import com.zbkj.common.request.page.PageLinkSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.PageLinkService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 商户装修页面链接控制器
+ *
+ * @author Han
+ * @version 1.0.0
+ * @Date 2024/10/28
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/page/link")
+@Api(tags = "商户装修页面链接控制器") //配合swagger使用
+public class MerchantPageLinkController {
+
+    @Autowired
+    private PageLinkService pageLinkService;
+
+    @PreAuthorize("hasAuthority('platform:pagelink:list')")
+    @ApiOperation(value = "页面链接分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PageLink>> getList(@Validated PageLinkSearchRequest request, @Validated PageParamRequest pageParamRequest){
+        CommonPage<PageLink> pageLinkCommonPage = CommonPage.restPage(pageLinkService.getList(request, pageParamRequest));
+        return CommonResult.success(pageLinkCommonPage);
+    }
+
+    @PreAuthorize("hasAuthority('platform:pagelink:save')")
+    @ApiOperation(value = "新增页面链接")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated PageLinkRequest pageLinkRequest){
+        PageLink pageLink = new PageLink();
+        BeanUtils.copyProperties(pageLinkRequest, pageLink);
+
+        if(pageLinkService.save(pageLink)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    @PreAuthorize("hasAuthority('platform:pagelink:delete')")
+    @ApiOperation(value = "删除页面链接")
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public CommonResult<String> delete(@RequestParam(value = "id") Integer id){
+        if(pageLinkService.removeById(id)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    @PreAuthorize("hasAuthority('platform:pagelink:update')")
+    @ApiOperation(value = "修改页面链接")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated PageLinkRequest pageLinkRequest){
+        PageLink pageLink = new PageLink();
+        BeanUtils.copyProperties(pageLinkRequest, pageLink);
+
+        if(pageLinkService.updateById(pageLink)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    @PreAuthorize("hasAuthority('platform:pagelink:info')")
+    @ApiOperation(value = "查询页面链接信息")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<PageLink> info(@RequestParam(value = "id") Integer id){
+        PageLink pageLink = pageLinkService.getById(id);
+        return CommonResult.success(pageLink);
+    }
+}

+ 150 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantPrintController.java

@@ -0,0 +1,150 @@
+package com.zbkj.admin.controller.merchant;
+
+
+import com.zbkj.common.model.merchant.MerchantPrint;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.merchant.MerchantPrintRequest;
+import com.zbkj.common.request.merchant.MerchantPrintUpdateStatusRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.PrintContentVo;
+import com.zbkj.service.service.MerchantPrintService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/print")
+@Api(tags = "商户端 - 小票打印") //配合swagger使用
+
+public class MerchantPrintController {
+
+    @Autowired
+    private MerchantPrintService merchantPrintService;
+
+    /**
+     * 分页显示
+     *
+     * @param pageParamRequest 分页参数
+     * @author dazongzi
+     * @since 2023-09-20
+     */
+    @PreAuthorize("hasAuthority('merchant:admin:print:list')")
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantPrint>> getList(@Validated PageParamRequest pageParamRequest) {
+        CommonPage<MerchantPrint> merchantPrintCommonPage = CommonPage.restPage(merchantPrintService.getList(pageParamRequest));
+        return CommonResult.success(merchantPrintCommonPage);
+    }
+
+    /**
+     * 新增
+     *
+     * @param merchantPrintRequest 新增参数
+     * @author dazongzi
+     * @since 2023-09-20
+     */
+    @PreAuthorize("hasAuthority('merchant:admin:print:save')")
+    @ApiOperation(value = "新增")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated MerchantPrintRequest merchantPrintRequest) {
+        MerchantPrint merchantPrint = new MerchantPrint();
+        BeanUtils.copyProperties(merchantPrintRequest, merchantPrint);
+        if (merchantPrintService.savePrintConfig(merchantPrint)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    /**
+     * 删除打印机方法
+     *
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-09-20
+     */
+    @PreAuthorize("hasAuthority('merchant:admin:print:delete')")
+    @ApiOperation(value = "删除")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (merchantPrintService.deleteById(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    /**
+     * 修改
+     *
+     * @param merchantPrintRequest 修改参数
+     * @author dazongzi
+     * @since 2023-09-20
+     */
+    @PreAuthorize("hasAuthority('merchant:admin:print:edit')")
+    @ApiOperation(value = "编辑小票打印机配置")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated MerchantPrintRequest merchantPrintRequest) {
+        MerchantPrint merchantPrint = new MerchantPrint();
+        BeanUtils.copyProperties(merchantPrintRequest, merchantPrint);
+        if (merchantPrintService.updatePrintConfig(merchantPrint)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    /**
+     * 查询信息
+     *
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-09-20
+     */
+    @PreAuthorize("hasAuthority('merchant:admin:print:info')")
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<MerchantPrint> info(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(merchantPrintService.getPrintInfo(id));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:admin:print:update:status')")
+    @ApiOperation(value = "更新状态")
+    @RequestMapping(value = "/status", method = RequestMethod.POST)
+    public CommonResult<String> updateStatus(@RequestBody @Validated MerchantPrintUpdateStatusRequest merchantPrintUpdateStatusRequest) {
+        boolean updateStatusResult = merchantPrintService.updateStatus(merchantPrintUpdateStatusRequest.getId(),
+                merchantPrintUpdateStatusRequest.getStatus());
+        if (updateStatusResult) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+
+    @PreAuthorize("hasAuthority('merchant:print:get:content')")
+    @ApiOperation(value = "获取打印内容配置")
+    @RequestMapping(value = "/get/content/{id}", method = RequestMethod.GET)
+    public CommonResult<PrintContentVo> getPrintContentConfig(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(merchantPrintService.getPrintContentConfig(id));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:print:save:content')")
+    @ApiOperation(value = "保存打印内容配置")
+    @RequestMapping(value = "/save/content/{id}", method = RequestMethod.POST)
+    public CommonResult<String> savePrintContentConfig(@RequestBody @Validated PrintContentVo voRequest, @PathVariable(value = "id") Integer id) {
+        if (merchantPrintService.savePrintContentConfig(id, voRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+}
+
+
+

+ 103 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductCategoryController.java

@@ -0,0 +1,103 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.merchant.MerchantProductCategory;
+import com.zbkj.common.request.merchant.MerchantProductCategoryRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.ProCategoryCacheVo;
+import com.zbkj.service.service.MerchantProductCategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 商户端商户商品分类控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/store/product/category")
+@Api(tags = "商户端商户商品分类控制器")
+public class MerchantProductCategoryController {
+
+    @Autowired
+    private MerchantProductCategoryService categoryService;
+
+
+    @PreAuthorize("hasAuthority('merchant:product:category:list')")
+    @ApiOperation(value = "商户商品分类列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<List<MerchantProductCategory>> getList() {
+        return CommonResult.success(categoryService.getAdminList());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:category:add')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增商户商品分类")
+    @ApiOperation(value = "新增商户商品分类")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<String> add(@RequestBody @Validated MerchantProductCategoryRequest request) {
+        if (categoryService.add(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:category:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除商户商品分类")
+    @ApiOperation(value = "删除商户商品分类")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (categoryService.delete(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:category:update')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改商户商品分类")
+    @ApiOperation(value = "修改商户商品分类")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated MerchantProductCategoryRequest request) {
+        if (categoryService.edit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:category:show:status')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改商户商品分类显示状态")
+    @ApiOperation(value = "修改商户商品分类显示状态")
+    @RequestMapping(value = "/update/show/{id}", method = RequestMethod.POST)
+    public CommonResult<String> updateShowStatus(@PathVariable(value = "id") Integer id) {
+        if (categoryService.updateShowStatus(id)) {
+            return CommonResult.success("修改成功");
+        }
+        return CommonResult.failed("修改失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:category:cache:tree')")
+    @ApiOperation(value = "商户商品分类缓存树")
+    @RequestMapping(value = "/cache/tree", method = RequestMethod.GET)
+    public CommonResult<List<ProCategoryCacheVo>> getCacheTree() {
+        return CommonResult.success(categoryService.getCacheTree());
+    }
+}
+
+
+

+ 342 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductController.java

@@ -0,0 +1,342 @@
+package com.zbkj.admin.controller.merchant;
+
+import cn.hutool.json.JSONException;
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.*;
+import com.zbkj.common.response.*;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ProductManagerService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 商户端商品控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/product")
+@Api(tags = "商户端商品控制器") //配合swagger使用
+public class MerchantProductController {
+
+    @Autowired
+    private ProductManagerService productService;
+
+    @PreAuthorize("hasAuthority('merchant:product:page:list')")
+    @ApiOperation(value = "商品分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<AdminProductListResponse>> getList(@Validated MerProductSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(productService.getAdminList(request)));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增商品")
+    @PreAuthorize("hasAuthority('merchant:product:save')")
+    @ApiOperation(value = "新增商品")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated ProductAddRequest request) {
+        if (productService.save(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除商品")
+    @PreAuthorize("hasAuthority('merchant:product:delete')")
+    @ApiOperation(value = "删除商品")
+    @RequestMapping(value = "/delete", method = RequestMethod.POST)
+    public CommonResult<String> delete(@RequestBody @Validated ProductDeleteRequest request) {
+        if (productService.deleteProduct(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "恢复回收站商品")
+    @PreAuthorize("hasAuthority('merchant:product:restore')")
+    @ApiOperation(value = "恢复回收站商品")
+    @RequestMapping(value = "/restore/{id}", method = RequestMethod.POST)
+    public CommonResult<String> restore(@PathVariable Integer id) {
+        if (productService.restoreProduct(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改商品")
+    @PreAuthorize("hasAuthority('merchant:product:update')")
+    @ApiOperation(value = "商品修改")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated ProductAddRequest ProductRequest) {
+        if (productService.update(ProductRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:info')")
+    @ApiOperation(value = "商品详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<ProductInfoResponse> info(@PathVariable Integer id) {
+        return CommonResult.success(productService.getInfo(id));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:tabs:headers')")
+    @ApiOperation(value = "商品表头数量")
+    @RequestMapping(value = "/tabs/headers", method = RequestMethod.GET)
+    public CommonResult<List<ProductTabsHeaderResponse>> getTabsHeader(@Validated MerProductTabsHeaderRequest request) {
+        return CommonResult.success(productService.getTabsHeader(request));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商品提审")
+    @PreAuthorize("hasAuthority('merchant:product:submit:audit')")
+    @ApiOperation(value = "商品提审")
+    @RequestMapping(value = "/submit/audit", method = RequestMethod.POST)
+    public CommonResult<String> submitAudit(@RequestBody @Validated ProductSubmitAuditRequest request) {
+        if (productService.submitAudit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "上架商品")
+    @PreAuthorize("hasAuthority('merchant:product:up')")
+    @ApiOperation(value = "商品上架")
+    @RequestMapping(value = "/up/{id}", method = RequestMethod.POST)
+    public CommonResult<String> up(@PathVariable Integer id) {
+        if (productService.putOnShelf(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "下架商品")
+    @PreAuthorize("hasAuthority('merchant:product:down')")
+    @ApiOperation(value = "商品下架")
+    @RequestMapping(value = "/down/{id}", method = RequestMethod.POST)
+    public CommonResult<String> down(@PathVariable Integer id) {
+        if (productService.offShelf(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "快捷添加库存")
+    @PreAuthorize("hasAuthority('merchant:product:quick:stock:add')")
+    @ApiOperation(value = "快捷添加库存")
+    @RequestMapping(value = "/quick/stock/add", method = RequestMethod.POST)
+    public CommonResult<String> quickAddStock(@RequestBody @Validated ProductAddStockRequest request) {
+        if (productService.quickAddStock(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商品免审编辑")
+    @PreAuthorize("hasAuthority('merchant:product:review:free:edit')")
+    @ApiOperation(value = "商品免审编辑")
+    @RequestMapping(value = "/review/free/edit", method = RequestMethod.POST)
+    public CommonResult<String> reviewFreeEdit(@RequestBody @Validated ProductReviewFreeEditRequest request) {
+        if (productService.reviewFreeEdit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:import:product')")
+    @ApiOperation(value = "导入99Api商品")
+    @RequestMapping(value = "/importProduct", method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "form", value = "导入平台1=淘宝,2=京东,3=苏宁,4=拼多多, 5=天猫", dataType = "int", required = true),
+            @ApiImplicitParam(name = "url", value = "URL", dataType = "String", required = true),
+    })
+    public CommonResult<ProductResponseForCopyProduct> importProduct(
+            @RequestParam @Valid int form,
+            @RequestParam @Valid String url) throws IOException, JSONException {
+        ProductResponseForCopyProduct productRequest = productService.importProductFrom99Api(url, form);
+        return CommonResult.success(productRequest);
+    }
+
+    /**
+     * 获取复制商品配置
+     */
+    @PreAuthorize("hasAuthority('admin:product:copy:config')")
+    @ApiOperation(value = "获取复制商品配置")
+    @RequestMapping(value = "/copy/config", method = RequestMethod.POST)
+    public CommonResult<Map<String, Object>> copyConfig() {
+        return CommonResult.success(productService.copyConfig());
+    }
+
+
+    @PreAuthorize("hasAuthority('merchant:product:copy:product')")
+    @ApiOperation(value = "复制商品")
+    @RequestMapping(value = "/copy/product", method = RequestMethod.POST)
+    public CommonResult<ProductResponseForCopyProduct> copyProduct(@RequestBody @Valid CopyProductRequest request) {
+        return CommonResult.success(productService.copyProduct(request.getUrl()));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:activity:search:page')")
+    @ApiOperation(value = "商品搜索分页列表(活动)")
+    @RequestMapping(value = "/activity/search/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<ProductActivityResponse>> getActivitySearchPage(@Validated ProductActivitySearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(productService.getActivitySearchPageByMerchant(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:set:freight:template')")
+    @ApiOperation(value = "设置运费模板")
+    @RequestMapping(value = "/set/freight/template", method = RequestMethod.POST)
+    public CommonResult<Object> setFreightTemplate(@RequestBody @Valid ProductFreightTemplateRequest request) {
+        if (productService.setFreightTemplate(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed().setMessage("设置失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:set:brokerage')")
+    @ApiOperation(value = "设置佣金")
+    @RequestMapping(value = "/set/brokerage", method = RequestMethod.POST)
+    public CommonResult<Object> setBrokerage(@RequestBody @Valid ProductSetBrokerageRequest request) {
+        if (productService.setBrokerage(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed().setMessage("设置失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:add:feedback:coupons')")
+    @ApiOperation(value = "添加回馈券")
+    @RequestMapping(value = "/add/feedback/coupons", method = RequestMethod.POST)
+    public CommonResult<Object> addFeedbackCoupons(@RequestBody @Valid ProductAddFeedbackCouponsRequest request) {
+        if (productService.addFeedbackCoupons(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed().setMessage("设置失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "批量上架商品")
+    @PreAuthorize("hasAuthority('merchant:product:batch:up')")
+    @ApiOperation(value = "批量上架商品")
+    @RequestMapping(value = "/batch/up", method = RequestMethod.POST)
+    public CommonResult<String> batchUp(@RequestBody @Valid CommonBatchRequest request) {
+        if (productService.batchUp(request.getIdList())) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "批量下架商品")
+    @PreAuthorize("hasAuthority('merchant:product:batch:down')")
+    @ApiOperation(value = "批量商品下架")
+    @RequestMapping(value = "/batch/down", method = RequestMethod.POST)
+    public CommonResult<String> batchDown(@RequestBody @Valid CommonBatchRequest request) {
+        if (productService.batchDown(request.getIdList())) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:batch:set:freight:template')")
+    @ApiOperation(value = "批量设置运费模板")
+    @RequestMapping(value = "/batch/set/freight/template", method = RequestMethod.POST)
+    public CommonResult<Object> batchSetFreightTemplate(@RequestBody @Valid BatchSetProductFreightTemplateRequest request) {
+        if (productService.batchSetFreightTemplate(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed().setMessage("设置失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:batch:set:brokerage')")
+    @ApiOperation(value = "批量设置佣金")
+    @RequestMapping(value = "/batch/set/brokerage", method = RequestMethod.POST)
+    public CommonResult<Object> batchSetBrokerage(@RequestBody @Valid BatchSetProductBrokerageRequest request) {
+        if (productService.batchSetBrokerage(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed().setMessage("设置失败");
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:batch:add:feedback:coupons')")
+    @ApiOperation(value = "批量添加回馈券")
+    @RequestMapping(value = "/batch/add/feedback/coupons", method = RequestMethod.POST)
+    public CommonResult<Object> batchAddFeedbackCoupons(@RequestBody @Valid BatchAddProductFeedbackCouponsRequest request) {
+        if (productService.batchAddFeedbackCoupons(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed().setMessage("设置失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "批量加入回收站")
+    @PreAuthorize("hasAuthority('merchant:product:batch:recycle')")
+    @ApiOperation(value = "批量加入回收站")
+    @RequestMapping(value = "/batch/recycle", method = RequestMethod.POST)
+    public CommonResult<String> batchRecycle(@RequestBody @Validated CommonBatchRequest request) {
+        if (productService.batchRecycle(request.getIdList())) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "批量删除商品")
+    @PreAuthorize("hasAuthority('merchant:product:batch:delete')")
+    @ApiOperation(value = "批量删除商品")
+    @RequestMapping(value = "/batch/delete", method = RequestMethod.POST)
+    public CommonResult<String> batchDelete(@RequestBody @Validated CommonBatchRequest request) {
+        if (productService.batchDelete(request.getIdList())) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "批量恢复回收站商品")
+    @PreAuthorize("hasAuthority('merchant:product:batch:restore')")
+    @ApiOperation(value = "批量恢复回收站商品")
+    @RequestMapping(value = "/batch/restore", method = RequestMethod.POST)
+    public CommonResult<String> batchRestore(@RequestBody @Validated CommonBatchRequest request) {
+        if (productService.batchRestore(request.getIdList())) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "批量提审商品")
+    @PreAuthorize("hasAuthority('merchant:product:batch:submit:audit')")
+    @ApiOperation(value = "批量提审商品")
+    @RequestMapping(value = "/batch/submit/audit", method = RequestMethod.POST)
+    public CommonResult<String> batchSubmitAudit(@RequestBody @Validated CommonBatchRequest request) {
+        if (productService.batchSubmitAudit(request.getIdList())) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:marketing:search:page')")
+    @ApiOperation(value = "商品搜索分页列表(营销)")
+    @RequestMapping(value = "/marketing/search/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<ProductMarketingResponse>> getMarketingSearchPage(@Validated MerProductMarketingSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(productService.getMarketingSearchPageByMerchant(request)));
+    }
+}
+
+
+

+ 80 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductGuaranteeGroupController.java

@@ -0,0 +1,80 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.request.ProductGuaranteeGroupAddRequest;
+import com.zbkj.common.response.ProductGuaranteeGroupListResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ProductGuaranteeGroupService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商户端商品保障服务组合控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/product/guarantee/group")
+@Api(tags = "商户端商品保障服务组合控制器") //配合swagger使用
+public class MerchantProductGuaranteeGroupController {
+
+    @Autowired
+    private ProductGuaranteeGroupService productGuaranteeGroupService;
+
+    @ApiOperation(value = "保障服务组合列表")
+    @PreAuthorize("hasAuthority('merchant:product:guarantee:group:list')")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<List<ProductGuaranteeGroupListResponse>> list() {
+        return CommonResult.success(productGuaranteeGroupService.findList());
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增保障服务组合")
+    @ApiOperation(value = "新增保障服务组合")
+    @PreAuthorize("hasAuthority('merchant:product:guarantee:group:add')")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<String> add(@RequestBody @Validated ProductGuaranteeGroupAddRequest request) {
+        if (productGuaranteeGroupService.add(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "编辑保障服务组合")
+    @ApiOperation(value = "编辑保障服务组合")
+    @PreAuthorize("hasAuthority('merchant:product:guarantee:group:edit')")
+    @RequestMapping(value = "/edit", method = RequestMethod.POST)
+    public CommonResult<String> edit(@RequestBody @Validated ProductGuaranteeGroupAddRequest request) {
+        if (productGuaranteeGroupService.edit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除保障服务组合")
+    @ApiOperation(value = "删除保障服务组合")
+    @PreAuthorize("hasAuthority('merchant:product:guarantee:group:delete')")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (productGuaranteeGroupService.delete(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+}

+ 79 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductReplyController.java

@@ -0,0 +1,79 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.ProductReplyCommentRequest;
+import com.zbkj.common.request.ProductReplySearchRequest;
+import com.zbkj.common.request.ProductReplyVirtualRequest;
+import com.zbkj.common.response.ProductReplyResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ProductReplyService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 商户端商品评论控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/product/reply")
+@Api(tags = "商户端商品评论控制器") //配合swagger使用
+public class MerchantProductReplyController {
+
+    @Autowired
+    private ProductReplyService storeProductReplyService;
+
+    @PreAuthorize("hasAuthority('merchant:product:reply:page:list')")
+    @ApiOperation(value = "商户端商品评论分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<ProductReplyResponse>> getList(@Validated ProductReplySearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(storeProductReplyService.getMerchantAdminPage(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:reply:virtual')")
+    @ApiOperation(value = "虚拟评论")
+    @RequestMapping(value = "/virtual", method = RequestMethod.POST)
+    public CommonResult<String> virtual(@RequestBody @Validated ProductReplyVirtualRequest request) {
+        if (storeProductReplyService.virtualCreate(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:reply:delete')")
+    @ApiOperation(value = "删除评论")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable Integer id) {
+        if (storeProductReplyService.delete(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:reply:comment')")
+   @ApiOperation(value = "回复评论")
+   @RequestMapping(value = "/comment", method = RequestMethod.POST)
+   public CommonResult<String> comment(@RequestBody ProductReplyCommentRequest request) {
+       if (storeProductReplyService.comment(request)) {
+           return CommonResult.success();
+       }
+       return CommonResult.failed();
+   }
+}
+
+
+

+ 95 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantProductRuleController.java

@@ -0,0 +1,95 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.product.ProductRule;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.ProductRuleRequest;
+import com.zbkj.common.request.ProductRuleSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ProductRuleService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 商品规则值(规格)控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/product/rule")
+@Api(tags = "商户端商品规则值(规格)控制器") //配合swagger使用
+public class MerchantProductRuleController {
+
+    @Autowired
+    private ProductRuleService productRuleService;
+
+    @PreAuthorize("hasAuthority('merchant:product:rule:page:list')")
+    @ApiOperation(value = "商户端商品规则值(规格)分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<ProductRule>> getList(@Validated ProductRuleSearchRequest request,
+                                                         @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(productRuleService.getList(request, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:rule:save')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增商品规格")
+    @ApiOperation(value = "新增商品规格")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated ProductRuleRequest ProductRuleRequest) {
+        if (productRuleService.save(ProductRuleRequest)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:rule:delete')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除商品规格")
+    @ApiOperation(value = "删除商品规格")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable Integer id) {
+        if (productRuleService.deleteById(id)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:rule:update')")
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改商品规格")
+    @ApiOperation(value = "修改商品规格")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated ProductRuleRequest ProductRuleRequest) {
+        if (productRuleService.updateRule(ProductRuleRequest)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    @PreAuthorize("hasAuthority('merchant:product:rule:info')")
+    @ApiOperation(value = "商品规格详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<ProductRule> info(@PathVariable Integer id) {
+        return CommonResult.success(productRuleService.getRuleInfo(id));
+   }
+}
+
+
+

+ 105 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantRoleController.java

@@ -0,0 +1,105 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.admin.SystemRole;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.SystemRoleRequest;
+import com.zbkj.common.request.SystemRoleSearchRequest;
+import com.zbkj.common.request.SystemRoleStatusRequest;
+import com.zbkj.common.response.RoleInfoResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.SystemRoleService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 商户端 管理员角色控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/role")
+@Api(tags = "商户端 管理员角色控制器")
+public class MerchantRoleController {
+
+    @Autowired
+    private SystemRoleService systemRoleService;
+
+    @PreAuthorize("hasAuthority('merchant:admin:role:list')")
+    @ApiOperation(value = "角色分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<SystemRole>> getList(@Validated SystemRoleSearchRequest request, @Validated PageParamRequest pageParamRequest) {
+        CommonPage<SystemRole> systemRoleCommonPage = CommonPage.restPage(systemRoleService.getList(request, pageParamRequest));
+        return CommonResult.success(systemRoleCommonPage);
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增角色")
+    @PreAuthorize("hasAuthority('merchant:admin:role:save')")
+    @ApiOperation(value = "新增角色")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated SystemRoleRequest systemRoleRequest) {
+        if (systemRoleService.add(systemRoleRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除角色")
+    @PreAuthorize("hasAuthority('merchant:admin:role:delete')")
+    @ApiOperation(value = "删除角色")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (systemRoleService.delete(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改角色")
+    @PreAuthorize("hasAuthority('merchant:admin:role:update')")
+    @ApiOperation(value = "修改角色")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated SystemRoleRequest systemRoleRequest) {
+        if (systemRoleService.edit(systemRoleRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:admin:role:info')")
+    @ApiOperation(value = "角色详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<RoleInfoResponse> info(@PathVariable Integer id) {
+        return CommonResult.success(systemRoleService.getInfo(id));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改角色状态")
+    @PreAuthorize("hasAuthority('merchant:admin:role:update:status')")
+    @ApiOperation(value = "修改角色状态")
+    @RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
+    public CommonResult<Object> updateStatus(@Validated @RequestBody SystemRoleStatusRequest request) {
+        if (systemRoleService.updateStatus(request)) {
+            return CommonResult.success("修改成功");
+        }
+        return CommonResult.failed("修改失败");
+    }
+}
+
+
+

+ 131 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantSeckillController.java

@@ -0,0 +1,131 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.admin.service.SeckillService;
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.*;
+import com.zbkj.common.response.SeckillActivityDetailResponse;
+import com.zbkj.common.response.SeckillActivityPageResponse;
+import com.zbkj.common.response.SeckillProductPageResponse;
+import com.zbkj.common.result.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 商户端秒杀控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/seckill")
+@Api(tags = "商户端 - 秒杀管理")
+public class MerchantSeckillController {
+
+    @Autowired
+    private SeckillService seckillService;
+
+    @PreAuthorize("hasAuthority('merchant:seckill:activity:page')")
+    @ApiOperation(value = "秒杀活动分页列表")
+    @RequestMapping(value = "/activity/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<SeckillActivityPageResponse>> activityPage(@Validated SeckillActivitySearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(seckillService.activityPage(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:seckill:activity:detail')")
+    @ApiOperation(value = "秒杀活动详情")
+    @RequestMapping(value = "/activity/detail/{id}", method = RequestMethod.GET)
+    public CommonResult<SeckillActivityDetailResponse> activityDetail(@PathVariable("id") Integer id) {
+        return CommonResult.success(seckillService.activityDetail(id));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:seckill:product:list')")
+    @ApiOperation(value = "秒杀商品列表")
+    @RequestMapping(value = "/product/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<SeckillProductPageResponse>> getSeckillProductPage(@Validated SeckillProductSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(seckillService.getSeckillProductPage(request)));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "秒杀商品撤回审核")
+    @PreAuthorize("hasAuthority('merchant:seckill:product:withdraw')")
+    @ApiOperation(value = "秒杀商品撤回审核")
+    @RequestMapping(value = "/product/withdraw/{id}", method = RequestMethod.POST)
+    public CommonResult<String> withdrawProductAudit(@PathVariable("id") Integer id) {
+        if (seckillService.withdrawProductAudit(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "秒杀商品设置活动价")
+    @PreAuthorize("hasAuthority('merchant:seckill:product:price')")
+    @ApiOperation(value = "秒杀商品设置活动价")
+    @RequestMapping(value = "/product/set/price", method = RequestMethod.POST)
+    public CommonResult<String> setProductPrice(@RequestBody @Validated SeckillProductPriceRequest request) {
+        if (seckillService.setProductPrice(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "秒杀商品上架")
+    @PreAuthorize("hasAuthority('merchant:seckill:product:up')")
+    @ApiOperation(value = "秒杀商品上架")
+    @RequestMapping(value = "/product/up", method = RequestMethod.POST)
+    public CommonResult<String> upProduct(@RequestBody @Validated SeckillProductBatchRequest request) {
+        if (seckillService.upProduct(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "秒杀商品下架")
+    @PreAuthorize("hasAuthority('merchant:seckill:product:down')")
+    @ApiOperation(value = "秒杀商品下架")
+    @RequestMapping(value = "/product/down", method = RequestMethod.POST)
+    public CommonResult<String> downProduct(@RequestBody @Validated SeckillProductBatchRequest request) {
+        if (seckillService.downProduct(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "秒杀商品删除")
+    @PreAuthorize("hasAuthority('merchant:seckill:product:delete')")
+    @ApiOperation(value = "秒杀商品删除")
+    @RequestMapping(value = "/product/delete", method = RequestMethod.POST)
+    public CommonResult<String> deleteProduct(@RequestBody @Validated SeckillProductBatchRequest request) {
+        if (seckillService.merchantDeleteProduct(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "商户秒杀商品添加")
+    @PreAuthorize("hasAuthority('merchant:seckill:product:add')")
+    @ApiOperation(value = "秒杀商品添加")
+    @RequestMapping(value = "/product/add", method = RequestMethod.POST)
+    public CommonResult<String> addProduct(@RequestBody @Validated SeckillProductAddRequest request) {
+        if (seckillService.merchantAddProduct(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+}
+
+
+

+ 80 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantSystemFormController.java

@@ -0,0 +1,80 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.system.SystemForm;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.SystemFormAddRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.SystemFormService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+/**
+ * 商户端系统表单控制器
+ *
+ * @author Han
+ * @version 1.0.0
+ * @Date 2024/8/5
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/system/form")
+@Api(tags = "系统表单控制器")
+public class MerchantSystemFormController {
+
+    @Autowired
+    private SystemFormService service;
+
+    @PreAuthorize("hasAuthority('merchant:system:form:page')")
+    @ApiOperation(value = "系统表单分页列表")
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<SystemForm>> getMerchantPage(@Validated PageParamRequest pageRequest) {
+        return CommonResult.success(CommonPage.restPage(service.getMerchantPage(pageRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:system:form:detail')")
+    @ApiOperation(value = "系统表单详情")
+    @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
+    public CommonResult<SystemForm> activityDetail(@PathVariable("id") Integer id) {
+        return CommonResult.success(service.getDetail(id));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "添加系统表单")
+    @PreAuthorize("hasAuthority('merchant:system:form:add')")
+    @ApiOperation(value = "添加系统表单")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<Map<String, Object>> addForm(@RequestBody @Validated SystemFormAddRequest request) {
+        return CommonResult.success(service.addForm(request));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改系统表单")
+    @PreAuthorize("hasAuthority('merchant:system:form:update')")
+    @ApiOperation(value = "修改系统表单")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> updateForm(@RequestBody @Validated SystemFormAddRequest request) {
+        if (service.updateForm(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除系统表单")
+    @PreAuthorize("hasAuthority('merchant:system:form:delete')")
+    @ApiOperation(value = "删除系统表单")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> deleteForm(@PathVariable(name = "id") Integer id) {
+        if (service.deleteForm(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+}

+ 74 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantUploadController.java

@@ -0,0 +1,74 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.FileResultVo;
+import com.zbkj.service.service.UploadService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+
+/**
+ * 上传文件 前端控制器 -- 商户端
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/upload")
+@Api(tags = "商户端上传文件")
+public class MerchantUploadController {
+
+    @Autowired
+    private UploadService uploadService;
+
+    /**
+     * 图片上传
+     */
+    @PreAuthorize("hasAuthority('merchant:upload:image')")
+    @ApiOperation(value = "图片上传")
+    @RequestMapping(value = "/image", method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "model", value = "模块 用户user,商品product,微信wechat,文章article,系统system"),
+            @ApiImplicitParam(name = "pid", value = "分类ID 0编辑器,1商品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图,7前台用户,8微信系列 ", allowableValues = "range[0,1,2,3,4,5,6,7,8]")
+    })
+    public CommonResult<FileResultVo> image(MultipartFile multipart, @RequestParam(value = "model") String model,
+                                            @RequestParam(value = "pid") Integer pid) {
+        return CommonResult.success(uploadService.imageUpload(multipart, model, pid));
+    }
+
+    /**
+     * 文件上传
+     */
+    @PreAuthorize("hasAuthority('merchant:upload:file')")
+    @ApiOperation(value = "文件上传")
+    @RequestMapping(value = "/file", method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "model", value = "模块 用户user,商品product,微信wechat,文章article,系统system"),
+            @ApiImplicitParam(name = "pid", value = "分类ID 0编辑器,1商品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图,7前台用户,8微信系列 ", allowableValues = "range[0,1,2,3,4,5,6,7,8]")
+    })
+    public CommonResult<FileResultVo> file(MultipartFile multipart, @RequestParam(value = "model") String model,
+                                           @RequestParam(value = "pid") Integer pid) {
+        return CommonResult.success(uploadService.fileUpload(multipart, model, pid));
+    }
+
+}
+
+
+

+ 58 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantUserController.java

@@ -0,0 +1,58 @@
+package com.zbkj.admin.controller.merchant;
+
+
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.merchant.MerchantUserSearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.response.UserAdminDetailResponse;
+import com.zbkj.common.response.UserResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.UserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 商户端用户控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/user")
+@Api(tags = "商户端用户控制器")
+@Validated
+public class MerchantUserController {
+    @Autowired
+    private UserService userService;
+
+    @PreAuthorize("hasAuthority('merchant:user:page:list')")
+    @ApiOperation(value = "商户端用户分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<UserResponse>> getList(@ModelAttribute @Validated MerchantUserSearchRequest request,
+                                                          @ModelAttribute PageParamRequest pageParamRequest) {
+        CommonPage<UserResponse> userCommonPage = CommonPage.restPage(userService.getMerchantPage(request, pageParamRequest));
+        return CommonResult.success(userCommonPage);
+    }
+
+    @PreAuthorize("hasAuthority('merchant:user:detail')")
+    @ApiOperation(value = "用户详情")
+    @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
+    public CommonResult<UserAdminDetailResponse> detail(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(userService.getAdminDetail(id));
+    }
+}
+
+
+

+ 122 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantWechatLiveAssistantController.java

@@ -0,0 +1,122 @@
+package com.zbkj.admin.controller.merchant;
+
+
+import com.zbkj.common.model.wechat.live.WechatLiveAssistant;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.wxmplive.assistant.WechatLiveAssistantAddRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.WechatLiveAssistantService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/mp/live/assistant")
+@Api(tags = "商户端 - 微信小程序 - 直播 - 小助手") //配合swagger使用
+public class MerchantWechatLiveAssistantController {
+
+    @Autowired
+    private WechatLiveAssistantService wechatLiveAssistantService;
+
+    /**
+     * 分页显示
+     *
+     * @param keywords         搜索条件
+     * @param pageParamRequest 分页参数
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:assistant:list')")
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "keywords", value = "微信号和微信昵称", dataType = "String")
+    })
+    public CommonResult<CommonPage<WechatLiveAssistant>> getList(@RequestParam String keywords, @Validated PageParamRequest pageParamRequest) {
+        CommonPage<WechatLiveAssistant> wechatLiveAssistantCommonPage = CommonPage.restPage(wechatLiveAssistantService.getList(keywords, pageParamRequest));
+        return CommonResult.success(wechatLiveAssistantCommonPage);
+    }
+
+    /**
+     * 新增
+     *
+     * @param wechatLiveAssistant 新增参数
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:assistant:save')")
+    @ApiOperation(value = "新增")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated WechatLiveAssistantAddRequest wechatLiveAssistant) {
+        WechatLiveAssistant assistant = new WechatLiveAssistant();
+        BeanUtils.copyProperties(wechatLiveAssistant, assistant);
+        if (wechatLiveAssistantService.saveUnique(assistant)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    /**
+     * 删除
+     *
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:assistant:delete')")
+    @ApiOperation(value = "删除")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (wechatLiveAssistantService.deleteById(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    /**
+     * 修改
+     *
+     * @param wechatLiveAssistant 修改参数
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:assistant:edit')")
+    @ApiOperation(value = "修改")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated WechatLiveAssistantAddRequest wechatLiveAssistant) {
+        if (wechatLiveAssistantService.edit(wechatLiveAssistant)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    /**
+     * 查询信息
+     *
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:assistant:info')")
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<WechatLiveAssistant> info(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(wechatLiveAssistantService.getAssistantInfo(id));
+    }
+}
+
+
+

+ 149 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantWechatLiveGoodsController.java

@@ -0,0 +1,149 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.wechat.live.WechatLiveGoods;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.wxmplive.goods.WechatLiveGoodsAddRequest;
+import com.zbkj.common.request.wxmplive.goods.WechatLiveGoodsEditRequest;
+import com.zbkj.common.request.wxmplive.goods.WechatLiveGoodsSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.WechatLiveGoodsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/mp/live/goods")
+@Api(tags = "商户端 - 微信小程序 - 直播 - 商品") //配合swagger使用
+public class MerchantWechatLiveGoodsController {
+
+    @Autowired
+    private WechatLiveGoodsService wechatLiveGoodsService;
+
+    /**
+     * 分页显示
+     *
+     * @param request          搜索条件
+     * @param pageParamRequest 分页参数
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:goods:list')")
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<WechatLiveGoods>> getList(@Validated WechatLiveGoodsSearchRequest request, @Validated PageParamRequest pageParamRequest) {
+        CommonPage<WechatLiveGoods> wechatLiveGoodsCommonPage = CommonPage.restPage(wechatLiveGoodsService.getList(request, pageParamRequest, Boolean.TRUE));
+        return CommonResult.success(wechatLiveGoodsCommonPage);
+    }
+
+    /**
+     * 新增
+     *
+     * @param wechatLiveGoodsRequest 新增参数
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:goods:save')")
+    @ApiOperation(value = "批量新增并提审")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated List<WechatLiveGoodsAddRequest> wechatLiveGoodsRequest) {
+        if (wechatLiveGoodsService.addGoods(wechatLiveGoodsRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    /**
+     * 删除
+     *
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:goods:delete')")
+    @ApiOperation(value = "删除")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
+    public CommonResult<String> delete(@PathVariable(name = "id") Integer id) {
+        if (wechatLiveGoodsService.deleteGoods(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    /**
+     * 修改
+     *
+     * @param wechatLiveGoodsRequest 修改参数
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:goods:edit')")
+    @ApiOperation(value = "修改")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated WechatLiveGoodsEditRequest wechatLiveGoodsRequest) {
+        if (wechatLiveGoodsService.updateGoods(wechatLiveGoodsRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:goods:sort')")
+    @ApiOperation(value = "修改排序")
+    @RequestMapping(value = "/sort/{id}/{sort}", method = RequestMethod.GET)
+    public CommonResult<String> sort(@PathVariable(name = "id") Integer id, @PathVariable(name = "sort") Integer sort) {
+        if (wechatLiveGoodsService.updateSort(id, sort)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    /**
+     * 查询信息
+     *
+     * @author dazongzi
+     * @since 2023-03-27
+     */
+    @PreAuthorize("hasAuthority('merchant:mp:live:goods:info')")
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<WechatLiveGoods> info(@PathVariable(value = "id") Integer id) {
+        WechatLiveGoods wechatLiveGoods = wechatLiveGoodsService.getGoodInfo(id);
+        return CommonResult.success(wechatLiveGoods);
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:goods:reset')")
+    @ApiOperation(value = "撤回申请")
+    @RequestMapping(value = "/audit/reset/{id}", method = RequestMethod.GET)
+    public CommonResult<Boolean> resetAudit(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(wechatLiveGoodsService.merchantResetAudit(id));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:goods:audit')")
+    @ApiOperation(value = "重新提交申请")
+    @RequestMapping(value = "/audit/{id}", method = RequestMethod.GET)
+    public CommonResult<String> auditGoods(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(wechatLiveGoodsService.merchantAuditGoods(id));
+    }
+
+    // 用于测试
+    @ApiOperation(value = "用于测试 获取直播商品审核状态")
+    @RequestMapping(value = "/auditforwx", method = RequestMethod.GET)
+    public CommonResult<String> auditWareHouse() {
+        wechatLiveGoodsService.getGoodsWareHouse();
+        return CommonResult.success();
+    }
+}
+
+
+

+ 213 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantWechatLiveRoomController.java

@@ -0,0 +1,213 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.wechat.live.WechatLiveAssistant;
+import com.zbkj.common.model.wechat.live.WechatLiveRoom;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.wxmplive.assistant.WechatMpLiveAddAssistantToRoomRequest;
+import com.zbkj.common.request.wxmplive.goods.WechatLiveGoodsInRoomResponse;
+import com.zbkj.common.request.wxmplive.goods.WechatMpLiveAddGoodsToRoomRequest;
+import com.zbkj.common.request.wxmplive.goods.WechatMpLiveGoodsOnSaleRequest;
+import com.zbkj.common.request.wxmplive.goods.WechatMpLiveGoodsSortRequest;
+import com.zbkj.common.request.wxmplive.room.WechatLiveRoomSharCode;
+import com.zbkj.common.request.wxmplive.room.WechatMpLiveRoomInfoRequest;
+import com.zbkj.common.request.wxmplive.room.WechatMpLiveRoomSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.WechatLiveRoomService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @Auther: 大粽子
+ * @Date: 2023/3/9 10:54
+ * @Description: 商户微信小程序直播控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/mp/live/room")
+@Api(tags = "商户端 - 微信小程序 - 直播间管理")
+@Validated
+public class MerchantWechatLiveRoomController {
+
+    @Autowired
+    private WechatLiveRoomService weChatLiveRoomService;
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:create')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 创建直播室")
+    @RequestMapping(value = "/create", method = RequestMethod.POST)
+    public CommonResult<Boolean> WechatMPLiveCreateRoom(@RequestBody @Validated WechatMpLiveRoomInfoRequest wxMaLiveRoomInfo) {
+        return CommonResult.success(weChatLiveRoomService.creteRoom(wxMaLiveRoomInfo));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:delete')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 删除直播室")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "待删除的直播间id", dataType = "int")
+    })
+    public CommonResult<Object> WechatMPLiveDeleteRoom(@PathVariable Integer id) {
+        if (weChatLiveRoomService.deleteRoom(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:edit')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 编辑直播室")
+    @RequestMapping(value = "/edit", method = RequestMethod.POST)
+    public CommonResult<Boolean> WechatMPLiveEditRoom(@RequestBody @Validated WechatMpLiveRoomInfoRequest roomInfo) {
+        if (weChatLiveRoomService.editRoom(roomInfo)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:info')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 直播间详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<WechatLiveRoom> WechatMPLiveRoomInfo(@PathVariable Integer id) {
+        return CommonResult.success(weChatLiveRoomService.getRoomInfoById(id));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:list')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 直播室列表和回放")
+    @RequestMapping(value = "/list", method = RequestMethod.POST)
+    public CommonResult<CommonPage<WechatLiveRoom>> WechatMPLiveListRoom(@RequestBody WechatMpLiveRoomSearchRequest weChatMpLiveRoomSearchRequest) {
+        return CommonResult.success(CommonPage.restPage(weChatLiveRoomService.getLiveList(weChatMpLiveRoomSearchRequest.getSearchRequest(),
+                weChatMpLiveRoomSearchRequest.getPageParamRequest(), Boolean.TRUE)));
+    }
+
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:addgoods')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 导入商品")
+    @RequestMapping(value = "/addgoods", method = RequestMethod.POST)
+    public CommonResult<Boolean> WechatMPLiveAddGoodsRoom(@RequestBody WechatMpLiveAddGoodsToRoomRequest weChatMpLiveAddGoodsRequest) {
+        return CommonResult.success(weChatLiveRoomService.addGoodsToRoom(weChatMpLiveAddGoodsRequest.getId(),
+                weChatMpLiveAddGoodsRequest.getIds()));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:goodslist')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 直播间商品列表")
+    @RequestMapping(value = "/goodslist/{id}", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "直播间ID", dataType = "int")
+    })
+    public CommonResult<List<WechatLiveGoodsInRoomResponse>> WechatMPLiveRoomGoodsList(@PathVariable Integer id) {
+        return CommonResult.success(weChatLiveRoomService.getRoomGoodsList(id));
+    }
+
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:getsharecode')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 获取直播间分享二维码")
+    @RequestMapping(value = "/getsharecode/{id}", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "待获取分享二维码的直播间id", dataType = "int")
+    })
+    public CommonResult<WechatLiveRoomSharCode> WechatMPLiveRoomGetShareCode(@PathVariable Integer id) {
+        return CommonResult.success(weChatLiveRoomService.getShareQRCodeByRoomId(id, null));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:deletegoods')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 删除直播间商品")
+    @RequestMapping(value = "/deletegoodsinroom/{id}/{goodsId}", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "直播间id", dataType = "int"),
+            @ApiImplicitParam(name = "goodsId", value = "删除的商品id", dataType = "int")
+    })
+    public CommonResult<Boolean> WechatMPLiveDeleteGoodsInRoom(@PathVariable Integer id, @PathVariable Integer goodsId) {
+        return CommonResult.success(weChatLiveRoomService.deleteGoodsInRoom(id, goodsId));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:goodsonsale')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 商品上下架")
+    @RequestMapping(value = "/goodsonsale", method = RequestMethod.POST)
+    public CommonResult<Boolean> WechatMPLiveGoodsOnSale(@RequestBody WechatMpLiveGoodsOnSaleRequest request) {
+        return CommonResult.success(weChatLiveRoomService.goodsOnSale(request.getRoomId(), request.getGoodsId(), request.getOnSale()));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:goodssort')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 商品排序")
+    @RequestMapping(value = "/goodsort", method = RequestMethod.POST)
+    public CommonResult<Boolean> WechatMPLiveGoodsOnSale(@RequestBody WechatMpLiveGoodsSortRequest request) {
+        return CommonResult.success(weChatLiveRoomService.goodsSort(request.getRoomId(), request.getGoods()));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:mangerass')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 管理直播间小助手")
+    @RequestMapping(value = "/mangerass", method = RequestMethod.POST)
+    public CommonResult<Boolean> WechatMPLiveAddAssistantToRoom(@RequestBody WechatMpLiveAddAssistantToRoomRequest request) {
+        return CommonResult.success(weChatLiveRoomService.mangerAssistant(request.getId(), request.getAssid()));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:getass')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 查询直播间小助手")
+    @RequestMapping(value = "/getass/{id}", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "本地直播间id", dataType = "int")
+    })
+    public CommonResult<List<WechatLiveAssistant>> WechatMPLiveModifyAssistant(@PathVariable Integer id) {
+        return CommonResult.success(weChatLiveRoomService.getAssistantByRoom(id));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:updatecomment')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 禁言管理")
+    @RequestMapping(value = "/updatecomment/{id}/{banComment}", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "直播间id", dataType = "int"),
+            @ApiImplicitParam(name = "banComment", value = "1-禁言,0-取消禁言", dataType = "int", allowableValues = "0,1")
+    })
+    public CommonResult<Boolean> WechatMPLiveUpdateComment(@PathVariable Integer id, @PathVariable Integer banComment) {
+        return CommonResult.success(weChatLiveRoomService.updateComment(id, banComment));
+    }
+
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:isfeedspublic')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 官方收录管理")
+    @RequestMapping(value = "/updatefeedpublic/{id}/{isFeedsPublic}", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "本地直播间id", dataType = "int"),
+            @ApiImplicitParam(name = "isFeedsPublic", value = "是否开启官方收录 【1: 开启,0:关闭】", dataType = "int", allowableValues = "0,1")
+    })
+    public CommonResult<Boolean> WechatMPLiveUpdateFeedPublic(@PathVariable Integer id, @PathVariable Integer isFeedsPublic) {
+        return CommonResult.success(weChatLiveRoomService.updateFeedPublic(id, isFeedsPublic));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:closekf')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 客服管理")
+    @RequestMapping(value = "/updateclosekf/{id}/{closeKf}", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "直播间id", dataType = "int"),
+            @ApiImplicitParam(name = "closeKf", value = "是否关闭客服 【0:开启,1:关闭】", dataType = "int", allowableValues = "0,1")
+    })
+    public CommonResult<Boolean> WechatMPLiveUpdateKF(@PathVariable Integer id, @PathVariable Integer closeKf) {
+        return CommonResult.success(weChatLiveRoomService.updateKF(id, closeKf));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:live:room:updatereplay')")
+    @ApiOperation(value = "商户端 - 小程序直播 - 开启回放")
+    @RequestMapping(value = "/updatereplay/{id}/{closeReplay}", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "直播间id", dataType = "int"),
+            @ApiImplicitParam(name = "closeReplay", value = "是否关闭回放 【0:开启,1:关闭】", dataType = "int", allowableValues = "0,1")
+    })
+    public CommonResult<Boolean> WechatMPLiveUpdateReplay(@PathVariable Integer id, @PathVariable Integer closeReplay) {
+        return CommonResult.success(weChatLiveRoomService.updateReplay(id, closeReplay));
+    }
+
+
+    // 用于测试
+    @ApiOperation(value = "用于测试 同步直播间状态")
+    @RequestMapping(value = "/syncliveroom", method = RequestMethod.GET)
+    public CommonResult<String> syncliveroom() {
+        weChatLiveRoomService.syncLiveRoom();
+        return CommonResult.success();
+    }
+}

+ 78 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/MerchantWechatMediaController.java

@@ -0,0 +1,78 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.alibaba.fastjson.JSONObject;
+import com.zbkj.common.request.wxmplive.media.WechatMediaUploadLocalRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.WechatMediaService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+
+/**
+ * @Auther: 大粽子
+ * @Date: 2023/3/9 10:54
+ * @Description: 商户微信 素材
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/mp/media")
+@Api(tags = "商户端 - 微信 - 素材")
+@Validated
+public class MerchantWechatMediaController {
+
+    @Autowired
+    private WechatMediaService weChatMediaService;
+
+    @PreAuthorize("hasAuthority('merchant:mp:media:upload')")
+    @ApiOperation(value = "商户端 - 微信 - 素材上传")
+    @RequestMapping(value = "/upload", method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "type", value = "分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)",dataType = "String")
+    })
+    public CommonResult<WxMediaUploadResult> WechatMediaUpload(MultipartFile multipart, @RequestParam(value = "type", defaultValue = "分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)") String type)
+            throws Exception {
+        WxMediaUploadResult wxMediaUploadResult = weChatMediaService.uploadMedia(type, multipart);
+        return CommonResult.success(wxMediaUploadResult);
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:media:uploadlocal')")
+    @ApiOperation(value = "商户端 - 微信 - 素材上传本地")
+    @RequestMapping(value = "/uploadlocal", method = RequestMethod.POST)
+    public CommonResult<WxMediaUploadResult> WechatMediaUploadLocal(@RequestBody WechatMediaUploadLocalRequest request)
+            throws Exception {
+        WxMediaUploadResult wxMediaUploadResult = weChatMediaService.uploadMediaByLocal(request.getType(), request.getImagePath());
+        return CommonResult.success(wxMediaUploadResult);
+    }
+
+    @PreAuthorize("hasAuthority('merchant:mp:media:get')")
+    @ApiOperation(value = "商户端 - 微信 - 素材获取")
+    @RequestMapping(value = "/get", method = RequestMethod.GET)
+    public CommonResult<File> WechatMediaGet(@RequestParam(value = "mediaId") String mediaId)
+            throws Exception {
+        File fileByMedia = weChatMediaService.getFileByMediaId(mediaId);
+        return CommonResult.success(fileByMedia);
+    }
+
+
+
+    @PreAuthorize("hasAuthority('merchant:mp:media:preserveupload')")
+    @ApiOperation(value = "商户端 - 微信 - 上传永久素材")
+    @RequestMapping(value = "/preserveupload", method = RequestMethod.GET)
+    public CommonResult<JSONObject> WechatMediaPreserveUpload(@RequestParam String url) {
+//        String result = weChatMediaService.preserveUploadImgNotMediaId(multipart);
+        JSONObject result = weChatMediaService.preserveUploadImgHasMediaId(url);
+        return CommonResult.success(result);
+    }
+
+
+}

+ 62 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentCatMerchantController.java

@@ -0,0 +1,62 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.wxvedioshop.cat_brand.CatItem;
+import com.zbkj.service.service.PayComponentCatService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 组件类目表 前端控制器
+ *  +----------------------------------------------------------------------
+ *  | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ *  +----------------------------------------------------------------------
+ *  | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ *  +----------------------------------------------------------------------
+ *  | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ *  +----------------------------------------------------------------------
+ *  | Author: CRMEB Team <admin@crmeb.com>
+ *  +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/pay/component/cat")
+@Api(tags = "04小程序 自定义交易组件—类目") //配合swagger使用
+public class PayComponentCatMerchantController {
+
+    @Autowired
+    private PayComponentCatService payComponentCatService;
+
+    /**
+     * 获取类目列表
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:cat:list')")
+    @ApiOperation(value = "获取类目列表")
+    @RequestMapping(value = "/get/list", method = RequestMethod.GET)
+    public CommonResult<List<CatItem>> getList() {
+        return CommonResult.success(payComponentCatService.getTreeList());
+    }
+
+
+    /**
+     * 获取类目(测试用,前端不调用)
+     */
+    @ApiOperation(value = "获取类目(测试用,前端不调用)")
+    @RequestMapping(value = "/get", method = RequestMethod.GET)
+    public CommonResult<Object> sendUserCode() {
+        payComponentCatService.autoUpdate();
+        return CommonResult.success();
+    }
+}
+
+
+

+ 62 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentDeliveryCompanyMerchantController.java

@@ -0,0 +1,62 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.wechat.video.PayComponentDeliveryCompany;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.PayComponentDeliveryCompanyService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 组件快递公司表 前端控制器
+ *  +----------------------------------------------------------------------
+ *  | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ *  +----------------------------------------------------------------------
+ *  | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ *  +----------------------------------------------------------------------
+ *  | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ *  +----------------------------------------------------------------------
+ *  | Author: CRMEB Team <admin@crmeb.com>
+ *  +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/pay/component/delivery/company")
+@Api(tags = "05小程序 自定义交易组件—快递公司")
+public class PayComponentDeliveryCompanyMerchantController {
+
+    @Autowired
+    private PayComponentDeliveryCompanyService payComponentDeliveryCompanyService;
+
+    /**
+     * 获取组件快递
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:delivery:company:get')")
+    @ApiOperation(value = "获取组件快递(测试用,前端不调用)")
+    @RequestMapping(value = "/get", method = RequestMethod.GET)
+    public CommonResult<Object> get(){
+        payComponentDeliveryCompanyService.updateData();
+        return CommonResult.success();
+    }
+
+    /**
+     * 获取组件快递列表
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:delivery:company:get:list')")
+    @ApiOperation(value = "获取组件快递")
+    @RequestMapping(value = "/get/list", method = RequestMethod.GET)
+    public CommonResult<List<PayComponentDeliveryCompany>> getList(){
+        return CommonResult.success(payComponentDeliveryCompanyService.getList());
+    }
+}
+
+
+

+ 108 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentDraftMerchantProductController.java

@@ -0,0 +1,108 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.wechat.video.PayComponentDraftProduct;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.wxvedio.product.ComponentProductSearchRequest;
+import com.zbkj.common.request.wxvedio.product.PayComponentDraftProductMerchantOperationReviewStatus;
+import com.zbkj.common.request.wxvedio.product.PayComponentProductAddRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.PayComponentDraftProductService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @Auther: 大粽子
+ * @Date: 2022/10/10 19:36
+ * @Description: 微信 自定义交易组件 草稿商品 控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/pay/component/draftproduct")
+@Api(tags = "08小程序 自定义交易组件—草稿商品") //配合swagger使用
+public class PayComponentDraftMerchantProductController {
+
+    @Autowired
+    private PayComponentDraftProductService payComponentDraftProductService;
+
+    /**
+     * 添加商品 添加商品到草稿 不自动提审 有专门提审的api
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:draft:add')")
+    @ApiOperation(value = "添加草稿商品")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<Object> add(@RequestBody @Validated PayComponentProductAddRequest addRequest) {
+        if (payComponentDraftProductService.add(addRequest)) {
+            return CommonResult.success("添加商品成功");
+        }
+        return CommonResult.failed("添加商品失败");
+    }
+
+
+    /**
+     * 编辑草稿商品 不自动提审 有专门提审的api
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:draft:update')")
+    @ApiOperation(value = "编辑草稿商品")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<Object> update(@RequestBody @Validated PayComponentProductAddRequest addRequest) {
+        if (payComponentDraftProductService.edit(addRequest)) {
+            return CommonResult.success("编辑草稿商品成功");
+        }
+        return CommonResult.failed("编辑草稿商品失败");
+    }
+
+    /**
+     * 删除草稿商品 不自动提审 有专门提审的api
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:draft:delete')")
+    @ApiOperation(value = "删除草稿商品")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
+    public CommonResult<Object> delete(@PathVariable Integer id) {
+        if (payComponentDraftProductService.removeById(id)) {
+            return CommonResult.success("删除草稿商品成功");
+        }
+        return CommonResult.failed("删除草稿商品失败");
+    }
+
+    /**
+     * 草稿商品 商家审核操作
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:draft:review')")
+    @ApiOperation(value = "商家提审草稿商品")
+    @RequestMapping(value = "/review", method = RequestMethod.POST)
+    public CommonResult<Object> review(@RequestBody @Validated PayComponentDraftProductMerchantOperationReviewStatus reviewStatus) {
+        if (payComponentDraftProductService.OperationPlatformReviewStatusByMerchant(reviewStatus)) {
+            return CommonResult.success("商家操作草稿商品成功");
+        }
+        return CommonResult.failed("商家操作草稿商品失败");
+    }
+
+    /**
+     * 当前商户获取自己的草稿商品列表(分页)
+     * @param request 搜索条件
+     * @param pageParamRequest 分页参数
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:draft:list')")
+    @ApiOperation(value = "当前商户获取自己的草稿商品列表(分页))") //配合swagger使用
+    @RequestMapping(value = "/draft/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PayComponentDraftProduct>> getDraftList(@Validated ComponentProductSearchRequest request,
+                                                                           @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(payComponentDraftProductService.getCurrentMerchantAdminListBeforeWeChatReview(request, pageParamRequest)));
+    }
+
+    /**
+     * 草稿商品详情
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:draft:info')")
+    @ApiOperation(value = "草稿商品详情") //配合swagger使用
+    @RequestMapping(value = "/draft/get/{id}", method = RequestMethod.GET)
+    public CommonResult<PayComponentDraftProduct> getDraftInfo(@PathVariable Integer id) {
+        return CommonResult.success(payComponentDraftProductService.getInfo(id));
+    }
+}

+ 108 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentProductMerchantController.java

@@ -0,0 +1,108 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.wechat.video.PayComponentProduct;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.wxvedio.product.ComponentProductSearchRequest;
+import com.zbkj.common.response.wxvideo.PayComponentProductResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.PayComponentProductService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ *  组件商品表 前端控制器
+ *  +----------------------------------------------------------------------
+ *  | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ *  +----------------------------------------------------------------------
+ *  | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ *  +----------------------------------------------------------------------
+ *  | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ *  +----------------------------------------------------------------------
+ *  | Author: CRMEB Team <admin@crmeb.com>
+ *  +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/pay/component/product")
+@Api(tags = "07小程序 自定义交易组件—过审商品") //配合swagger使用
+public class PayComponentProductMerchantController {
+
+    @Autowired
+    private PayComponentProductService payComponentProductService;
+
+    /**
+     * 删除商品
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:delete')")
+    @ApiOperation(value = "删除商品")
+    @RequestMapping(value = "/delete/{proId}", method = RequestMethod.GET)
+    public CommonResult<Object> delete(@PathVariable Integer proId) {
+        if (payComponentProductService.delete(proId)) {
+            return CommonResult.success("删除商品成功");
+        }
+        return CommonResult.failed("删除商品失败");
+    }
+
+    /**
+     * 商家上架商品
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:puton')")
+    @ApiOperation(value = "上架商品")
+    @RequestMapping(value = "/puton/{proId}", method = RequestMethod.GET)
+    public CommonResult<Object> puton(@PathVariable Integer proId) {
+        if (payComponentProductService.putonByMerchant(proId)) {
+            return CommonResult.success("上架商品成功");
+        }
+        return CommonResult.failed("上架商品失败");
+    }
+
+    /**
+     * 商家下架商品
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:putdown')")
+    @ApiOperation(value = "下架商品")
+    @RequestMapping(value = "/putdown/{proId}", method = RequestMethod.GET)
+    public CommonResult<Object> putdown(@PathVariable Integer proId) {
+        if (payComponentProductService.putdownByMerchant(proId)) {
+            return CommonResult.success("下架商品成功");
+        }
+        return CommonResult.failed("下架商品失败");
+    }
+
+    /**
+     * 当前商户的过审商品列表(分页)
+     * @param request 搜索条件
+     * @param pageParamRequest 分页参数
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:list')")
+    @ApiOperation(value = "过审商品列表(分页)") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PayComponentProduct>> getList(@Validated ComponentProductSearchRequest request,
+                                                                 @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(payComponentProductService.getMerchantProductListByAfterWechatReview(request, pageParamRequest)));
+    }
+
+
+    /**
+     * 过审商品详情
+     */
+    @PreAuthorize("hasAuthority('merchant:pay:component:product:info')")
+    @ApiOperation(value = "过审商品详情") //配合swagger使用
+    @RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
+    public CommonResult<PayComponentProductResponse> getInfo(@PathVariable Integer id) {
+        return CommonResult.success(payComponentProductService.getInfo(id));
+    }
+}
+
+
+

+ 80 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PayComponentShopMerchantController.java

@@ -0,0 +1,80 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.wechat.video.PayComponentShopBrand;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.wxvedio.image.ShopUploadImgRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.wxvedioshop.WechatVideoUploadImageResponseVo;
+import com.zbkj.common.vo.wxvedioshop.cat_brand.ShopCatDetailVo;
+import com.zbkj.service.service.PayComponentShopService;
+import com.zbkj.service.service.WechatVideoBeforeService;
+import com.zbkj.service.service.WechatVideoSpuService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ *  自定义交易组件—商家及接入前
+ *  +----------------------------------------------------------------------
+ *  | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ *  +----------------------------------------------------------------------
+ *  | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ *  +----------------------------------------------------------------------
+ *  | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ *  +----------------------------------------------------------------------
+ *  | Author: CRMEB Team <admin@crmeb.com>
+ *  +----------------------------------------------------------------------
+ */
+@RestController
+@RequestMapping("api/admin/merchant/pay/component/shop")
+@Api(tags = "02微信小程序 自定义交易组件—接入商品前必须接口") //配合swagger使用
+public class PayComponentShopMerchantController {
+
+    @Autowired
+    private PayComponentShopService shopService;
+
+    @Autowired
+    private WechatVideoBeforeService wechatVideoBeforeService;
+
+    @Autowired
+    private WechatVideoSpuService wechatVideoSpuService;
+
+    /***************************************** 接入之前必须调用 START ************************************************/
+
+    @PreAuthorize("hasAuthority('merchant:pay:component:shop:cat:get')")
+    @ApiOperation(value = "获取类目详情")
+    @RequestMapping(value = "/cat/get", method = RequestMethod.POST)
+    public CommonResult<List<ShopCatDetailVo>> shopCatGet() {
+        return CommonResult.success(wechatVideoSpuService.getShopCat());
+    }
+
+    @PreAuthorize("hasAuthority('merchant:pay:component:shop:img:upload')")
+    @ApiOperation(value = "上传图片 到微信自定义组件换链接")
+    @RequestMapping(value = "/img/upload", method = RequestMethod.POST)
+    public CommonResult<WechatVideoUploadImageResponseVo> shopImgUpload(@RequestBody ShopUploadImgRequest request) {
+        return CommonResult.success(wechatVideoBeforeService.shopImgUpload(request));
+    }
+
+    /***************************************** 接入之前必须调用 END ************************************************/
+
+
+    @PreAuthorize("hasAuthority('merchant:pay:component:shop:brand:list')")
+    @ApiOperation(value = "品牌列表 分页")
+    @RequestMapping(value = "/brand/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PayComponentShopBrand>> shopBrandList(@Validated PageParamRequest pageParamRequest, @RequestParam(value = "status", required = false) Integer status) {
+        return CommonResult.success(CommonPage.restPage(shopService.brandList(pageParamRequest, status)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:pay:component:shop:brand:usable:list')")
+    @ApiOperation(value = "品牌列表 不分页")
+    @RequestMapping(value = "/brand/usable/list", method = RequestMethod.GET)
+    public CommonResult<List<PayComponentShopBrand>> shopUsableBrandList() {
+        return CommonResult.success(shopService.usableBrandList());
+    }
+}

+ 59 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PlatProductBrandController.java

@@ -0,0 +1,59 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.BrandCategorySearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.response.ProductBrandResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ProductBrandService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 平台端商品品牌控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/plat/product/brand")
+@Api(tags = "商户端商品品牌控制器")
+public class PlatProductBrandController {
+
+    @Autowired
+    private ProductBrandService productBrandService;
+
+    @PreAuthorize("hasAuthority('merchant:plat:product:brand:list')")
+    @ApiOperation(value = "品牌分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<ProductBrandResponse>> getList(@Validated BrandCategorySearchRequest request, @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(productBrandService.getPageListByCategory(request, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:plat:product:brand:cache:list')")
+    @ApiOperation(value = "品牌缓存列表(全部)")
+    @RequestMapping(value = "/cache/list", method = RequestMethod.GET)
+    public CommonResult<List<ProductBrandResponse>> getCacheAllList() {
+        return CommonResult.success(productBrandService.getCacheAllList());
+    }
+}
+
+
+

+ 48 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PlatProductCategoryController.java

@@ -0,0 +1,48 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.ProCategoryCacheVo;
+import com.zbkj.service.service.ProductCategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 商户端商品分类控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/plat/product/category")
+@Api(tags = "商户端商品分类控制器")
+public class PlatProductCategoryController {
+
+    @Autowired
+    private ProductCategoryService productCategoryService;
+
+    @PreAuthorize("hasAuthority('merchant:plat:product:category:cache:tree')")
+    @ApiOperation(value = "分类缓存树")
+    @RequestMapping(value = "/cache/tree", method = RequestMethod.GET)
+    public CommonResult<List<ProCategoryCacheVo>> getMerchantCacheTree() {
+        return CommonResult.success(productCategoryService.getMerchantCacheTree());
+    }
+}
+
+
+

+ 51 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/PlatProductGuaranteeController.java

@@ -0,0 +1,51 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.model.product.ProductGuarantee;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ProductGuaranteeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 平台端商品保障服务控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/plat/product/guarantee")
+@Api(tags = "商户端商品保障服务控制器")
+public class PlatProductGuaranteeController {
+
+    @Autowired
+    private ProductGuaranteeService guaranteeService;
+
+    @PreAuthorize("hasAuthority('merchant:plat:product:guarantee:list')")
+    @ApiOperation(value = "保障服务列表")
+    @ApiImplicitParam(name="type", value="类型,0-全部,1-有效", required = true)
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<List<ProductGuarantee>> getList(@RequestParam(name = "type", defaultValue = "0") Integer type) {
+        return CommonResult.success(guaranteeService.getList(type));
+    }
+}
+
+
+

+ 111 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/RefundOrderController.java

@@ -0,0 +1,111 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.OrderRefundAuditRequest;
+import com.zbkj.common.request.RefundOrderRemarkRequest;
+import com.zbkj.common.request.RefundOrderSearchRequest;
+import com.zbkj.common.request.RejectReceivingRequest;
+import com.zbkj.common.response.MerchantRefundOrderPageResponse;
+import com.zbkj.common.response.RefundOrderAdminDetailResponse;
+import com.zbkj.common.response.RefundOrderCountItemResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.RefundOrderService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 商户侧退款订单控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/refund/order")
+@Api(tags = "商户侧退款订单控制器") //配合swagger使用
+public class RefundOrderController {
+
+    @Autowired
+    private RefundOrderService refundOrderService;
+
+    @PreAuthorize("hasAuthority('merchant:refund:order:page:list')")
+    @ApiOperation(value = "商户端退款订单分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantRefundOrderPageResponse>> getList(@Validated RefundOrderSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(refundOrderService.getMerchantAdminPage(request)));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:refund:order:detail')")
+    @ApiOperation(value = "商户端退款订单详情") //配合swagger使用
+    @RequestMapping(value = "/detail/{refundOrderNo}", method = RequestMethod.GET)
+    public CommonResult<RefundOrderAdminDetailResponse> getDetail(@PathVariable(value = "refundOrderNo") String refundOrderNo) {
+        return CommonResult.success(refundOrderService.getMerchantDetail(refundOrderNo));
+    }
+
+    @PreAuthorize("hasAuthority('merchant:refund:order:status:num')")
+    @ApiOperation(value = "商户端获取退款订单各状态数量")
+    @RequestMapping(value = "/status/num", method = RequestMethod.GET)
+    public CommonResult<RefundOrderCountItemResponse> getOrderStatusNum(@Validated RefundOrderSearchRequest request) {
+        return CommonResult.success(refundOrderService.getMerchantOrderStatusNum(request));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商户备注退款订单")
+    @PreAuthorize("hasAuthority('merchant:refund:order:mark')")
+    @ApiOperation(value = "商户备注退款订单")
+    @RequestMapping(value = "/mark", method = RequestMethod.POST)
+    public CommonResult<String> mark(@RequestBody @Validated RefundOrderRemarkRequest request) {
+        if (refundOrderService.mark(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "退款单审核")
+    @PreAuthorize("hasAuthority('merchant:refund:order:audit')")
+    @ApiOperation(value = "退款单审核")
+    @RequestMapping(value = "/audit", method = RequestMethod.POST)
+    public CommonResult<String> audit(@RequestBody @Validated OrderRefundAuditRequest request) {
+        if (refundOrderService.audit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "退款单收到退货")
+    @PreAuthorize("hasAuthority('merchant:refund:order:receiving')")
+    @ApiOperation(value = "退款单收到退货")
+    @RequestMapping(value = "/receiving/{refundOrderNo}", method = RequestMethod.POST)
+    public CommonResult<String> receiving(@PathVariable(value = "refundOrderNo") String refundOrderNo) {
+        if (refundOrderService.receiving(refundOrderNo)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "退款单拒绝收货")
+    @PreAuthorize("hasAuthority('merchant:refund:order:receiving:reject')")
+    @ApiOperation(value = "退款单拒绝收货")
+    @RequestMapping(value = "/receiving/reject", method = RequestMethod.POST)
+    public CommonResult<String> receivingReject(@RequestBody @Validated RejectReceivingRequest request) {
+        if (refundOrderService.receivingReject(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+}
+
+
+

+ 93 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/ShippingTemplatesController.java

@@ -0,0 +1,93 @@
+package com.zbkj.admin.controller.merchant;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.express.ShippingTemplates;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.ShippingTemplatesRequest;
+import com.zbkj.common.request.ShippingTemplatesSearchRequest;
+import com.zbkj.common.response.ShippingTemplatesInfoResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ShippingTemplatesService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 物流-模板控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/shipping/templates")
+@Api(tags = "商户端 -- 运费模板")
+public class ShippingTemplatesController {
+
+    @Autowired
+    private ShippingTemplatesService shippingTemplatesService;
+
+    @PreAuthorize("hasAuthority('merchant:shipping:templates:list')")
+    @ApiOperation(value = "运费模板分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<ShippingTemplates>> getList(@Validated ShippingTemplatesSearchRequest request, @Validated PageParamRequest pageParamRequest) {
+        CommonPage<ShippingTemplates> shippingTemplatesCommonPage = CommonPage.restPage(shippingTemplatesService.getList(request, pageParamRequest));
+        return CommonResult.success(shippingTemplatesCommonPage);
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增运费模板")
+    @PreAuthorize("hasAuthority('merchant:shipping:templates:save')")
+    @ApiOperation(value = "新增运费模板")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated ShippingTemplatesRequest request) {
+        if (shippingTemplatesService.create(request)) {
+            return CommonResult.success("新增运费模板成功");
+        }
+        return CommonResult.failed("新增运费模板失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除运费模板")
+    @PreAuthorize("hasAuthority('merchant:shipping:templates:delete')")
+    @ApiOperation(value = "删除运费模板")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (shippingTemplatesService.remove(id)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "运费模板修改")
+    @PreAuthorize("hasAuthority('merchant:shipping:templates:update')")
+    @ApiOperation(value = "运费模板修改")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated ShippingTemplatesRequest request) {
+        if (shippingTemplatesService.edit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('merchant:shipping:templates:info')")
+    @ApiOperation(value = "运费模板详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<ShippingTemplatesInfoResponse> info(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(shippingTemplatesService.getInfo(id));
+    }
+}
+
+
+

+ 156 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/groupbuy/MerchantGroupBuyActivityController.java

@@ -0,0 +1,156 @@
+package com.zbkj.admin.controller.merchant.groupbuy;
+
+import com.zbkj.common.enums.GroupBuyGroupStatusEnum;
+import com.zbkj.common.model.admin.SystemAdmin;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.groupbuy.GroupBuyActivityRequest;
+import com.zbkj.common.request.groupbuy.GroupBuyActivitySearchRequest;
+import com.zbkj.common.request.groupbuy.GroupBuyActivityStatusOnOrOffRequest;
+import com.zbkj.common.request.groupbuy.PatGroupBuyActivitySearchRequest;
+import com.zbkj.common.response.groupbuy.GroupBuyActivityListHeaderCount;
+import com.zbkj.common.response.groupbuy.GroupBuyActivityResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.utils.SecurityUtil;
+import com.zbkj.service.service.groupbuy.GroupBuyActivityService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 拼团活动表 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/groupbuy/activity")
+@Api(tags = "商户端 - 拼团活动表") //配合swagger使用
+
+public class MerchantGroupBuyActivityController {
+
+    @Autowired
+    private GroupBuyActivityService groupBuyActivityService;
+
+    /**
+     * 分页显示拼团活动表
+     * @param request 搜索条件
+     * @param pageParamRequest 分页参数
+     * @author dazongzi
+     * @since 2024-08-13
+     */
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @PreAuthorize("hasAuthority('merchant:groupbuy:activity:list')")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<GroupBuyActivityResponse>> getList(@Validated GroupBuyActivitySearchRequest request, @Validated PageParamRequest pageParamRequest) {
+        PatGroupBuyActivitySearchRequest requestPat = new PatGroupBuyActivitySearchRequest();
+        BeanUtils.copyProperties(request, requestPat);
+        CommonPage<GroupBuyActivityResponse> groupBuyActivityCommonPage = CommonPage.restPage(groupBuyActivityService.getList(requestPat, pageParamRequest));
+        return CommonResult.success(groupBuyActivityCommonPage);
+    }
+
+    @ApiOperation(value = "拼团头部 对应活动进程数量") //配合swagger使用
+    @PreAuthorize("hasAuthority('merchant:groupbuy:activity:list:count')")
+    @RequestMapping(value = "/list/count", method = RequestMethod.GET)
+    public CommonResult<List<GroupBuyActivityListHeaderCount>> getListStatusCount(GroupBuyActivitySearchRequest request) {
+        SystemAdmin systemAdmin = SecurityUtil.getLoginUserVo().getUser();
+        return CommonResult.success(groupBuyActivityService.getListHeaderCount(request, systemAdmin));
+    }
+
+    /**
+     * 新增拼团活动表
+     * @param groupBuyActivityRequest 新增参数
+     * @author dazongzi
+     * @since 2024-08-13
+     */
+    @ApiOperation(value = "新增")
+    @PreAuthorize("hasAuthority('merchant:groupbuy:activity:add')")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated GroupBuyActivityRequest groupBuyActivityRequest) {
+        if(groupBuyActivityService.addGroupBuyActivity(groupBuyActivityRequest)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 删除拼团活动表
+     * @param id Integer
+     * @author dazongzi
+     * @since 2024-08-13
+     */
+    @ApiOperation(value = "删除")
+    @PreAuthorize("hasAuthority('merchant:groupbuy:activity:delete')")
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public CommonResult<String> delete(@RequestParam(value = "id") Integer id) {
+        if(groupBuyActivityService.deleteGroupBuyActivity(id)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 修改拼团活动表
+     * @param groupBuyActivityRequest 修改参数
+     * @author dazongzi
+     * @since 2024-08-13
+     */
+    @ApiOperation(value = "修改")
+    @PreAuthorize("hasAuthority('merchant:groupbuy:activity:update')")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated GroupBuyActivityRequest groupBuyActivityRequest) {
+        if(groupBuyActivityService.updateGroupBuyActivity(groupBuyActivityRequest)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 查询拼团活动表信息
+     * @param id Integer
+     * @author dazongzi
+     * @since 2024-08-13
+     */
+    @ApiOperation(value = "详情")
+    @PreAuthorize("hasAuthority('merchant:groupbuy:activity:info')")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<GroupBuyActivityResponse> info(@RequestParam(value = "id") Integer id) {
+        GroupBuyActivityResponse groupBuyActivity = groupBuyActivityService.getGroupBuyActivity(id);
+        return CommonResult.success(groupBuyActivity);
+    }
+
+
+    @ApiOperation(value = "活动状态 修改")
+    @PreAuthorize("hasAuthority('merchant:groupbuy:activity:change:status')")
+    @RequestMapping(value = "/status", method = RequestMethod.POST)
+    public CommonResult<String> status(@RequestBody @Validated GroupBuyActivityStatusOnOrOffRequest request) {
+        if(groupBuyActivityService.groupBuyActivityStatusOnOrOff(request.getId(), request.getStatus())){
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    @ApiOperation(value = "撤回待审核")
+    @PreAuthorize("hasAuthority('merchant:groupbuy:activity:rollback')")
+    @RequestMapping(value = "/activity/rollback", method = RequestMethod.GET)
+    public CommonResult<String> activityStatusRollback(@RequestParam(value = "id") Integer id) {
+        if(groupBuyActivityService.groupBuyGroupStatusProgress(id, GroupBuyGroupStatusEnum.GROUP_BUY_ENUM_ACTIVITY_STATUS_CANCEL.getCode(), null)){
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+}
+
+
+

+ 79 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/groupbuy/MerchantGroupBuyRecordController.java

@@ -0,0 +1,79 @@
+package com.zbkj.admin.controller.merchant.groupbuy;
+
+import com.zbkj.common.model.admin.SystemAdmin;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.GroupBuyRecordPageNumRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.groupbuy.GroupBuyRecordSearchRequest;
+import com.zbkj.common.response.groupbuy.GroupBuyActivityRecordAdminListResponse;
+import com.zbkj.common.response.groupbuy.GroupBuyActivityRecordListHeaderCount;
+import com.zbkj.common.response.groupbuy.GroupBuyRecordDetailResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.utils.SecurityUtil;
+import com.zbkj.service.service.groupbuy.GroupBuyRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 拼团活动记录表 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/groupbuy/record")
+@Api(tags = "商户端 - 拼团活动记录表") //配合swagger使用
+public class MerchantGroupBuyRecordController {
+
+    @Autowired
+    private GroupBuyRecordService groupBuyRecordService;
+
+    /**
+     * 分页显示拼团活动记录表
+     *
+     * @param request          搜索条件
+     * @param pageParamRequest 分页参数
+     * @author dazongzi
+     * @since 2024-08-13
+     */
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @PreAuthorize("hasAuthority('merchant:groupbuy:record:list')")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<GroupBuyActivityRecordAdminListResponse>> getList(@Validated GroupBuyRecordSearchRequest request, @Validated PageParamRequest pageParamRequest) {
+        CommonPage<GroupBuyActivityRecordAdminListResponse> groupBuyRecordCommonPage = CommonPage.restPage(groupBuyRecordService.getList(request, pageParamRequest));
+        return CommonResult.success(groupBuyRecordCommonPage);
+    }
+
+
+    @ApiOperation(value = "拼团记录头部 对应活动进程数量") //配合swagger使用
+    @PreAuthorize("hasAuthority('merchant:groupbuy:record:list:count')")
+    @RequestMapping(value = "/list/count", method = RequestMethod.GET)
+    public CommonResult<GroupBuyActivityRecordListHeaderCount> getListStatusCount(@Validated GroupBuyRecordPageNumRequest request) {
+        SystemAdmin systemAdmin = SecurityUtil.getLoginUserVo().getUser();
+        return CommonResult.success(groupBuyRecordService.getListHeaderCount(request, systemAdmin));
+    }
+
+    /**
+     * 查询拼团活动记录表信息
+     *
+     * @param id Integer
+     * @author dazongzi
+     * @since 2024-08-13
+     */
+    @ApiOperation(value = "拼团开团记录详情")
+    @PreAuthorize("hasAuthority('merchant:groupbuy:record:info')")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<GroupBuyRecordDetailResponse> info(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(groupBuyRecordService.getByAdminDetail(id));
+    }
+}
+
+
+

+ 59 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/merchant/groupbuy/MerchantGroupBuyUserController.java

@@ -0,0 +1,59 @@
+package com.zbkj.admin.controller.merchant.groupbuy;
+
+import com.zbkj.common.model.groupbuy.GroupBuyUser;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.groupbuy.GroupBuyUserSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.groupbuy.GroupBuyUserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 拼团参与成员表 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/merchant/groupbuy/user")
+@Api(tags = "商户端 - 拼团参与成员表") //配合swagger使用
+public class MerchantGroupBuyUserController {
+
+    @Autowired
+    private GroupBuyUserService groupBuyUserService;
+
+    /**
+     * 分页显示拼团参与成员表
+     * @param request 搜索条件
+     * @param pageParamRequest 分页参数
+     * @author dazongzi
+     * @since 2024-08-13
+     */
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<GroupBuyUser>>  getList(@Validated GroupBuyUserSearchRequest request, @Validated PageParamRequest pageParamRequest) {
+        CommonPage<GroupBuyUser> groupBuyUserCommonPage = CommonPage.restPage(groupBuyUserService.getList(request, pageParamRequest));
+        return CommonResult.success(groupBuyUserCommonPage);
+    }
+
+
+    /**
+     * 查询拼团参与成员表信息
+     * @param id Integer
+     * @author dazongzi
+     * @since 2024-08-13
+     */
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<GroupBuyUser> info(@RequestParam(value = "id") Integer id) {
+        GroupBuyUser groupBuyUser = groupBuyUserService.getById(id);
+        return CommonResult.success(groupBuyUser);
+    }
+}
+
+
+

+ 138 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/ActivityStyleController.java

@@ -0,0 +1,138 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.constants.DateConstants;
+import com.zbkj.common.model.acticitystyle.ActivityStyle;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.ActivityStyleRequest;
+import com.zbkj.common.request.ActivityStyleSearchRequest;
+import com.zbkj.common.request.ActivityStyleUpdateStatusRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.response.ActivityStyleResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.utils.CrmebDateUtil;
+import com.zbkj.service.service.ActivityStyleService;
+import com.zbkj.service.service.SystemAttachmentService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 活动样式 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/activitystyle")
+@Api(tags = "活动样式") //配合swagger使用
+public class ActivityStyleController {
+
+    @Autowired
+    private ActivityStyleService activityStyleService;
+    @Autowired
+    private SystemAttachmentService systemAttachmentService;
+
+    /**
+     * 分页显示
+     *
+     * @param request          搜索条件
+     * @param pageParamRequest 分页参数
+     * @author dazongzi
+     * @since 2023-01-05
+     */
+    @PreAuthorize("hasAuthority('platform:activitystyle:list')")
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<ActivityStyleResponse>> getList(@Validated ActivityStyleSearchRequest request,
+                                                                   @ModelAttribute PageParamRequest pageParamRequest) {
+        CommonPage<ActivityStyleResponse> activityStyleCommonPage = CommonPage.restPage(activityStyleService.getList(request, pageParamRequest));
+        return CommonResult.success(activityStyleCommonPage);
+    }
+
+    /**
+     * 新增
+     *
+     * @param activityStyleRequest 新增参数
+     * @author dazongzi
+     * @since 2023-01-05
+     */
+    @PreAuthorize("hasAuthority('platform:activitystyle:save')")
+    @ApiOperation(value = "新增")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated ActivityStyleRequest activityStyleRequest) {
+        ActivityStyle activityStyle = new ActivityStyle();
+        BeanUtils.copyProperties(activityStyleRequest, activityStyle);
+        activityStyle.setStarttime(CrmebDateUtil.strToDate(activityStyleRequest.getStarttime(), DateConstants.DATE_FORMAT));
+        activityStyle.setEndtime(CrmebDateUtil.strToDate(activityStyleRequest.getEndtime(), DateConstants.DATE_FORMAT));
+        activityStyle.setStyle(systemAttachmentService.clearPrefix(activityStyle.getStyle()));
+        if (activityStyleService.save(activityStyle)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 删除
+     *
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-01-05
+     */
+    @PreAuthorize("hasAuthority('platform:activitystyle:delete')")
+    @ApiOperation(value = "删除")
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public CommonResult<String> delete(@RequestParam(value = "id") Integer id) {
+        if (activityStyleService.removeById(id)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 修改
+     *
+     * @param activityStyleRequest 修改参数
+     * @author dazongzi
+     * @since 2023-01-05
+     */
+    @PreAuthorize("hasAuthority('platform:activitystyle:edite')")
+    @ApiOperation(value = "修改")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated ActivityStyleRequest activityStyleRequest) {
+        ActivityStyle activityStyle = new ActivityStyle();
+        BeanUtils.copyProperties(activityStyleRequest, activityStyle);
+        activityStyle.setId(activityStyleRequest.getId());
+        activityStyle.setStyle(systemAttachmentService.clearPrefix(activityStyle.getStyle()));
+        activityStyle.setStarttime(CrmebDateUtil.strToDate(activityStyleRequest.getStarttime(), DateConstants.DATE_FORMAT));
+        activityStyle.setEndtime(CrmebDateUtil.strToDate(activityStyleRequest.getEndtime(), DateConstants.DATE_FORMAT));
+        if (activityStyleService.updateById(activityStyle)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 更新状态
+     */
+    @PreAuthorize("hasAuthority('platform:activitystyle:updatestatus')")
+    @ApiOperation(value = "更新状态")
+    @RequestMapping(value = "/status", method = RequestMethod.POST)
+    public CommonResult<String> updateStatus(@RequestBody @Validated ActivityStyleUpdateStatusRequest activityStyleUpdateStatusRequest) {
+        boolean result = activityStyleService.updateStatus(activityStyleUpdateStatusRequest.getId(), activityStyleUpdateStatusRequest.getStatus());
+        if (result) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+}
+
+
+

+ 226 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/AgreementController.java

@@ -0,0 +1,226 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.constants.SysConfigConstants;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.SystemConfigService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.constraints.NotEmpty;
+
+/**
+ * 文字协议 控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/agreement")
+@Api(tags = "协议管理")
+public class AgreementController {
+    @Autowired
+    private SystemConfigService systemConfigService;
+
+    /**
+     * 保存用户注册协议
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:user:save')")
+    @ApiOperation(value = "用户注册协议 保存")
+    @RequestMapping(value = "/usersave", method = RequestMethod.POST)
+    public CommonResult<Boolean> userAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.USER_REGISTER_AGREEMENT, agreement));
+    }
+
+    /**
+     * 获取用户注册协议
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:user:info')")
+    @ApiOperation(value = "用户注册协议 详情")
+    @RequestMapping(value = "/userinfo", method = RequestMethod.GET)
+    public CommonResult<String> userAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.USER_REGISTER_AGREEMENT));
+    }
+
+    /**
+     * 保存商户入住协议
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:merincomming:save')")
+    @ApiOperation(value = "商户入驻协议 保存")
+    @RequestMapping(value = "/merincommingsave", method = RequestMethod.POST)
+    public CommonResult<Boolean> merincommingAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.MERCHANT_SETTLEMENT_AGREEMENT, agreement));
+    }
+
+    /**
+     * 获取商户入住协议
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:merincomming:info')")
+    @ApiOperation(value = "商户入驻协议 详情")
+    @RequestMapping(value = "/merincomminginfo", method = RequestMethod.GET)
+    public CommonResult<String> merincommingAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.MERCHANT_SETTLEMENT_AGREEMENT));
+    }
+
+    /**
+     * 保存用户隐私协议
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:userprivacy:save')")
+    @ApiOperation(value = "用户隐私协议 保存")
+    @RequestMapping(value = "/userprivacysave", method = RequestMethod.POST)
+    public CommonResult<Boolean> userPrivacyAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.USER_PRIVACY_AGREEMENT, agreement));
+    }
+
+    /**
+     * 获取用户隐私协议
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:userprivacy:info')")
+    @ApiOperation(value = "用户隐私协议 详情")
+    @RequestMapping(value = "/userprivacyinfo", method = RequestMethod.GET)
+    public CommonResult<String> userPrivacyAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.USER_PRIVACY_AGREEMENT));
+    }
+
+    /**
+     * 保存用户注销协议
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:useraccountcancel:save')")
+    @ApiOperation(value = "用户注销协议 保存")
+    @RequestMapping(value = "/useraccountcancelsave", method = RequestMethod.POST)
+    public CommonResult<Boolean> userAccountCancelAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.USER_CANCEL_AGREEMENT, agreement));
+    }
+
+    /**
+     * 获取用户注销协议
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:useraccountcancel:info')")
+    @ApiOperation(value = "用户注销协议 详情")
+    @RequestMapping(value = "/useraccountcancelinfo", method = RequestMethod.GET)
+    public CommonResult<String> userAccountCancelAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.USER_CANCEL_AGREEMENT));
+    }
+
+
+    /**
+     * 保存用户注销重要提示
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:useraccountcancelnotice:save')")
+    @ApiOperation(value = "用户注销声明 保存")
+    @RequestMapping(value = "/useraccountcancelnoticesave", method = RequestMethod.POST)
+    public CommonResult<Boolean> userAccountCancelNoticeAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.USER_CANCEL_NOTICE_AGREEMENT, agreement));
+    }
+
+    /**
+     * 获取用户注销声明重要提示
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:useraccountcancelnotice:info')")
+    @ApiOperation(value = "用户注销声明 详情")
+    @RequestMapping(value = "/useraccountcancelnoticeinfo", method = RequestMethod.GET)
+    public CommonResult<String> userAccountCancelNoticeAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.USER_CANCEL_NOTICE_AGREEMENT));
+    }
+
+    /**
+     * 关于我们协议保存
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:aboutus:save')")
+    @ApiOperation(value = "关于我们协议 保存")
+    @RequestMapping(value = "/aboutussave", method = RequestMethod.POST)
+    public CommonResult<Boolean> aboutusAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.ABOUTUS_AGREEMENT, agreement));
+    }
+
+    /**
+     * 关于我们协议 详情
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:aboutus:info')")
+    @ApiOperation(value = "关于我们协议 详情")
+    @RequestMapping(value = "/aboutusinfo", method = RequestMethod.GET)
+    public CommonResult<String> aboutusAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.ABOUTUS_AGREEMENT));
+    }
+
+    /**
+     * 平台资质证明 保存
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:intelligent:save')")
+    @ApiOperation(value = "平台资质证明 保存")
+    @RequestMapping(value = "/intelligentsave", method = RequestMethod.POST)
+    public CommonResult<Boolean> intelligentAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.PLATFROM_INTELLIGENT_AGREEMENT, agreement));
+    }
+
+    /**
+     * 平台资质证明 详情
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:intelligent:info')")
+    @ApiOperation(value = "平台资质证明 详情")
+    @RequestMapping(value = "/intelligentinfo", method = RequestMethod.GET)
+    public CommonResult<String> intelligentAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.PLATFROM_INTELLIGENT_AGREEMENT));
+    }
+
+    /**
+     * 平台规则 保存
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:platfromrule:save')")
+    @ApiOperation(value = "平台规则 保存")
+    @RequestMapping(value = "/platfromrulesave", method = RequestMethod.POST)
+    public CommonResult<Boolean> platfromRuleAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.PLATFROM_RULE_AGREEMENT, agreement));
+    }
+
+    /**
+     * 平台规则 详情
+     */
+    @PreAuthorize("hasAuthority('platform:system:agreement:platfromrule:info')")
+    @ApiOperation(value = "平台规则 详情")
+    @RequestMapping(value = "/platfromruleinfo", method = RequestMethod.GET)
+    public CommonResult<String> platfromRuleAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.PLATFROM_RULE_AGREEMENT));
+    }
+
+    @PreAuthorize("hasAuthority('platform:system:agreement:coupon:agreement:save')")
+    @ApiOperation(value = "优惠券规则 保存")
+    @RequestMapping(value = "/coupon/agreement/save", method = RequestMethod.POST)
+    public CommonResult<Boolean> couponAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.COUPON_AGREEMENT, agreement));
+    }
+
+    @PreAuthorize("hasAuthority('platform:system:agreement:coupon:agreement:info')")
+    @ApiOperation(value = "优惠券规则 详情")
+    @RequestMapping(value = "/coupon/agreement/info", method = RequestMethod.GET)
+    public CommonResult<String> couponAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.COUPON_AGREEMENT));
+    }
+
+    @PreAuthorize("hasAuthority('platform:system:agreement:paid:member:save')")
+    @ApiOperation(value = "付费会员协议 保存")
+    @RequestMapping(value = "/paid/member/save", method = RequestMethod.POST)
+    public CommonResult<Boolean> paidMemberAgreementSave(@RequestBody @NotEmpty String agreement) {
+        return CommonResult.success(systemConfigService.updateOrSaveValueByName(SysConfigConstants.PAID_MEMBER_AGREEMENT, agreement));
+    }
+
+    @PreAuthorize("hasAuthority('platform:system:agreement:paid:member:info')")
+    @ApiOperation(value = "付费会员协议 详情")
+    @RequestMapping(value = "/paid/member/info", method = RequestMethod.GET)
+    public CommonResult<String> paidMemberAgreementInfo() {
+        return CommonResult.success(systemConfigService.getAgreementByKey(SysConfigConstants.PAID_MEMBER_AGREEMENT));
+    }
+}

+ 97 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/ArticleCategoryController.java

@@ -0,0 +1,97 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.request.ArticleCategoryRequest;
+import com.zbkj.common.response.ArticleCategoryResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ArticleCategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 文章管理表 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/article/category")
+@Api(tags = "文章分类管理")
+public class ArticleCategoryController {
+
+    @Autowired
+    private ArticleCategoryService articleCategoryService;
+
+    @PreAuthorize("hasAuthority('platform:article:category:list')")
+    @ApiOperation(value = "文章分类分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<List<ArticleCategoryResponse>> getList() {
+        return CommonResult.success(articleCategoryService.getAdminList());
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增文章分类")
+    @PreAuthorize("hasAuthority('platform:article:category:add')")
+    @ApiOperation(value = "新增文章分类")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<String> add(@RequestBody @Validated ArticleCategoryRequest request) {
+        if (articleCategoryService.create(request)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除文章分类")
+    @PreAuthorize("hasAuthority('platform:article:category:delete')")
+    @ApiOperation(value = "删除文章分类")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (articleCategoryService.deleteById(id)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改文章分类")
+    @PreAuthorize("hasAuthority('platform:article:category:update')")
+    @ApiOperation(value = "修改文章分类")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated ArticleCategoryRequest request) {
+        if (articleCategoryService.edit(request)) {
+            return CommonResult.success();
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "文章分类开关")
+    @PreAuthorize("hasAuthority('platform:article:category:switch')")
+    @ApiOperation(value="文章分类开关")
+    @RequestMapping(value = "/switch/{id}", method = RequestMethod.POST)
+    public CommonResult<String> categorySwitch(@PathVariable("id") Integer id) {
+        if (articleCategoryService.categorySwitch(id)) {
+            return CommonResult.success("切换文章分类开关成功");
+        }
+        return CommonResult.failed("切换文章分类开关失败");
+    }
+}
+
+
+

+ 111 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/ArticleController.java

@@ -0,0 +1,111 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.ArticleRequest;
+import com.zbkj.common.request.ArticleSearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.response.ArticleInfoResponse;
+import com.zbkj.common.response.ArticleResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ArticleService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 文章管理表 前端控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/article")
+@Api(tags = "文章管理")
+public class ArticleController {
+
+    @Autowired
+    private ArticleService articleService;
+
+    @PreAuthorize("hasAuthority('platform:article:list')")
+    @ApiOperation(value = "文章分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "cid", value = "分类id", dataType = "int"),
+            @ApiImplicitParam(name = "title", value = "标题", dataType = "string"),
+            @ApiImplicitParam(name = "author", value = "作者", dataType = "string")
+    })
+    public CommonResult<CommonPage<ArticleResponse>> getList(@Validated ArticleSearchRequest request,
+                                                             @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(articleService.getAdminList(request, pageParamRequest)));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "文章新增")
+    @PreAuthorize("hasAuthority('platform:article:save')")
+    @ApiOperation(value = "文章新增")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated ArticleRequest articleRequest) {
+        if (articleService.create(articleRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除文章")
+    @PreAuthorize("hasAuthority('platform:article:delete')")
+    @ApiOperation(value = "删除文章")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "id") Integer id) {
+        if (articleService.deleteById(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "文章编辑")
+    @PreAuthorize("hasAuthority('platform:article:update')")
+    @ApiOperation(value = "文章编辑")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated ArticleRequest articleRequest) {
+        if (articleService.updateArticle(articleRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:article:info')")
+    @ApiOperation(value = "文章详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<ArticleInfoResponse> info(@PathVariable(value = "id") Integer id) {
+        return CommonResult.success(articleService.getDetail(id));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "文章开关")
+    @PreAuthorize("hasAuthority('platform:article:switch')")
+    @ApiOperation(value = "文章开关")
+    @RequestMapping(value = "/switch/{id}", method = RequestMethod.POST)
+    public CommonResult<String> articleSwitch(@PathVariable("id") Integer id) {
+        if (articleService.articleSwitch(id)) {
+            return CommonResult.success("切换文章开关成功");
+        }
+        return CommonResult.failed("切换文章开关失败");
+    }
+}
+
+
+

+ 87 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CityRegionController.java

@@ -0,0 +1,87 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.request.CityRegionEditRequest;
+import com.zbkj.common.request.CityRegionRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.CityVo;
+import com.zbkj.service.service.CityRegionService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 城市区域控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/city/region")
+@Api(tags = "城市管理")
+public class CityRegionController {
+
+    @Autowired
+    private CityRegionService cityRegionService;
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "城市区域添加")
+    @PreAuthorize("hasAuthority('platform:city:region:add')")
+    @ApiOperation(value = "城市区域添加")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<String> add(@Validated CityRegionRequest request) {
+        if (cityRegionService.add(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "城市区域编辑")
+    @PreAuthorize("hasAuthority('platform:city:region:edit')")
+    @ApiOperation(value = "城市区域编辑")
+    @RequestMapping(value = "/edit", method = RequestMethod.POST)
+    public CommonResult<String> edit(@Validated CityRegionEditRequest request) {
+        if (cityRegionService.edit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "城市区域删除")
+    @PreAuthorize("hasAuthority('platform:city:region:delete')")
+    @ApiOperation(value = "城市区域删除")
+    @RequestMapping(value = "/delete/{regionId}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable(value = "regionId") Integer regionId) {
+        if (cityRegionService.delete(regionId)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:city:region:list:tree')")
+    @ApiOperation(value = "获取城市区域tree结构的列表")
+    @RequestMapping(value = "/list/tree", method = RequestMethod.GET)
+    public CommonResult<List<CityVo>> getListTree() {
+        return CommonResult.success(cityRegionService.getRegionListTree());
+    }
+}
+
+
+

+ 71 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityCategoryController.java

@@ -0,0 +1,71 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.model.community.CommunityCategory;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.CommunityCategorySaveRequest;
+import com.zbkj.common.request.CommunityCategorySearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.CommunityCategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @ClassName CommunityCategoryController
+ * @Description 社区分类控制器
+ * @Author HZW
+ * @Date 2023/3/7 11:32
+ * @Version 1.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/community/category")
+@Api(tags = "社区分类管理")
+public class CommunityCategoryController {
+
+    @Autowired
+    private CommunityCategoryService communityCategoryService;
+
+    @PreAuthorize("hasAuthority('platform:community:category:page:list')")
+    @ApiOperation(value = "社区分类分页列表")
+    @RequestMapping(value = "/page/list", method = RequestMethod.GET)
+    public CommonPage<CommunityCategory> findPageList(@Validated CommunityCategorySearchRequest request) {
+        return CommonPage.restPage(communityCategoryService.findPageList(request));
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:category:add')")
+    @ApiOperation(value = "添加社区分类")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<Object> add(@RequestBody @Validated CommunityCategorySaveRequest request) {
+        communityCategoryService.add(request);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:category:update')")
+    @ApiOperation(value = "编辑社区分类")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<Object> update(@RequestBody @Validated CommunityCategorySaveRequest request) {
+        communityCategoryService.edit(request);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:category:delete')")
+    @ApiOperation(value = "删除社区分类")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> update(@PathVariable("id") Integer id) {
+        communityCategoryService.deleteById(id);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:category:show:switch')")
+    @ApiOperation(value = "社区分类显示开关")
+    @RequestMapping(value = "/show/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> showSwitch(@PathVariable("id") Integer id) {
+        communityCategoryService.showSwitch(id);
+        return CommonResult.success();
+    }
+}

+ 48 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityController.java

@@ -0,0 +1,48 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.admin.service.CommunityService;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.CommunityConfigVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @ClassName CommunityCategoryController
+ * @Description 社区控制器
+ * @Author HZW
+ * @Date 2023/3/7 11:32
+ * @Version 1.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/community/category")
+@Api(tags = "社区管理")
+public class CommunityController {
+
+    @Autowired
+    private CommunityService communityService;
+
+    @PreAuthorize("hasAuthority('platform:community:get:config')")
+    @ApiOperation(value = "获取社区配置")
+    @RequestMapping(value = "/get/config", method = RequestMethod.GET)
+    public CommunityConfigVo getConfig() {
+        return communityService.getConfig();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:update:config')")
+    @ApiOperation(value = "更新社区配置")
+    @RequestMapping(value = "/update/config", method = RequestMethod.POST)
+    public CommonResult<Object> updateConfig(@RequestBody @Validated CommunityConfigVo request) {
+        communityService.updateConfig(request);
+        return CommonResult.success();
+    }
+
+}

+ 94 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityNoteController.java

@@ -0,0 +1,94 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.*;
+import com.zbkj.common.response.CommunityNoteDetailResponse;
+import com.zbkj.common.response.CommunityNotePageDateResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.CommunityNotesService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @ClassName CommunityNoteController
+ * @Description 社区笔记控制器
+ * @Author HZW
+ * @Date 2023/3/7 11:32
+ * @Version 1.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/community/note")
+@Api(tags = "社区笔记管理")
+public class CommunityNoteController {
+
+    @Autowired
+    private CommunityNotesService notesService;
+
+    @PreAuthorize("hasAuthority('platform:community:note:page:list')")
+    @ApiOperation(value = "社区笔记分页列表")
+    @RequestMapping(value = "/page/list", method = RequestMethod.GET)
+    public CommonPage<CommunityNotePageDateResponse> findPageList(@Validated CommunityNoteSearchRequest request) {
+        return CommonPage.restPage(notesService.findPageList(request));
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:note:detail')")
+    @ApiOperation(value = "社区笔记详情")
+    @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
+    public CommunityNoteDetailResponse detail(@PathVariable("id") Integer id) {
+        return notesService.detail(id);
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:note:audit')")
+    @ApiOperation(value = "社区笔记审核")
+    @RequestMapping(value = "/audit", method = RequestMethod.POST)
+    public CommonResult<Object> audit(@RequestBody @Validated CommonAuditRequest request) {
+        notesService.audit(request);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:note:forced:down')")
+    @ApiOperation(value = "社区笔记强制下架")
+    @RequestMapping(value = "/forced/down/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> forcedDown(@RequestBody @Validated CommonForcedDownRequest request) {
+        notesService.forcedDown(request);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:note:delete')")
+    @ApiOperation(value = "社区笔记删除")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> delete(@PathVariable("id") Integer id) {
+        notesService.delete(id);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:note:category:batch:update')")
+    @ApiOperation(value = "社区笔记分类批量修改")
+    @RequestMapping(value = "/category/batch/update", method = RequestMethod.POST)
+    public CommonResult<Object> categoryBatchUpdate(@RequestBody @Validated CommunityNoteCategoryBatchUpdateRequest request) {
+        notesService.categoryBatchUpdate(request);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:note:star:update')")
+    @ApiOperation(value = "社区笔记推荐星级编辑")
+    @RequestMapping(value = "/star/update", method = RequestMethod.POST)
+    public CommonResult<Object> updateStar(@RequestBody @Validated CommonStarUpdateRequest request) {
+        notesService.updateStar(request);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:note:repley:force:off:switch')")
+    @ApiOperation(value = "社区笔记评论强制关闭开关")
+    @RequestMapping(value = "/reply/force/off/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> replyForceOffSwitch(@PathVariable("id") Integer id) {
+        notesService.replyForceOffSwitch(id);
+        return CommonResult.success();
+    }
+}

+ 64 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityReplyController.java

@@ -0,0 +1,64 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.CommonAuditRequest;
+import com.zbkj.common.request.CommunityReplySearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.response.CommunityCommentReplyResponse;
+import com.zbkj.common.response.CommunityReplyPageDateResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.CommunityReplyService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @ClassName CommunityReplyController
+ * @Description 社区评论控制器
+ * @Author HZW
+ * @Date 2023/3/7 11:32
+ * @Version 1.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/community/reply")
+@Api(tags = "社区评论管理")
+public class CommunityReplyController {
+
+    @Autowired
+    private CommunityReplyService replyService;
+
+    @PreAuthorize("hasAuthority('platform:community:reply:page:list')")
+    @ApiOperation(value = "社区评论分页列表")
+    @RequestMapping(value = "/page/list", method = RequestMethod.GET)
+    public CommonPage<CommunityReplyPageDateResponse> findPageList(@Validated CommunityReplySearchRequest request) {
+        return CommonPage.restPage(replyService.findPageList(request));
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:reply:audit')")
+    @ApiOperation(value = "社区评论审核")
+    @RequestMapping(value = "/audit", method = RequestMethod.POST)
+    public CommonResult<Object> audit(@RequestBody @Validated CommonAuditRequest request) {
+        replyService.audit(request);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:reply:delete')")
+    @ApiOperation(value = "社区评论删除")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> delete(@PathVariable("id") Integer id) {
+        replyService.delete(id);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:reply:note:page:list')")
+    @ApiOperation(value = "社区评论-文章分页列表")
+    @RequestMapping(value = "/note/page/list/{nid}", method = RequestMethod.GET)
+    public CommonPage<CommunityCommentReplyResponse> findNotePageList(@PathVariable("nid") Integer nid, @Validated PageParamRequest request) {
+        return CommonPage.restPage(replyService.findNotePageList(nid, request));
+    }
+}

+ 72 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CommunityTopicController.java

@@ -0,0 +1,72 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.model.community.CommunityTopic;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.CommunityCategorySaveRequest;
+import com.zbkj.common.request.CommunityTopicSaveRequest;
+import com.zbkj.common.request.CommunityTopicSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.CommunityTopicService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @ClassName CommunityTopicController
+ * @Description 社区话题控制器
+ * @Author HZW
+ * @Date 2023/3/7 11:32
+ * @Version 1.0
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/community/topic")
+@Api(tags = "社区话题管理")
+public class CommunityTopicController {
+
+    @Autowired
+    private CommunityTopicService topicService;
+
+    @PreAuthorize("hasAuthority('platform:community:topic:page:list')")
+    @ApiOperation(value = "社区话题分页列表")
+    @RequestMapping(value = "/page/list", method = RequestMethod.GET)
+    public CommonPage<CommunityTopic> findPageList(@Validated CommunityTopicSearchRequest request) {
+        return CommonPage.restPage(topicService.findPageList(request));
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:topic:add')")
+    @ApiOperation(value = "添加社区话题")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<Object> add(@RequestBody @Validated CommunityTopicSaveRequest request) {
+        topicService.add(request);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:topic:update')")
+    @ApiOperation(value = "编辑社区话题")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<Object> update(@RequestBody @Validated CommunityTopicSaveRequest request) {
+        topicService.edit(request);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:topic:delete')")
+    @ApiOperation(value = "删除社区话题")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> update(@PathVariable("id") Integer id) {
+        topicService.deleteById(id);
+        return CommonResult.success();
+    }
+
+    @PreAuthorize("hasAuthority('platform:community:topic:recommend:switch')")
+    @ApiOperation(value = "社区话题开启/关闭推荐")
+    @RequestMapping(value = "/recommend/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> recommendSwitch(@PathVariable("id") Integer id) {
+        topicService.recommendSwitch(id);
+        return CommonResult.success();
+    }
+}

+ 56 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/CopyrightController.java

@@ -0,0 +1,56 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.admin.copyright.CopyrightInfoResponse;
+import com.zbkj.admin.copyright.CopyrightUpdateInfoRequest;
+import com.zbkj.admin.service.CopyrightService;
+import com.zbkj.common.result.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 版权控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/copyright")
+@Api(tags = "版权控制器")
+public class CopyrightController {
+
+    @Autowired
+    private CopyrightService copyrightService;
+
+//    @PreAuthorize("hasAuthority('platform:copyright:get:info')")
+    @ApiOperation(value = "获取版权信息")
+    @RequestMapping(value = "/get/info", method = RequestMethod.GET)
+    public CommonResult<CopyrightInfoResponse> getInfo() {
+        return CommonResult.success(copyrightService.getInfo());
+    }
+
+    @PreAuthorize("hasAuthority('platform:copyright:update:company:info')")
+    @ApiOperation(value = "编辑公司版权信息")
+    @RequestMapping(value = "/update/company/info", method = RequestMethod.POST)
+    public CommonResult<Object> updateCompanyInfo(@RequestBody @Validated CopyrightUpdateInfoRequest request) {
+        if (copyrightService.updateCompanyInfo(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+}

+ 98 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/ExpressController.java

@@ -0,0 +1,98 @@
+package com.zbkj.admin.controller.platform;
+
+import com.alibaba.fastjson.JSONObject;
+import com.zbkj.common.model.express.Express;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.ExpressSearchRequest;
+import com.zbkj.common.request.ExpressUpdateRequest;
+import com.zbkj.common.request.ExpressUpdateShowRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ExpressService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 平台端物流公司控制器
+ *  +----------------------------------------------------------------------
+ *  | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ *  +----------------------------------------------------------------------
+ *  | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ *  +----------------------------------------------------------------------
+ *  | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ *  +----------------------------------------------------------------------
+ *  | Author: CRMEB Team <admin@crmeb.com>
+ *  +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/express")
+@Api(tags = "平台端物流公司控制器")
+public class ExpressController {
+
+    @Autowired
+    private ExpressService expressService;
+
+    @PreAuthorize("hasAuthority('platform:express:list')")
+    @ApiOperation(value = "分页显示快递公司列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    @ApiImplicitParam(name="keywords", value="搜索关键字")
+    public CommonResult<CommonPage<Express>> getList(@Validated ExpressSearchRequest request,
+                                                     @ModelAttribute PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(expressService.getList(request, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('platform:express:update')")
+    @ApiOperation(value = "编辑快递公司")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated ExpressUpdateRequest expressRequest) {
+        if (expressService.updateExpress(expressRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:express:update:show')")
+    @ApiOperation(value = "修改快递公司显示状态")
+    @RequestMapping(value = "/update/show", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated ExpressUpdateShowRequest expressRequest) {
+        if (expressService.updateExpressShow(expressRequest)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:express:sync')")
+    @ApiOperation(value = "同步物流公司")
+    @RequestMapping(value = "/sync/express", method = RequestMethod.POST)
+    public CommonResult<String> syncExpress() {
+        if (expressService.syncExpress()) {
+            CommonResult<String> success = CommonResult.success();
+            success.setMessage("同步物流公司成功");
+            return success;
+        }
+        return CommonResult.failed("同步物流公司失败");
+    }
+
+
+    @PreAuthorize("hasAuthority('platform:express:info')")
+    @ApiOperation(value = "快递公司详情")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    @ApiImplicitParam(name="id", value="快递公司ID", required = true)
+    public CommonResult<Express> info(@RequestParam(value = "id") Integer id) {
+        return CommonResult.success(expressService.getInfo(id));
+   }
+
+}
+
+
+

+ 179 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/FinanceController.java

@@ -0,0 +1,179 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.admin.service.FinanceService;
+import com.zbkj.common.model.bill.SummaryFinancialStatements;
+import com.zbkj.common.model.user.UserClosing;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.*;
+import com.zbkj.common.request.merchant.MerchantClosingSearchRequest;
+import com.zbkj.common.response.FundsFlowResponse;
+import com.zbkj.common.response.MerchantClosingInfoResponse;
+import com.zbkj.common.response.MerchantClosingPlatformPageResponse;
+import com.zbkj.common.response.PlatformStatementResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.MerchantClosingConfigVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 平台端财务控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/finance")
+@Api(tags = "平台端财务控制器")
+public class FinanceController {
+
+    @Autowired
+    private FinanceService financeService;
+
+    @PreAuthorize("hasAuthority('platform:finance:user:closing:page:list')")
+    @ApiOperation(value = "用户结算分页列表")
+    @RequestMapping(value = "/user/closing/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<UserClosing>> getUserClosingPageList(@ModelAttribute UserClosingSearchRequest request,
+                                                                        @ModelAttribute PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.getUserClosingPageList(request, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:user:closing:audit')")
+    @ApiOperation(value = "用户结算申请审核")
+    @RequestMapping(value = "/user/closing/audit", method = RequestMethod.POST)
+    public CommonResult<String> userClosingAudit(@RequestBody @Validated ClosingAuditRequest request) {
+        if (financeService.userClosingAudit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:user:closing:proof')")
+    @ApiOperation(value = "用户结算到账凭证")
+    @RequestMapping(value = "/user/closing/proof", method = RequestMethod.POST)
+    public CommonResult<String> userClosingProof(@RequestBody @Validated ClosingProofRequest request) {
+        if (financeService.userClosingProof(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:user:closing:remark')")
+    @ApiOperation(value = "用户结算备注")
+    @RequestMapping(value = "/user/closing/remark", method = RequestMethod.POST)
+    public CommonResult<String> userClosingRemark(@RequestBody @Validated ClosingRemarkRequest request) {
+        if (financeService.userClosingRemark(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:merchant:closing:config')")
+    @ApiOperation(value = "获取商户结算设置")
+    @RequestMapping(value = "/merchant/closing/config", method = RequestMethod.GET)
+    public CommonResult<MerchantClosingConfigVo> getMerchantClosingConfig() {
+        return CommonResult.success(financeService.getMerchantClosingConfig());
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:merchant:closing:config:edit')")
+    @ApiOperation(value = "编辑商户结算设置")
+    @RequestMapping(value = "/merchant/closing/config/edit", method = RequestMethod.POST)
+    public CommonResult<String> merchantClosingConfigEdit(@RequestBody @Validated MerchantClosingConfigVo request) {
+        if (financeService.merchantClosingConfigEdit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:merchant:closing:page:list')")
+    @ApiOperation(value = "商户结算分页列表")
+    @RequestMapping(value = "/merchant/closing/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantClosingPlatformPageResponse>> getMerchantClosingPageList(
+            @ModelAttribute MerchantClosingSearchRequest request, @ModelAttribute PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.getMerchantClosingPageList(request, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:merchant:closing:detail')")
+    @ApiOperation(value = "商户结算记录详情")
+    @RequestMapping(value = "/merchant/closing/detail/{closingNo}", method = RequestMethod.GET)
+    public CommonResult<MerchantClosingInfoResponse> getMerchantClosingDetail(@PathVariable String closingNo) {
+        return CommonResult.success(financeService.getMerchantClosingDetailByPlatform(closingNo));
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:merchant:closing:audit')")
+    @ApiOperation(value = "商户结算申请审核")
+    @RequestMapping(value = "/merchant/closing/audit", method = RequestMethod.POST)
+    public CommonResult<String> merchantClosingAudit(@RequestBody @Validated ClosingAuditRequest request) {
+        if (financeService.merchantClosingAudit(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:merchant:closing:proof')")
+    @ApiOperation(value = "商户结算到账凭证")
+    @RequestMapping(value = "/merchant/closing/proof", method = RequestMethod.POST)
+    public CommonResult<String> merchantClosingProof(@RequestBody @Validated ClosingProofRequest request) {
+        if (financeService.merchantClosingProof(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:merchant:closing:remark')")
+    @ApiOperation(value = "商户结算备注")
+    @RequestMapping(value = "/merchant/closing/remark", method = RequestMethod.POST)
+    public CommonResult<String> merchantClosingRemark(@RequestBody @Validated ClosingRemarkRequest request) {
+        if (financeService.merchantClosingRemark(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:funds:flow')")
+    @ApiOperation(value = "资金流水分页列表")
+    @RequestMapping(value = "/funds/flow", method = RequestMethod.GET)
+    public CommonResult<CommonPage<FundsFlowResponse>> getFundsFlow(@ModelAttribute FundsFlowRequest request,
+                                                                    @ModelAttribute PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.getFundsFlow(request, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:daily:statement:page:list')")
+    @ApiOperation(value = "日帐单管理分页列表")
+    @RequestMapping(value = "/daily/statement/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PlatformStatementResponse>> getDailyStatementList(@RequestParam(value = "dateLimit", required = false, defaultValue = "") String dateLimit,
+                                                                                     @ModelAttribute PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.getPlatformDailyStatementList(dateLimit, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:month:statement:page:list')")
+    @ApiOperation(value = "月帐单管理分页列表")
+    @RequestMapping(value = "/month/statement/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PlatformStatementResponse>> getMonthStatementList(@RequestParam(value = "dateLimit", required = false, defaultValue = "") String dateLimit,
+                                                                                     @ModelAttribute PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.getPlatformMonthStatementList(dateLimit, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('platform:finance:summary:financial:statements')")
+    @ApiOperation(value = "财务流水汇总")
+    @RequestMapping(value = "/summary/financial/statements", method = RequestMethod.GET)
+    public CommonResult<CommonPage<SummaryFinancialStatements>> summaryFinancialStatements(@RequestParam(value = "dateLimit", required = false, defaultValue = "") String dateLimit,
+                                                                                           @ModelAttribute PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(financeService.summaryFinancialStatements(dateLimit, pageParamRequest)));
+    }
+}
+
+
+

+ 65 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/HomeController.java

@@ -0,0 +1,65 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.service.service.HomeService;
+import com.zbkj.common.response.HomeOperatingDataResponse;
+import com.zbkj.common.response.PlatformHomeRateResponse;
+import com.zbkj.common.response.UserChannelDataResponse;
+import com.zbkj.common.result.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+
+/**
+ * 平台端主页控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/statistics/home")
+@Api(tags = "平台端主页控制器")
+public class HomeController {
+
+    @Autowired
+    private HomeService homeService;
+
+    @PreAuthorize("hasAuthority('platform:statistics:home:index')")
+    @ApiOperation(value = "首页数据")
+    @RequestMapping(value = "/index", method = RequestMethod.GET)
+    public CommonResult<PlatformHomeRateResponse> indexDate() {
+        return CommonResult.success(homeService.indexPlatformDate());
+    }
+
+    @PreAuthorize("hasAuthority('platform:statistics:home:operating:data')")
+    @ApiOperation(value = "经营数据")
+    @RequestMapping(value = "/operating/data", method = RequestMethod.GET)
+    public CommonResult<HomeOperatingDataResponse> operatingData() {
+        return CommonResult.success(homeService.operatingPlatformData());
+    }
+
+    @PreAuthorize("hasAuthority('platform:statistics:home:user:channel')")
+    @ApiOperation(value = "用户渠道数据")
+    @RequestMapping(value = "/channel", method = RequestMethod.GET)
+    public CommonResult<List<UserChannelDataResponse>> getChannelData() {
+        return CommonResult.success(homeService.getUserChannelData());
+    }
+
+}
+
+
+

+ 62 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/IntegralController.java

@@ -0,0 +1,62 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.admin.service.IntegralService;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.IntegralPageSearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.response.IntegralConfigResponse;
+import com.zbkj.common.response.IntegralRecordPageResponse;
+import com.zbkj.common.result.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 积分控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/integral")
+@Api(tags = "积分控制器")
+public class IntegralController {
+
+    @Autowired
+    private IntegralService integralService;
+
+    @PreAuthorize("hasAuthority('platform:integral:get:config')")
+    @ApiOperation(value = "获取积分配置")
+    @RequestMapping(value = "/get/config", method = RequestMethod.GET)
+    public CommonResult<IntegralConfigResponse> getConfig() {
+        return CommonResult.success(integralService.getConfig());
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:update:config')")
+    @ApiOperation(value = "编辑积分配置")
+    @RequestMapping(value = "/set/config", method = RequestMethod.POST)
+    public CommonResult<String> updateConfig(@RequestBody IntegralConfigResponse request) {
+        if (integralService.updateConfig(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:page:list')")
+    @ApiOperation(value = "积分分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<IntegralRecordPageResponse>> findRecordPageList(@ModelAttribute @Validated IntegralPageSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(integralService.findRecordPageList(request)));
+    }
+}

+ 82 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/IntegralIntervalController.java

@@ -0,0 +1,82 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.system.GroupConfig;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.IntegralIntervalAddRequest;
+import com.zbkj.common.request.IntegralIntervalPageSearchRequest;
+import com.zbkj.common.request.IntegralProductAddRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.GroupConfigService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 积分区间控制器
+ *
+ * @author Han
+ * @version 1.0.0
+ * @Date 2024/8/19
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/integral/interval")
+@Api(tags = "积分区间控制器")
+public class IntegralIntervalController {
+
+    @Autowired
+    private GroupConfigService groupConfigService;
+
+    @PreAuthorize("hasAuthority('platform:integral:interval:page')")
+    @ApiOperation(value = "积分区间分页列表") //配合swagger使用
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<GroupConfig>> getList(@Validated IntegralIntervalPageSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(groupConfigService.getIntegralIntervalPage(request)));
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:interval:save')")
+    @ApiOperation(value = "新增积分区间")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated IntegralIntervalAddRequest request) {
+        if (groupConfigService.saveIntegralInterval(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:interval:update')")
+    @ApiOperation(value = "修改积分区间")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated IntegralIntervalAddRequest request) {
+        if (groupConfigService.updateIntegralInterval(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:interval:delete')")
+    @ApiOperation(value = "删除积分区间")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<String> delete(@PathVariable Integer id) {
+        if (groupConfigService.deleteIntegralInterval(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:interval:update:status')")
+    @ApiOperation(value = "修改积分区间状态")
+    @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
+    public CommonResult<String> updateStatus(@PathVariable Integer id) {
+        if (groupConfigService.updateIntegralIntervalStatus(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+}

+ 110 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/IntegralOrderController.java

@@ -0,0 +1,110 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.admin.SystemAdmin;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.*;
+import com.zbkj.common.response.IntegralOrderPageResponse;
+import com.zbkj.common.response.OrderAdminDetailResponse;
+import com.zbkj.common.response.OrderCountItemResponse;
+import com.zbkj.common.response.OrderInvoiceResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.utils.SecurityUtil;
+import com.zbkj.common.vo.LogisticsResultVo;
+import com.zbkj.service.service.OrderService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 积分订单控制器
+ *
+ * @author Han
+ * @version 1.0.0
+ * @Date 2024/8/26
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/integral/order")
+@Api(tags = "积分订单控制器")
+public class IntegralOrderController {
+
+    @Autowired
+    private OrderService orderService;
+
+    @PreAuthorize("hasAuthority('platform:integral:order:page:list')")
+    @ApiOperation(value = "积分订单分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<IntegralOrderPageResponse>> getList(@Validated IntegralOrderSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(orderService.findIntegralOrderPageByPlat(request)));
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:order:status:num')")
+    @ApiOperation(value = "积分订单各状态数量")
+    @RequestMapping(value = "/status/num", method = RequestMethod.GET)
+    public CommonResult<OrderCountItemResponse> getIntegralOrderStatusNum(@Validated IntegralOrderTabsHeaderRequest request) {
+        return CommonResult.success(orderService.getIntegralOrderStatusNum(request));
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:order:mark')")
+    @ApiOperation(value = "积分订单备注")
+    @RequestMapping(value = "/mark", method = RequestMethod.POST)
+    public CommonResult<String> mark(@RequestBody @Validated OrderRemarkRequest request) {
+        if (orderService.integralOrderMark(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:order:detail')")
+    @ApiOperation(value = "积分订单详情")
+    @RequestMapping(value = "/detail/{orderNo}", method = RequestMethod.GET)
+    public CommonResult<OrderAdminDetailResponse> detail(@PathVariable(value = "orderNo") String orderNo) {
+        return CommonResult.success(orderService.adminIntegralOrderDetail(orderNo));
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:order:send')")
+    @ApiOperation(value = "积分订单发货")
+    @RequestMapping(value = "/send", method = RequestMethod.POST)
+    public CommonResult<Boolean> send(@RequestBody @Validated OrderSendRequest request) {
+        SystemAdmin systemAdmin = SecurityUtil.getLoginUserVo().getUser();
+        if (orderService.send(request, systemAdmin)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:order:invoice:list')")
+    @ApiOperation(value = "获取订单发货单列表")
+    @RequestMapping(value = "/{orderNo}/invoice/list", method = RequestMethod.GET)
+    public CommonResult<List<OrderInvoiceResponse>> getInvoiceList(@PathVariable(value = "orderNo") String orderNo) {
+        SystemAdmin systemAdmin = SecurityUtil.getLoginUserVo().getUser();
+        return CommonResult.success(orderService.getInvoiceListByMerchant(orderNo, systemAdmin));
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:order:logistics:info')")
+    @ApiOperation(value = "订单物流详情")
+    @RequestMapping(value = "/get/{invoiceId}/logistics/info", method = RequestMethod.GET)
+    public CommonResult<LogisticsResultVo> getLogisticsInfo(@PathVariable(value = "invoiceId") Integer invoiceId) {
+        SystemAdmin systemAdmin = SecurityUtil.getLoginUserVo().getUser();
+        return CommonResult.success(orderService.getLogisticsInfoByMerchant(invoiceId, systemAdmin));
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:order:invoice:update')")
+    @ApiOperation(value = "修改发货单配送信息")
+    @RequestMapping(value = "/invoice/update", method = RequestMethod.POST)
+    public CommonResult<Object> updateInvoice(@RequestBody @Validated OrderInvoiceUpdateRequest request) {
+        SystemAdmin systemAdmin = SecurityUtil.getLoginUserVo().getUser();
+        if (orderService.updateInvoice(request, systemAdmin)) {
+            return CommonResult.success().setMessage("修改发货单配送信息成功");
+        }
+        return CommonResult.failed().setMessage("修改发货单配送信息失败");
+    }
+}

+ 108 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/IntegralProductController.java

@@ -0,0 +1,108 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.IntegralProductAddRequest;
+import com.zbkj.common.request.IntegralProductPageSearchRequest;
+import com.zbkj.common.request.IntegralProductTabsHeaderRequest;
+import com.zbkj.common.response.IntegralProductDetailResponse;
+import com.zbkj.common.response.IntegralProductPageResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.ProductService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+/**
+ * 积分商品控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/integral/product")
+@Api(tags = "积分商品控制器")
+public class IntegralProductController {
+
+    @Autowired
+    private ProductService productService;
+
+    @PreAuthorize("hasAuthority('platform:integral:product:page')")
+    @ApiOperation(value = "积分商品分页列表") //配合swagger使用
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    public CommonResult<CommonPage<IntegralProductPageResponse>> getList(@Validated IntegralProductPageSearchRequest request) {
+        return CommonResult.success(CommonPage.restPage(productService.getIntegralProductPageByPlat(request)));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "新增积分商品")
+    @PreAuthorize("hasAuthority('platform:integral:product:save')")
+    @ApiOperation(value = "新增积分商品")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated IntegralProductAddRequest request) {
+        if (productService.saveIntegralProduct(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改积分商品")
+    @PreAuthorize("hasAuthority('platform:integral:product:update')")
+    @ApiOperation(value = "修改积分商品")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated IntegralProductAddRequest request) {
+        if (productService.updateIntegralProduct(request)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:product:detail')")
+    @ApiOperation(value = "积分商品详情")
+    @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
+    public CommonResult<IntegralProductDetailResponse> detail(@PathVariable Integer id) {
+        return CommonResult.success(productService.getIntegralProductDetail(id));
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:product:tabs:headers')")
+    @ApiOperation(value = "积分商品表头数量")
+    @RequestMapping(value = "/tabs/headers", method = RequestMethod.GET)
+    public CommonResult<Map<String, Object>> getTabsHeader(@Validated IntegralProductTabsHeaderRequest request) {
+        return CommonResult.success(productService.getIntegralProductTabsHeader(request));
+    }
+
+    @PreAuthorize("hasAuthority('platform:integral:product:delete')")
+    @ApiOperation(value = "删除积分商品")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<IntegralProductDetailResponse> delete(@PathVariable Integer id) {
+        if (productService.deleteIntegralProduct(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "上架商品")
+    @PreAuthorize("hasAuthority('platform:integral:product:update:show')")
+    @ApiOperation(value = "积分商品上/下架")
+    @RequestMapping(value = "/update/show/{id}", method = RequestMethod.POST)
+    public CommonResult<String> updateShow(@PathVariable Integer id) {
+        if (productService.updateShowIntegralProduct(id)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+}

+ 79 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MarketingActivityController.java

@@ -0,0 +1,79 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.admin.service.MarketingActivityService;
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.request.BirthdayPresentRequest;
+import com.zbkj.common.request.NewPeoplePresentRequest;
+import com.zbkj.common.response.BirthdayPresentResponse;
+import com.zbkj.common.response.NewPeoplePresentResponse;
+import com.zbkj.common.result.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 营销活动控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/marketing/activity")
+@Api(tags = "营销活动控制器")
+public class MarketingActivityController {
+
+    @Autowired
+    private MarketingActivityService marketingActivityService;
+
+    @PreAuthorize("hasAuthority('platform:marketing:activity:birthday:present:config')")
+    @ApiOperation(value="获取生日有礼配置")
+    @RequestMapping(value = "/birthday/present/config", method = RequestMethod.GET)
+    public BirthdayPresentResponse getBirthdayPresentConfig() {
+        return marketingActivityService.getBirthdayPresentConfig();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "编辑生日有礼配置")
+    @PreAuthorize("hasAuthority('platform:marketing:activity:birthday:present:edit')")
+    @ApiOperation(value="编辑生日有礼配置")
+    @RequestMapping(value = "/birthday/present/edit", method = RequestMethod.POST)
+    public CommonResult<String> editBirthdayPresent(@RequestBody @Validated BirthdayPresentRequest request) {
+        if (marketingActivityService.editBirthdayPresent(request)) {
+            return CommonResult.success("编辑生日有礼配置成功");
+        }
+        return CommonResult.failed("编辑生日有礼配置失败");
+    }
+
+    @PreAuthorize("hasAuthority('platform:marketing:activity:new:people:present:config')")
+    @ApiOperation(value="获取新人礼配置")
+    @RequestMapping(value = "/new/people/present/config", method = RequestMethod.GET)
+    public NewPeoplePresentResponse getNewPeopleConfig() {
+        return marketingActivityService.getNewPeopleConfig();
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "编辑生日有礼配置")
+    @PreAuthorize("hasAuthority('platform:marketing:activity:new:people:present:edit')")
+    @ApiOperation(value="编辑新人礼配置")
+    @RequestMapping(value = "/new/people/present/edit", method = RequestMethod.POST)
+    public CommonResult<String> editNewPeopleConfig(@RequestBody @Validated NewPeoplePresentRequest request) {
+        if (marketingActivityService.editNewPeopleConfig(request)) {
+            return CommonResult.success("编辑新人礼配置成功");
+        }
+        return CommonResult.failed("编辑新人礼配置失败");
+    }
+
+}

+ 74 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MerchantApplyController.java

@@ -0,0 +1,74 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.merchant.MerchantApply;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.merchant.MerchantApplyAuditRequest;
+import com.zbkj.common.request.merchant.MerchantApplyRemarkRequest;
+import com.zbkj.common.request.merchant.MerchantApplySearchRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.MerchantApplyService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 商户入驻控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/merchant/apply")
+@Api(tags = "商户入驻控制器")
+public class MerchantApplyController {
+
+    @Autowired
+    private MerchantApplyService merchantApplyService;
+
+    @PreAuthorize("hasAuthority('platform:merchant:apply:page:list')")
+    @ApiOperation(value="商户入驻分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantApply>> getPageList(@Validated MerchantApplySearchRequest searchRequest,
+                                                               @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(merchantApplyService.getAdminPage(searchRequest, pageParamRequest)));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商户入驻审核")
+    @PreAuthorize("hasAuthority('platform:merchant:apply:audit')")
+    @ApiOperation(value="审核")
+    @RequestMapping(value = "/audit", method = RequestMethod.POST)
+    public CommonResult<Object> audit(@RequestBody @Validated MerchantApplyAuditRequest request) {
+        if (merchantApplyService.audit(request)) {
+            return CommonResult.success("申请审核成功");
+        }
+        return CommonResult.failed("申请审核失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "商户入驻备注")
+    @PreAuthorize("hasAuthority('platform:merchant:apply:remark')")
+    @ApiOperation(value="备注")
+    @RequestMapping(value = "/remark", method = RequestMethod.POST)
+    public CommonResult<Object> remark(@RequestBody @Validated MerchantApplyRemarkRequest request) {
+        if (merchantApplyService.remark(request)) {
+            return CommonResult.success("备注成功");
+        }
+        return CommonResult.failed("备注失败");
+    }
+}

+ 90 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MerchantCategoryController.java

@@ -0,0 +1,90 @@
+package com.zbkj.admin.controller.platform;
+
+import com.github.pagehelper.PageInfo;
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.merchant.MerchantCategory;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.merchant.MerchantCategoryRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.MerchantCategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商户分类控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/merchant/category")
+@Api(tags = "平台端商户分类控制器")
+public class MerchantCategoryController {
+
+    @Autowired
+    private MerchantCategoryService categoryService;
+
+    @PreAuthorize("hasAuthority('platform:merchant:category:list')")
+    @ApiOperation(value="商户分类分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantCategory>> getList(@Validated PageParamRequest pageParamRequest) {
+        PageInfo<MerchantCategory> pageInfo = categoryService.getAdminPage(pageParamRequest);
+        return CommonResult.success(CommonPage.restPage(pageInfo));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "添加商户分类")
+    @PreAuthorize("hasAuthority('platform:merchant:category:add')")
+    @ApiOperation(value="添加商户分类")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<Object> add(@RequestBody @Validated MerchantCategoryRequest request) {
+        if (categoryService.add(request)) {
+            return CommonResult.success("添加商户分类成功");
+        }
+        return CommonResult.failed("添加商户分类失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "编辑商户分类")
+    @PreAuthorize("hasAuthority('platform:merchant:category:update')")
+    @ApiOperation(value="编辑商户分类")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<Object> update(@RequestBody @Validated MerchantCategoryRequest request) {
+        if (categoryService.edit(request)) {
+            return CommonResult.success("编辑商户分类成功");
+        }
+        return CommonResult.failed("编辑商户分类失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除商户分类")
+    @PreAuthorize("hasAuthority('platform:merchant:category:delete')")
+    @ApiOperation(value="删除商户分类")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> delete(@PathVariable("id") Integer id) {
+        if (categoryService.delete(id)) {
+            return CommonResult.success("删除商户分类成功");
+        }
+        return CommonResult.failed("删除商户分类失败");
+    }
+
+    @PreAuthorize("hasAuthority('platform:merchant:category:all')")
+    @ApiOperation(value="获取全部商户分类列表")
+    @RequestMapping(value = "/all/list", method = RequestMethod.GET)
+    public CommonResult<List<MerchantCategory>> allList() {
+        return CommonResult.success(categoryService.allList());
+    }
+}

+ 173 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MerchantController.java

@@ -0,0 +1,173 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.admin.service.AdminLoginService;
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.merchant.*;
+import com.zbkj.common.response.*;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.MerchantService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商户控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/merchant")
+@Api(tags = "平台端商户控制器")
+public class MerchantController {
+
+    @Autowired
+    private MerchantService merchantService;
+    @Autowired
+    private AdminLoginService adminLoginService;
+
+    @PreAuthorize("hasAuthority('platform:merchant:page:list')")
+    @ApiOperation(value="商户分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantPageResponse>> getPageList(@Validated MerchantSearchRequest searchRequest,
+                                                                      @Validated PageParamRequest pageParamRequest) {
+        return CommonResult.success(CommonPage.restPage(merchantService.getAdminPage(searchRequest, pageParamRequest)));
+    }
+
+    @PreAuthorize("hasAuthority('platform:merchant:list:header:num')")
+    @ApiOperation(value="商户分页列表表头数量")
+    @RequestMapping(value = "/list/header/num", method = RequestMethod.GET)
+    public CommonResult<MerchantHeaderNumResponse> getListHeaderNum(@Validated MerchantSearchRequest searchRequest) {
+        return CommonResult.success(merchantService.getListHeaderNum(searchRequest));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "添加商户")
+    @PreAuthorize("hasAuthority('platform:merchant:add')")
+    @ApiOperation(value="添加商户")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<String> add(@RequestBody @Validated MerchantAddRequest request) {
+        if (merchantService.add(request)) {
+            return CommonResult.success("添加商户成功");
+        }
+        return CommonResult.failed("添加商户失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "编辑商户")
+    @PreAuthorize("hasAuthority('platform:merchant:update')")
+    @ApiOperation(value="编辑商户")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated MerchantUpdateRequest request) {
+        if (merchantService.edit(request)) {
+            return CommonResult.success("编辑商户成功");
+        }
+        return CommonResult.failed("编辑商户失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改商户手机号")
+    @PreAuthorize("hasAuthority('platform:merchant:update:phone')")
+    @ApiOperation(value="修改商户手机号")
+    @RequestMapping(value = "/update/phone", method = RequestMethod.POST)
+    public CommonResult<String> updatePhone(@RequestBody @Validated MerchantUpdatePhoneRequest request) {
+        if (merchantService.updatePhone(request)) {
+            return CommonResult.success("修改商户手机号成功");
+        }
+        return CommonResult.failed("修改商户手机号失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "重置商户密码")
+    @PreAuthorize("hasAuthority('platform:merchant:reset:password')")
+    @ApiOperation(value="重置商户密码")
+    @RequestMapping(value = "/reset/password/{id}", method = RequestMethod.POST)
+    public CommonResult<String> resetPassword(@PathVariable(value = "id") Integer id) {
+        if (merchantService.resetPassword(id)) {
+            return CommonResult.success("重置商户密码成功");
+        }
+        return CommonResult.failed("重置商户密码失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "修改复制商品数量")
+    @PreAuthorize("hasAuthority('platform:merchant:copy:prodcut:num')")
+    @ApiOperation(value="修改复制商品数量")
+    @RequestMapping(value = "/update/copy/product/num", method = RequestMethod.POST)
+    public CommonResult<String> updateCopyProductNum(@RequestBody @Validated MerchantUpdateProductNumRequest request) {
+        if (merchantService.updateCopyProductNum(request)) {
+            return CommonResult.success("修改复制商品数量成功");
+        }
+        return CommonResult.failed("修改复制商品数量失败");
+    }
+
+    @PreAuthorize("hasAuthority('platform:merchant:detail')")
+    @ApiOperation(value="商户详情")
+    @RequestMapping(value = "/detail/{id}", method = RequestMethod.GET)
+    public CommonResult<MerchantPlatformDetailResponse> getDetail(@PathVariable("id") Integer id) {
+        return CommonResult.success(merchantService.getPlatformDetail(id));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "推荐开关")
+    @PreAuthorize("hasAuthority('platform:merchant:recommend:switch')")
+    @ApiOperation(value="推荐开关")
+    @RequestMapping(value = "/recommend/switch/{id}", method = RequestMethod.POST)
+    public CommonResult<String> recommendSwitch(@PathVariable("id") Integer id) {
+        if (merchantService.recommendSwitch(id)) {
+            return CommonResult.success("切换商户推荐开关成功");
+        }
+        return CommonResult.failed("切换商户推荐开关失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "关闭商户")
+    @PreAuthorize("hasAuthority('platform:merchant:close')")
+    @ApiOperation(value="关闭商户")
+    @RequestMapping(value = "/close/{id}", method = RequestMethod.POST)
+    public CommonResult<String> close(@PathVariable("id") Integer id) {
+        if (merchantService.close(id)) {
+            return CommonResult.success("关闭商户成功");
+        }
+        return CommonResult.failed("关闭商户失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "开启商户")
+    @PreAuthorize("hasAuthority('platform:merchant:open')")
+    @ApiOperation(value="开启商户")
+    @RequestMapping(value = "/open/{id}", method = RequestMethod.POST)
+    public CommonResult<String> open(@PathVariable("id") Integer id) {
+        if (merchantService.open(id)) {
+            return CommonResult.success("开启商户成功");
+        }
+        return CommonResult.failed("开启商户失败");
+    }
+
+    @PreAuthorize("hasAuthority('platform:merchant:use:category:list')")
+    @ApiOperation(value="可用分类商户列表")
+    @RequestMapping(value = "/use/category/list", method = RequestMethod.GET)
+    public CommonResult<List<CategoryMerchantResponse>> getUseCategoryList() {
+        return CommonResult.success(merchantService.getUseCategoryList());
+    }
+
+    /**
+     * FIXME: 风险说明: 此接口的操作存在很大的安全性隐患,强烈不建议用户使用,并将其注释掉
+     */
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "越权登录商户")
+    @PreAuthorize("hasAuthority('platform:merchant:ultra:vires:login')")
+    @ApiOperation(value="越权登录商户")
+    @RequestMapping(value = "/ultra/vires/login/{id}", method = RequestMethod.POST)
+    public CommonResult<SystemLoginResponse> ultraViresLogin(@PathVariable("id") Integer id) {
+        SystemLoginResponse response = adminLoginService.ultraViresLoginMerchantByPlat(id);
+        return CommonResult.success(response);
+    }
+}

+ 90 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/MerchantTypeController.java

@@ -0,0 +1,90 @@
+package com.zbkj.admin.controller.platform;
+
+import com.github.pagehelper.PageInfo;
+import com.zbkj.common.annotation.LogControllerAnnotation;
+import com.zbkj.common.enums.MethodType;
+import com.zbkj.common.model.merchant.MerchantType;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.merchant.MerchantTypeRequest;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.MerchantTypeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商户类型控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/merchant/type")
+@Api(tags = "平台端商户类型控制器")
+public class MerchantTypeController {
+
+    @Autowired
+    private MerchantTypeService typeService;
+
+    @PreAuthorize("hasAuthority('platform:merchant:type:list')")
+    @ApiOperation(value="商户类型分页列表")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<MerchantType>> getList(@Validated PageParamRequest pageParamRequest) {
+        PageInfo<MerchantType> pageInfo = typeService.getAdminPage(pageParamRequest);
+        return CommonResult.success(CommonPage.restPage(pageInfo));
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.ADD, description = "添加商户类型")
+    @PreAuthorize("hasAuthority('platform:merchant:type:add')")
+    @ApiOperation(value="添加商户类型")
+    @RequestMapping(value = "/add", method = RequestMethod.POST)
+    public CommonResult<Object> add(@RequestBody @Validated MerchantTypeRequest request) {
+        if (typeService.add(request)) {
+            return CommonResult.success("添加商户类型成功");
+        }
+        return CommonResult.failed("添加商户类型失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.UPDATE, description = "编辑类型类型")
+    @PreAuthorize("hasAuthority('platform:merchant:type:update')")
+    @ApiOperation(value="编辑类型类型")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<Object> update(@RequestBody @Validated MerchantTypeRequest request) {
+        if (typeService.edit(request)) {
+            return CommonResult.success("编辑商户类型成功");
+        }
+        return CommonResult.failed("编辑商户类型失败");
+    }
+
+    @LogControllerAnnotation(intoDB = true, methodType = MethodType.DELETE, description = "删除商户类型")
+    @PreAuthorize("hasAuthority('platform:merchant:type:delete')")
+    @ApiOperation(value="删除商户类型")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    public CommonResult<Object> delete(@PathVariable("id") Integer id) {
+        if (typeService.delete(id)) {
+            return CommonResult.success("删除商户类型成功");
+        }
+        return CommonResult.failed("删除商户类型失败");
+    }
+
+    @PreAuthorize("hasAuthority('platform:merchant:type:all')")
+    @ApiOperation(value="获取全部商户类型列表")
+    @RequestMapping(value = "/all/list", method = RequestMethod.GET)
+    public CommonResult<List<MerchantType>> allList() {
+        return CommonResult.success(typeService.allList());
+    }
+}

+ 55 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/OnePassController.java

@@ -0,0 +1,55 @@
+package com.zbkj.admin.controller.platform;
+
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.OnePassApplicationInfoVo;
+import com.zbkj.service.service.OnePassService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 一号通控制器
+ * +----------------------------------------------------------------------
+ * | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ * +----------------------------------------------------------------------
+ * | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ * +----------------------------------------------------------------------
+ * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ * +----------------------------------------------------------------------
+ * | Author: CRMEB Team <admin@crmeb.com>
+ * +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/one/pass")
+@Api(tags = "一号通控制器")
+public class OnePassController {
+
+    @Autowired
+    private OnePassService onePassService;
+
+    @PreAuthorize("hasAuthority('platform:one:pass:app:save')")
+    @ApiOperation(value = "一号通应用信息保存")
+    @RequestMapping(value = "/app/info/save", method = RequestMethod.POST)
+    public CommonResult<Object> saveApplication(@Validated @RequestBody OnePassApplicationInfoVo request) {
+        if (onePassService.saveApplicationInfo(request)) {
+            return CommonResult.success().setMessage("保存成功");
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:one:pass:app:get')")
+    @ApiOperation(value = "一号通应用信息获取")
+    @RequestMapping(value = "/app/info/get", method = RequestMethod.GET)
+    public CommonResult<OnePassApplicationInfoVo> getOnePassApplication() {
+        return CommonResult.success(onePassService.getApplicationInfo());
+    }
+
+}

+ 123 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/PageCategoryController.java

@@ -0,0 +1,123 @@
+package com.zbkj.admin.controller.platform;
+
+
+import com.zbkj.common.model.page.PageCategory;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.page.PageCategoryRequest;
+import com.zbkj.common.request.page.PageCategorySearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.PageCategoryService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 页面链接分类 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/pagecategory")
+@Api(tags = "DIY 页面链接分类 控制器") //配合swagger使用
+
+public class PageCategoryController {
+
+    @Autowired
+    private PageCategoryService pageCategoryService;
+
+    /**
+     * 分页显示页面链接分类
+     * @param request 搜索条件
+     * @param pageParamRequest 分页参数
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagecategory:list')")
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PageCategory>>  getList(@Validated PageCategorySearchRequest request, @Validated PageParamRequest pageParamRequest){
+
+        CommonPage<PageCategory> pageCategoryCommonPage = CommonPage.restPage(pageCategoryService.getList(request, pageParamRequest));
+        return CommonResult.success(pageCategoryCommonPage);
+    }
+
+    /**
+     * 新增页面链接分类
+     * @param pageCategoryRequest 新增参数
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagecategory:save')")
+    @ApiOperation(value = "新增")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated PageCategoryRequest pageCategoryRequest){
+        PageCategory pageCategory = new PageCategory();
+        BeanUtils.copyProperties(pageCategoryRequest, pageCategory);
+
+        if(pageCategoryService.save(pageCategory)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 删除页面链接分类
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagecategory:delete')")
+    @ApiOperation(value = "删除")
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public CommonResult<String> delete(@RequestParam(value = "id") Integer id){
+        if(pageCategoryService.removeById(id)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 修改页面链接分类
+     * @param pageCategoryRequest 修改参数
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagecategory:update')")
+    @ApiOperation(value = "修改")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated PageCategoryRequest pageCategoryRequest){
+        PageCategory pageCategory = new PageCategory();
+        BeanUtils.copyProperties(pageCategoryRequest, pageCategory);
+
+        if(pageCategoryService.updateById(pageCategory)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 查询页面链接分类信息
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagecategory:info')")
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<PageCategory> info(@RequestParam(value = "id") Integer id){
+        PageCategory pageCategory = pageCategoryService.getById(id);
+        return CommonResult.success(pageCategory);
+   }
+}
+
+
+

+ 173 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/PageDiyController.java

@@ -0,0 +1,173 @@
+package com.zbkj.admin.controller.platform;
+
+
+import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
+import com.zbkj.common.exception.CrmebException;
+import com.zbkj.common.model.page.PageDiy;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.page.PageDiyEditNameRequest;
+import com.zbkj.common.request.page.PageDiyRequest;
+import com.zbkj.common.response.page.PageDiyResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.PageDiyService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * DIY数据表 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/pagediy")
+@Api(tags = "DIY 控制器") //配合swagger使用
+
+public class PageDiyController {
+
+    @Autowired
+    private PageDiyService pageDiyService;
+
+    /**
+     * 分页显示DIY数据表
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagediy:list')")
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "name", value = "搜索关键子", dataType = "String")
+    })
+    public CommonResult<CommonPage<PageDiy>> getList(@RequestParam String name,PageParamRequest pageParamRequest){
+        CommonPage<PageDiy> pageDiyCommonPage = CommonPage.restPage(pageDiyService.getList(name, pageParamRequest));
+        return CommonResult.success(pageDiyCommonPage);
+    }
+
+    /**
+     * 设置首页
+     * @param id 待设置的首页id
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagediy:setdefault')")
+    @ApiOperation(value = "设置商城首页")
+    @RequestMapping(value = "/setdefault/{id}", method = RequestMethod.GET)
+    public CommonResult<String> setDefault(@PathVariable(value = "id") Integer id ){
+        if(pageDiyService.setDiyDefault(id)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 获取已经设置的首页模版数据
+     * @return 首页模版id
+     */
+    @PreAuthorize("hasAuthority('platform:pagediy:getdefault')")
+    @ApiOperation(value = "获取商城首页")
+    @RequestMapping(value = "/getdefault", method = RequestMethod.GET)
+    public CommonResult<Integer> getDefault(){
+        return CommonResult.success(pageDiyService.getDefaultId());
+    }
+
+    /**
+     * 新增DIY数据表
+     * @param pageDiyRequest 新增参数
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagediy:save')")
+    @ApiOperation(value = "新增")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<PageDiy> save(@RequestBody @Validated PageDiyRequest pageDiyRequest){
+        PageDiy pageDiy = new PageDiy();
+        BeanUtils.copyProperties(pageDiyRequest, pageDiy);
+        pageDiy.setValue(JSON.toJSONString(pageDiyRequest.getValue()));
+        return CommonResult.success(pageDiyService.savePageDiy(pageDiy));
+    }
+
+    /**
+     * 删除DIY数据表
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagediy:delete')")
+    @ApiOperation(value = "删除")
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public CommonResult<String> delete(@RequestParam(value = "id") Integer id){
+        if(pageDiyService.removeById(id)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 修改DIY数据表
+     * @param pageDiyRequest 修改参数
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagediy:update')")
+    @ApiOperation(value = "DIY 设计")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated PageDiyRequest pageDiyRequest){
+        PageDiy pageDiy = new PageDiy();
+        BeanUtils.copyProperties(pageDiyRequest, pageDiy);
+        pageDiy.setValue(JSON.toJSONString(pageDiyRequest.getValue()));
+        if(pageDiyService.editPageDiy(pageDiy)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * DIY 模版名称更新
+     * @param pageDiyEditNameRequest 更新模版名称对象
+     * @return 更新结果
+     */
+    @PreAuthorize("hasAuthority('platform:pagediy:updatename')")
+    @ApiOperation(value = "DIY 模版名称更新")
+    @RequestMapping(value = "/updatename", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated PageDiyEditNameRequest pageDiyEditNameRequest){
+        if(pageDiyService.editPageDiyName(pageDiyEditNameRequest)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 查询DIY数据表信息
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagediy:info')")
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    public CommonResult<PageDiyResponse> info(@PathVariable(value = "id") Integer id){
+        PageDiy pageDiy = pageDiyService.getDiyPageByPageIdForAdmin(id);
+        if(ObjectUtil.isNull(pageDiy)) throw new CrmebException("未找到对应模版信息");
+        PageDiyResponse response = new PageDiyResponse();
+        BeanUtils.copyProperties(pageDiy, response);
+        response.setValue(JSON.parseObject(pageDiy.getValue()));
+        return CommonResult.success(response);
+   }
+}
+
+
+

+ 121 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/PageLayoutController.java

@@ -0,0 +1,121 @@
+package com.zbkj.admin.controller.platform;
+
+import com.alibaba.fastjson.JSONObject;
+import com.zbkj.common.response.PageLayoutBottomNavigationResponse;
+import com.zbkj.common.response.PageLayoutIndexResponse;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.common.vo.SplashAdConfigVo;
+import com.zbkj.service.service.PageLayoutService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 页面设计 前端控制器
+ *  +----------------------------------------------------------------------
+ *  | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+ *  +----------------------------------------------------------------------
+ *  | Copyright (c) 2016~2025 https://www.crmeb.com All rights reserved.
+ *  +----------------------------------------------------------------------
+ *  | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+ *  +----------------------------------------------------------------------
+ *  | Author: CRMEB Team <admin@crmeb.com>
+ *  +----------------------------------------------------------------------
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/page/layout")
+@Api(tags = "页面布局管理")
+public class PageLayoutController {
+
+    @Autowired
+    private PageLayoutService pageLayoutService;
+
+    @PreAuthorize("hasAuthority('platform:page:layout:index')")
+    @ApiOperation(value = "页面首页")
+    @RequestMapping(value = "/index", method = RequestMethod.GET)
+    public CommonResult<PageLayoutIndexResponse> index() {
+        return CommonResult.success(pageLayoutService.index());
+    }
+
+    @PreAuthorize("hasAuthority('platform:page:layout:bottom:navigation')")
+    @ApiOperation(value = "页面底部导航")
+    @RequestMapping(value = "/bottom/navigation/get", method = RequestMethod.GET)
+    public CommonResult<PageLayoutBottomNavigationResponse> getBottomNavigation() {
+        return CommonResult.success(pageLayoutService.getBottomNavigation());
+    }
+
+    @PreAuthorize("hasAuthority('platform:page:layout:index:banner:save')")
+    @ApiOperation(value = "页面首页banner保存")
+    @RequestMapping(value = "/index/banner/save", method = RequestMethod.POST)
+    public CommonResult<Object> indexBannerSave(@RequestBody JSONObject jsonObject) {
+        if (pageLayoutService.indexBannerSave(jsonObject)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:page:layout:index:menu:save')")
+    @ApiOperation(value = "页面首页menu保存")
+    @RequestMapping(value = "/index/menu/save", method = RequestMethod.POST)
+    public CommonResult<Object> indexMenuSave(@RequestBody JSONObject jsonObject) {
+        if (pageLayoutService.indexMenuSave(jsonObject)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:page:layout:index:banner:save')")
+    @ApiOperation(value = "页面用户中心banner保存")
+    @RequestMapping(value = "/user/banner/save", method = RequestMethod.POST)
+    public CommonResult<Object> userBannerSave(@RequestBody JSONObject jsonObject) {
+        if (pageLayoutService.userBannerSave(jsonObject)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:page:layout:user:menu:save')")
+    @ApiOperation(value = "页面用户中心导航保存")
+    @RequestMapping(value = "/user/menu/save", method = RequestMethod.POST)
+    public CommonResult<Object> userMenuSave(@RequestBody JSONObject jsonObject) {
+        if (pageLayoutService.userMenuSave(jsonObject)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:page:layout:bottom:navigation:save')")
+    @ApiOperation(value = "底部导航保存")
+    @RequestMapping(value = "/bottom/navigation/save", method = RequestMethod.POST)
+    public CommonResult<Object> bottomNavigationSave(@RequestBody JSONObject jsonObject) {
+        if (pageLayoutService.bottomNavigationSave(jsonObject)) {
+            return CommonResult.success();
+        }
+        return CommonResult.failed();
+    }
+
+    @PreAuthorize("hasAuthority('platform:page:layout:splash:ad:get')")
+    @ApiOperation(value = "获取开屏广告配置")
+    @RequestMapping(value = "/splash/ad/get", method = RequestMethod.GET)
+    public CommonResult<SplashAdConfigVo> getSplashAdConfig() {
+        return CommonResult.success(pageLayoutService.getSplashAdConfig());
+    }
+
+    @PreAuthorize("hasAuthority('platform:page:layout:splash:ad:save')")
+    @ApiOperation(value = "编辑开屏广告配置")
+    @RequestMapping(value = "/splash/ad/save", method = RequestMethod.POST)
+    public CommonResult<Object> splashAdConfigSave(@RequestBody @Validated SplashAdConfigVo configVo) {
+        if (pageLayoutService.splashAdConfigSave(configVo)) {
+            return CommonResult.success("编辑成功");
+        }
+        return CommonResult.failed("编辑失败");
+    }
+}

+ 122 - 0
mer_java/crmeb-admin/src/main/java/com/zbkj/admin/controller/platform/PageLinkController.java

@@ -0,0 +1,122 @@
+package com.zbkj.admin.controller.platform;
+
+
+import com.zbkj.common.model.page.PageLink;
+import com.zbkj.common.page.CommonPage;
+import com.zbkj.common.request.PageParamRequest;
+import com.zbkj.common.request.page.PageLinkRequest;
+import com.zbkj.common.request.page.PageLinkSearchRequest;
+import com.zbkj.common.result.CommonResult;
+import com.zbkj.service.service.PageLinkService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * 页面链接 前端控制器
+ */
+@Slf4j
+@RestController
+@RequestMapping("api/admin/platform/pagelink")
+@Api(tags = "DIY 页面链接 控制器") //配合swagger使用
+
+public class PageLinkController {
+
+    @Autowired
+    private PageLinkService pageLinkService;
+
+    /**
+     * 分页显示页面链接
+     * @param request 搜索条件
+     * @param pageParamRequest 分页参数
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagelink:list')")
+    @ApiOperation(value = "分页列表") //配合swagger使用
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    public CommonResult<CommonPage<PageLink>>  getList(@Validated PageLinkSearchRequest request, @Validated PageParamRequest pageParamRequest){
+        CommonPage<PageLink> pageLinkCommonPage = CommonPage.restPage(pageLinkService.getList(request, pageParamRequest));
+        return CommonResult.success(pageLinkCommonPage);
+    }
+
+    /**
+     * 新增页面链接
+     * @param pageLinkRequest 新增参数
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagelink:save')")
+    @ApiOperation(value = "新增")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    public CommonResult<String> save(@RequestBody @Validated PageLinkRequest pageLinkRequest){
+        PageLink pageLink = new PageLink();
+        BeanUtils.copyProperties(pageLinkRequest, pageLink);
+
+        if(pageLinkService.save(pageLink)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 删除页面链接
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagelink:delete')")
+    @ApiOperation(value = "删除")
+    @RequestMapping(value = "/delete", method = RequestMethod.GET)
+    public CommonResult<String> delete(@RequestParam(value = "id") Integer id){
+        if(pageLinkService.removeById(id)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 修改页面链接
+     * @param pageLinkRequest 修改参数
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagelink:update')")
+    @ApiOperation(value = "修改")
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    public CommonResult<String> update(@RequestBody @Validated PageLinkRequest pageLinkRequest){
+        PageLink pageLink = new PageLink();
+        BeanUtils.copyProperties(pageLinkRequest, pageLink);
+
+        if(pageLinkService.updateById(pageLink)){
+            return CommonResult.success();
+        }else{
+            return CommonResult.failed();
+        }
+    }
+
+    /**
+     * 查询页面链接信息
+     * @param id Integer
+     * @author dazongzi
+     * @since 2023-05-16
+     */
+    @PreAuthorize("hasAuthority('platform:pagelink:info')")
+    @ApiOperation(value = "详情")
+    @RequestMapping(value = "/info", method = RequestMethod.GET)
+    public CommonResult<PageLink> info(@RequestParam(value = "id") Integer id){
+        PageLink pageLink = pageLinkService.getById(id);
+        return CommonResult.success(pageLink);
+   }
+}
+
+
+

部分文件因为文件数量过多而无法显示