初始化 crm 模块

This commit is contained in:
YunaiV
2023-10-15 20:16:46 +08:00
parent 82fd800ad2
commit 7e312aae02
44 changed files with 313 additions and 1 deletions

25
yudao-module-crm/pom.xml Normal file
View File

@ -0,0 +1,25 @@
<?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>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao</artifactId>
<version>${revision}</version>
</parent>
<modules>
<module>yudao-module-crm-api</module>
<module>yudao-module-crm-biz</module>
</modules>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-module-crm</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>
crm 包下客户关系管理Customer Relationship Management
例如说:客户、联系人、商机、合同、回款等等
</description>
</project>

View File

@ -0,0 +1,33 @@
<?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>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-crm</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-module-crm-api</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
crm 模块 API暴露给其它模块调用
</description>
<dependencies>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-common</artifactId>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,4 @@
/**
* crm API 包,定义暴露给其它模块的 API
*/
package cn.iocoder.yudao.module.crm.api;

View File

@ -0,0 +1,12 @@
package cn.iocoder.yudao.module.crm.enums;
/**
* CRM 错误码枚举类
* <p>
* crm 系统,使用 1-020-000-000 段
*/
public interface ErrorCodeConstants {
}

View File

@ -0,0 +1,55 @@
<?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>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-crm</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-module-crm-biz</artifactId>
<name>${project.artifactId}</name>
<description>
crm 包下客户关系管理Customer Relationship Management
例如说:客户、联系人、商机、合同、回款等等
</description>
<dependencies>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-module-system-api</artifactId>
<version>${revision}</version>
</dependency>
<!-- 业务组件 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-biz-operatelog</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>cn.iocoder.boot</groupId>
<artifactId>yudao-spring-boot-starter-security</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>

View File

@ -0,0 +1,4 @@
/**
* crm API 实现类,定义暴露给其它模块的 API
*/
package cn.iocoder.yudao.module.crm.api;

View File

@ -0,0 +1,4 @@
/**
* 商机(销售机会)
*/
package cn.iocoder.yudao.module.crm.controller.admin.business;

View File

@ -0,0 +1,4 @@
/**
* 线索
*/
package cn.iocoder.yudao.module.crm.controller.admin.clue;

View File

@ -0,0 +1,4 @@
/**
* 联系人
*/
package cn.iocoder.yudao.module.crm.controller.admin.contact;

View File

@ -0,0 +1,4 @@
/**
* 合同
*/
package cn.iocoder.yudao.module.crm.controller.admin.contract;

View File

@ -0,0 +1,4 @@
### 请求 /crm/customer/test 接口 => 成功
GET {{baseUrl}}/crm/customer/test
tenant-id: 1
Authorization: Bearer {{token}}

View File

@ -0,0 +1,23 @@
package cn.iocoder.yudao.module.crm.controller.admin.customer;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import io.swagger.v3.oas.annotations.tags.Tag;
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;
@Tag(name = "管理后台 - 客户信息")
@RestController
@RequestMapping("/crm/customer")
@Validated
public class CrmCustomerController {
@GetMapping("/test")
public CommonResult<String> test() {
return success("hello");
}
}

View File

@ -0,0 +1,4 @@
/**
* 产品表
*/
package cn.iocoder.yudao.module.crm.controller.admin.product;

View File

@ -0,0 +1,4 @@
/**
* 回款
*/
package cn.iocoder.yudao.module.crm.controller.admin.receivable;

View File

@ -0,0 +1,4 @@
/**
* 占位
*/
package cn.iocoder.yudao.module.crm.controller.app;

View File

@ -0,0 +1,6 @@
/**
* 提供 RESTful API 给前端:
* 1. admin 包:提供给管理后台 yudao-ui-admin 前端项目
* 2. app 包:提供给用户 APP yudao-ui-app 前端项目,它的 Controller 和 VO 都要添加 App 前缀,用于和管理后台进行区分
*/
package cn.iocoder.yudao.module.crm.controller;

View File

@ -0,0 +1,6 @@
/**
* 提供 POJO 类的实体转换
*
* 目前使用 MapStruct 框架
*/
package cn.iocoder.yudao.module.crm.convert;

View File

@ -0,0 +1,4 @@
/**
* 商机(销售机会)
*/
package cn.iocoder.yudao.module.crm.dal.dataobject.business;

View File

@ -0,0 +1,4 @@
/**
* 线索
*/
package cn.iocoder.yudao.module.crm.dal.dataobject.clue;

View File

@ -0,0 +1,4 @@
/**
* 联系人
*/
package cn.iocoder.yudao.module.crm.dal.dataobject.contact;

View File

@ -0,0 +1,4 @@
/**
* 合同
*/
package cn.iocoder.yudao.module.crm.dal.dataobject.contract;

View File

@ -0,0 +1,4 @@
/**
* 客户
*/
package cn.iocoder.yudao.module.crm.dal.dataobject.customer;

View File

@ -0,0 +1,4 @@
/**
* 产品表
*/
package cn.iocoder.yudao.module.crm.dal.dataobject.product;

View File

@ -0,0 +1,4 @@
/**
* 回款
*/
package cn.iocoder.yudao.module.crm.dal.dataobject.receivable;

View File

@ -0,0 +1,4 @@
/**
* 商机(销售机会)
*/
package cn.iocoder.yudao.module.crm.dal.mysql.business;

View File

@ -0,0 +1,4 @@
/**
* 线索
*/
package cn.iocoder.yudao.module.crm.dal.mysql.clue;

View File

@ -0,0 +1,4 @@
/**
* 联系人
*/
package cn.iocoder.yudao.module.crm.dal.mysql.contact;

View File

@ -0,0 +1,4 @@
/**
* 合同
*/
package cn.iocoder.yudao.module.crm.dal.mysql.contract;

View File

@ -0,0 +1,4 @@
/**
* 客户
*/
package cn.iocoder.yudao.module.crm.dal.mysql.customer;

View File

@ -0,0 +1,4 @@
/**
* 产品表
*/
package cn.iocoder.yudao.module.crm.dal.mysql.product;

View File

@ -0,0 +1,4 @@
/**
* 回款
*/
package cn.iocoder.yudao.module.crm.dal.mysql.receivable;

View File

@ -0,0 +1,6 @@
/**
* 属于 crm 模块的 framework 封装
*
* @author 芋道源码
*/
package cn.iocoder.yudao.module.crm.framework;

View File

@ -0,0 +1,10 @@
/**
* crm 包下客户关系管理Customer Relationship Management
* 例如说:客户、联系人、商机、合同、回款等等
*
* 1. Controller URL以 /crm/ 开头,避免和其它 Module 冲突
* 2. DataObject 表名:以 crm_ 开头,方便在数据库中区分
*
* 注意,由于 Crm 模块下,容易和其它模块重名,所以类名都加载 Crm 的前缀~
*/
package cn.iocoder.yudao.module.crm;

View File

@ -0,0 +1,4 @@
/**
* 商机(销售机会)
*/
package cn.iocoder.yudao.module.crm.service.business;

View File

@ -0,0 +1,4 @@
/**
* 线索
*/
package cn.iocoder.yudao.module.crm.service.clue;

View File

@ -0,0 +1,4 @@
/**
* 联系人
*/
package cn.iocoder.yudao.module.crm.service.contact;

View File

@ -0,0 +1,4 @@
/**
* 合同
*/
package cn.iocoder.yudao.module.crm.service.contract;

View File

@ -0,0 +1,4 @@
/**
* 客户
*/
package cn.iocoder.yudao.module.crm.service.customer;

View File

@ -0,0 +1,4 @@
/**
* 产品表
*/
package cn.iocoder.yudao.module.crm.service.product;

View File

@ -0,0 +1,4 @@
/**
* 回款
*/
package cn.iocoder.yudao.module.crm.service.receivable;