Compare commits
12 Commits
dc8f1be4c3
...
1af2677c05
| Author | SHA1 | Date | |
|---|---|---|---|
| 1af2677c05 | |||
| cca2e620b5 | |||
| e0ce344d09 | |||
| 85d4289ba7 | |||
| 4e55105c9e | |||
| 36698468f4 | |||
| 7084b3ee6a | |||
| b20abce3d4 | |||
| fe0eb8eca2 | |||
| 74c69956f9 | |||
| 5ccb68a98b | |||
| 1a944c2ba6 |
273
doc/README-中介黑名单测试部署.md
Normal file
273
doc/README-中介黑名单测试部署.md
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
# 中介黑名单管理模块 - 测试与部署文档
|
||||||
|
|
||||||
|
## 文件说明
|
||||||
|
|
||||||
|
本目录包含中介黑名单管理模块(v2.0)的测试脚本、API文档、菜单配置和测试报告模板。
|
||||||
|
|
||||||
|
```
|
||||||
|
doc/
|
||||||
|
├── scripts/
|
||||||
|
│ ├── test-intermediary-api.sh # API自动化测试脚本
|
||||||
|
│ └── cleanup-intermediary-test-data.sh # 测试数据清理脚本
|
||||||
|
├── api/
|
||||||
|
│ └── 中介黑名单管理API文档-v2.0.md # 完整的API接口文档
|
||||||
|
├── test/
|
||||||
|
│ └── intermediary-blacklist-test-report.md # 测试报告模板
|
||||||
|
└── sql/
|
||||||
|
└── menu-intermediary.sql # 菜单配置SQL
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 快速开始
|
||||||
|
|
||||||
|
### 1. 执行菜单SQL
|
||||||
|
|
||||||
|
首先在数据库中执行菜单配置SQL,为系统添加中介黑名单管理菜单:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mysql -u root -p ruoyi < sql/menu-intermediary.sql
|
||||||
|
```
|
||||||
|
|
||||||
|
或者直接在MySQL客户端中执行:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
source D:/ccdi/ccdi/sql/menu-intermediary.sql;
|
||||||
|
```
|
||||||
|
|
||||||
|
执行后,在角色管理中为相应角色分配权限。
|
||||||
|
|
||||||
|
### 2. 运行API测试脚本
|
||||||
|
|
||||||
|
确保后端服务已启动(http://localhost:8080),然后执行测试脚本:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd D:/ccdi/ccdi/doc/scripts
|
||||||
|
bash test-intermediary-api.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
测试脚本会自动:
|
||||||
|
- 获取Token
|
||||||
|
- 测试查询列表
|
||||||
|
- 测试新增个人中介
|
||||||
|
- 测试新增实体中介
|
||||||
|
- 测试查询详情
|
||||||
|
- 测试修改操作
|
||||||
|
- 测试唯一性校验
|
||||||
|
- 测试条件查询
|
||||||
|
|
||||||
|
### 3. 清理测试数据
|
||||||
|
|
||||||
|
测试完成后,运行清理脚本删除测试数据:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd D:/ccdi/ccdi/doc/scripts
|
||||||
|
bash cleanup-intermediary-test-data.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. 查看API文档
|
||||||
|
|
||||||
|
参考API文档进行接口对接:
|
||||||
|
|
||||||
|
- 文件位置: `doc/api/中介黑名单管理API文档-v2.0.md`
|
||||||
|
- Swagger UI: http://localhost:8080/swagger-ui/index.html
|
||||||
|
|
||||||
|
### 5. 填写测试报告
|
||||||
|
|
||||||
|
根据测试结果填写测试报告模板:
|
||||||
|
|
||||||
|
- 文件位置: `doc/test/intermediary-blacklist-test-report.md`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## API接口列表
|
||||||
|
|
||||||
|
### 基础路径
|
||||||
|
`/ccdi/intermediary`
|
||||||
|
|
||||||
|
### 主要接口
|
||||||
|
|
||||||
|
| 方法 | 路径 | 说明 | 权限 |
|
||||||
|
|------|------|------|------|
|
||||||
|
| GET | /list | 查询中介列表 | ccdi:intermediary:list |
|
||||||
|
| GET | /person/{bizId} | 查询个人中介详情 | ccdi:intermediary:query |
|
||||||
|
| GET | /entity/{socialCreditCode} | 查询实体中介详情 | ccdi:intermediary:query |
|
||||||
|
| POST | /person | 新增个人中介 | ccdi:intermediary:add |
|
||||||
|
| POST | /entity | 新增实体中介 | ccdi:intermediary:add |
|
||||||
|
| PUT | /person | 修改个人中介 | ccdi:intermediary:edit |
|
||||||
|
| PUT | /entity | 修改实体中介 | ccdi:intermediary:edit |
|
||||||
|
| DELETE | /{ids} | 删除中介 | ccdi:intermediary:remove |
|
||||||
|
| GET | /checkPersonIdUnique | 校验人员ID唯一性 | 无 |
|
||||||
|
| GET | /checkSocialCreditCodeUnique | 校验统一社会信用代码唯一性 | 无 |
|
||||||
|
| POST | /importPersonTemplate | 下载个人中介导入模板 | 无 |
|
||||||
|
| POST | /importEntityTemplate | 下载实体中介导入模板 | 无 |
|
||||||
|
| POST | /importPersonData | 导入个人中介数据 | ccdi:intermediary:import |
|
||||||
|
| POST | /importEntityData | 导入实体中介数据 | ccdi:intermediary:import |
|
||||||
|
|
||||||
|
详细接口说明请参考API文档。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 测试账号
|
||||||
|
|
||||||
|
- **用户名**: admin
|
||||||
|
- **密码**: admin123
|
||||||
|
- **角色**: 管理员
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 菜单权限说明
|
||||||
|
|
||||||
|
执行menu-intermediary.sql后,系统会创建以下权限:
|
||||||
|
|
||||||
|
| 权限标识 | 说明 |
|
||||||
|
|---------|------|
|
||||||
|
| ccdi:intermediary:query | 查询中介详情 |
|
||||||
|
| ccdi:intermediary:list | 查询中介列表 |
|
||||||
|
| ccdi:intermediary:add | 新增中介 |
|
||||||
|
| ccdi:intermediary:edit | 修改中介 |
|
||||||
|
| ccdi:intermediary:remove | 删除中介 |
|
||||||
|
| ccdi:intermediary:export | 导出中介数据 |
|
||||||
|
| ccdi:intermediary:import | 导入中介数据 |
|
||||||
|
|
||||||
|
在角色管理中为相应角色分配这些权限。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 数据字典说明
|
||||||
|
|
||||||
|
模块使用的数据字典类型:
|
||||||
|
|
||||||
|
| 字典类型 | 字典名称 | 用途 |
|
||||||
|
|---------|---------|------|
|
||||||
|
| ccdi_indiv_gender | 个人中介性别 | 个人中介模板性别下拉框 |
|
||||||
|
| ccdi_certificate_type | 证件类型 | 个人中介模板证件类型下拉框 |
|
||||||
|
| ccdi_entity_type | 主体类型 | 机构中介模板主体类型下拉框 |
|
||||||
|
| ccdi_enterprise_nature | 企业性质 | 机构中介模板企业性质下拉框 |
|
||||||
|
| ccdi_data_source | 数据来源 | 数据来源字段映射 |
|
||||||
|
|
||||||
|
确保这些字典类型在系统中已配置。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 测试用例统计
|
||||||
|
|
||||||
|
本模块共包含44个测试用例,涵盖:
|
||||||
|
|
||||||
|
1. **列表查询** (7个用例)
|
||||||
|
- 基础列表查询
|
||||||
|
- 分页查询
|
||||||
|
- 按姓名查询
|
||||||
|
- 按证件号查询
|
||||||
|
- 按中介类型查询
|
||||||
|
- 组合条件查询
|
||||||
|
|
||||||
|
2. **个人中介管理** (8个用例)
|
||||||
|
- 新增个人中介
|
||||||
|
- 字段验证
|
||||||
|
- 唯一性校验
|
||||||
|
- 修改个人中介
|
||||||
|
- 查询详情
|
||||||
|
|
||||||
|
3. **实体中介管理** (7个用例)
|
||||||
|
- 新增实体中介
|
||||||
|
- 字段验证
|
||||||
|
- 唯一性校验
|
||||||
|
- 修改实体中介
|
||||||
|
- 查询详情
|
||||||
|
|
||||||
|
4. **唯一性校验** (2个用例)
|
||||||
|
- 人员ID唯一性
|
||||||
|
- 统一社会信用代码唯一性
|
||||||
|
|
||||||
|
5. **删除功能** (3个用例)
|
||||||
|
- 删除单条记录
|
||||||
|
- 批量删除
|
||||||
|
- 删除不存在的记录
|
||||||
|
|
||||||
|
6. **导入导出** (11个用例)
|
||||||
|
- 模板下载
|
||||||
|
- 数据导入
|
||||||
|
- 数据导出
|
||||||
|
- 异常处理
|
||||||
|
|
||||||
|
7. **权限控制** (6个用例)
|
||||||
|
- 各功能点的权限验证
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 常见问题
|
||||||
|
|
||||||
|
### 1. 测试脚本无法执行
|
||||||
|
|
||||||
|
**问题**: bash: test-intermediary-api.sh: command not found
|
||||||
|
|
||||||
|
**解决**: 使用bash命令执行
|
||||||
|
```bash
|
||||||
|
bash test-intermediary-api.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. jq命令未安装
|
||||||
|
|
||||||
|
**问题**: jq: command not found
|
||||||
|
|
||||||
|
**解决**: 安装jq命令
|
||||||
|
```bash
|
||||||
|
# Ubuntu/Debian
|
||||||
|
apt-get install jq
|
||||||
|
|
||||||
|
# CentOS/RHEL
|
||||||
|
yum install jq
|
||||||
|
|
||||||
|
# Windows (使用Git Bash)
|
||||||
|
# 下载jq for Windows并添加到PATH
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Token获取失败
|
||||||
|
|
||||||
|
**问题**: Token获取失败或返回null
|
||||||
|
|
||||||
|
**解决**:
|
||||||
|
- 确保后端服务已启动
|
||||||
|
- 确认用户名密码正确(admin/admin123)
|
||||||
|
- 检查/login/test接口是否正常
|
||||||
|
|
||||||
|
### 4. 菜单不显示
|
||||||
|
|
||||||
|
**问题**: 执行SQL后菜单不显示
|
||||||
|
|
||||||
|
**解决**:
|
||||||
|
- 在角色管理中为当前角色分配权限
|
||||||
|
- 刷新页面或重新登录
|
||||||
|
- 检查父级菜单ID(2000)是否存在
|
||||||
|
|
||||||
|
### 5. 导入失败
|
||||||
|
|
||||||
|
**问题**: 导入数据时报错
|
||||||
|
|
||||||
|
**解决**:
|
||||||
|
- 确认Excel模板格式正确
|
||||||
|
- 检查必填字段是否为空
|
||||||
|
- 检查证件号或统一社会信用代码是否重复
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 版本历史
|
||||||
|
|
||||||
|
| 版本 | 日期 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| 2.0.0 | 2026-02-04 | 重构版本:使用MyBatis Plus,分离DTO/VO,统一业务ID |
|
||||||
|
| 1.3.0 | 2026-01-29 | 新增接口分离:新增个人/机构专用新增接口 |
|
||||||
|
| 1.2.0 | 2026-01-29 | 修改接口分离:新增个人/机构专用修改接口 |
|
||||||
|
| 1.1.0 | 2026-01-29 | 添加字典下拉框功能,分离个人/机构模板 |
|
||||||
|
| 1.0.0 | 2026-01-29 | 初始版本,支持个人和机构分类管理 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 联系方式
|
||||||
|
|
||||||
|
如有问题,请联系开发团队。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**最后更新**: 2026-02-04
|
||||||
610
doc/api/中介黑名单管理API文档-v2.0.md
Normal file
610
doc/api/中介黑名单管理API文档-v2.0.md
Normal file
@@ -0,0 +1,610 @@
|
|||||||
|
# 中介黑名单管理 API 文档 v2.0
|
||||||
|
|
||||||
|
## 概述
|
||||||
|
|
||||||
|
中介黑名单管理模块提供个人和实体两类中介信息的增删改查、类型化模板下载和批量导入导出功能。
|
||||||
|
|
||||||
|
**基础路径**: `/ccdi/intermediary`
|
||||||
|
|
||||||
|
**权限标识前缀**: `ccdi:intermediary`
|
||||||
|
|
||||||
|
**文档版本**: v2.0
|
||||||
|
|
||||||
|
**更新日期**: 2026-02-04
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## API 接口列表
|
||||||
|
|
||||||
|
### 1. 查询中介列表
|
||||||
|
|
||||||
|
**接口地址**: `GET /ccdi/intermediary/list`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:list`
|
||||||
|
|
||||||
|
**请求参数** (Query Params):
|
||||||
|
|
||||||
|
| 参数名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| name | String | 否 | 姓名/机构名称(模糊查询) |
|
||||||
|
| certificateNo | String | 否 | 证件号/统一社会信用代码(精确查询) |
|
||||||
|
| intermediaryType | String | 否 | 中介类型(1=个人, 2=实体) |
|
||||||
|
| pageNum | Integer | 否 | 页码(默认1) |
|
||||||
|
| pageSize | Integer | 否 | 每页数量(默认10) |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功",
|
||||||
|
"rows": [
|
||||||
|
{
|
||||||
|
"bizId": "I202602040001",
|
||||||
|
"name": "张三",
|
||||||
|
"certificateNo": "110101199001011234",
|
||||||
|
"intermediaryType": "1",
|
||||||
|
"intermediaryTypeName": "个人",
|
||||||
|
"status": "0",
|
||||||
|
"statusName": "正常",
|
||||||
|
"remark": "测试数据",
|
||||||
|
"createBy": "admin",
|
||||||
|
"createTime": "2026-02-04 10:00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"total": 1
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**响应字段说明**:
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 说明 |
|
||||||
|
|--------|------|------|
|
||||||
|
| bizId | String | 业务ID |
|
||||||
|
| name | String | 姓名/机构名称 |
|
||||||
|
| certificateNo | String | 证件号/统一社会信用代码 |
|
||||||
|
| intermediaryType | String | 中介类型(1=个人, 2=实体) |
|
||||||
|
| intermediaryTypeName | String | 中介类型名称 |
|
||||||
|
| status | String | 状态(0=正常, 1=停用) |
|
||||||
|
| statusName | String | 状态名称 |
|
||||||
|
| remark | String | 备注 |
|
||||||
|
| createBy | String | 创建人 |
|
||||||
|
| createTime | String | 创建时间 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 2. 查询个人中介详情
|
||||||
|
|
||||||
|
**接口地址**: `GET /ccdi/intermediary/person/{bizId}`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:query`
|
||||||
|
|
||||||
|
**路径参数**:
|
||||||
|
|
||||||
|
| 参数名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| bizId | String | 是 | 业务ID |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功",
|
||||||
|
"data": {
|
||||||
|
"bizId": "I202602040001",
|
||||||
|
"name": "张三",
|
||||||
|
"certificateNo": "110101199001011234",
|
||||||
|
"intermediaryType": "1",
|
||||||
|
"intermediaryTypeName": "个人",
|
||||||
|
"status": "0",
|
||||||
|
"statusName": "正常",
|
||||||
|
"personType": "中介",
|
||||||
|
"personSubType": "本人",
|
||||||
|
"relationType": "正常",
|
||||||
|
"gender": "M",
|
||||||
|
"genderName": "男",
|
||||||
|
"idType": "身份证",
|
||||||
|
"personId": "110101199001011234",
|
||||||
|
"mobile": "13800138000",
|
||||||
|
"wechatNo": "zhangsan",
|
||||||
|
"contactAddress": "北京市朝阳区",
|
||||||
|
"company": "XX公司",
|
||||||
|
"socialCreditCode": "91110000123456789X",
|
||||||
|
"position": "经纪人",
|
||||||
|
"relatedNumId": "",
|
||||||
|
"relation": "",
|
||||||
|
"remark": "测试数据",
|
||||||
|
"createBy": "admin",
|
||||||
|
"createTime": "2026-02-04 10:00:00"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 3. 查询实体中介详情
|
||||||
|
|
||||||
|
**接口地址**: `GET /ccdi/intermediary/entity/{socialCreditCode}`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:query`
|
||||||
|
|
||||||
|
**路径参数**:
|
||||||
|
|
||||||
|
| 参数名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| socialCreditCode | String | 是 | 统一社会信用代码 |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功",
|
||||||
|
"data": {
|
||||||
|
"bizId": "I202602040002",
|
||||||
|
"name": "XX中介公司",
|
||||||
|
"certificateNo": "91110000123456789X",
|
||||||
|
"intermediaryType": "2",
|
||||||
|
"intermediaryTypeName": "实体",
|
||||||
|
"status": "0",
|
||||||
|
"statusName": "正常",
|
||||||
|
"enterpriseName": "XX中介公司",
|
||||||
|
"socialCreditCode": "91110000123456789X",
|
||||||
|
"enterpriseType": "有限责任公司",
|
||||||
|
"enterpriseNature": "民企",
|
||||||
|
"industryClass": "房地产",
|
||||||
|
"industryName": "房地产业",
|
||||||
|
"establishDate": "2020-01-01",
|
||||||
|
"registerAddress": "北京市朝阳区",
|
||||||
|
"legalRepresentative": "张三",
|
||||||
|
"legalCertType": "身份证",
|
||||||
|
"legalCertNo": "110101199001011234",
|
||||||
|
"shareholder1": "李四",
|
||||||
|
"shareholder2": "王五",
|
||||||
|
"shareholder3": "",
|
||||||
|
"shareholder4": "",
|
||||||
|
"shareholder5": "",
|
||||||
|
"remark": "测试数据",
|
||||||
|
"createBy": "admin",
|
||||||
|
"createTime": "2026-02-04 10:00:00"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 4. 新增个人中介
|
||||||
|
|
||||||
|
**接口地址**: `POST /ccdi/intermediary/person`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:add`
|
||||||
|
|
||||||
|
**请求体** (application/json):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "张三",
|
||||||
|
"personType": "中介",
|
||||||
|
"personSubType": "本人",
|
||||||
|
"relationType": "正常",
|
||||||
|
"gender": "M",
|
||||||
|
"idType": "身份证",
|
||||||
|
"personId": "110101199001011234",
|
||||||
|
"mobile": "13800138000",
|
||||||
|
"wechatNo": "zhangsan",
|
||||||
|
"contactAddress": "北京市朝阳区",
|
||||||
|
"company": "XX公司",
|
||||||
|
"socialCreditCode": "91110000123456789X",
|
||||||
|
"position": "经纪人",
|
||||||
|
"relatedNumId": "",
|
||||||
|
"relation": "",
|
||||||
|
"remark": "测试数据"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**字段说明**:
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| name | String | 是 | 姓名(最大100字符) |
|
||||||
|
| personId | String | 是 | 证件号码(最大50字符) |
|
||||||
|
| personType | String | 否 | 人员类型 |
|
||||||
|
| personSubType | String | 否 | 人员子类型 |
|
||||||
|
| relationType | String | 否 | 关系类型 |
|
||||||
|
| gender | String | 否 | 性别(M=男, F=女, O=其他) |
|
||||||
|
| idType | String | 否 | 证件类型 |
|
||||||
|
| mobile | String | 否 | 手机号码(最大20字符) |
|
||||||
|
| wechatNo | String | 否 | 微信号(最大50字符) |
|
||||||
|
| contactAddress | String | 否 | 联系地址(最大200字符) |
|
||||||
|
| company | String | 否 | 所在公司(最大200字符) |
|
||||||
|
| socialCreditCode | String | 否 | 企业统一信用码(最大50字符) |
|
||||||
|
| position | String | 否 | 职位(最大100字符) |
|
||||||
|
| relatedNumId | String | 否 | 关联人员ID(最大50字符) |
|
||||||
|
| relation | String | 否 | 关联关系(最大50字符) |
|
||||||
|
| remark | String | 否 | 备注(最大500字符) |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 5. 新增实体中介
|
||||||
|
|
||||||
|
**接口地址**: `POST /ccdi/intermediary/entity`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:add`
|
||||||
|
|
||||||
|
**请求体** (application/json):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"enterpriseName": "XX中介公司",
|
||||||
|
"socialCreditCode": "91110000123456789X",
|
||||||
|
"enterpriseType": "有限责任公司",
|
||||||
|
"enterpriseNature": "民企",
|
||||||
|
"industryClass": "房地产",
|
||||||
|
"industryName": "房地产业",
|
||||||
|
"establishDate": "2020-01-01",
|
||||||
|
"registerAddress": "北京市朝阳区",
|
||||||
|
"legalRepresentative": "张三",
|
||||||
|
"legalCertType": "身份证",
|
||||||
|
"legalCertNo": "110101199001011234",
|
||||||
|
"shareholder1": "李四",
|
||||||
|
"shareholder2": "王五",
|
||||||
|
"shareholder3": "",
|
||||||
|
"shareholder4": "",
|
||||||
|
"shareholder5": "",
|
||||||
|
"remark": "测试数据"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**字段说明**:
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| enterpriseName | String | 是 | 机构名称(最大200字符) |
|
||||||
|
| socialCreditCode | String | 否 | 统一社会信用代码(最大50字符) |
|
||||||
|
| enterpriseType | String | 否 | 主体类型(最大50字符) |
|
||||||
|
| enterpriseNature | String | 否 | 企业性质(最大50字符) |
|
||||||
|
| industryClass | String | 否 | 行业分类(最大100字符) |
|
||||||
|
| industryName | String | 否 | 所属行业(最大100字符) |
|
||||||
|
| establishDate | Date | 否 | 成立日期 |
|
||||||
|
| registerAddress | String | 否 | 注册地址(最大500字符) |
|
||||||
|
| legalRepresentative | String | 否 | 法定代表人(最大100字符) |
|
||||||
|
| legalCertType | String | 否 | 法定代表人证件类型(最大50字符) |
|
||||||
|
| legalCertNo | String | 否 | 法定代表人证件号码(最大50字符) |
|
||||||
|
| shareholder1-5 | String | 否 | 股东信息(每个最大100字符) |
|
||||||
|
| remark | String | 否 | 备注(最大500字符) |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 6. 修改个人中介
|
||||||
|
|
||||||
|
**接口地址**: `PUT /ccdi/intermediary/person`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:edit`
|
||||||
|
|
||||||
|
**请求体** (application/json):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"bizId": "I202602040001",
|
||||||
|
"name": "张三",
|
||||||
|
"personType": "中介",
|
||||||
|
"personSubType": "本人",
|
||||||
|
"relationType": "正常",
|
||||||
|
"gender": "M",
|
||||||
|
"idType": "身份证",
|
||||||
|
"personId": "110101199001011234",
|
||||||
|
"mobile": "13800138000",
|
||||||
|
"wechatNo": "zhangsan",
|
||||||
|
"contactAddress": "北京市朝阳区",
|
||||||
|
"company": "XX公司",
|
||||||
|
"socialCreditCode": "91110000123456789X",
|
||||||
|
"position": "经纪人",
|
||||||
|
"relatedNumId": "",
|
||||||
|
"relation": "",
|
||||||
|
"remark": "测试数据"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**字段说明**: 与新增个人中介相同,bizId为必填项
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 7. 修改实体中介
|
||||||
|
|
||||||
|
**接口地址**: `PUT /ccdi/intermediary/entity`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:edit`
|
||||||
|
|
||||||
|
**请求体** (application/json):
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"socialCreditCode": "91110000123456789X",
|
||||||
|
"enterpriseName": "XX中介公司",
|
||||||
|
"enterpriseType": "有限责任公司",
|
||||||
|
"enterpriseNature": "民企",
|
||||||
|
"industryClass": "房地产",
|
||||||
|
"industryName": "房地产业",
|
||||||
|
"establishDate": "2020-01-01",
|
||||||
|
"registerAddress": "北京市朝阳区",
|
||||||
|
"legalRepresentative": "张三",
|
||||||
|
"legalCertType": "身份证",
|
||||||
|
"legalCertNo": "110101199001011234",
|
||||||
|
"shareholder1": "李四",
|
||||||
|
"shareholder2": "王五",
|
||||||
|
"shareholder3": "",
|
||||||
|
"shareholder4": "",
|
||||||
|
"shareholder5": "",
|
||||||
|
"remark": "测试数据"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**字段说明**: 与新增实体中介相同,socialCreditCode为必填项
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 8. 删除中介
|
||||||
|
|
||||||
|
**接口地址**: `DELETE /ccdi/intermediary/{ids}`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:remove`
|
||||||
|
|
||||||
|
**路径参数**:
|
||||||
|
|
||||||
|
| 参数名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| ids | String[] | 是 | 业务ID数组(逗号分隔) |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 9. 校验人员ID唯一性
|
||||||
|
|
||||||
|
**接口地址**: `GET /ccdi/intermediary/checkPersonIdUnique`
|
||||||
|
|
||||||
|
**权限要求**: 无
|
||||||
|
|
||||||
|
**请求参数**:
|
||||||
|
|
||||||
|
| 参数名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| personId | String | 是 | 证件号码 |
|
||||||
|
| bizId | String | 否 | 排除的业务ID(修改时使用) |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功",
|
||||||
|
"data": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**data字段说明**: true=唯一可用, false=已存在
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 10. 校验统一社会信用代码唯一性
|
||||||
|
|
||||||
|
**接口地址**: `GET /ccdi/intermediary/checkSocialCreditCodeUnique`
|
||||||
|
|
||||||
|
**权限要求**: 无
|
||||||
|
|
||||||
|
**请求参数**:
|
||||||
|
|
||||||
|
| 参数名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| socialCreditCode | String | 是 | 统一社会信用代码 |
|
||||||
|
| excludeId | String | 否 | 排除的ID(修改时使用) |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "操作成功",
|
||||||
|
"data": true
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
**data字段说明**: true=唯一可用, false=已存在
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 11. 下载个人中介导入模板
|
||||||
|
|
||||||
|
**接口地址**: `POST /ccdi/intermediary/importPersonTemplate`
|
||||||
|
|
||||||
|
**权限要求**: 无
|
||||||
|
|
||||||
|
**响应**: Excel模板文件下载
|
||||||
|
|
||||||
|
**Excel格式说明**:
|
||||||
|
|
||||||
|
**Sheet1: 个人中介信息**
|
||||||
|
| 姓名 | 人员类型 | 人员子类型 | 关系类型 | 性别▼ | 证件类型▼ | 证件号码 | 手机号码 | 微信号 | 联系地址 | 所在公司 | 企业统一信用码 | 职位 | 关联人员ID | 关联关系 | 备注 |
|
||||||
|
|------|---------|-----------|---------|-------|-----------|---------|---------|--------|---------|---------|--------------|-----|-----------|---------|------|
|
||||||
|
| 张三 | 中介 | 本人 | 正常 | 男 | 身份证 | 110101199001011234 | 13800138000 | zhangsan | 北京市朝阳区 | XX公司 | 91110000XXXXXXXXXX | 经纪人 | - | - | 测试 |
|
||||||
|
|
||||||
|
**注**: 带▼标记的列包含下拉框,选项来自字典
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 12. 下载实体中介导入模板
|
||||||
|
|
||||||
|
**接口地址**: `POST /ccdi/intermediary/importEntityTemplate`
|
||||||
|
|
||||||
|
**权限要求**: 无
|
||||||
|
|
||||||
|
**响应**: Excel模板文件下载
|
||||||
|
|
||||||
|
**Excel格式说明**:
|
||||||
|
|
||||||
|
**Sheet1: 实体中介信息**
|
||||||
|
| 机构名称 | 统一社会信用代码 | 主体类型▼ | 企业性质▼ | 行业分类 | 所属行业 | 成立日期 | 注册地址 | 法定代表人 | 法定代表人证件类型 | 法定代表人证件号码 | 股东1 | 股东2 | 股东3 | 股东4 | 股东5 | 备注 |
|
||||||
|
|---------|-----------------|-----------|-----------|---------|---------|---------|---------|-----------|-------------------|-------------------|-------|-------|-------|-------|-------|------|
|
||||||
|
| XX公司 | 91110000XXXXXXXXXX | 有限责任公司 | 民企 | 房地产 | 房地产业 | 2020-01-01 | 北京市朝阳区 | 张三 | 身份证 | 110101199001011234 | 李四 | 王五 | - | - | - | - |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 13. 导入个人中介数据
|
||||||
|
|
||||||
|
**接口地址**: `POST /ccdi/intermediary/importPersonData`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:import`
|
||||||
|
|
||||||
|
**请求参数** (multipart/form-data):
|
||||||
|
|
||||||
|
| 参数名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| file | File | 是 | Excel文件 |
|
||||||
|
| updateSupport | Boolean | 否 | 是否更新已存在数据(默认false) |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "恭喜您,数据已全部导入成功!共10条"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### 14. 导入实体中介数据
|
||||||
|
|
||||||
|
**接口地址**: `POST /ccdi/intermediary/importEntityData`
|
||||||
|
|
||||||
|
**权限要求**: `ccdi:intermediary:import`
|
||||||
|
|
||||||
|
**请求参数** (multipart/form-data):
|
||||||
|
|
||||||
|
| 参数名 | 类型 | 必填 | 说明 |
|
||||||
|
|--------|------|------|------|
|
||||||
|
| file | File | 是 | Excel文件 |
|
||||||
|
| updateSupport | Boolean | 否 | 是否更新已存在数据(默认false) |
|
||||||
|
|
||||||
|
**响应示例**:
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "恭喜您,数据已全部导入成功!共10条"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 字典数据说明
|
||||||
|
|
||||||
|
导入模板中的下拉框选项来自系统字典管理,相关字典类型:
|
||||||
|
|
||||||
|
| 字典类型 | 字典名称 | 用途 |
|
||||||
|
|---------|---------|------|
|
||||||
|
| ccdi_indiv_gender | 个人中介性别 | 个人中介模板性别下拉框 |
|
||||||
|
| ccdi_certificate_type | 证件类型 | 个人中介模板证件类型下拉框 |
|
||||||
|
| ccdi_entity_type | 主体类型 | 机构中介模板主体类型下拉框 |
|
||||||
|
| ccdi_enterprise_nature | 企业性质 | 机构中介模板企业性质下拉框 |
|
||||||
|
| ccdi_data_source | 数据来源 | 数据来源字段映射 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 错误码说明
|
||||||
|
|
||||||
|
| HTTP状态码 | 错误码 | 说明 |
|
||||||
|
|-----------|--------|------|
|
||||||
|
| 200 | 200 | 操作成功 |
|
||||||
|
| 401 | 401 | 未授权,请先登录 |
|
||||||
|
| 403 | 403 | 无权限访问 |
|
||||||
|
| 500 | 500 | 服务器内部错误 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 业务错误信息
|
||||||
|
|
||||||
|
| 错误信息 | 说明 |
|
||||||
|
|----------|------|
|
||||||
|
| 姓名不能为空 | 个人中介新增/修改时姓名为空 |
|
||||||
|
| 机构名称不能为空 | 实体中介新增/修改时机构名称为空 |
|
||||||
|
| 证件号码不能为空 | 个人中介新增/修改时证件号码为空 |
|
||||||
|
| 该证件号已存在 | 新增/导入时证件号重复 |
|
||||||
|
| 该统一社会信用代码已存在 | 新增/导入时信用代码重复 |
|
||||||
|
| 姓名长度不能超过100个字符 | 姓名超长 |
|
||||||
|
| 证件号码长度不能超过50个字符 | 证件号码超长 |
|
||||||
|
| 机构名称长度不能超过200个字符 | 机构名称超长 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 测试账号
|
||||||
|
|
||||||
|
- 用户名: `admin`
|
||||||
|
- 密码: `admin123`
|
||||||
|
|
||||||
|
测试前请先调用 `/login/test` 接口获取Token。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 更新日志
|
||||||
|
|
||||||
|
| 版本 | 日期 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| 1.0.0 | 2026-01-29 | 初始版本,支持个人和机构分类管理 |
|
||||||
|
| 1.1.0 | 2026-01-29 | 添加字典下拉框功能,分离个人/机构模板 |
|
||||||
|
| 1.2.0 | 2026-01-29 | 修改接口分离:新增个人/机构专用修改接口,修复中介类型修改问题 |
|
||||||
|
| 1.3.0 | 2026-01-29 | 新增接口分离:新增个人/机构专用新增接口,统一接口设计 |
|
||||||
|
| 2.0.0 | 2026-02-04 | 重构版本:使用MyBatis Plus,分离DTO/VO,统一业务ID(bizId),优化查询接口 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 主要变更说明 (v2.0)
|
||||||
|
|
||||||
|
### 架构变更
|
||||||
|
- 使用MyBatis Plus替代原生MyBatis
|
||||||
|
- 分离DTO(请求)和VO(响应)对象
|
||||||
|
- 统一使用业务ID(bizId)作为主键
|
||||||
|
|
||||||
|
### 接口变更
|
||||||
|
- 查询详情接口分离为个人和实体两个接口
|
||||||
|
- 新增接口分离为个人和实体两个接口
|
||||||
|
- 修改接口分离为个人和实体两个接口
|
||||||
|
- 新增唯一性校验接口
|
||||||
|
|
||||||
|
### 数据模型变更
|
||||||
|
- 个人中介使用`personId`作为证件号字段
|
||||||
|
- 实体中介使用`socialCreditCode`作为统一社会信用代码字段
|
||||||
|
- 删除了`intermediaryId`,统一使用`bizId`
|
||||||
|
|
||||||
|
### 查询功能增强
|
||||||
|
- 支持按中介类型查询
|
||||||
|
- 支持按姓名/机构名称模糊查询
|
||||||
|
- 支持按证件号/统一社会信用代码精确查询
|
||||||
177
doc/scripts/cleanup-intermediary-test-data.sh
Normal file
177
doc/scripts/cleanup-intermediary-test-data.sh
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# 中介黑名单管理测试数据清理脚本
|
||||||
|
# 功能: 清理测试脚本创建的测试数据
|
||||||
|
# 作者: Claude Code
|
||||||
|
# 日期: 2026-02-04
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# 颜色定义
|
||||||
|
RED='\033[0;31m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
# 配置
|
||||||
|
BASE_URL="http://localhost:8080"
|
||||||
|
TEST_USERNAME="admin"
|
||||||
|
TEST_PASSWORD="admin123"
|
||||||
|
|
||||||
|
# 输出函数
|
||||||
|
print_header() {
|
||||||
|
echo ""
|
||||||
|
echo "========================================"
|
||||||
|
echo "$1"
|
||||||
|
echo "========================================"
|
||||||
|
}
|
||||||
|
|
||||||
|
print_section() {
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}=== $1 ===${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
print_success() {
|
||||||
|
echo -e "${GREEN}✓ $1${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
print_error() {
|
||||||
|
echo -e "${RED}✗ $1${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# 获取Token
|
||||||
|
get_token() {
|
||||||
|
print_section "获取Token"
|
||||||
|
|
||||||
|
TOKEN=$(curl -s -X POST "${BASE_URL}/login/test" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"username\":\"${TEST_USERNAME}\",\"password\":\"${TEST_PASSWORD}\"}" | jq -r '.data.token')
|
||||||
|
|
||||||
|
if [ "$TOKEN" != "null" ] && [ -n "$TOKEN" ]; then
|
||||||
|
print_success "Token获取成功"
|
||||||
|
else
|
||||||
|
print_error "Token获取失败"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 查询测试数据
|
||||||
|
query_test_data() {
|
||||||
|
print_section "查询测试数据"
|
||||||
|
|
||||||
|
echo "查询测试个人中介:"
|
||||||
|
PERSON_RESPONSE=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/list?name=测试中介个人&intermediaryType=1" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$PERSON_RESPONSE" | jq '.'
|
||||||
|
|
||||||
|
PERSON_IDS=$(echo "$PERSON_RESPONSE" | jq -r '.rows[].bizId // empty')
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "查询测试实体中介:"
|
||||||
|
ENTITY_RESPONSE=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/list?name=测试中介公司&intermediaryType=2" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$ENTITY_RESPONSE" | jq '.'
|
||||||
|
|
||||||
|
ENTITY_IDS=$(echo "$ENTITY_RESPONSE" | jq -r '.rows[].bizId // empty')
|
||||||
|
}
|
||||||
|
|
||||||
|
# 删除测试数据
|
||||||
|
delete_test_data() {
|
||||||
|
print_section "删除测试数据"
|
||||||
|
|
||||||
|
# 删除测试个人中介
|
||||||
|
if [ -n "$PERSON_IDS" ]; then
|
||||||
|
echo "删除测试个人中介: $PERSON_IDS"
|
||||||
|
DELETE_RESPONSE=$(curl -s -X DELETE "${BASE_URL}/ccdi/intermediary/${PERSON_IDS}" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$DELETE_RESPONSE" | jq '.'
|
||||||
|
|
||||||
|
code=$(echo "$DELETE_RESPONSE" | jq -r '.code')
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
print_success "测试个人中介删除成功"
|
||||||
|
else
|
||||||
|
print_error "测试个人中介删除失败"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "没有找到测试个人中介数据"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 删除测试实体中介
|
||||||
|
if [ -n "$ENTITY_IDS" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "删除测试实体中介: $ENTITY_IDS"
|
||||||
|
DELETE_RESPONSE=$(curl -s -X DELETE "${BASE_URL}/ccdi/intermediary/${ENTITY_IDS}" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$DELETE_RESPONSE" | jq '.'
|
||||||
|
|
||||||
|
code=$(echo "$DELETE_RESPONSE" | jq -r '.code')
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
print_success "测试实体中介删除成功"
|
||||||
|
else
|
||||||
|
print_error "测试实体中介删除失败"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "没有找到测试实体中介数据"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 验证删除结果
|
||||||
|
verify_deletion() {
|
||||||
|
print_section "验证删除结果"
|
||||||
|
|
||||||
|
echo "验证测试个人中介是否已删除:"
|
||||||
|
VERIFY_PERSON=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/list?name=测试中介个人&intermediaryType=1" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
TOTAL=$(echo "$VERIFY_PERSON" | jq -r '.total')
|
||||||
|
if [ "$TOTAL" == "0" ]; then
|
||||||
|
print_success "测试个人中介已全部删除"
|
||||||
|
else
|
||||||
|
print_error "仍有 $TOTAL 条测试个人中介数据未删除"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "验证测试实体中介是否已删除:"
|
||||||
|
VERIFY_ENTITY=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/list?name=测试中介公司&intermediaryType=2" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
TOTAL=$(echo "$VERIFY_ENTITY" | jq -r '.total')
|
||||||
|
if [ "$TOTAL" == "0" ]; then
|
||||||
|
print_success "测试实体中介已全部删除"
|
||||||
|
else
|
||||||
|
print_error "仍有 $TOTAL 条测试实体中介数据未删除"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 主函数
|
||||||
|
main() {
|
||||||
|
print_header "中介黑名单测试数据清理开始"
|
||||||
|
|
||||||
|
# 检查jq命令
|
||||||
|
if ! command -v jq &> /dev/null; then
|
||||||
|
print_error "jq命令未安装,请先安装: apt-get install jq 或 yum install jq"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 获取Token
|
||||||
|
get_token
|
||||||
|
|
||||||
|
# 查询测试数据
|
||||||
|
query_test_data
|
||||||
|
|
||||||
|
# 删除测试数据
|
||||||
|
delete_test_data
|
||||||
|
|
||||||
|
# 验证删除结果
|
||||||
|
verify_deletion
|
||||||
|
|
||||||
|
print_header "清理完成"
|
||||||
|
}
|
||||||
|
|
||||||
|
# 执行主函数
|
||||||
|
main
|
||||||
33
doc/scripts/run-cleanup.bat
Normal file
33
doc/scripts/run-cleanup.bat
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
@echo off
|
||||||
|
REM =====================================================
|
||||||
|
REM 中介黑名单管理 测试数据清理脚本 (Windows版本)
|
||||||
|
REM 功能: 在Windows上清理测试数据
|
||||||
|
REM 作者: Claude Code
|
||||||
|
REM 日期: 2026-02-04
|
||||||
|
REM =====================================================
|
||||||
|
|
||||||
|
echo ========================================
|
||||||
|
echo 中介黑名单测试数据清理
|
||||||
|
echo ========================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
REM 检查Git Bash是否安装
|
||||||
|
where bash >nul 2>nul
|
||||||
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
|
echo 错误: 未找到Git Bash
|
||||||
|
echo 请安装Git for Windows或在Git Bash中运行此脚本
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM 执行清理脚本
|
||||||
|
echo 正在清理测试数据...
|
||||||
|
echo.
|
||||||
|
bash "D:/ccdi/ccdi/doc/scripts/cleanup-intermediary-test-data.sh"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ========================================
|
||||||
|
echo 清理完成
|
||||||
|
echo ========================================
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
33
doc/scripts/run-test.bat
Normal file
33
doc/scripts/run-test.bat
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
@echo off
|
||||||
|
REM =====================================================
|
||||||
|
REM 中介黑名单管理 API 测试脚本 (Windows版本)
|
||||||
|
REM 功能: 在Windows上执行API测试
|
||||||
|
REM 作者: Claude Code
|
||||||
|
REM 日期: 2026-02-04
|
||||||
|
REM =====================================================
|
||||||
|
|
||||||
|
echo ========================================
|
||||||
|
echo 中介黑名单管理 API 测试
|
||||||
|
echo ========================================
|
||||||
|
echo.
|
||||||
|
|
||||||
|
REM 检查Git Bash是否安装
|
||||||
|
where bash >nul 2>nul
|
||||||
|
if %ERRORLEVEL% NEQ 0 (
|
||||||
|
echo 错误: 未找到Git Bash
|
||||||
|
echo 请安装Git for Windows或在Git Bash中运行此脚本
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM 执行测试脚本
|
||||||
|
echo 正在执行API测试...
|
||||||
|
echo.
|
||||||
|
bash "D:/ccdi/ccdi/doc/scripts/test-intermediary-api.sh"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ========================================
|
||||||
|
echo 测试完成
|
||||||
|
echo ========================================
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
363
doc/scripts/test-intermediary-api.sh
Normal file
363
doc/scripts/test-intermediary-api.sh
Normal file
@@ -0,0 +1,363 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# 中介黑名单管理 API 测试脚本
|
||||||
|
# 功能: 测试中介黑名单管理模块的所有接口
|
||||||
|
# 作者: Claude Code
|
||||||
|
# 日期: 2026-02-04
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# 颜色定义
|
||||||
|
RED='\033[0;31m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
YELLOW='\033[1;33m'
|
||||||
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
# 配置
|
||||||
|
BASE_URL="http://localhost:8080"
|
||||||
|
TEST_USERNAME="admin"
|
||||||
|
TEST_PASSWORD="admin123"
|
||||||
|
|
||||||
|
# 输出函数
|
||||||
|
print_header() {
|
||||||
|
echo ""
|
||||||
|
echo "========================================"
|
||||||
|
echo "$1"
|
||||||
|
echo "========================================"
|
||||||
|
}
|
||||||
|
|
||||||
|
print_section() {
|
||||||
|
echo ""
|
||||||
|
echo -e "${YELLOW}=== $1 ===${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
print_success() {
|
||||||
|
echo -e "${GREEN}✓ $1${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
print_error() {
|
||||||
|
echo -e "${RED}✗ $1${NC}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# 获取Token
|
||||||
|
get_token() {
|
||||||
|
print_section "获取Token"
|
||||||
|
|
||||||
|
TOKEN=$(curl -s -X POST "${BASE_URL}/login/test" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"username\":\"${TEST_USERNAME}\",\"password\":\"${TEST_PASSWORD}\"}" | jq -r '.data.token')
|
||||||
|
|
||||||
|
if [ "$TOKEN" != "null" ] && [ -n "$TOKEN" ]; then
|
||||||
|
print_success "Token获取成功: ${TOKEN:0:20}..."
|
||||||
|
echo "$TOKEN"
|
||||||
|
else
|
||||||
|
print_error "Token获取失败"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试查询列表
|
||||||
|
test_list() {
|
||||||
|
print_section "测试查询列表"
|
||||||
|
|
||||||
|
response=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/list?pageNum=1&pageSize=10" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
code=$(echo "$response" | jq -r '.code')
|
||||||
|
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
print_success "查询列表成功"
|
||||||
|
total=$(echo "$response" | jq -r '.total')
|
||||||
|
echo "总记录数: $total"
|
||||||
|
else
|
||||||
|
print_error "查询列表失败"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试新增个人中介
|
||||||
|
test_add_person() {
|
||||||
|
print_section "测试新增个人中介"
|
||||||
|
|
||||||
|
response=$(curl -s -X POST "${BASE_URL}/ccdi/intermediary/person" \
|
||||||
|
-H "Authorization: Bearer $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"name": "测试中介个人",
|
||||||
|
"personType": "中介",
|
||||||
|
"personSubType": "本人",
|
||||||
|
"relationType": "正常",
|
||||||
|
"gender": "M",
|
||||||
|
"idType": "身份证",
|
||||||
|
"personId": "110101199001019999",
|
||||||
|
"mobile": "13800138000",
|
||||||
|
"wechatNo": "test_wx",
|
||||||
|
"contactAddress": "北京市朝阳区测试地址",
|
||||||
|
"company": "测试公司",
|
||||||
|
"position": "经纪人",
|
||||||
|
"remark": "自动化测试数据"
|
||||||
|
}')
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
code=$(echo "$response" | jq -r '.code')
|
||||||
|
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
print_success "新增个人中介成功"
|
||||||
|
# 保存bizId用于后续测试
|
||||||
|
PERSON_BIZ_ID=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/list?name=测试中介个人" \
|
||||||
|
-H "Authorization: Bearer $TOKEN" | jq -r '.rows[0].bizId // empty')
|
||||||
|
if [ -n "$PERSON_BIZ_ID" ]; then
|
||||||
|
echo "获取到个人中介bizId: $PERSON_BIZ_ID"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
print_error "新增个人中介失败: $(echo "$response" | jq -r '.msg')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试新增实体中介
|
||||||
|
test_add_entity() {
|
||||||
|
print_section "测试新增实体中介"
|
||||||
|
|
||||||
|
response=$(curl -s -X POST "${BASE_URL}/ccdi/intermediary/entity" \
|
||||||
|
-H "Authorization: Bearer $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{
|
||||||
|
"enterpriseName": "测试中介公司",
|
||||||
|
"socialCreditCode": "91110000123456789X",
|
||||||
|
"enterpriseType": "有限责任公司",
|
||||||
|
"enterpriseNature": "民企",
|
||||||
|
"industryClass": "房地产",
|
||||||
|
"industryName": "房地产业",
|
||||||
|
"establishDate": "2020-01-01",
|
||||||
|
"registerAddress": "北京市朝阳区注册地址",
|
||||||
|
"legalRepresentative": "张三",
|
||||||
|
"legalCertType": "身份证",
|
||||||
|
"legalCertNo": "110101199001011234",
|
||||||
|
"shareholder1": "李四",
|
||||||
|
"shareholder2": "王五",
|
||||||
|
"remark": "自动化测试数据"
|
||||||
|
}')
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
code=$(echo "$response" | jq -r '.code')
|
||||||
|
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
print_success "新增实体中介成功"
|
||||||
|
# 保存socialCreditCode用于后续测试
|
||||||
|
ENTITY_CREDIT_CODE="91110000123456789X"
|
||||||
|
echo "实体中介统一社会信用代码: $ENTITY_CREDIT_CODE"
|
||||||
|
else
|
||||||
|
print_error "新增实体中介失败: $(echo "$response" | jq -r '.msg')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试查询个人中介详情
|
||||||
|
test_get_person_detail() {
|
||||||
|
print_section "测试查询个人中介详情"
|
||||||
|
|
||||||
|
if [ -z "$PERSON_BIZ_ID" ]; then
|
||||||
|
print_error "没有可用的个人中介bizId,跳过测试"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
response=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/person/${PERSON_BIZ_ID}" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
code=$(echo "$response" | jq -r '.code')
|
||||||
|
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
print_success "查询个人中介详情成功"
|
||||||
|
else
|
||||||
|
print_error "查询个人中介详情失败: $(echo "$response" | jq -r '.msg')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试查询实体中介详情
|
||||||
|
test_get_entity_detail() {
|
||||||
|
print_section "测试查询实体中介详情"
|
||||||
|
|
||||||
|
if [ -z "$ENTITY_CREDIT_CODE" ]; then
|
||||||
|
print_error "没有可用的实体中介统一社会信用代码,跳过测试"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
response=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/entity/${ENTITY_CREDIT_CODE}" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
code=$(echo "$response" | jq -r '.code')
|
||||||
|
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
print_success "查询实体中介详情成功"
|
||||||
|
else
|
||||||
|
print_error "查询实体中介详情失败: $(echo "$response" | jq -r '.msg')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试校验人员ID唯一性
|
||||||
|
test_check_person_id() {
|
||||||
|
print_section "测试校验人员ID唯一性"
|
||||||
|
|
||||||
|
response=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/checkPersonIdUnique?personId=110101199001019999" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
code=$(echo "$response" | jq -r '.code')
|
||||||
|
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
unique=$(echo "$response" | jq -r '.data')
|
||||||
|
print_success "校验人员ID唯一性成功, unique=$unique"
|
||||||
|
else
|
||||||
|
print_error "校验人员ID唯一性失败"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试校验统一社会信用代码唯一性
|
||||||
|
test_check_social_credit_code() {
|
||||||
|
print_section "测试校验统一社会信用代码唯一性"
|
||||||
|
|
||||||
|
response=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/checkSocialCreditCodeUnique?socialCreditCode=91110000123456789X" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
code=$(echo "$response" | jq -r '.code')
|
||||||
|
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
unique=$(echo "$response" | jq -r '.data')
|
||||||
|
print_success "校验统一社会信用代码唯一性成功, unique=$unique"
|
||||||
|
else
|
||||||
|
print_error "校验统一社会信用代码唯一性失败"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试修改个人中介
|
||||||
|
test_edit_person() {
|
||||||
|
print_section "测试修改个人中介"
|
||||||
|
|
||||||
|
if [ -z "$PERSON_BIZ_ID" ]; then
|
||||||
|
print_error "没有可用的个人中介bizId,跳过测试"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
response=$(curl -s -X PUT "${BASE_URL}/ccdi/intermediary/person" \
|
||||||
|
-H "Authorization: Bearer $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{
|
||||||
|
\"bizId\": \"$PERSON_BIZ_ID\",
|
||||||
|
\"name\": \"测试中介个人(已修改)\",
|
||||||
|
\"personType\": \"中介\",
|
||||||
|
\"gender\": \"M\",
|
||||||
|
\"idType\": \"身份证\",
|
||||||
|
\"personId\": \"110101199001019999\",
|
||||||
|
\"mobile\": \"13900139000\",
|
||||||
|
\"company\": \"新公司\",
|
||||||
|
\"position\": \"高级经纪人\",
|
||||||
|
\"remark\": \"修改后的测试数据\"
|
||||||
|
}")
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
code=$(echo "$response" | jq -r '.code')
|
||||||
|
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
print_success "修改个人中介成功"
|
||||||
|
else
|
||||||
|
print_error "修改个人中介失败: $(echo "$response" | jq -r '.msg')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试修改实体中介
|
||||||
|
test_edit_entity() {
|
||||||
|
print_section "测试修改实体中介"
|
||||||
|
|
||||||
|
if [ -z "$ENTITY_CREDIT_CODE" ]; then
|
||||||
|
print_error "没有可用的实体中介统一社会信用代码,跳过测试"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
response=$(curl -s -X PUT "${BASE_URL}/ccdi/intermediary/entity" \
|
||||||
|
-H "Authorization: Bearer $TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{
|
||||||
|
\"socialCreditCode\": \"$ENTITY_CREDIT_CODE\",
|
||||||
|
\"enterpriseName\": \"测试中介公司(已修改)\",
|
||||||
|
\"enterpriseType\": \"股份有限公司\",
|
||||||
|
\"enterpriseNature\": \"国企\",
|
||||||
|
\"industryClass\": \"金融\",
|
||||||
|
\"industryName\": \"金融业\",
|
||||||
|
\"registerAddress\": \"北京市海淀区新地址\",
|
||||||
|
\"legalRepresentative\": \"李四\",
|
||||||
|
\"shareholder1\": \"赵六\",
|
||||||
|
\"shareholder2\": \"钱七\",
|
||||||
|
\"remark\": \"修改后的测试数据\"
|
||||||
|
}")
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
code=$(echo "$response" | jq -r '.code')
|
||||||
|
|
||||||
|
if [ "$code" == "200" ]; then
|
||||||
|
print_success "修改实体中介成功"
|
||||||
|
else
|
||||||
|
print_error "修改实体中介失败: $(echo "$response" | jq -r '.msg')"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 测试条件查询
|
||||||
|
test_query_by_type() {
|
||||||
|
print_section "测试按中介类型查询"
|
||||||
|
|
||||||
|
# 查询个人中介
|
||||||
|
print_section "查询个人中介"
|
||||||
|
response=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/list?intermediaryType=1&pageNum=1&pageSize=10" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
total=$(echo "$response" | jq -r '.total')
|
||||||
|
print_success "查询到个人中介 $total 条"
|
||||||
|
|
||||||
|
# 查询实体中介
|
||||||
|
print_section "查询实体中介"
|
||||||
|
response=$(curl -s -X GET "${BASE_URL}/ccdi/intermediary/list?intermediaryType=2&pageNum=1&pageSize=10" \
|
||||||
|
-H "Authorization: Bearer $TOKEN")
|
||||||
|
|
||||||
|
echo "$response" | jq '.'
|
||||||
|
total=$(echo "$response" | jq -r '.total')
|
||||||
|
print_success "查询到实体中介 $total 条"
|
||||||
|
}
|
||||||
|
|
||||||
|
# 主函数
|
||||||
|
main() {
|
||||||
|
print_header "中介黑名单管理 API 测试开始"
|
||||||
|
|
||||||
|
# 检查jq命令
|
||||||
|
if ! command -v jq &> /dev/null; then
|
||||||
|
print_error "jq命令未安装,请先安装: apt-get install jq 或 yum install jq"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 获取Token
|
||||||
|
get_token
|
||||||
|
|
||||||
|
# 执行测试
|
||||||
|
test_list
|
||||||
|
test_add_person
|
||||||
|
test_add_entity
|
||||||
|
test_get_person_detail
|
||||||
|
test_get_entity_detail
|
||||||
|
test_check_person_id
|
||||||
|
test_check_social_credit_code
|
||||||
|
test_edit_person
|
||||||
|
test_edit_entity
|
||||||
|
test_query_by_type
|
||||||
|
|
||||||
|
print_header "测试完成"
|
||||||
|
echo ""
|
||||||
|
echo "注意事项:"
|
||||||
|
echo "1. 请确保后端服务已启动 (${BASE_URL})"
|
||||||
|
echo "2. 测试数据已创建,可手动清理"
|
||||||
|
echo "3. 如需删除测试数据,请使用清理脚本"
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
# 执行主函数
|
||||||
|
main
|
||||||
286
doc/test/intermediary-blacklist-test-report.md
Normal file
286
doc/test/intermediary-blacklist-test-report.md
Normal file
@@ -0,0 +1,286 @@
|
|||||||
|
# 中介黑名单管理模块测试报告
|
||||||
|
|
||||||
|
## 测试概要
|
||||||
|
|
||||||
|
| 项目 | 内容 |
|
||||||
|
|------|------|
|
||||||
|
| 测试模块 | 中介黑名单管理 |
|
||||||
|
| 测试版本 | v2.0 |
|
||||||
|
| 测试日期 | 2026-02-04 |
|
||||||
|
| 测试人员 | [测试人员姓名] |
|
||||||
|
| 测试环境 | 开发环境 |
|
||||||
|
| 后端地址 | http://localhost:8080 |
|
||||||
|
| 前端地址 | http://localhost |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 测试环境信息
|
||||||
|
|
||||||
|
### 后端环境
|
||||||
|
- **框架**: Spring Boot 3.5.8
|
||||||
|
- **JDK版本**: Java 17
|
||||||
|
- **数据库**: MySQL 8.2.0
|
||||||
|
- **ORM框架**: MyBatis Plus 3.5.10
|
||||||
|
- **API文档**: Swagger UI (http://localhost:8080/swagger-ui/index.html)
|
||||||
|
|
||||||
|
### 前端环境
|
||||||
|
- **框架**: Vue 2.6.12
|
||||||
|
- **UI库**: Element UI 2.15.14
|
||||||
|
- **构建工具**: npm/yarn
|
||||||
|
|
||||||
|
### 测试账号
|
||||||
|
- **用户名**: admin
|
||||||
|
- **密码**: admin123
|
||||||
|
- **角色**: 管理员
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 测试用例执行情况
|
||||||
|
|
||||||
|
### 1. 列表查询测试
|
||||||
|
|
||||||
|
#### 1.1 基础列表查询
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 查询所有中介 | GET /ccdi/intermediary/list | 返回分页数据列表 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 分页查询 | pageNum=1, pageSize=10 | 返回第一页10条数据 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
#### 1.2 条件查询
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 按姓名查询 | name=张三 | 返回姓名包含"张三"的数据 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 按证件号查询 | certificateNo=110101... | 返回证件号匹配的数据 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 按中介类型查询 | intermediaryType=1 | 返回个人中介数据 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 按中介类型查询 | intermediaryType=2 | 返回实体中介数据 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 组合条件查询 | 多个条件组合 | 返回符合所有条件的数据 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
### 2. 个人中介管理测试
|
||||||
|
|
||||||
|
#### 2.1 新增个人中介
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 正常新增 | POST /ccdi/intermediary/person | 返回成功,数据保存 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 姓名为空 | name="" | 提示"姓名不能为空" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 证件号为空 | personId="" | 提示"证件号码不能为空" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 姓名超长 | name=101个字符 | 提示"姓名长度不能超过100个字符" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 证件号超长 | personId=51个字符 | 提示"证件号码长度不能超过50个字符" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 证件号重复 | 使用已存在的personId | 提示"该证件号已存在" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
#### 2.2 查询个人中介详情
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 正常查询 | GET /ccdi/intermediary/person/{bizId} | 返回完整的个人中介详情 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| bizId不存在 | 使用不存在的bizId | 返回空数据或提示 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
#### 2.3 修改个人中介
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 正常修改 | PUT /ccdi/intermediary/person | 返回成功,数据更新 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 修改为重复证件号 | personId改为已存在的值 | 提示"该证件号已存在" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 姓名为空 | name="" | 提示"姓名不能为空" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
### 3. 实体中介管理测试
|
||||||
|
|
||||||
|
#### 3.1 新增实体中介
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 正常新增 | POST /ccdi/intermediary/entity | 返回成功,数据保存 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 机构名称为空 | enterpriseName="" | 提示"机构名称不能为空" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 机构名称超长 | enterpriseName=201个字符 | 提示"机构名称长度不能超过200个字符" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 统一社会信用代码重复 | 使用已存在的socialCreditCode | 提示"该统一社会信用代码已存在" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
#### 3.2 查询实体中介详情
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 正常查询 | GET /ccdi/intermediary/entity/{socialCreditCode} | 返回完整的实体中介详情 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| socialCreditCode不存在 | 使用不存在的代码 | 返回空数据或提示 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
#### 3.3 修改实体中介
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 正常修改 | PUT /ccdi/intermediary/entity | 返回成功,数据更新 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 修改为重复信用代码 | socialCreditCode改为已存在的值 | 提示"该统一社会信用代码已存在" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 机构名称为空 | enterpriseName="" | 提示"机构名称不能为空" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
### 4. 唯一性校验测试
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 校验人员ID唯一性 | GET /checkPersonIdUnique | 返回true/false | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 校验统一社会信用代码唯一性 | GET /checkSocialCreditCodeUnique | 返回true/false | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
### 5. 删除测试
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 删除单条记录 | DELETE /ccdi/intermediary/{id} | 返回成功,数据删除 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 批量删除 | DELETE /ccdi/intermediary/{id1,id2} | 返回成功,多条数据删除 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 删除不存在的记录 | DELETE /ccdi/intermediary/{不存在的id} | 返回成功或提示 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
### 6. 导入导出测试
|
||||||
|
|
||||||
|
#### 6.1 模板下载
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 下载个人中介模板 | POST /importPersonTemplate | 下载Excel模板,包含下拉框 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 下载实体中介模板 | POST /importEntityTemplate | 下载Excel模板,包含下拉框 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
#### 6.2 数据导入
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 导入个人中介数据 | POST /importPersonData | 返回导入成功条数 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 导入实体中介数据 | POST /importEntityData | 返回导入成功条数 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 导入空数据 | 上传空Excel | 提示"没有数据" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 导入格式错误数据 | 上传格式错误的Excel | 提示格式错误 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 导入必填字段为空 | 上传姓名为空的Excel | 提示"姓名不能为空" | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 更新已存在数据 | updateSupport=true | 更新已存在的记录 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 不更新已存在数据 | updateSupport=false | 跳过已存在的记录 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
#### 6.3 数据导出
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 导出全部数据 | POST /export | 下载包含所有数据的Excel | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 按条件导出 | 带查询条件导出 | 下载符合条件的数据Excel | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
### 7. 权限测试
|
||||||
|
|
||||||
|
| 测试项 | 测试步骤 | 预期结果 | 实际结果 | 测试状态 |
|
||||||
|
|--------|---------|---------|---------|---------|
|
||||||
|
| 无权限访问列表 | 无ccdi:intermediary:list权限 | 返回403或提示无权限 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 无权限新增 | 无ccdi:intermediary:add权限 | 返回403或提示无权限 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 无权限修改 | 无ccdi:intermediary:edit权限 | 返回403或提示无权限 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 无权限删除 | 无ccdi:intermediary:remove权限 | 返回403或提示无权限 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 无权限导出 | 无ccdi:intermediary:export权限 | 返回403或提示无权限 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
| 无权限导入 | 无ccdi:intermediary:import权限 | 返回403或提示无权限 | | ⬜ 通过 / ❌ 失败 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 测试结果统计
|
||||||
|
|
||||||
|
### 测试用例统计
|
||||||
|
|
||||||
|
| 类别 | 总数 | 通过 | 失败 | 通过率 |
|
||||||
|
|------|------|------|------|--------|
|
||||||
|
| 列表查询 | 7 | 0 | 0 | 0% |
|
||||||
|
| 个人中介管理 | 8 | 0 | 0 | 0% |
|
||||||
|
| 实体中介管理 | 7 | 0 | 0 | 0% |
|
||||||
|
| 唯一性校验 | 2 | 0 | 0 | 0% |
|
||||||
|
| 删除功能 | 3 | 0 | 0 | 0% |
|
||||||
|
| 导入导出 | 11 | 0 | 0 | 0% |
|
||||||
|
| 权限控制 | 6 | 0 | 0 | 0% |
|
||||||
|
| **合计** | **44** | **0** | **0** | **0%** |
|
||||||
|
|
||||||
|
### 缺陷统计
|
||||||
|
|
||||||
|
| 严重程度 | 数量 | 缺陷列表 |
|
||||||
|
|---------|------|---------|
|
||||||
|
| 严重 | 0 | |
|
||||||
|
| 重要 | 0 | |
|
||||||
|
| 一般 | 0 | |
|
||||||
|
| 轻微 | 0 | |
|
||||||
|
| **合计** | **0** | |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 测试结论
|
||||||
|
|
||||||
|
### 整体评价
|
||||||
|
|
||||||
|
[待填写]
|
||||||
|
|
||||||
|
### 主要功能点测试结果
|
||||||
|
|
||||||
|
| 功能模块 | 测试结果 | 备注 |
|
||||||
|
|---------|---------|------|
|
||||||
|
| 列表查询 | | |
|
||||||
|
| 个人中介CRUD | | |
|
||||||
|
| 实体中介CRUD | | |
|
||||||
|
| 唯一性校验 | | |
|
||||||
|
| 导入导出 | | |
|
||||||
|
| 权限控制 | | |
|
||||||
|
|
||||||
|
### 发现的问题
|
||||||
|
|
||||||
|
#### 1. [问题标题]
|
||||||
|
- **问题描述**: [详细描述问题]
|
||||||
|
- **严重程度**: [严重/重要/一般/轻微]
|
||||||
|
- **复现步骤**:
|
||||||
|
1. [步骤1]
|
||||||
|
2. [步骤2]
|
||||||
|
3. [步骤3]
|
||||||
|
- **预期结果**: [预期结果]
|
||||||
|
- **实际结果**: [实际结果]
|
||||||
|
- **附件**: [截图或日志]
|
||||||
|
|
||||||
|
#### 2. [问题标题]
|
||||||
|
...
|
||||||
|
|
||||||
|
### 改进建议
|
||||||
|
|
||||||
|
1. [建议1]
|
||||||
|
2. [建议2]
|
||||||
|
3. [建议3]
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 测试附件
|
||||||
|
|
||||||
|
### 测试数据
|
||||||
|
|
||||||
|
| 数据类型 | 数据内容 |
|
||||||
|
|---------|---------|
|
||||||
|
| 测试个人中介bizId | [填写] |
|
||||||
|
| 测试实体中介信用代码 | [填写] |
|
||||||
|
| 测试证件号 | [填写] |
|
||||||
|
|
||||||
|
### 测试日志
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 测试脚本输出日志
|
||||||
|
[粘贴测试脚本的完整输出]
|
||||||
|
```
|
||||||
|
|
||||||
|
### 测试截图
|
||||||
|
|
||||||
|
- 图1: 列表查询成功截图
|
||||||
|
- 图2: 新增个人中介成功截图
|
||||||
|
- 图3: 新增实体中介成功截图
|
||||||
|
- 图4: 修改中介成功截图
|
||||||
|
- 图5: 删除中介成功截图
|
||||||
|
- 图6: 导入数据成功截图
|
||||||
|
- 图7: 导出数据成功截图
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 签名
|
||||||
|
|
||||||
|
| 角色 | 姓名 | 签名 | 日期 |
|
||||||
|
|------|------|------|------|
|
||||||
|
| 测试人员 | | | |
|
||||||
|
| 开发负责人 | | | |
|
||||||
|
| 产品负责人 | | | |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 备注
|
||||||
|
|
||||||
|
1. 本测试报告基于中介黑名单管理模块v2.0版本
|
||||||
|
2. 测试环境为开发环境,生产环境部署前需再次测试
|
||||||
|
3. 所有测试用例均使用自动化测试脚本执行,可复现
|
||||||
|
4. 测试数据可在测试完成后清理
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**报告生成时间**: [填写]
|
||||||
|
**报告版本**: v1.0
|
||||||
@@ -0,0 +1,202 @@
|
|||||||
|
package com.ruoyi.ccdi.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryEntityAddDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryEntityEditDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryPersonAddDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryPersonEditDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryQueryDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryEntityExcel;
|
||||||
|
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryPersonExcel;
|
||||||
|
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryEntityDetailVO;
|
||||||
|
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryPersonDetailVO;
|
||||||
|
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryVO;
|
||||||
|
import com.ruoyi.ccdi.service.ICcdiIntermediaryService;
|
||||||
|
import com.ruoyi.ccdi.utils.EasyExcelUtil;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.PageDomain;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.core.page.TableSupport;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
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.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中介信息Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Tag(name = "中介信息管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ccdi/intermediary")
|
||||||
|
public class CcdiIntermediaryController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ICcdiIntermediaryService intermediaryService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询中介列表
|
||||||
|
*/
|
||||||
|
@Operation(summary = "查询中介列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(CcdiIntermediaryQueryDTO queryDTO) {
|
||||||
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||||
|
Page<CcdiIntermediaryVO> page = new Page<>(pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||||
|
Page<CcdiIntermediaryVO> result = intermediaryService.selectIntermediaryPage(page, queryDTO);
|
||||||
|
return getDataTable(result.getRecords(), result.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询个人中介详情
|
||||||
|
*/
|
||||||
|
@Operation(summary = "查询个人中介详情")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:query')")
|
||||||
|
@GetMapping("/person/{bizId}")
|
||||||
|
public AjaxResult getPersonInfo(@PathVariable String bizId) {
|
||||||
|
CcdiIntermediaryPersonDetailVO vo = intermediaryService.selectIntermediaryPersonDetail(bizId);
|
||||||
|
return success(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询实体中介详情
|
||||||
|
*/
|
||||||
|
@Operation(summary = "查询实体中介详情")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:query')")
|
||||||
|
@GetMapping("/entity/{socialCreditCode}")
|
||||||
|
public AjaxResult getEntityInfo(@PathVariable String socialCreditCode) {
|
||||||
|
CcdiIntermediaryEntityDetailVO vo = intermediaryService.selectIntermediaryEntityDetail(socialCreditCode);
|
||||||
|
return success(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增个人中介
|
||||||
|
*/
|
||||||
|
@Operation(summary = "新增个人中介")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:add')")
|
||||||
|
@Log(title = "个人中介", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/person")
|
||||||
|
public AjaxResult addPerson(@Validated @RequestBody CcdiIntermediaryPersonAddDTO addDTO) {
|
||||||
|
return toAjax(intermediaryService.insertIntermediaryPerson(addDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改个人中介
|
||||||
|
*/
|
||||||
|
@Operation(summary = "修改个人中介")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:edit')")
|
||||||
|
@Log(title = "个人中介", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/person")
|
||||||
|
public AjaxResult editPerson(@Validated @RequestBody CcdiIntermediaryPersonEditDTO editDTO) {
|
||||||
|
return toAjax(intermediaryService.updateIntermediaryPerson(editDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增实体中介
|
||||||
|
*/
|
||||||
|
@Operation(summary = "新增实体中介")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:add')")
|
||||||
|
@Log(title = "实体中介", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/entity")
|
||||||
|
public AjaxResult addEntity(@Validated @RequestBody CcdiIntermediaryEntityAddDTO addDTO) {
|
||||||
|
return toAjax(intermediaryService.insertIntermediaryEntity(addDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改实体中介
|
||||||
|
*/
|
||||||
|
@Operation(summary = "修改实体中介")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:edit')")
|
||||||
|
@Log(title = "实体中介", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/entity")
|
||||||
|
public AjaxResult editEntity(@Validated @RequestBody CcdiIntermediaryEntityEditDTO editDTO) {
|
||||||
|
return toAjax(intermediaryService.updateIntermediaryEntity(editDTO));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除中介
|
||||||
|
*/
|
||||||
|
@Operation(summary = "删除中介")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:remove')")
|
||||||
|
@Log(title = "中介信息", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable String[] ids) {
|
||||||
|
return toAjax(intermediaryService.deleteIntermediaryByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验人员ID唯一性
|
||||||
|
*/
|
||||||
|
@Operation(summary = "校验人员ID唯一性")
|
||||||
|
@GetMapping("/checkPersonIdUnique")
|
||||||
|
public AjaxResult checkPersonIdUnique(@RequestParam String personId, @RequestParam(required = false) String bizId) {
|
||||||
|
boolean unique = intermediaryService.checkPersonIdUnique(personId, bizId);
|
||||||
|
return success(unique);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统一社会信用代码唯一性
|
||||||
|
*/
|
||||||
|
@Operation(summary = "校验统一社会信用代码唯一性")
|
||||||
|
@GetMapping("/checkSocialCreditCodeUnique")
|
||||||
|
public AjaxResult checkSocialCreditCodeUnique(@RequestParam String socialCreditCode, @RequestParam(required = false) String excludeId) {
|
||||||
|
boolean unique = intermediaryService.checkSocialCreditCodeUnique(socialCreditCode, excludeId);
|
||||||
|
return success(unique);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载个人中介导入模板
|
||||||
|
*/
|
||||||
|
@Operation(summary = "下载个人中介导入模板")
|
||||||
|
@PostMapping("/importPersonTemplate")
|
||||||
|
public void importPersonTemplate(HttpServletResponse response) {
|
||||||
|
EasyExcelUtil.importTemplateWithDictDropdown(response, CcdiIntermediaryPersonExcel.class, "个人中介信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载实体中介导入模板
|
||||||
|
*/
|
||||||
|
@Operation(summary = "下载实体中介导入模板")
|
||||||
|
@PostMapping("/importEntityTemplate")
|
||||||
|
public void importEntityTemplate(HttpServletResponse response) {
|
||||||
|
EasyExcelUtil.importTemplateWithDictDropdown(response, CcdiIntermediaryEntityExcel.class, "实体中介信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入个人中介数据
|
||||||
|
*/
|
||||||
|
@Operation(summary = "导入个人中介数据")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:import')")
|
||||||
|
@Log(title = "个人中介", businessType = BusinessType.IMPORT)
|
||||||
|
@PostMapping("/importPersonData")
|
||||||
|
public AjaxResult importPersonData(MultipartFile file, @RequestParam(defaultValue = "false") boolean updateSupport) throws Exception {
|
||||||
|
List<CcdiIntermediaryPersonExcel> list = EasyExcelUtil.importExcel(file.getInputStream(), CcdiIntermediaryPersonExcel.class);
|
||||||
|
String message = intermediaryService.importIntermediaryPerson(list, updateSupport);
|
||||||
|
return success(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入实体中介数据
|
||||||
|
*/
|
||||||
|
@Operation(summary = "导入实体中介数据")
|
||||||
|
@PreAuthorize("@ss.hasPermi('ccdi:intermediary:import')")
|
||||||
|
@Log(title = "实体中介", businessType = BusinessType.IMPORT)
|
||||||
|
@PostMapping("/importEntityData")
|
||||||
|
public AjaxResult importEntityData(MultipartFile file, @RequestParam(defaultValue = "false") boolean updateSupport) throws Exception {
|
||||||
|
List<CcdiIntermediaryEntityExcel> list = EasyExcelUtil.importExcel(file.getInputStream(), CcdiIntermediaryEntityExcel.class);
|
||||||
|
String message = intermediaryService.importIntermediaryEntity(list, updateSupport);
|
||||||
|
return success(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.ruoyi.ccdi.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中介对象 ccdi_biz_intermediary
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ccdi_biz_intermediary")
|
||||||
|
public class CcdiBizIntermediary implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 人员ID */
|
||||||
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
private String bizId;
|
||||||
|
|
||||||
|
/** 人员类型,中介、职业背债人、房产中介等 */
|
||||||
|
private String personType;
|
||||||
|
|
||||||
|
/** 人员子类型 */
|
||||||
|
private String personSubType;
|
||||||
|
|
||||||
|
/** 关系类型,如:配偶、子女、父母、兄弟姐妹等 */
|
||||||
|
private String relationType;
|
||||||
|
|
||||||
|
/** 姓名 */
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 性别 */
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
/** 证件类型 */
|
||||||
|
private String idType;
|
||||||
|
|
||||||
|
/** 证件号码 */
|
||||||
|
private String personId;
|
||||||
|
|
||||||
|
/** 手机号码 */
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
/** 微信号 */
|
||||||
|
private String wechatNo;
|
||||||
|
|
||||||
|
/** 联系地址 */
|
||||||
|
private String contactAddress;
|
||||||
|
|
||||||
|
/** 所在公司 */
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
/** 企业统一信用码 */
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
/** 职位 */
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/** 关联人员ID */
|
||||||
|
private String relatedNumId;
|
||||||
|
|
||||||
|
/** 关联关系 */
|
||||||
|
private String relationTypeField;
|
||||||
|
|
||||||
|
/** 数据来源,MANUAL:手动录入, SYSTEM:系统同步, IMPORT:批量导入, API:接口获取 */
|
||||||
|
private String dataSource;
|
||||||
|
|
||||||
|
/** 备注信息 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 记录创建人 */
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createdBy;
|
||||||
|
|
||||||
|
/** 记录创建时间 */
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 记录更新人 */
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updatedBy;
|
||||||
|
|
||||||
|
/** 记录更新时间 */
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.ruoyi.ccdi.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 企业主体信息对象 ccdi_enterprise_base_info
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("ccdi_enterprise_base_info")
|
||||||
|
public class CcdiEnterpriseBaseInfo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 统一社会信用代码,员工企业关联关系表的外键 */
|
||||||
|
@TableId(type = IdType.INPUT)
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
/** 企业名称 */
|
||||||
|
private String enterpriseName;
|
||||||
|
|
||||||
|
/** 企业类型,有限责任公司、股份有限公司、合伙企业、个体工商户、外资企业等 */
|
||||||
|
private String enterpriseType;
|
||||||
|
|
||||||
|
/** 企业性质,国企、民企、外企、合资、其他 */
|
||||||
|
private String enterpriseNature;
|
||||||
|
|
||||||
|
/** 行业分类 */
|
||||||
|
private String industryClass;
|
||||||
|
|
||||||
|
/** 所属行业 */
|
||||||
|
private String industryName;
|
||||||
|
|
||||||
|
/** 成立日期 */
|
||||||
|
private Date establishDate;
|
||||||
|
|
||||||
|
/** 注册地址 */
|
||||||
|
private String registerAddress;
|
||||||
|
|
||||||
|
/** 法定代表人 */
|
||||||
|
private String legalRepresentative;
|
||||||
|
|
||||||
|
/** 法定代表人证件类型 */
|
||||||
|
private String legalCertType;
|
||||||
|
|
||||||
|
/** 法定代表人证件号码 */
|
||||||
|
private String legalCertNo;
|
||||||
|
|
||||||
|
/** 股东1 */
|
||||||
|
private String shareholder1;
|
||||||
|
|
||||||
|
/** 股东2 */
|
||||||
|
private String shareholder2;
|
||||||
|
|
||||||
|
/** 股东3 */
|
||||||
|
private String shareholder3;
|
||||||
|
|
||||||
|
/** 股东4 */
|
||||||
|
private String shareholder4;
|
||||||
|
|
||||||
|
/** 股东5 */
|
||||||
|
private String shareholder5;
|
||||||
|
|
||||||
|
/** 经营状态 */
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createdBy;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updatedBy;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/** 数据来源,MANUAL:手动录入, SYSTEM:系统同步, API:接口获取, IMPORT:批量导入 */
|
||||||
|
private String dataSource;
|
||||||
|
|
||||||
|
/** 风险等级:1-高风险, 2-中风险, 3-低风险 */
|
||||||
|
private String riskLevel;
|
||||||
|
|
||||||
|
/** 企业来源:GENERAL-一般企业, EMP_RELATION-员工关系人, CREDIT_CUSTOMER-信贷客户, INTERMEDIARY-中介, BOTH-兼有 */
|
||||||
|
private String entSource;
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体中介新增DTO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "实体中介新增DTO")
|
||||||
|
public class CcdiIntermediaryEntityAddDTO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "机构名称")
|
||||||
|
@NotBlank(message = "机构名称不能为空")
|
||||||
|
@Size(max = 200, message = "机构名称长度不能超过200个字符")
|
||||||
|
private String enterpriseName;
|
||||||
|
|
||||||
|
@Schema(description = "统一社会信用代码")
|
||||||
|
@Size(max = 50, message = "统一社会信用代码长度不能超过50个字符")
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
@Schema(description = "主体类型")
|
||||||
|
@Size(max = 50, message = "主体类型长度不能超过50个字符")
|
||||||
|
private String enterpriseType;
|
||||||
|
|
||||||
|
@Schema(description = "企业性质")
|
||||||
|
@Size(max = 50, message = "企业性质长度不能超过50个字符")
|
||||||
|
private String enterpriseNature;
|
||||||
|
|
||||||
|
@Schema(description = "行业分类")
|
||||||
|
@Size(max = 100, message = "行业分类长度不能超过100个字符")
|
||||||
|
private String industryClass;
|
||||||
|
|
||||||
|
@Schema(description = "所属行业")
|
||||||
|
@Size(max = 100, message = "所属行业长度不能超过100个字符")
|
||||||
|
private String industryName;
|
||||||
|
|
||||||
|
@Schema(description = "成立日期")
|
||||||
|
private Date establishDate;
|
||||||
|
|
||||||
|
@Schema(description = "注册地址")
|
||||||
|
@Size(max = 500, message = "注册地址长度不能超过500个字符")
|
||||||
|
private String registerAddress;
|
||||||
|
|
||||||
|
@Schema(description = "法定代表人")
|
||||||
|
@Size(max = 100, message = "法定代表人长度不能超过100个字符")
|
||||||
|
private String legalRepresentative;
|
||||||
|
|
||||||
|
@Schema(description = "法定代表人证件类型")
|
||||||
|
@Size(max = 50, message = "法定代表人证件类型长度不能超过50个字符")
|
||||||
|
private String legalCertType;
|
||||||
|
|
||||||
|
@Schema(description = "法定代表人证件号码")
|
||||||
|
@Size(max = 50, message = "法定代表人证件号码长度不能超过50个字符")
|
||||||
|
private String legalCertNo;
|
||||||
|
|
||||||
|
@Schema(description = "股东1")
|
||||||
|
@Size(max = 100, message = "股东1长度不能超过100个字符")
|
||||||
|
private String shareholder1;
|
||||||
|
|
||||||
|
@Schema(description = "股东2")
|
||||||
|
@Size(max = 100, message = "股东2长度不能超过100个字符")
|
||||||
|
private String shareholder2;
|
||||||
|
|
||||||
|
@Schema(description = "股东3")
|
||||||
|
@Size(max = 100, message = "股东3长度不能超过100个字符")
|
||||||
|
private String shareholder3;
|
||||||
|
|
||||||
|
@Schema(description = "股东4")
|
||||||
|
@Size(max = 100, message = "股东4长度不能超过100个字符")
|
||||||
|
private String shareholder4;
|
||||||
|
|
||||||
|
@Schema(description = "股东5")
|
||||||
|
@Size(max = 100, message = "股东5长度不能超过100个字符")
|
||||||
|
private String shareholder5;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体中介修改DTO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "实体中介修改DTO")
|
||||||
|
public class CcdiIntermediaryEntityEditDTO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "统一社会信用代码")
|
||||||
|
@NotBlank(message = "统一社会信用代码不能为空")
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
@Schema(description = "机构名称")
|
||||||
|
@NotBlank(message = "机构名称不能为空")
|
||||||
|
@Size(max = 200, message = "机构名称长度不能超过200个字符")
|
||||||
|
private String enterpriseName;
|
||||||
|
|
||||||
|
@Schema(description = "主体类型")
|
||||||
|
@Size(max = 50, message = "主体类型长度不能超过50个字符")
|
||||||
|
private String enterpriseType;
|
||||||
|
|
||||||
|
@Schema(description = "企业性质")
|
||||||
|
@Size(max = 50, message = "企业性质长度不能超过50个字符")
|
||||||
|
private String enterpriseNature;
|
||||||
|
|
||||||
|
@Schema(description = "行业分类")
|
||||||
|
@Size(max = 100, message = "行业分类长度不能超过100个字符")
|
||||||
|
private String industryClass;
|
||||||
|
|
||||||
|
@Schema(description = "所属行业")
|
||||||
|
@Size(max = 100, message = "所属行业长度不能超过100个字符")
|
||||||
|
private String industryName;
|
||||||
|
|
||||||
|
@Schema(description = "成立日期")
|
||||||
|
private Date establishDate;
|
||||||
|
|
||||||
|
@Schema(description = "注册地址")
|
||||||
|
@Size(max = 500, message = "注册地址长度不能超过500个字符")
|
||||||
|
private String registerAddress;
|
||||||
|
|
||||||
|
@Schema(description = "法定代表人")
|
||||||
|
@Size(max = 100, message = "法定代表人长度不能超过100个字符")
|
||||||
|
private String legalRepresentative;
|
||||||
|
|
||||||
|
@Schema(description = "法定代表人证件类型")
|
||||||
|
@Size(max = 50, message = "法定代表人证件类型长度不能超过50个字符")
|
||||||
|
private String legalCertType;
|
||||||
|
|
||||||
|
@Schema(description = "法定代表人证件号码")
|
||||||
|
@Size(max = 50, message = "法定代表人证件号码长度不能超过50个字符")
|
||||||
|
private String legalCertNo;
|
||||||
|
|
||||||
|
@Schema(description = "股东1")
|
||||||
|
@Size(max = 100, message = "股东1长度不能超过100个字符")
|
||||||
|
private String shareholder1;
|
||||||
|
|
||||||
|
@Schema(description = "股东2")
|
||||||
|
@Size(max = 100, message = "股东2长度不能超过100个字符")
|
||||||
|
private String shareholder2;
|
||||||
|
|
||||||
|
@Schema(description = "股东3")
|
||||||
|
@Size(max = 100, message = "股东3长度不能超过100个字符")
|
||||||
|
private String shareholder3;
|
||||||
|
|
||||||
|
@Schema(description = "股东4")
|
||||||
|
@Size(max = 100, message = "股东4长度不能超过100个字符")
|
||||||
|
private String shareholder4;
|
||||||
|
|
||||||
|
@Schema(description = "股东5")
|
||||||
|
@Size(max = 100, message = "股东5长度不能超过100个字符")
|
||||||
|
private String shareholder5;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中介新增DTO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "个人中介新增DTO")
|
||||||
|
public class CcdiIntermediaryPersonAddDTO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "姓名")
|
||||||
|
@NotBlank(message = "姓名不能为空")
|
||||||
|
@Size(max = 100, message = "姓名长度不能超过100个字符")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "人员类型")
|
||||||
|
private String personType;
|
||||||
|
|
||||||
|
@Schema(description = "人员子类型")
|
||||||
|
private String personSubType;
|
||||||
|
|
||||||
|
@Schema(description = "关系类型")
|
||||||
|
private String relationType;
|
||||||
|
|
||||||
|
@Schema(description = "性别")
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
@Schema(description = "证件类型")
|
||||||
|
private String idType;
|
||||||
|
|
||||||
|
@Schema(description = "证件号码")
|
||||||
|
@NotBlank(message = "证件号码不能为空")
|
||||||
|
@Size(max = 50, message = "证件号码长度不能超过50个字符")
|
||||||
|
private String personId;
|
||||||
|
|
||||||
|
@Schema(description = "手机号码")
|
||||||
|
@Size(max = 20, message = "手机号码长度不能超过20个字符")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@Schema(description = "微信号")
|
||||||
|
@Size(max = 50, message = "微信号长度不能超过50个字符")
|
||||||
|
private String wechatNo;
|
||||||
|
|
||||||
|
@Schema(description = "联系地址")
|
||||||
|
@Size(max = 200, message = "联系地址长度不能超过200个字符")
|
||||||
|
private String contactAddress;
|
||||||
|
|
||||||
|
@Schema(description = "所在公司")
|
||||||
|
@Size(max = 200, message = "所在公司长度不能超过200个字符")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@Schema(description = "企业统一信用码")
|
||||||
|
@Size(max = 50, message = "企业统一信用码长度不能超过50个字符")
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
@Schema(description = "职位")
|
||||||
|
@Size(max = 100, message = "职位长度不能超过100个字符")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@Schema(description = "关联人员ID")
|
||||||
|
@Size(max = 50, message = "关联人员ID长度不能超过50个字符")
|
||||||
|
private String relatedNumId;
|
||||||
|
|
||||||
|
@Schema(description = "关联关系")
|
||||||
|
@Size(max = 50, message = "关联关系长度不能超过50个字符")
|
||||||
|
private String relation;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.Size;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中介修改DTO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "个人中介修改DTO")
|
||||||
|
public class CcdiIntermediaryPersonEditDTO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "人员ID")
|
||||||
|
@NotBlank(message = "人员ID不能为空")
|
||||||
|
private String bizId;
|
||||||
|
|
||||||
|
@Schema(description = "姓名")
|
||||||
|
@NotBlank(message = "姓名不能为空")
|
||||||
|
@Size(max = 100, message = "姓名长度不能超过100个字符")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "人员类型")
|
||||||
|
private String personType;
|
||||||
|
|
||||||
|
@Schema(description = "人员子类型")
|
||||||
|
private String personSubType;
|
||||||
|
|
||||||
|
@Schema(description = "关系类型")
|
||||||
|
private String relationType;
|
||||||
|
|
||||||
|
@Schema(description = "性别")
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
@Schema(description = "证件类型")
|
||||||
|
private String idType;
|
||||||
|
|
||||||
|
@Schema(description = "证件号码")
|
||||||
|
@Size(max = 50, message = "证件号码长度不能超过50个字符")
|
||||||
|
private String personId;
|
||||||
|
|
||||||
|
@Schema(description = "手机号码")
|
||||||
|
@Size(max = 20, message = "手机号码长度不能超过20个字符")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@Schema(description = "微信号")
|
||||||
|
@Size(max = 50, message = "微信号长度不能超过50个字符")
|
||||||
|
private String wechatNo;
|
||||||
|
|
||||||
|
@Schema(description = "联系地址")
|
||||||
|
@Size(max = 200, message = "联系地址长度不能超过200个字符")
|
||||||
|
private String contactAddress;
|
||||||
|
|
||||||
|
@Schema(description = "所在公司")
|
||||||
|
@Size(max = 200, message = "所在公司长度不能超过200个字符")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@Schema(description = "企业统一信用码")
|
||||||
|
@Size(max = 50, message = "企业统一信用码长度不能超过50个字符")
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
@Schema(description = "职位")
|
||||||
|
@Size(max = 100, message = "职位长度不能超过100个字符")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@Schema(description = "关联人员ID")
|
||||||
|
@Size(max = 50, message = "关联人员ID长度不能超过50个字符")
|
||||||
|
private String relatedNumId;
|
||||||
|
|
||||||
|
@Schema(description = "关联关系")
|
||||||
|
@Size(max = 50, message = "关联关系长度不能超过50个字符")
|
||||||
|
private String relation;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
@Size(max = 500, message = "备注长度不能超过500个字符")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中介查询DTO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "中介查询DTO")
|
||||||
|
public class CcdiIntermediaryQueryDTO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "姓名/机构名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "证件号/统一社会信用代码")
|
||||||
|
private String certificateNo;
|
||||||
|
|
||||||
|
@Schema(description = "中介类型(1=个人, 2=实体)")
|
||||||
|
private String intermediaryType;
|
||||||
|
}
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.excel;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import com.ruoyi.common.annotation.DictDropdown;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体中介Excel导入导出对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CcdiIntermediaryEntityExcel implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 机构名称 */
|
||||||
|
@ExcelProperty(value = "机构名称", index = 0)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String enterpriseName;
|
||||||
|
|
||||||
|
/** 统一社会信用代码 */
|
||||||
|
@ExcelProperty(value = "统一社会信用代码", index = 1)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
/** 主体类型 */
|
||||||
|
@ExcelProperty(value = "主体类型", index = 2)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
@DictDropdown(dictType = "ccdi_enterprise_type")
|
||||||
|
private String enterpriseType;
|
||||||
|
|
||||||
|
/** 企业性质 */
|
||||||
|
@ExcelProperty(value = "企业性质", index = 3)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
@DictDropdown(dictType = "ccdi_enterprise_nature")
|
||||||
|
private String enterpriseNature;
|
||||||
|
|
||||||
|
/** 行业分类 */
|
||||||
|
@ExcelProperty(value = "行业分类", index = 4)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String industryClass;
|
||||||
|
|
||||||
|
/** 所属行业 */
|
||||||
|
@ExcelProperty(value = "所属行业", index = 5)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String industryName;
|
||||||
|
|
||||||
|
/** 成立日期 */
|
||||||
|
@ExcelProperty(value = "成立日期", index = 6)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private Date establishDate;
|
||||||
|
|
||||||
|
/** 注册地址 */
|
||||||
|
@ExcelProperty(value = "注册地址", index = 7)
|
||||||
|
@ColumnWidth(40)
|
||||||
|
private String registerAddress;
|
||||||
|
|
||||||
|
/** 法定代表人 */
|
||||||
|
@ExcelProperty(value = "法定代表人", index = 8)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String legalRepresentative;
|
||||||
|
|
||||||
|
/** 法定代表人证件类型 */
|
||||||
|
@ExcelProperty(value = "法定代表人证件类型", index = 9)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
@DictDropdown(dictType = "ccdi_id_type")
|
||||||
|
private String legalCertType;
|
||||||
|
|
||||||
|
/** 法定代表人证件号码 */
|
||||||
|
@ExcelProperty(value = "法定代表人证件号码", index = 10)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String legalCertNo;
|
||||||
|
|
||||||
|
/** 股东1 */
|
||||||
|
@ExcelProperty(value = "股东1", index = 11)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String shareholder1;
|
||||||
|
|
||||||
|
/** 股东2 */
|
||||||
|
@ExcelProperty(value = "股东2", index = 12)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String shareholder2;
|
||||||
|
|
||||||
|
/** 股东3 */
|
||||||
|
@ExcelProperty(value = "股东3", index = 13)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String shareholder3;
|
||||||
|
|
||||||
|
/** 股东4 */
|
||||||
|
@ExcelProperty(value = "股东4", index = 14)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String shareholder4;
|
||||||
|
|
||||||
|
/** 股东5 */
|
||||||
|
@ExcelProperty(value = "股东5", index = 15)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String shareholder5;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@ExcelProperty(value = "备注", index = 16)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.excel;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||||
|
import com.ruoyi.common.annotation.DictDropdown;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中介Excel导入导出对象
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CcdiIntermediaryPersonExcel implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 姓名 */
|
||||||
|
@ExcelProperty(value = "姓名", index = 0)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 人员类型 */
|
||||||
|
@ExcelProperty(value = "人员类型", index = 1)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
@DictDropdown(dictType = "ccdi_person_type")
|
||||||
|
private String personType;
|
||||||
|
|
||||||
|
/** 人员子类型 */
|
||||||
|
@ExcelProperty(value = "人员子类型", index = 2)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
@DictDropdown(dictType = "ccdi_person_sub_type")
|
||||||
|
private String personSubType;
|
||||||
|
|
||||||
|
/** 关系类型 */
|
||||||
|
@ExcelProperty(value = "关系类型", index = 3)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
@DictDropdown(dictType = "ccdi_relation_type")
|
||||||
|
private String relationType;
|
||||||
|
|
||||||
|
/** 性别 */
|
||||||
|
@ExcelProperty(value = "性别", index = 4)
|
||||||
|
@ColumnWidth(10)
|
||||||
|
@DictDropdown(dictType = "sys_user_sex")
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
/** 证件类型 */
|
||||||
|
@ExcelProperty(value = "证件类型", index = 5)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
@DictDropdown(dictType = "ccdi_id_type")
|
||||||
|
private String idType;
|
||||||
|
|
||||||
|
/** 证件号码 */
|
||||||
|
@ExcelProperty(value = "证件号码", index = 6)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String personId;
|
||||||
|
|
||||||
|
/** 手机号码 */
|
||||||
|
@ExcelProperty(value = "手机号码", index = 7)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
/** 微信号 */
|
||||||
|
@ExcelProperty(value = "微信号", index = 8)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String wechatNo;
|
||||||
|
|
||||||
|
/** 联系地址 */
|
||||||
|
@ExcelProperty(value = "联系地址", index = 9)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String contactAddress;
|
||||||
|
|
||||||
|
/** 所在公司 */
|
||||||
|
@ExcelProperty(value = "所在公司", index = 10)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
/** 企业统一信用码 */
|
||||||
|
@ExcelProperty(value = "企业统一信用码", index = 11)
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
/** 职位 */
|
||||||
|
@ExcelProperty(value = "职位", index = 12)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/** 关联人员ID */
|
||||||
|
@ExcelProperty(value = "关联人员ID", index = 13)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
private String relatedNumId;
|
||||||
|
|
||||||
|
/** 关联关系 */
|
||||||
|
@ExcelProperty(value = "关联关系", index = 14)
|
||||||
|
@ColumnWidth(15)
|
||||||
|
@DictDropdown(dictType = "ccdi_relation")
|
||||||
|
private String relation;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@ExcelProperty(value = "备注", index = 15)
|
||||||
|
@ColumnWidth(30)
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体中介详情VO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "实体中介详情VO")
|
||||||
|
public class CcdiIntermediaryEntityDetailVO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "统一社会信用代码")
|
||||||
|
private String socialCreditCode;
|
||||||
|
|
||||||
|
@Schema(description = "企业名称")
|
||||||
|
private String enterpriseName;
|
||||||
|
|
||||||
|
@Schema(description = "企业类型")
|
||||||
|
private String enterpriseType;
|
||||||
|
|
||||||
|
@Schema(description = "企业性质")
|
||||||
|
private String enterpriseNature;
|
||||||
|
|
||||||
|
@Schema(description = "行业分类")
|
||||||
|
private String industryClass;
|
||||||
|
|
||||||
|
@Schema(description = "所属行业")
|
||||||
|
private String industryName;
|
||||||
|
|
||||||
|
@Schema(description = "成立日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date establishDate;
|
||||||
|
|
||||||
|
@Schema(description = "注册地址")
|
||||||
|
private String registerAddress;
|
||||||
|
|
||||||
|
@Schema(description = "法定代表人")
|
||||||
|
private String legalRepresentative;
|
||||||
|
|
||||||
|
@Schema(description = "法定代表人证件类型")
|
||||||
|
private String legalCertType;
|
||||||
|
|
||||||
|
@Schema(description = "法定代表人证件号码")
|
||||||
|
private String legalCertNo;
|
||||||
|
|
||||||
|
@Schema(description = "股东1")
|
||||||
|
private String shareholder1;
|
||||||
|
|
||||||
|
@Schema(description = "股东2")
|
||||||
|
private String shareholder2;
|
||||||
|
|
||||||
|
@Schema(description = "股东3")
|
||||||
|
private String shareholder3;
|
||||||
|
|
||||||
|
@Schema(description = "股东4")
|
||||||
|
private String shareholder4;
|
||||||
|
|
||||||
|
@Schema(description = "股东5")
|
||||||
|
private String shareholder5;
|
||||||
|
|
||||||
|
@Schema(description = "风险等级")
|
||||||
|
private String riskLevel;
|
||||||
|
|
||||||
|
@Schema(description = "企业来源")
|
||||||
|
private String entSource;
|
||||||
|
|
||||||
|
@Schema(description = "数据来源")
|
||||||
|
private String dataSource;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中介详情VO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "个人中介详情VO")
|
||||||
|
public class CcdiIntermediaryPersonDetailVO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "人员ID")
|
||||||
|
private String bizId;
|
||||||
|
|
||||||
|
@Schema(description = "姓名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "人员类型")
|
||||||
|
private String personType;
|
||||||
|
|
||||||
|
@Schema(description = "人员子类型")
|
||||||
|
private String personSubType;
|
||||||
|
|
||||||
|
@Schema(description = "性别")
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
@Schema(description = "证件类型")
|
||||||
|
private String idType;
|
||||||
|
|
||||||
|
@Schema(description = "证件号码")
|
||||||
|
private String personId;
|
||||||
|
|
||||||
|
@Schema(description = "手机号码")
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
@Schema(description = "微信号")
|
||||||
|
private String wechatNo;
|
||||||
|
|
||||||
|
@Schema(description = "联系地址")
|
||||||
|
private String contactAddress;
|
||||||
|
|
||||||
|
@Schema(description = "所在公司")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@Schema(description = "职位")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
@Schema(description = "关联人员ID")
|
||||||
|
private String relatedNumId;
|
||||||
|
|
||||||
|
@Schema(description = "关联关系")
|
||||||
|
private String relationType;
|
||||||
|
|
||||||
|
@Schema(description = "数据来源")
|
||||||
|
private String dataSource;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.ruoyi.ccdi.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中介统一列表VO
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Schema(description = "中介统一列表VO")
|
||||||
|
public class CcdiIntermediaryVO implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Schema(description = "ID")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Schema(description = "姓名/机构名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "证件号/统一社会信用代码")
|
||||||
|
private String certificateNo;
|
||||||
|
|
||||||
|
@Schema(description = "中介类型(1=个人, 2=实体)")
|
||||||
|
private String intermediaryType;
|
||||||
|
|
||||||
|
@Schema(description = "人员类型")
|
||||||
|
private String personType;
|
||||||
|
|
||||||
|
@Schema(description = "公司")
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
@Schema(description = "数据来源")
|
||||||
|
private String dataSource;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.ruoyi.ccdi.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ruoyi.ccdi.domain.CcdiBizIntermediary;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人中介Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CcdiBizIntermediaryMapper extends BaseMapper<CcdiBizIntermediary> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入个人中介
|
||||||
|
*
|
||||||
|
* @param list 个人中介列表
|
||||||
|
* @return 插入行数
|
||||||
|
*/
|
||||||
|
int insertBatch(List<CcdiBizIntermediary> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新个人中介
|
||||||
|
*
|
||||||
|
* @param list 个人中介列表
|
||||||
|
* @return 更新行数
|
||||||
|
*/
|
||||||
|
int updateBatch(List<CcdiBizIntermediary> list);
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.ruoyi.ccdi.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ruoyi.ccdi.domain.CcdiEnterpriseBaseInfo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体中介Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface CcdiEnterpriseBaseInfoMapper extends BaseMapper<CcdiEnterpriseBaseInfo> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入实体中介
|
||||||
|
*
|
||||||
|
* @param list 实体中介列表
|
||||||
|
* @return 插入行数
|
||||||
|
*/
|
||||||
|
int insertBatch(List<CcdiEnterpriseBaseInfo> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量更新实体中介
|
||||||
|
*
|
||||||
|
* @param list 实体中介列表
|
||||||
|
* @return 更新行数
|
||||||
|
*/
|
||||||
|
int updateBatch(List<CcdiEnterpriseBaseInfo> list);
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package com.ruoyi.ccdi.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.*;
|
||||||
|
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryEntityDetailVO;
|
||||||
|
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryPersonDetailVO;
|
||||||
|
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中介Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
public interface ICcdiIntermediaryService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询中介列表
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param queryDTO 查询条件
|
||||||
|
* @return 中介VO分页结果
|
||||||
|
*/
|
||||||
|
Page<CcdiIntermediaryVO> selectIntermediaryPage(Page<CcdiIntermediaryVO> page, CcdiIntermediaryQueryDTO queryDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询个人中介详情
|
||||||
|
*
|
||||||
|
* @param bizId 人员ID
|
||||||
|
* @return 个人中介详情VO
|
||||||
|
*/
|
||||||
|
CcdiIntermediaryPersonDetailVO selectIntermediaryPersonDetail(String bizId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询实体中介详情
|
||||||
|
*
|
||||||
|
* @param socialCreditCode 统一社会信用代码
|
||||||
|
* @return 实体中介详情VO
|
||||||
|
*/
|
||||||
|
CcdiIntermediaryEntityDetailVO selectIntermediaryEntityDetail(String socialCreditCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增个人中介
|
||||||
|
*
|
||||||
|
* @param addDTO 新增DTO
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertIntermediaryPerson(CcdiIntermediaryPersonAddDTO addDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改个人中介
|
||||||
|
*
|
||||||
|
* @param editDTO 编辑DTO
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateIntermediaryPerson(CcdiIntermediaryPersonEditDTO editDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增实体中介
|
||||||
|
*
|
||||||
|
* @param addDTO 新增DTO
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertIntermediaryEntity(CcdiIntermediaryEntityAddDTO addDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改实体中介
|
||||||
|
*
|
||||||
|
* @param editDTO 编辑DTO
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateIntermediaryEntity(CcdiIntermediaryEntityEditDTO editDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除中介
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的ID数组
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int deleteIntermediaryByIds(String[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验人员ID唯一性
|
||||||
|
*
|
||||||
|
* @param personId 人员ID
|
||||||
|
* @param bizId 排除的人员ID
|
||||||
|
* @return true=唯一, false=不唯一
|
||||||
|
*/
|
||||||
|
boolean checkPersonIdUnique(String personId, String bizId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统一社会信用代码唯一性
|
||||||
|
*
|
||||||
|
* @param socialCreditCode 统一社会信用代码
|
||||||
|
* @param excludeId 排除的ID
|
||||||
|
* @return true=唯一, false=不唯一
|
||||||
|
*/
|
||||||
|
boolean checkSocialCreditCodeUnique(String socialCreditCode, String excludeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入个人中介数据
|
||||||
|
*
|
||||||
|
* @param list Excel实体列表
|
||||||
|
* @param updateSupport 是否更新支持
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
String importIntermediaryPerson(java.util.List<com.ruoyi.ccdi.domain.excel.CcdiIntermediaryPersonExcel> list, boolean updateSupport);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入实体中介数据
|
||||||
|
*
|
||||||
|
* @param list Excel实体列表
|
||||||
|
* @param updateSupport 是否更新支持
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
String importIntermediaryEntity(java.util.List<com.ruoyi.ccdi.domain.excel.CcdiIntermediaryEntityExcel> list, boolean updateSupport);
|
||||||
|
}
|
||||||
@@ -0,0 +1,492 @@
|
|||||||
|
package com.ruoyi.ccdi.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.ccdi.domain.CcdiBizIntermediary;
|
||||||
|
import com.ruoyi.ccdi.domain.CcdiEnterpriseBaseInfo;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryEntityAddDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryEntityEditDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryPersonAddDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryPersonEditDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.dto.CcdiIntermediaryQueryDTO;
|
||||||
|
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryEntityExcel;
|
||||||
|
import com.ruoyi.ccdi.domain.excel.CcdiIntermediaryPersonExcel;
|
||||||
|
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryEntityDetailVO;
|
||||||
|
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryPersonDetailVO;
|
||||||
|
import com.ruoyi.ccdi.domain.vo.CcdiIntermediaryVO;
|
||||||
|
import com.ruoyi.ccdi.mapper.CcdiBizIntermediaryMapper;
|
||||||
|
import com.ruoyi.ccdi.mapper.CcdiEnterpriseBaseInfoMapper;
|
||||||
|
import com.ruoyi.ccdi.service.ICcdiIntermediaryService;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中介Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2026-02-04
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CcdiIntermediaryServiceImpl implements ICcdiIntermediaryService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CcdiBizIntermediaryMapper bizIntermediaryMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CcdiEnterpriseBaseInfoMapper enterpriseBaseInfoMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询中介列表
|
||||||
|
*
|
||||||
|
* @param page 分页对象
|
||||||
|
* @param queryDTO 查询条件
|
||||||
|
* @return 中介VO分页结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Page<CcdiIntermediaryVO> selectIntermediaryPage(Page<CcdiIntermediaryVO> page, CcdiIntermediaryQueryDTO queryDTO) {
|
||||||
|
Page<CcdiIntermediaryVO> voPage = new Page<>(page.getCurrent(), page.getSize());
|
||||||
|
List<CcdiIntermediaryVO> list = new ArrayList<>();
|
||||||
|
|
||||||
|
// 查询个人中介
|
||||||
|
LambdaQueryWrapper<CcdiBizIntermediary> personWrapper = new LambdaQueryWrapper<>();
|
||||||
|
personWrapper.eq(CcdiBizIntermediary::getPersonType, "中介")
|
||||||
|
.like(StringUtils.isNotEmpty(queryDTO.getName()), CcdiBizIntermediary::getName, queryDTO.getName())
|
||||||
|
.like(StringUtils.isNotEmpty(queryDTO.getCertificateNo()), CcdiBizIntermediary::getPersonId, queryDTO.getCertificateNo());
|
||||||
|
|
||||||
|
List<CcdiBizIntermediary> personList = bizIntermediaryMapper.selectList(personWrapper);
|
||||||
|
for (CcdiBizIntermediary person : personList) {
|
||||||
|
CcdiIntermediaryVO vo = new CcdiIntermediaryVO();
|
||||||
|
vo.setId(person.getBizId());
|
||||||
|
vo.setName(person.getName());
|
||||||
|
vo.setCertificateNo(person.getPersonId());
|
||||||
|
vo.setIntermediaryType("1");
|
||||||
|
vo.setPersonType(person.getPersonType());
|
||||||
|
vo.setCompany(person.getCompany());
|
||||||
|
vo.setDataSource(person.getDataSource());
|
||||||
|
vo.setCreateTime(person.getCreateTime());
|
||||||
|
list.add(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询实体中介
|
||||||
|
LambdaQueryWrapper<CcdiEnterpriseBaseInfo> entityWrapper = new LambdaQueryWrapper<>();
|
||||||
|
entityWrapper.eq(CcdiEnterpriseBaseInfo::getRiskLevel, "1")
|
||||||
|
.eq(CcdiEnterpriseBaseInfo::getEntSource, "INTERMEDIARY")
|
||||||
|
.like(StringUtils.isNotEmpty(queryDTO.getName()), CcdiEnterpriseBaseInfo::getEnterpriseName, queryDTO.getName())
|
||||||
|
.like(StringUtils.isNotEmpty(queryDTO.getCertificateNo()), CcdiEnterpriseBaseInfo::getSocialCreditCode, queryDTO.getCertificateNo());
|
||||||
|
|
||||||
|
List<CcdiEnterpriseBaseInfo> entityList = enterpriseBaseInfoMapper.selectList(entityWrapper);
|
||||||
|
for (CcdiEnterpriseBaseInfo entity : entityList) {
|
||||||
|
CcdiIntermediaryVO vo = new CcdiIntermediaryVO();
|
||||||
|
vo.setId(entity.getSocialCreditCode());
|
||||||
|
vo.setName(entity.getEnterpriseName());
|
||||||
|
vo.setCertificateNo(entity.getSocialCreditCode());
|
||||||
|
vo.setIntermediaryType("2");
|
||||||
|
vo.setDataSource(entity.getDataSource());
|
||||||
|
vo.setCreateTime(entity.getCreateTime());
|
||||||
|
list.add(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 手动分页
|
||||||
|
int start = (int) ((voPage.getCurrent() - 1) * voPage.getSize());
|
||||||
|
int end = (int) Math.min(start + voPage.getSize(), list.size());
|
||||||
|
|
||||||
|
List<CcdiIntermediaryVO> pageList = new ArrayList<>();
|
||||||
|
if (start < list.size()) {
|
||||||
|
pageList = list.subList(start, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
voPage.setRecords(pageList);
|
||||||
|
voPage.setTotal(list.size());
|
||||||
|
|
||||||
|
return voPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询个人中介详情
|
||||||
|
*
|
||||||
|
* @param bizId 人员ID
|
||||||
|
* @return 个人中介详情VO
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CcdiIntermediaryPersonDetailVO selectIntermediaryPersonDetail(String bizId) {
|
||||||
|
CcdiBizIntermediary person = bizIntermediaryMapper.selectById(bizId);
|
||||||
|
if (person == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
CcdiIntermediaryPersonDetailVO vo = new CcdiIntermediaryPersonDetailVO();
|
||||||
|
BeanUtils.copyProperties(person, vo);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询实体中介详情
|
||||||
|
*
|
||||||
|
* @param socialCreditCode 统一社会信用代码
|
||||||
|
* @return 实体中介详情VO
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CcdiIntermediaryEntityDetailVO selectIntermediaryEntityDetail(String socialCreditCode) {
|
||||||
|
CcdiEnterpriseBaseInfo entity = enterpriseBaseInfoMapper.selectById(socialCreditCode);
|
||||||
|
if (entity == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
CcdiIntermediaryEntityDetailVO vo = new CcdiIntermediaryEntityDetailVO();
|
||||||
|
BeanUtils.copyProperties(entity, vo);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增个人中介
|
||||||
|
*
|
||||||
|
* @param addDTO 新增DTO
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int insertIntermediaryPerson(CcdiIntermediaryPersonAddDTO addDTO) {
|
||||||
|
// 检查人员ID唯一性
|
||||||
|
if (!checkPersonIdUnique(addDTO.getPersonId(), null)) {
|
||||||
|
throw new RuntimeException("该证件号已存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
CcdiBizIntermediary person = new CcdiBizIntermediary();
|
||||||
|
BeanUtils.copyProperties(addDTO, person);
|
||||||
|
person.setPersonType("中介");
|
||||||
|
person.setDataSource("MANUAL");
|
||||||
|
|
||||||
|
return bizIntermediaryMapper.insert(person);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改个人中介
|
||||||
|
*
|
||||||
|
* @param editDTO 编辑DTO
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int updateIntermediaryPerson(CcdiIntermediaryPersonEditDTO editDTO) {
|
||||||
|
// 检查人员ID唯一性(排除自己)
|
||||||
|
if (StringUtils.isNotEmpty(editDTO.getPersonId())) {
|
||||||
|
if (!checkPersonIdUnique(editDTO.getPersonId(), editDTO.getBizId())) {
|
||||||
|
throw new RuntimeException("该证件号已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CcdiBizIntermediary person = new CcdiBizIntermediary();
|
||||||
|
BeanUtils.copyProperties(editDTO, person);
|
||||||
|
|
||||||
|
return bizIntermediaryMapper.updateById(person);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增实体中介
|
||||||
|
*
|
||||||
|
* @param addDTO 新增DTO
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int insertIntermediaryEntity(CcdiIntermediaryEntityAddDTO addDTO) {
|
||||||
|
// 检查统一社会信用代码唯一性
|
||||||
|
if (StringUtils.isNotEmpty(addDTO.getSocialCreditCode())) {
|
||||||
|
if (!checkSocialCreditCodeUnique(addDTO.getSocialCreditCode(), null)) {
|
||||||
|
throw new RuntimeException("该统一社会信用代码已存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CcdiEnterpriseBaseInfo entity = new CcdiEnterpriseBaseInfo();
|
||||||
|
BeanUtils.copyProperties(addDTO, entity);
|
||||||
|
entity.setRiskLevel("1");
|
||||||
|
entity.setEntSource("INTERMEDIARY");
|
||||||
|
entity.setDataSource("MANUAL");
|
||||||
|
|
||||||
|
return enterpriseBaseInfoMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改实体中介
|
||||||
|
*
|
||||||
|
* @param editDTO 编辑DTO
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int updateIntermediaryEntity(CcdiIntermediaryEntityEditDTO editDTO) {
|
||||||
|
CcdiEnterpriseBaseInfo entity = new CcdiEnterpriseBaseInfo();
|
||||||
|
BeanUtils.copyProperties(editDTO, entity);
|
||||||
|
|
||||||
|
return enterpriseBaseInfoMapper.updateById(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除中介
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的ID数组
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public int deleteIntermediaryByIds(String[] ids) {
|
||||||
|
int count = 0;
|
||||||
|
for (String id : ids) {
|
||||||
|
// 判断是个人还是实体(个人ID长度较长,实体统一社会信用代码18位)
|
||||||
|
if (id.length() > 18) {
|
||||||
|
// 个人中介
|
||||||
|
count += bizIntermediaryMapper.deleteById(id);
|
||||||
|
} else {
|
||||||
|
// 实体中介
|
||||||
|
count += enterpriseBaseInfoMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验人员ID唯一性
|
||||||
|
*
|
||||||
|
* @param personId 人员ID
|
||||||
|
* @param bizId 排除的人员ID
|
||||||
|
* @return true=唯一, false=不唯一
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean checkPersonIdUnique(String personId, String bizId) {
|
||||||
|
LambdaQueryWrapper<CcdiBizIntermediary> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(CcdiBizIntermediary::getPersonId, personId);
|
||||||
|
if (StringUtils.isNotEmpty(bizId)) {
|
||||||
|
wrapper.ne(CcdiBizIntermediary::getBizId, bizId);
|
||||||
|
}
|
||||||
|
return bizIntermediaryMapper.selectCount(wrapper) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验统一社会信用代码唯一性
|
||||||
|
*
|
||||||
|
* @param socialCreditCode 统一社会信用代码
|
||||||
|
* @param excludeId 排除的ID
|
||||||
|
* @return true=唯一, false=不唯一
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean checkSocialCreditCodeUnique(String socialCreditCode, String excludeId) {
|
||||||
|
LambdaQueryWrapper<CcdiEnterpriseBaseInfo> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(CcdiEnterpriseBaseInfo::getSocialCreditCode, socialCreditCode);
|
||||||
|
if (StringUtils.isNotEmpty(excludeId)) {
|
||||||
|
wrapper.ne(CcdiEnterpriseBaseInfo::getSocialCreditCode, excludeId);
|
||||||
|
}
|
||||||
|
return enterpriseBaseInfoMapper.selectCount(wrapper) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入个人中介数据(批量操作)
|
||||||
|
*
|
||||||
|
* @param list Excel实体列表
|
||||||
|
* @param updateSupport 是否更新支持
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public String importIntermediaryPerson(List<CcdiIntermediaryPersonExcel> list, boolean updateSupport) {
|
||||||
|
if (StringUtils.isNull(list) || list.isEmpty()) {
|
||||||
|
return "至少需要一条数据";
|
||||||
|
}
|
||||||
|
|
||||||
|
int successNum = 0;
|
||||||
|
int failureNum = 0;
|
||||||
|
StringBuilder successMsg = new StringBuilder();
|
||||||
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
|
|
||||||
|
// 待插入和更新的列表
|
||||||
|
List<CcdiBizIntermediary> insertList = new ArrayList<>();
|
||||||
|
List<CcdiBizIntermediary> updateList = new ArrayList<>();
|
||||||
|
List<String> personIds = new ArrayList<>();
|
||||||
|
|
||||||
|
// 第一轮:数据验证和分类
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
try {
|
||||||
|
CcdiIntermediaryPersonExcel excel = list.get(i);
|
||||||
|
|
||||||
|
// 验证数据
|
||||||
|
if (StringUtils.isEmpty(excel.getName())) {
|
||||||
|
throw new RuntimeException("姓名不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtils.isEmpty(excel.getPersonId())) {
|
||||||
|
throw new RuntimeException("证件号码不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换为实体
|
||||||
|
CcdiBizIntermediary person = new CcdiBizIntermediary();
|
||||||
|
BeanUtils.copyProperties(excel, person);
|
||||||
|
person.setPersonType("中介");
|
||||||
|
person.setDataSource("IMPORT");
|
||||||
|
|
||||||
|
personIds.add(excel.getPersonId());
|
||||||
|
|
||||||
|
// 检查唯一性
|
||||||
|
if (!checkPersonIdUnique(excel.getPersonId(), null)) {
|
||||||
|
if (updateSupport) {
|
||||||
|
// 需要更新,暂时加入更新列表
|
||||||
|
updateList.add(person);
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("该证件号已存在");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 新数据,加入插入列表
|
||||||
|
insertList.add(person);
|
||||||
|
}
|
||||||
|
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>").append(successNum).append("、").append(excel.getName()).append(" 导入成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
failureNum++;
|
||||||
|
failureMsg.append("<br/>").append(failureNum).append("、").append(list.get(i).getName()).append(" 导入失败:");
|
||||||
|
failureMsg.append(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (failureNum > 0) {
|
||||||
|
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||||
|
throw new RuntimeException(failureMsg.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第二轮:批量处理
|
||||||
|
try {
|
||||||
|
// 批量插入新记录
|
||||||
|
if (!insertList.isEmpty()) {
|
||||||
|
bizIntermediaryMapper.insertBatch(insertList);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量更新已存在的记录
|
||||||
|
if (!updateList.isEmpty()) {
|
||||||
|
// 查询已存在记录的bizId
|
||||||
|
LambdaQueryWrapper<CcdiBizIntermediary> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.in(CcdiBizIntermediary::getPersonId, personIds);
|
||||||
|
List<CcdiBizIntermediary> existingList = bizIntermediaryMapper.selectList(wrapper);
|
||||||
|
|
||||||
|
// 建立personId到bizId的映射
|
||||||
|
java.util.Map<String, String> personIdToBizIdMap = new java.util.HashMap<>();
|
||||||
|
for (CcdiBizIntermediary existing : existingList) {
|
||||||
|
personIdToBizIdMap.put(existing.getPersonId(), existing.getBizId());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置bizId到更新列表
|
||||||
|
for (CcdiBizIntermediary person : updateList) {
|
||||||
|
String bizId = personIdToBizIdMap.get(person.getPersonId());
|
||||||
|
if (bizId != null) {
|
||||||
|
person.setBizId(bizId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量更新
|
||||||
|
bizIntermediaryMapper.updateBatch(updateList);
|
||||||
|
}
|
||||||
|
|
||||||
|
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条");
|
||||||
|
return successMsg.toString();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("批量操作失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入实体中介数据(批量操作)
|
||||||
|
*
|
||||||
|
* @param list Excel实体列表
|
||||||
|
* @param updateSupport 是否更新支持
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public String importIntermediaryEntity(List<CcdiIntermediaryEntityExcel> list, boolean updateSupport) {
|
||||||
|
if (StringUtils.isNull(list) || list.isEmpty()) {
|
||||||
|
return "至少需要一条数据";
|
||||||
|
}
|
||||||
|
|
||||||
|
int successNum = 0;
|
||||||
|
int failureNum = 0;
|
||||||
|
StringBuilder successMsg = new StringBuilder();
|
||||||
|
StringBuilder failureMsg = new StringBuilder();
|
||||||
|
|
||||||
|
// 待插入和更新的列表
|
||||||
|
List<CcdiEnterpriseBaseInfo> insertList = new ArrayList<>();
|
||||||
|
List<CcdiEnterpriseBaseInfo> updateList = new ArrayList<>();
|
||||||
|
List<String> socialCreditCodes = new ArrayList<>();
|
||||||
|
|
||||||
|
// 第一轮:数据验证和分类
|
||||||
|
for (int i = 0; i < list.size(); i++) {
|
||||||
|
try {
|
||||||
|
CcdiIntermediaryEntityExcel excel = list.get(i);
|
||||||
|
|
||||||
|
// 验证数据
|
||||||
|
if (StringUtils.isEmpty(excel.getEnterpriseName())) {
|
||||||
|
throw new RuntimeException("机构名称不能为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 转换为实体
|
||||||
|
CcdiEnterpriseBaseInfo entity = new CcdiEnterpriseBaseInfo();
|
||||||
|
BeanUtils.copyProperties(excel, entity);
|
||||||
|
entity.setRiskLevel("1");
|
||||||
|
entity.setEntSource("INTERMEDIARY");
|
||||||
|
entity.setDataSource("IMPORT");
|
||||||
|
|
||||||
|
// 检查唯一性
|
||||||
|
if (StringUtils.isNotEmpty(excel.getSocialCreditCode())) {
|
||||||
|
socialCreditCodes.add(excel.getSocialCreditCode());
|
||||||
|
|
||||||
|
if (!checkSocialCreditCodeUnique(excel.getSocialCreditCode(), null)) {
|
||||||
|
if (updateSupport) {
|
||||||
|
// 需要更新,加入更新列表
|
||||||
|
updateList.add(entity);
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("该统一社会信用代码已存在");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 新数据,加入插入列表
|
||||||
|
insertList.add(entity);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 没有统一社会信用代码,直接加入插入列表
|
||||||
|
insertList.add(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
successNum++;
|
||||||
|
successMsg.append("<br/>").append(successNum).append("、").append(excel.getEnterpriseName()).append(" 导入成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
failureNum++;
|
||||||
|
failureMsg.append("<br/>").append(failureNum).append("、").append(list.get(i).getEnterpriseName()).append(" 导入失败:");
|
||||||
|
failureMsg.append(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (failureNum > 0) {
|
||||||
|
failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
|
||||||
|
throw new RuntimeException(failureMsg.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第二轮:批量处理
|
||||||
|
try {
|
||||||
|
// 批量插入新记录
|
||||||
|
if (!insertList.isEmpty()) {
|
||||||
|
enterpriseBaseInfoMapper.insertBatch(insertList);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 批量更新已存在的记录
|
||||||
|
if (!updateList.isEmpty()) {
|
||||||
|
// 批量更新(socialCreditCode已在实体中)
|
||||||
|
enterpriseBaseInfoMapper.updateBatch(updateList);
|
||||||
|
}
|
||||||
|
|
||||||
|
successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条");
|
||||||
|
return successMsg.toString();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("批量操作失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.ccdi.mapper.CcdiBizIntermediaryMapper">
|
||||||
|
|
||||||
|
<!-- 批量插入个人中介 -->
|
||||||
|
<insert id="insertBatch" parameterType="java.util.List">
|
||||||
|
INSERT INTO ccdi_biz_intermediary (
|
||||||
|
biz_id, person_type, person_sub_type, relation_type,
|
||||||
|
name, gender, id_type, person_id, mobile, wechat_no,
|
||||||
|
contact_address, company, social_credit_code, position,
|
||||||
|
related_num_id, data_source, remark,
|
||||||
|
created_by, updated_by, create_time, update_time
|
||||||
|
) VALUES
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(
|
||||||
|
#{item.bizId}, #{item.personType}, #{item.personSubType}, #{item.relationType},
|
||||||
|
#{item.name}, #{item.gender}, #{item.idType}, #{item.personId}, #{item.mobile}, #{item.wechatNo},
|
||||||
|
#{item.contactAddress}, #{item.company}, #{item.socialCreditCode}, #{item.position},
|
||||||
|
#{item.relatedNumId}, #{item.dataSource}, #{item.remark},
|
||||||
|
#{item.createdBy}, #{item.updatedBy}, #{item.createTime}, #{item.updateTime}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 批量更新个人中介 -->
|
||||||
|
<update id="updateBatch" parameterType="java.util.List">
|
||||||
|
<foreach collection="list" item="item" separator=";">
|
||||||
|
UPDATE ccdi_biz_intermediary
|
||||||
|
<set>
|
||||||
|
<if test="item.personType != null">person_type = #{item.personType},</if>
|
||||||
|
<if test="item.personSubType != null">person_sub_type = #{item.personSubType},</if>
|
||||||
|
<if test="item.relationType != null">relation_type = #{item.relationType},</if>
|
||||||
|
<if test="item.name != null and item.name != ''">name = #{item.name},</if>
|
||||||
|
<if test="item.gender != null">gender = #{item.gender},</if>
|
||||||
|
<if test="item.idType != null">id_type = #{item.idType},</if>
|
||||||
|
<if test="item.personId != null and item.personId != ''">person_id = #{item.personId},</if>
|
||||||
|
<if test="item.mobile != null">mobile = #{item.mobile},</if>
|
||||||
|
<if test="item.wechatNo != null">wechat_no = #{item.wechatNo},</if>
|
||||||
|
<if test="item.contactAddress != null">contact_address = #{item.contactAddress},</if>
|
||||||
|
<if test="item.company != null">company = #{item.company},</if>
|
||||||
|
<if test="item.socialCreditCode != null">social_credit_code = #{item.socialCreditCode},</if>
|
||||||
|
<if test="item.position != null">position = #{item.position},</if>
|
||||||
|
<if test="item.relatedNumId != null">related_num_id = #{item.relatedNumId},</if>
|
||||||
|
<if test="item.dataSource != null">data_source = #{item.dataSource},</if>
|
||||||
|
<if test="item.remark != null">remark = #{item.remark},</if>
|
||||||
|
<if test="item.updatedBy != null">updated_by = #{item.updatedBy},</if>
|
||||||
|
update_time = #{item.updateTime}
|
||||||
|
</set>
|
||||||
|
WHERE biz_id = #{item.bizId}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.ccdi.mapper.CcdiEnterpriseBaseInfoMapper">
|
||||||
|
|
||||||
|
<!-- 批量插入实体中介 -->
|
||||||
|
<insert id="insertBatch" parameterType="java.util.List">
|
||||||
|
INSERT INTO ccdi_enterprise_base_info (
|
||||||
|
social_credit_code, enterprise_name, enterprise_type, enterprise_nature,
|
||||||
|
industry_class, industry_name, establish_date, register_address,
|
||||||
|
legal_representative, legal_cert_type, legal_cert_no,
|
||||||
|
shareholder1, shareholder2, shareholder3, shareholder4, shareholder5,
|
||||||
|
status, risk_level, ent_source, data_source,
|
||||||
|
created_by, updated_by, create_time, update_time
|
||||||
|
) VALUES
|
||||||
|
<foreach collection="list" item="item" separator=",">
|
||||||
|
(
|
||||||
|
#{item.socialCreditCode}, #{item.enterpriseName}, #{item.enterpriseType}, #{item.enterpriseNature},
|
||||||
|
#{item.industryClass}, #{item.industryName}, #{item.establishDate}, #{item.registerAddress},
|
||||||
|
#{item.legalRepresentative}, #{item.legalCertType}, #{item.legalCertNo},
|
||||||
|
#{item.shareholder1}, #{item.shareholder2}, #{item.shareholder3}, #{item.shareholder4}, #{item.shareholder5},
|
||||||
|
#{item.status}, #{item.riskLevel}, #{item.entSource}, #{item.dataSource},
|
||||||
|
#{item.createdBy}, #{item.updatedBy}, #{item.createTime}, #{item.updateTime}
|
||||||
|
)
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!-- 批量更新实体中介 -->
|
||||||
|
<update id="updateBatch" parameterType="java.util.List">
|
||||||
|
<foreach collection="list" item="item" separator=";">
|
||||||
|
UPDATE ccdi_enterprise_base_info
|
||||||
|
<set>
|
||||||
|
<if test="item.enterpriseName != null and item.enterpriseName != ''">enterprise_name = #{item.enterpriseName},</if>
|
||||||
|
<if test="item.enterpriseType != null">enterprise_type = #{item.enterpriseType},</if>
|
||||||
|
<if test="item.enterpriseNature != null">enterprise_nature = #{item.enterpriseNature},</if>
|
||||||
|
<if test="item.industryClass != null">industry_class = #{item.industryClass},</if>
|
||||||
|
<if test="item.industryName != null">industry_name = #{item.industryName},</if>
|
||||||
|
<if test="item.establishDate != null">establish_date = #{item.establishDate},</if>
|
||||||
|
<if test="item.registerAddress != null">register_address = #{item.registerAddress},</if>
|
||||||
|
<if test="item.legalRepresentative != null">legal_representative = #{item.legalRepresentative},</if>
|
||||||
|
<if test="item.legalCertType != null">legal_cert_type = #{item.legalCertType},</if>
|
||||||
|
<if test="item.legalCertNo != null">legal_cert_no = #{item.legalCertNo},</if>
|
||||||
|
<if test="item.shareholder1 != null">shareholder1 = #{item.shareholder1},</if>
|
||||||
|
<if test="item.shareholder2 != null">shareholder2 = #{item.shareholder2},</if>
|
||||||
|
<if test="item.shareholder3 != null">shareholder3 = #{item.shareholder3},</if>
|
||||||
|
<if test="item.shareholder4 != null">shareholder4 = #{item.shareholder4},</if>
|
||||||
|
<if test="item.shareholder5 != null">shareholder5 = #{item.shareholder5},</if>
|
||||||
|
<if test="item.status != null">status = #{item.status},</if>
|
||||||
|
<if test="item.riskLevel != null">risk_level = #{item.riskLevel},</if>
|
||||||
|
<if test="item.entSource != null">ent_source = #{item.entSource},</if>
|
||||||
|
<if test="item.dataSource != null">data_source = #{item.dataSource},</if>
|
||||||
|
<if test="item.updatedBy != null">updated_by = #{item.updatedBy},</if>
|
||||||
|
update_time = #{item.updateTime}
|
||||||
|
</set>
|
||||||
|
WHERE social_credit_code = #{item.socialCreditCode}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.ccdi.mapper.CcdiBizIntermediaryMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
统一列表联合查询
|
||||||
|
使用UNION ALL联合查询个人中介和实体中介
|
||||||
|
支持按中介类型、姓名、证件号筛选
|
||||||
|
-->
|
||||||
|
<select id="selectIntermediaryList" resultType="com.ruoyi.ccdi.domain.vo.CcdiIntermediaryVO">
|
||||||
|
<!-- 查询个人中介 -->
|
||||||
|
SELECT
|
||||||
|
biz_id as id,
|
||||||
|
name,
|
||||||
|
person_id as certificate_no,
|
||||||
|
'1' as intermediary_type,
|
||||||
|
person_type,
|
||||||
|
company,
|
||||||
|
data_source,
|
||||||
|
create_time
|
||||||
|
FROM ccdi_biz_intermediary
|
||||||
|
WHERE person_type = '中介'
|
||||||
|
<if test="intermediaryType == null or intermediaryType == '1'">
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND name LIKE CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="certificateNo != null and certificateNo != ''">
|
||||||
|
AND person_id = #{certificateNo}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
|
||||||
|
<!-- 查询实体中介 -->
|
||||||
|
SELECT
|
||||||
|
social_credit_code as id,
|
||||||
|
enterprise_name as name,
|
||||||
|
social_credit_code as certificate_no,
|
||||||
|
'2' as intermediary_type,
|
||||||
|
'实体' as person_type,
|
||||||
|
enterprise_name as company,
|
||||||
|
data_source,
|
||||||
|
create_time
|
||||||
|
FROM ccdi_enterprise_base_info
|
||||||
|
WHERE risk_level = '1' AND ent_source = 'INTERMEDIARY'
|
||||||
|
<if test="intermediaryType == null or intermediaryType == '2'">
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
AND enterprise_name LIKE CONCAT('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="certificateNo != null and certificateNo != ''">
|
||||||
|
AND social_credit_code = #{certificateNo}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
|
||||||
|
ORDER BY create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
246
sql/menu-intermediary.sql
Normal file
246
sql/menu-intermediary.sql
Normal file
@@ -0,0 +1,246 @@
|
|||||||
|
-- =====================================================
|
||||||
|
-- 中介黑名单管理菜单SQL
|
||||||
|
-- 功能: 为中介黑名单管理模块创建菜单和权限配置
|
||||||
|
-- 版本: 2.0
|
||||||
|
-- 日期: 2026-02-04
|
||||||
|
-- =====================================================
|
||||||
|
|
||||||
|
-- 1. 创建主菜单 (中介黑名单)
|
||||||
|
-- 父级菜单: 2000 (业务管理, 请根据实际情况调整)
|
||||||
|
-- 菜单类型: M (目录)
|
||||||
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, perms, icon, menu_type, status, visible, create_by, create_time, update_by, update_time, remark)
|
||||||
|
VALUES (
|
||||||
|
'中介黑名单',
|
||||||
|
2000,
|
||||||
|
5,
|
||||||
|
'intermediary',
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
'peoples',
|
||||||
|
'M',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'admin',
|
||||||
|
NOW(),
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
'中介黑名单管理目录'
|
||||||
|
);
|
||||||
|
|
||||||
|
-- 获取刚插入的菜单ID
|
||||||
|
SET @menu_id = LAST_INSERT_ID();
|
||||||
|
|
||||||
|
-- 2. 创建子菜单 (中介黑名单管理)
|
||||||
|
-- 菜单类型: C (菜单)
|
||||||
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, perms, icon, menu_type, status, visible, create_by, create_time, update_by, update_time, remark)
|
||||||
|
VALUES (
|
||||||
|
'中介管理',
|
||||||
|
@menu_id,
|
||||||
|
1,
|
||||||
|
'intermediaryIndex',
|
||||||
|
'ccdi/intermediary/index',
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
'user',
|
||||||
|
'C',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'admin',
|
||||||
|
NOW(),
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
'中介黑名单管理菜单'
|
||||||
|
);
|
||||||
|
|
||||||
|
SET @intermediary_menu_id = LAST_INSERT_ID();
|
||||||
|
|
||||||
|
-- 3. 创建按钮权限
|
||||||
|
-- 查询权限
|
||||||
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, perms, icon, menu_type, status, visible, create_by, create_time, update_by, update_time, remark)
|
||||||
|
VALUES (
|
||||||
|
'中介查询',
|
||||||
|
@intermediary_menu_id,
|
||||||
|
1,
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
'ccdi:intermediary:query',
|
||||||
|
'#',
|
||||||
|
'F',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'admin',
|
||||||
|
NOW(),
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
-- 列表权限
|
||||||
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, perms, icon, menu_type, status, visible, create_by, create_time, update_by, update_time, remark)
|
||||||
|
VALUES (
|
||||||
|
'中介列表',
|
||||||
|
@intermediary_menu_id,
|
||||||
|
2,
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
'ccdi:intermediary:list',
|
||||||
|
'#',
|
||||||
|
'F',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'admin',
|
||||||
|
NOW(),
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
-- 新增权限
|
||||||
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, perms, icon, menu_type, status, visible, create_by, create_time, update_by, update_time, remark)
|
||||||
|
VALUES (
|
||||||
|
'中介新增',
|
||||||
|
@intermediary_menu_id,
|
||||||
|
3,
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
'ccdi:intermediary:add',
|
||||||
|
'#',
|
||||||
|
'F',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'admin',
|
||||||
|
NOW(),
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
-- 修改权限
|
||||||
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, perms, icon, menu_type, status, visible, create_by, create_time, update_by, update_time, remark)
|
||||||
|
VALUES (
|
||||||
|
'中介修改',
|
||||||
|
@intermediary_menu_id,
|
||||||
|
4,
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
'ccdi:intermediary:edit',
|
||||||
|
'#',
|
||||||
|
'F',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'admin',
|
||||||
|
NOW(),
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
-- 删除权限
|
||||||
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, perms, icon, menu_type, status, visible, create_by, create_time, update_by, update_time, remark)
|
||||||
|
VALUES (
|
||||||
|
'中介删除',
|
||||||
|
@intermediary_menu_id,
|
||||||
|
5,
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
'ccdi:intermediary:remove',
|
||||||
|
'#',
|
||||||
|
'F',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'admin',
|
||||||
|
NOW(),
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
-- 导出权限
|
||||||
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, perms, icon, menu_type, status, visible, create_by, create_time, update_by, update_time, remark)
|
||||||
|
VALUES (
|
||||||
|
'中介导出',
|
||||||
|
@intermediary_menu_id,
|
||||||
|
6,
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
'ccdi:intermediary:export',
|
||||||
|
'#',
|
||||||
|
'F',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'admin',
|
||||||
|
NOW(),
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
-- 导入权限
|
||||||
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, query, perms, icon, menu_type, status, visible, create_by, create_time, update_by, update_time, remark)
|
||||||
|
VALUES (
|
||||||
|
'中介导入',
|
||||||
|
@intermediary_menu_id,
|
||||||
|
7,
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
'ccdi:intermediary:import',
|
||||||
|
'#',
|
||||||
|
'F',
|
||||||
|
'0',
|
||||||
|
'0',
|
||||||
|
'admin',
|
||||||
|
NOW(),
|
||||||
|
'',
|
||||||
|
NULL,
|
||||||
|
''
|
||||||
|
);
|
||||||
|
|
||||||
|
-- =====================================================
|
||||||
|
-- 说明:
|
||||||
|
-- 1. 本SQL创建了完整的菜单结构:
|
||||||
|
-- - 一级菜单: 中介黑名单 (目录)
|
||||||
|
-- - 二级菜单: 中介管理 (菜单页面)
|
||||||
|
-- - 三级菜单: 各种按钮权限
|
||||||
|
--
|
||||||
|
-- 2. 权限标识:
|
||||||
|
-- - ccdi:intermediary:query (查询)
|
||||||
|
-- - ccdi:intermediary:list (列表)
|
||||||
|
-- - ccdi:intermediary:add (新增)
|
||||||
|
-- - ccdi:intermediary:edit (修改)
|
||||||
|
-- - ccdi:intermediary:remove (删除)
|
||||||
|
-- - ccdi:intermediary:export (导出)
|
||||||
|
-- - ccdi:intermediary:import (导入)
|
||||||
|
--
|
||||||
|
-- 3. 使用说明:
|
||||||
|
-- - 执行本SQL后,需要在角色管理中为相应角色分配权限
|
||||||
|
-- - 建议为admin角色分配所有权限
|
||||||
|
-- - 前端路由会根据权限自动显示菜单
|
||||||
|
--
|
||||||
|
-- 4. 注意事项:
|
||||||
|
-- - parent_id=2000 是业务管理的父级菜单,请根据实际情况调整
|
||||||
|
-- - 组件路径 'ccdi/intermediary/index' 需要与前端Vue组件路径一致
|
||||||
|
-- - 如果父级菜单不存在,需要先创建父级菜单或修改parent_id
|
||||||
|
-- =====================================================
|
||||||
|
|
||||||
|
-- 查询创建的菜单 (用于验证)
|
||||||
|
SELECT
|
||||||
|
menu_id AS '菜单ID',
|
||||||
|
menu_name AS '菜单名称',
|
||||||
|
parent_id AS '父级菜单ID',
|
||||||
|
order_num AS '显示顺序',
|
||||||
|
perms AS '权限标识',
|
||||||
|
menu_type AS '菜单类型',
|
||||||
|
status AS '状态',
|
||||||
|
visible AS '可见',
|
||||||
|
create_time AS '创建时间'
|
||||||
|
FROM sys_menu
|
||||||
|
WHERE menu_name LIKE '%中介%' OR perms LIKE '%intermediary%'
|
||||||
|
ORDER BY parent_id, order_num;
|
||||||
Reference in New Issue
Block a user