Переглянути джерело

【营销模块】新建模块yudao-module-market

shuaidawang 2 роки тому
батько
коміт
ece6712d69

+ 1 - 0
pom.xml

@@ -18,6 +18,7 @@
         <module>yudao-module-system</module>
         <module>yudao-module-infra</module>
         <module>yudao-module-pay</module>
+        <module>yudao-module-market</module>
     </modules>
 
     <name>${project.artifactId}</name>

+ 26 - 0
yudao-module-market/pom.xml

@@ -0,0 +1,26 @@
+<?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>yudao</artifactId>
+        <groupId>cn.iocoder.boot</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>yudao-module-market</artifactId>
+    <packaging>pom</packaging>
+
+    <name>${project.artifactId}</name>
+
+    <description>
+        market模块,主要实现营销相关功能
+        例如:营销活动、banner广告、优惠券、优惠码等功能。
+    </description>
+    <modules>
+        <module>yudao-module-market-api</module>
+        <module>yudao-module-market-biz</module>
+    </modules>
+
+</project>

+ 26 - 0
yudao-module-market/yudao-module-market-api/pom.xml

@@ -0,0 +1,26 @@
+<?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>yudao-module-market</artifactId>
+        <groupId>cn.iocoder.boot</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>yudao-module-market-api</artifactId>
+    <packaging>jar</packaging>
+
+    <name>${project.artifactId}</name>
+    <description>
+        market 模块 API,暴露给其它模块调用
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-common</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

+ 61 - 0
yudao-module-market/yudao-module-market-biz/pom.xml

@@ -0,0 +1,61 @@
+<?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>yudao-module-market</artifactId>
+        <groupId>cn.iocoder.boot</groupId>
+        <version>${revision}</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <artifactId>yudao-module-market-biz</artifactId>
+
+    <name>${project.artifactId}</name>
+
+    <description>
+        market模块,主要实现营销相关功能
+        例如:营销活动、banner广告、优惠券、优惠码等功能。
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-module-market-api</artifactId>
+            <version>${revision}</version>
+        </dependency>
+
+        <!-- 业务组件 -->
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-spring-boot-starter-biz-weixin</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-spring-boot-starter-biz-tenant</artifactId>
+        </dependency>
+
+        <!-- Web 相关 -->
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <!-- DB 相关 -->
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-spring-boot-starter-mybatis</artifactId>
+        </dependency>
+
+        <!-- Test 测试相关 -->
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-spring-boot-starter-test</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

+ 25 - 0
yudao-module-market/yudao-module-market-biz/src/main/java/cn/iocoder/yudao/module/market/controller/admin/MarketTestController.java

@@ -0,0 +1,25 @@
+package cn.iocoder.yudao.module.market.controller.admin;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+@Api(tags = "管理后台 - 营销")
+@RestController
+@RequestMapping("/market/test")
+@Validated
+public class MarketTestController {
+
+    @GetMapping("/get")
+    @ApiOperation("获取 market 信息")
+    public CommonResult<String> get() {
+        return success("true");
+    }
+
+}

+ 24 - 0
yudao-module-market/yudao-module-market-biz/src/main/java/cn/iocoder/yudao/module/market/controller/app/AppMarketTestController.java

@@ -0,0 +1,24 @@
+package cn.iocoder.yudao.module.market.controller.app;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+@Api(tags = "用户 App - 营销")
+@RestController
+@RequestMapping("/market/test")
+@Validated
+public class AppMarketTestController {
+
+    @GetMapping("/get")
+    @ApiOperation("获取 market 信息")
+    public CommonResult<String> get() {
+        return success("true");
+    }
+}

+ 8 - 0
yudao-module-market/yudao-module-market-biz/src/main/java/cn/iocoder/yudao/module/market/package-info.java

@@ -0,0 +1,8 @@
+/**
+ * market 模块,我们放营销业务。
+ * 例如说:营销活动、banner、优惠券等等
+ *
+ * 1. Controller URL:以 /market/ 开头,避免和其它 Module 冲突
+ * 2. DataObject 表名:以 market_ 开头,方便在数据库中区分
+ */
+package cn.iocoder.yudao.module.market;

+ 5 - 0
yudao-server/pom.xml

@@ -42,6 +42,11 @@
             <artifactId>yudao-module-pay-biz</artifactId>
             <version>${revision}</version>
         </dependency>
+        <dependency>
+            <groupId>cn.iocoder.boot</groupId>
+            <artifactId>yudao-module-market-biz</artifactId>
+            <version>${revision}</version>
+        </dependency>
         <!-- 默认引入 yudao-module-bpm-biz-flowable 实现,可以替换为 yudao-module-bpm-biz-activiti 实现-->
         <dependency>
             <groupId>cn.iocoder.boot</groupId>