From 9bc4772475830bc05ccc5f693b377bd8a7d74586 Mon Sep 17 00:00:00 2001
From: dx <1242347652@qq.com>
Date: Sun, 26 Jan 2025 17:19:57 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E6=A0=87=E7=AD=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yudao-dependencies/pom.xml | 26 ---------------
.../enterprise/EnterpriseController.java | 32 ++++++++++---------
.../admin/taglibrary/vo/TagLibraryRespVO.java | 4 +++
.../taglibrary/vo/TagLibrarySaveReqVO.java | 6 ++--
.../dataobject/taglibrary/TagLibraryDO.java | 2 ++
.../mysql/taglibrary/TagLibraryMapper.java | 2 +-
6 files changed, 28 insertions(+), 44 deletions(-)
diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml
index 2f81c63..16350c5 100644
--- a/yudao-dependencies/pom.xml
+++ b/yudao-dependencies/pom.xml
@@ -525,7 +525,6 @@
com.google.inject
guice
- ${guice.version}
@@ -583,11 +582,6 @@
-
- com.github.binarywang
- weixin-java-pay
- ${weixin-java.version}
-
com.github.binarywang
wx-java-mp-spring-boot-starter
@@ -599,26 +593,6 @@
${weixin-java.version}
-
-
- org.jeecgframework.jimureport
- jimureport-spring-boot-starter
- ${jimureport.version}
-
-
- com.alibaba
- druid
-
-
-
-
-
-
- org.eclipse.paho
- org.eclipse.paho.client.mqttv3
- ${mqtt.version}
-
-
ch.qos.logback
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java
index 63089a7..239c667 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java
@@ -90,24 +90,26 @@ public class EnterpriseController {
// @PreAuthorize("@ss.hasPermission('system:enterprise:query')")
public CommonResult getEnterprise(@RequestParam("id") Long id) {
EnterpriseDO enterprise = enterpriseService.getEnterprise(id);
+ if (enterprise != null) {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(FileInfoDO::getDictType, 644l);
+ wrapper.eq(FileInfoDO::getDictData, 1l);
+ wrapper.eq(FileInfoDO::getUnitId, enterprise.getId());
+ final List collect = fileInfoMapper.selectList(wrapper).stream().map(res -> res.getInfraFileId()).collect(Collectors.toList());
- //获取企业图片
- LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
- wrapper.eq(FileInfoDO::getDictType, 644l);
- wrapper.eq(FileInfoDO::getDictData, 1l);
- wrapper.eq(FileInfoDO::getUnitId, enterprise.getId());
- final List collect = fileInfoMapper.selectList(wrapper).stream().map(res -> res.getInfraFileId()).collect(Collectors.toList());
-
- if (!collect.isEmpty()) {
- final List list = fileApi.listFile(collect);
- enterprise.setFiles(list);
+ if (!collect.isEmpty()) {
+ final List list = fileApi.listFile(collect);
+ enterprise.setFiles(list);
+ }
+
+ //获取资质
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(EnterpriseQualificationDO::getEnterpriseId, enterprise.getId());
+ final List enterpriseQualificationList = enterpriseQualificationMapper.selectList(queryWrapper);
+ enterprise.setQualificationList(enterpriseQualificationList);
}
+ //获取企业图片
- //获取资质
- LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(EnterpriseQualificationDO::getEnterpriseId, enterprise.getId());
- final List enterpriseQualificationList = enterpriseQualificationMapper.selectList(queryWrapper);
- enterprise.setQualificationList(enterpriseQualificationList);
return success(BeanUtils.toBean(enterprise, EnterpriseRespVO.class));
}
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/vo/TagLibraryRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/vo/TagLibraryRespVO.java
index 217fb8a..1b8e579 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/vo/TagLibraryRespVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/vo/TagLibraryRespVO.java
@@ -33,6 +33,10 @@ public class TagLibraryRespVO {
@ExcelProperty("1、企业标签2、执法标签")
private Integer tagType;
+ @Schema(description = "排序", example = "2")
+ @ExcelProperty("排序")
+ private Integer sort;
+
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/vo/TagLibrarySaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/vo/TagLibrarySaveReqVO.java
index 35a2f14..1be6466 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/vo/TagLibrarySaveReqVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/taglibrary/vo/TagLibrarySaveReqVO.java
@@ -21,10 +21,12 @@ public class TagLibrarySaveReqVO {
@Schema(description = "父标签的ID", example = "30648")
private Integer parentId;
- @Schema(description = "标签层级(一级、二级、三级)", requiredMode = Schema.RequiredMode.REQUIRED)
- @NotNull(message = "标签层级(一级、二级、三级)不能为空")
+ @Schema(description = "标签层级(一级、二级、三级)")
private Integer tagLevel;
+ @Schema(description = "排序")
+ private Integer sort;
+
@Schema(description = "1、企业标签2、执法标签", example = "2")
private Integer tagType;
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taglibrary/TagLibraryDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taglibrary/TagLibraryDO.java
index 3c002fc..442a934 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taglibrary/TagLibraryDO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/taglibrary/TagLibraryDO.java
@@ -43,6 +43,8 @@ public class TagLibraryDO extends BaseDO {
* 1、企业标签2、执法标签
*/
private Integer tagType;
+ //排序
+ private Integer sort;
@TableField(exist = false)
private List children = new ArrayList<>(); // 子标签列表
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/taglibrary/TagLibraryMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/taglibrary/TagLibraryMapper.java
index c252e3e..d62d2f3 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/taglibrary/TagLibraryMapper.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/taglibrary/TagLibraryMapper.java
@@ -24,7 +24,7 @@ public interface TagLibraryMapper extends BaseMapperX {
.eqIfPresent(TagLibraryDO::getTagLevel, reqVO.getTagLevel())
.eqIfPresent(TagLibraryDO::getTagType, reqVO.getTagType())
.betweenIfPresent(TagLibraryDO::getCreateTime, reqVO.getCreateTime())
- .orderByDesc(TagLibraryDO::getId));
+ .orderByDesc(TagLibraryDO::getSort));
}
}
From 355585ba65b2b5f8632b56ae346ea4c3fa04d80e Mon Sep 17 00:00:00 2001
From: dx <1242347652@qq.com>
Date: Sun, 26 Jan 2025 18:17:22 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=88=86=E9=A1=B5?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=87=E7=AD=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../enterprise/EnterpriseController.java | 47 ++++++++-
.../admin/enterprise/vo/EnterpriseRespVO.java | 5 +
.../EnterpriseTagController.java | 95 +++++++++++++++++++
.../vo/EnterpriseTagPageReqVO.java | 28 ++++++
.../enterprisetag/vo/EnterpriseTagRespVO.java | 31 ++++++
.../vo/EnterpriseTagSaveReqVO.java | 20 ++++
.../dataobject/enterprise/EnterpriseDO.java | 4 +
.../enterprisetag/EnterpriseTagDO.java | 39 ++++++++
.../enterprisetag/EnterpriseTagMapper.java | 28 ++++++
.../enterprisetag/EnterpriseTagService.java | 56 +++++++++++
.../EnterpriseTagServiceImpl.java | 75 +++++++++++++++
11 files changed, 426 insertions(+), 2 deletions(-)
create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/EnterpriseTagController.java
create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagPageReqVO.java
create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagRespVO.java
create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagSaveReqVO.java
create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprisetag/EnterpriseTagDO.java
create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprisetag/EnterpriseTagMapper.java
create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprisetag/EnterpriseTagService.java
create mode 100644 yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprisetag/EnterpriseTagServiceImpl.java
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java
index 239c667..443603c 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/EnterpriseController.java
@@ -2,13 +2,18 @@ package cn.iocoder.yudao.module.system.controller.admin.enterprise;
import cn.iocoder.yudao.module.infra.api.file.FileApi;
import cn.iocoder.yudao.module.system.dal.dataobject.enterpriseauditlog.EnterpriseAuditLogDO;
+import cn.iocoder.yudao.module.system.dal.dataobject.enterprisetag.EnterpriseTagDO;
import cn.iocoder.yudao.module.system.dal.dataobject.fileInfo.FileInfoDO;
import cn.iocoder.yudao.module.system.dal.dataobject.qualification.EnterpriseQualificationDO;
+import cn.iocoder.yudao.module.system.dal.dataobject.taglibrary.TagLibraryDO;
import cn.iocoder.yudao.module.system.dal.mysql.enterpriseauditlog.EnterpriseAuditLogMapper;
+import cn.iocoder.yudao.module.system.dal.mysql.enterprisetag.EnterpriseTagMapper;
import cn.iocoder.yudao.module.system.dal.mysql.fileInfo.FileInfoMapper;
import cn.iocoder.yudao.module.system.dal.mysql.qualification.EnterpriseQualificationMapper;
+import cn.iocoder.yudao.module.system.dal.mysql.taglibrary.TagLibraryMapper;
import cn.iocoder.yudao.module.system.service.fileInfo.FileInfoService;
import cn.iocoder.yudao.module.system.service.qualification.EnterpriseQualificationService;
+import cn.iocoder.yudao.module.system.service.taglibrary.TagLibraryService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
@@ -59,6 +64,10 @@ public class EnterpriseController {
private EnterpriseQualificationMapper enterpriseQualificationMapper;
@Resource
private EnterpriseAuditLogMapper enterpriseAuditLogMapper;
+ @Resource
+ private TagLibraryMapper tagLibraryMapper;
+ @Resource
+ private EnterpriseTagMapper enterpriseTagMapper;
@PostMapping("/create")
@Operation(summary = "创建企业")
@@ -108,8 +117,7 @@ public class EnterpriseController {
final List enterpriseQualificationList = enterpriseQualificationMapper.selectList(queryWrapper);
enterprise.setQualificationList(enterpriseQualificationList);
}
- //获取企业图片
-
+ //获取企业标签
return success(BeanUtils.toBean(enterprise, EnterpriseRespVO.class));
}
@@ -119,6 +127,41 @@ public class EnterpriseController {
@PreAuthorize("@ss.hasPermission('system:enterprise:query')")
public CommonResult> getEnterprisePage(@Valid EnterprisePageReqVO pageReqVO) {
PageResult pageResult = enterpriseService.getEnterprisePage(pageReqVO);
+ pageResult.getList().forEach(item->{
+ //企业审核状态
+ QueryWrapper auditLogDOQueryWrapper = new QueryWrapper<>();
+ auditLogDOQueryWrapper.eq("enterprise_id", item.getId());
+ EnterpriseAuditLogDO enterpriseAuditLogDO = enterpriseAuditLogMapper.selectOne(auditLogDOQueryWrapper);
+ if (enterpriseAuditLogDO != null) {
+ item.setAudit(enterpriseAuditLogDO.getAudit());
+ }
+
+ //企业图片
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(FileInfoDO::getDictType, 644l);
+ wrapper.eq(FileInfoDO::getDictData, 1l);
+ wrapper.eq(FileInfoDO::getUnitId, item.getId());
+ final List collect = fileInfoMapper.selectList(wrapper).stream().map(res -> res.getInfraFileId()).collect(Collectors.toList());
+
+ if (!collect.isEmpty()) {
+ final List list = fileApi.listFile(collect);
+ item.setFiles(list);
+ }
+
+ // 企业标签
+ LambdaQueryWrapper tagDOLambdaQueryWrapper = new LambdaQueryWrapper<>();
+ tagDOLambdaQueryWrapper.eq(EnterpriseTagDO::getEnterpriseId, item.getId());
+ List enterpriseTagDOS = enterpriseTagMapper.selectList(tagDOLambdaQueryWrapper);
+ if (enterpriseTagDOS != null && enterpriseTagDOS.size() > 0) {
+ List tagIds = enterpriseTagDOS.stream().map(EnterpriseTagDO::getTagId).collect(Collectors.toList());
+ List tagLibraryDOS = tagLibraryMapper.selectList(new LambdaQueryWrapper().in(TagLibraryDO::getId, tagIds));
+ if (tagLibraryDOS != null && tagLibraryDOS.size() > 0) {
+ List tagNames = tagLibraryDOS.stream().map(TagLibraryDO::getTagName).collect(Collectors.toList());
+ item.setTagList(tagNames);
+ }
+ }
+ });
+
return success(BeanUtils.toBean(pageResult, EnterpriseRespVO.class));
}
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseRespVO.java
index e460662..e4436f4 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseRespVO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprise/vo/EnterpriseRespVO.java
@@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.system.controller.admin.enterprise.vo;
import cn.iocoder.yudao.module.system.dal.dataobject.qualification.EnterpriseQualificationDO;
+import cn.iocoder.yudao.module.system.dal.dataobject.taglibrary.TagLibraryDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@@ -93,4 +94,8 @@ public class EnterpriseRespVO {
@Schema(description = "企业资质列表", example = "26433")
private List qualificationList;
+ @Schema(description = "企业标签", example = "26433")
+ private List tagList;
+
+
}
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/EnterpriseTagController.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/EnterpriseTagController.java
new file mode 100644
index 0000000..8ff1cfd
--- /dev/null
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/EnterpriseTagController.java
@@ -0,0 +1,95 @@
+package cn.iocoder.yudao.module.system.controller.admin.enterprisetag;
+
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Operation;
+
+import java.util.*;
+import java.io.IOException;
+
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
+
+import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
+import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
+
+import cn.iocoder.yudao.module.system.controller.admin.enterprisetag.vo.*;
+import cn.iocoder.yudao.module.system.dal.dataobject.enterprisetag.EnterpriseTagDO;
+import cn.iocoder.yudao.module.system.service.enterprisetag.EnterpriseTagService;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+
+@Tag(name = "管理后台 - 企业标签")
+@RestController
+@RequestMapping("/system/enterprise-tag")
+@Validated
+public class EnterpriseTagController {
+
+ @Resource
+ private EnterpriseTagService enterpriseTagService;
+
+ @PostMapping("/create")
+ @Operation(summary = "创建企业标签")
+ @PreAuthorize("@ss.hasPermission('system:enterprise-tag:create')")
+ public CommonResult createEnterpriseTag(@Valid @RequestBody EnterpriseTagSaveReqVO createReqVO) {
+ return success(enterpriseTagService.createEnterpriseTag(createReqVO));
+ }
+
+ @PutMapping("/update")
+ @Operation(summary = "更新企业标签")
+ @PreAuthorize("@ss.hasPermission('system:enterprise-tag:update')")
+ public CommonResult updateEnterpriseTag(@Valid @RequestBody EnterpriseTagSaveReqVO updateReqVO) {
+ enterpriseTagService.updateEnterpriseTag(updateReqVO);
+ return success(true);
+ }
+
+ @DeleteMapping("/delete")
+ @Operation(summary = "删除企业标签")
+ @Parameter(name = "id", description = "编号", required = true)
+ @PreAuthorize("@ss.hasPermission('system:enterprise-tag:delete')")
+ public CommonResult deleteEnterpriseTag(@RequestParam("id") Long id) {
+ enterpriseTagService.deleteEnterpriseTag(id);
+ return success(true);
+ }
+
+ @GetMapping("/get")
+ @Operation(summary = "获得企业标签")
+ @Parameter(name = "id", description = "编号", required = true, example = "1024")
+ @PreAuthorize("@ss.hasPermission('system:enterprise-tag:query')")
+ public CommonResult getEnterpriseTag(@RequestParam("id") Long id) {
+ EnterpriseTagDO enterpriseTag = enterpriseTagService.getEnterpriseTag(id);
+ return success(BeanUtils.toBean(enterpriseTag, EnterpriseTagRespVO.class));
+ }
+
+ @GetMapping("/page")
+ @Operation(summary = "获得企业标签分页")
+ @PreAuthorize("@ss.hasPermission('system:enterprise-tag:query')")
+ public CommonResult> getEnterpriseTagPage(@Valid EnterpriseTagPageReqVO pageReqVO) {
+ PageResult pageResult = enterpriseTagService.getEnterpriseTagPage(pageReqVO);
+ return success(BeanUtils.toBean(pageResult, EnterpriseTagRespVO.class));
+ }
+
+ @GetMapping("/export-excel")
+ @Operation(summary = "导出企业标签 Excel")
+ @PreAuthorize("@ss.hasPermission('system:enterprise-tag:export')")
+ @ApiAccessLog(operateType = EXPORT)
+ public void exportEnterpriseTagExcel(@Valid EnterpriseTagPageReqVO pageReqVO,
+ HttpServletResponse response) throws IOException {
+ pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
+ List list = enterpriseTagService.getEnterpriseTagPage(pageReqVO).getList();
+ // 导出 Excel
+ ExcelUtils.write(response, "企业标签.xls", "数据", EnterpriseTagRespVO.class,
+ BeanUtils.toBean(list, EnterpriseTagRespVO.class));
+ }
+
+}
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagPageReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagPageReqVO.java
new file mode 100644
index 0000000..a19dda9
--- /dev/null
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagPageReqVO.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.system.controller.admin.enterprisetag.vo;
+
+import lombok.*;
+import java.util.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+
+import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
+
+@Schema(description = "管理后台 - 企业标签分页 Request VO")
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+public class EnterpriseTagPageReqVO extends PageParam {
+
+ @Schema(description = "企业id", example = "32136")
+ private Long enterpriseId;
+
+ @Schema(description = "标签id", example = "13027")
+ private Long tagId;
+
+ @Schema(description = "创建时间")
+ @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
+ private LocalDateTime[] createTime;
+
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagRespVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagRespVO.java
new file mode 100644
index 0000000..a4d15d5
--- /dev/null
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagRespVO.java
@@ -0,0 +1,31 @@
+package cn.iocoder.yudao.module.system.controller.admin.enterprisetag.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.time.LocalDateTime;
+import com.alibaba.excel.annotation.*;
+
+@Schema(description = "管理后台 - 企业标签 Response VO")
+@Data
+@ExcelIgnoreUnannotated
+public class EnterpriseTagRespVO {
+
+ @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19630")
+ @ExcelProperty("主键")
+ private Long id;
+
+ @Schema(description = "企业id", example = "32136")
+ @ExcelProperty("企业id")
+ private Long enterpriseId;
+
+ @Schema(description = "标签id", example = "13027")
+ @ExcelProperty("标签id")
+ private Long tagId;
+
+ @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
+ @ExcelProperty("创建时间")
+ private LocalDateTime createTime;
+
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagSaveReqVO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagSaveReqVO.java
new file mode 100644
index 0000000..1f785db
--- /dev/null
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/enterprisetag/vo/EnterpriseTagSaveReqVO.java
@@ -0,0 +1,20 @@
+package cn.iocoder.yudao.module.system.controller.admin.enterprisetag.vo;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.*;
+import java.util.*;
+
+@Schema(description = "管理后台 - 企业标签新增/修改 Request VO")
+@Data
+public class EnterpriseTagSaveReqVO {
+
+ @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19630")
+ private Long id;
+
+ @Schema(description = "企业id", example = "32136")
+ private Long enterpriseId;
+
+ @Schema(description = "标签id", example = "13027")
+ private Long tagId;
+
+}
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprise/EnterpriseDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprise/EnterpriseDO.java
index a9ec972..1a8d92f 100644
--- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprise/EnterpriseDO.java
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprise/EnterpriseDO.java
@@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.system.dal.dataobject.enterprise;
import cn.iocoder.yudao.module.system.dal.dataobject.qualification.EnterpriseQualificationDO;
+import cn.iocoder.yudao.module.system.dal.dataobject.taglibrary.TagLibraryDO;
import lombok.*;
import java.time.LocalDate;
@@ -93,4 +94,7 @@ public class EnterpriseDO extends BaseDO {
@TableField(exist = false)
private List qualificationList;
+ @TableField(exist = false)
+ private List tagList;
+
}
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprisetag/EnterpriseTagDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprisetag/EnterpriseTagDO.java
new file mode 100644
index 0000000..3573f86
--- /dev/null
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/enterprisetag/EnterpriseTagDO.java
@@ -0,0 +1,39 @@
+package cn.iocoder.yudao.module.system.dal.dataobject.enterprisetag;
+
+import lombok.*;
+import java.util.*;
+import java.time.LocalDateTime;
+import java.time.LocalDateTime;
+import com.baomidou.mybatisplus.annotation.*;
+import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
+
+/**
+ * 企业标签 DO
+ *
+ * @author 芋道源码
+ */
+@TableName("enterprise_tag")
+@KeySequence("enterprise_tag_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ToString(callSuper = true)
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class EnterpriseTagDO extends BaseDO {
+
+ /**
+ * 主键
+ */
+ @TableId
+ private Long id;
+ /**
+ * 企业id
+ */
+ private Long enterpriseId;
+ /**
+ * 标签id
+ */
+ private Long tagId;
+
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprisetag/EnterpriseTagMapper.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprisetag/EnterpriseTagMapper.java
new file mode 100644
index 0000000..7ebf3f0
--- /dev/null
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/enterprisetag/EnterpriseTagMapper.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.system.dal.mysql.enterprisetag;
+
+import java.util.*;
+
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
+import cn.iocoder.yudao.module.system.dal.dataobject.enterprisetag.EnterpriseTagDO;
+import org.apache.ibatis.annotations.Mapper;
+import cn.iocoder.yudao.module.system.controller.admin.enterprisetag.vo.*;
+
+/**
+ * 企业标签 Mapper
+ *
+ * @author 芋道源码
+ */
+@Mapper
+public interface EnterpriseTagMapper extends BaseMapperX {
+
+ default PageResult selectPage(EnterpriseTagPageReqVO reqVO) {
+ return selectPage(reqVO, new LambdaQueryWrapperX()
+ .eqIfPresent(EnterpriseTagDO::getEnterpriseId, reqVO.getEnterpriseId())
+ .eqIfPresent(EnterpriseTagDO::getTagId, reqVO.getTagId())
+ .betweenIfPresent(EnterpriseTagDO::getCreateTime, reqVO.getCreateTime())
+ .orderByDesc(EnterpriseTagDO::getId));
+ }
+
+}
\ No newline at end of file
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprisetag/EnterpriseTagService.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprisetag/EnterpriseTagService.java
new file mode 100644
index 0000000..793649a
--- /dev/null
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprisetag/EnterpriseTagService.java
@@ -0,0 +1,56 @@
+package cn.iocoder.yudao.module.system.service.enterprisetag;
+
+import java.util.*;
+import cn.iocoder.yudao.module.system.controller.admin.enterprisetag.vo.*;
+import cn.iocoder.yudao.module.system.dal.dataobject.enterprisetag.EnterpriseTagDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+
+import javax.validation.Valid;
+
+/**
+ * 企业标签 Service 接口
+ *
+ * @author 芋道源码
+ */
+public interface EnterpriseTagService {
+
+ /**
+ * 创建企业标签
+ *
+ * @param createReqVO 创建信息
+ * @return 编号
+ */
+ Long createEnterpriseTag(@Valid EnterpriseTagSaveReqVO createReqVO);
+
+ /**
+ * 更新企业标签
+ *
+ * @param updateReqVO 更新信息
+ */
+ void updateEnterpriseTag(@Valid EnterpriseTagSaveReqVO updateReqVO);
+
+ /**
+ * 删除企业标签
+ *
+ * @param id 编号
+ */
+ void deleteEnterpriseTag(Long id);
+
+ /**
+ * 获得企业标签
+ *
+ * @param id 编号
+ * @return 企业标签
+ */
+ EnterpriseTagDO getEnterpriseTag(Long id);
+
+ /**
+ * 获得企业标签分页
+ *
+ * @param pageReqVO 分页查询
+ * @return 企业标签分页
+ */
+ PageResult getEnterpriseTagPage(EnterpriseTagPageReqVO pageReqVO);
+
+}
diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprisetag/EnterpriseTagServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprisetag/EnterpriseTagServiceImpl.java
new file mode 100644
index 0000000..f31994b
--- /dev/null
+++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/enterprisetag/EnterpriseTagServiceImpl.java
@@ -0,0 +1,75 @@
+package cn.iocoder.yudao.module.system.service.enterprisetag;
+
+import org.springframework.stereotype.Service;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import cn.iocoder.yudao.module.system.controller.admin.enterprisetag.vo.*;
+import cn.iocoder.yudao.module.system.dal.dataobject.enterprisetag.EnterpriseTagDO;
+import cn.iocoder.yudao.framework.common.pojo.PageResult;
+import cn.iocoder.yudao.framework.common.pojo.PageParam;
+import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
+
+import cn.iocoder.yudao.module.system.dal.mysql.enterprisetag.EnterpriseTagMapper;
+
+import javax.annotation.Resource;
+
+import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static cn.iocoder.yudao.module.system.enums.ErrorCodeConstants.*;
+
+/**
+ * 企业标签 Service 实现类
+ *
+ * @author 芋道源码
+ */
+@Service
+@Validated
+public class EnterpriseTagServiceImpl implements EnterpriseTagService {
+
+ @Resource
+ private EnterpriseTagMapper enterpriseTagMapper;
+
+ @Override
+ public Long createEnterpriseTag(EnterpriseTagSaveReqVO createReqVO) {
+ // 插入
+ EnterpriseTagDO enterpriseTag = BeanUtils.toBean(createReqVO, EnterpriseTagDO.class);
+ enterpriseTagMapper.insert(enterpriseTag);
+ // 返回
+ return enterpriseTag.getId();
+ }
+
+ @Override
+ public void updateEnterpriseTag(EnterpriseTagSaveReqVO updateReqVO) {
+ // 校验存在
+ validateEnterpriseTagExists(updateReqVO.getId());
+ // 更新
+ EnterpriseTagDO updateObj = BeanUtils.toBean(updateReqVO, EnterpriseTagDO.class);
+ enterpriseTagMapper.updateById(updateObj);
+ }
+
+ @Override
+ public void deleteEnterpriseTag(Long id) {
+ // 校验存在
+ validateEnterpriseTagExists(id);
+ // 删除
+ enterpriseTagMapper.deleteById(id);
+ }
+
+ private void validateEnterpriseTagExists(Long id) {
+ if (enterpriseTagMapper.selectById(id) == null) {
+ throw exception(USER_MOBILE_EXISTS);
+ }
+ }
+
+ @Override
+ public EnterpriseTagDO getEnterpriseTag(Long id) {
+ return enterpriseTagMapper.selectById(id);
+ }
+
+ @Override
+ public PageResult getEnterpriseTagPage(EnterpriseTagPageReqVO pageReqVO) {
+ return enterpriseTagMapper.selectPage(pageReqVO);
+ }
+
+}
From f318deea6d6f3d6bf5580cbbb2e7b72008e23e5e Mon Sep 17 00:00:00 2001
From: dx <1242347652@qq.com>
Date: Sun, 26 Jan 2025 19:05:43 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=88=86=E9=A1=B5?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=87=E7=AD=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../iocoder/yudao/module/infra/api/file/FileApi.java | 2 +-
.../yudao/module/infra/api/file/FileApiImpl.java | 2 +-
.../yudao/module/infra/service/file/FileService.java | 2 +-
.../module/infra/service/file/FileServiceImpl.java | 11 +++++++++--
.../admin/enterprise/EnterpriseController.java | 8 +++-----
.../admin/enterprise/vo/EnterpriseRespVO.java | 2 +-
.../dal/dataobject/enterprise/EnterpriseDO.java | 2 +-
.../service/enterprise/EnterpriseServiceImpl.java | 11 ++++++++---
8 files changed, 25 insertions(+), 15 deletions(-)
diff --git a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/FileApi.java b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/FileApi.java
index 46db718..d322a86 100644
--- a/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/FileApi.java
+++ b/yudao-module-infra/yudao-module-infra-api/src/main/java/cn/iocoder/yudao/module/infra/api/file/FileApi.java
@@ -41,6 +41,6 @@ public interface FileApi {
*/
Map createFile(String name, String path, byte[] content);
- List listFile(List ids);
+ List