diff --git a/mvnw b/mvnw
old mode 100644
new mode 100755
diff --git a/pom.xml b/pom.xml
index 18470f3..4c6c660 100644
--- a/pom.xml
+++ b/pom.xml
@@ -259,10 +259,9 @@
2.8.0
- com.vaadin.external.google
- android-json
- 0.0.20131108.vaadin1
- compile
+ org.json
+ json
+ 20170516
@@ -275,7 +274,37 @@
com.github.wechatpay-apiv3
wechatpay-java
- 0.2.12
+ 0.2.17
+
+
+ com.alibaba.nls
+ nls-sdk-tts
+ 2.2.19
+
+
+ javax.xml.bind
+ jaxb-api
+ 2.3.0
+
+
+ com.sun.xml.bind
+ jaxb-impl
+ 2.3.0
+
+
+ com.sun.xml.bind
+ jaxb-core
+ 2.3.0
+
+
+ javax.activation
+ activation
+ 1.1.1
+
+
+ com.aliyun
+ aliyun-java-sdk-core
+ 3.7.1
diff --git a/src/main/java/com/gxwebsoft/cms/controller/ArticleCollectController.java b/src/main/java/com/gxwebsoft/cms/controller/ArticleCollectController.java
new file mode 100644
index 0000000..c2ac511
--- /dev/null
+++ b/src/main/java/com/gxwebsoft/cms/controller/ArticleCollectController.java
@@ -0,0 +1,121 @@
+package com.gxwebsoft.cms.controller;
+
+import com.gxwebsoft.common.core.web.BaseController;
+import com.gxwebsoft.cms.service.ArticleCollectService;
+import com.gxwebsoft.cms.entity.ArticleCollect;
+import com.gxwebsoft.cms.param.ArticleCollectParam;
+import com.gxwebsoft.common.core.web.ApiResult;
+import com.gxwebsoft.common.core.web.PageResult;
+import com.gxwebsoft.common.core.web.PageParam;
+import com.gxwebsoft.common.core.web.BatchParam;
+import com.gxwebsoft.common.core.annotation.OperationLog;
+import com.gxwebsoft.common.system.entity.User;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 控制器
+ *
+ * @author LX
+ * @since 2025-11-23 14:05:18
+ */
+@Api(tags = "管理")
+@RestController
+@RequestMapping("/api/cms/article-collect")
+public class ArticleCollectController extends BaseController {
+ @Resource
+ private ArticleCollectService articleCollectService;
+
+ @ApiOperation("分页查询")
+ @GetMapping("/page")
+ public ApiResult> page(ArticleCollectParam param) {
+ // 使用关联查询
+ return success(articleCollectService.pageRel(param));
+ }
+
+ @ApiOperation("查询全部")
+ @GetMapping()
+ public ApiResult> list(ArticleCollectParam param) {
+ // 使用关联查询
+ param.setUserId(getLoginUserId());
+ return success(articleCollectService.listRel(param));
+ }
+
+ @ApiOperation("根据id查询")
+ @GetMapping("/{id}")
+ public ApiResult get(@PathVariable("id") Integer id) {
+ // 使用关联查询
+ return success(articleCollectService.getByIdRel(id));
+ }
+
+ @ApiOperation("添加")
+ @PostMapping()
+ public ApiResult> save(@RequestBody ArticleCollect articleCollect) {
+ // 记录当前登录用户id
+ User loginUser = getLoginUser();
+ if (loginUser != null) {
+ articleCollect.setUserId(loginUser.getUserId());
+ }
+ ArticleCollect check = articleCollectService.check(getLoginUserId(), articleCollect.getArticleId());
+ if (check == null) {
+ if (articleCollectService.save(articleCollect)) {
+ return success("添加成功");
+ }
+ }else {
+ articleCollectService.removeById(check.getId());
+ return success("取消成功");
+ }
+ return fail("添加失败");
+ }
+
+ @ApiOperation("修改")
+ @PutMapping()
+ public ApiResult> update(@RequestBody ArticleCollect articleCollect) {
+ if (articleCollectService.updateById(articleCollect)) {
+ return success("修改成功");
+ }
+ return fail("修改失败");
+ }
+
+ @ApiOperation("删除")
+ @DeleteMapping("/{id}")
+ public ApiResult> remove(@PathVariable("id") Integer id) {
+ if (articleCollectService.removeById(id)) {
+ return success("删除成功");
+ }
+ return fail("删除失败");
+ }
+
+ @ApiOperation("批量添加")
+ @PostMapping("/batch")
+ public ApiResult> saveBatch(@RequestBody List list) {
+ if (articleCollectService.saveBatch(list)) {
+ return success("添加成功");
+ }
+ return fail("添加失败");
+ }
+
+ @ApiOperation("批量修改")
+ @PutMapping("/batch")
+ public ApiResult> updateBatch(@RequestBody BatchParam batchParam) {
+ if (batchParam.update(articleCollectService, "id")) {
+ return success("修改成功");
+ }
+ return fail("修改失败");
+ }
+
+ @ApiOperation("批量删除")
+ @DeleteMapping("/batch")
+ public ApiResult> removeBatch(@RequestBody List ids) {
+ if (articleCollectService.removeByIds(ids)) {
+ return success("删除成功");
+ }
+ return fail("删除失败");
+ }
+
+}
diff --git a/src/main/java/com/gxwebsoft/cms/controller/ArticleCommentController.java b/src/main/java/com/gxwebsoft/cms/controller/ArticleCommentController.java
new file mode 100644
index 0000000..29d2ed5
--- /dev/null
+++ b/src/main/java/com/gxwebsoft/cms/controller/ArticleCommentController.java
@@ -0,0 +1,115 @@
+package com.gxwebsoft.cms.controller;
+
+import com.gxwebsoft.common.core.web.BaseController;
+import com.gxwebsoft.cms.service.ArticleCommentService;
+import com.gxwebsoft.cms.entity.ArticleComment;
+import com.gxwebsoft.cms.param.ArticleCommentParam;
+import com.gxwebsoft.common.core.web.ApiResult;
+import com.gxwebsoft.common.core.web.PageResult;
+import com.gxwebsoft.common.core.web.PageParam;
+import com.gxwebsoft.common.core.web.BatchParam;
+import com.gxwebsoft.common.core.annotation.OperationLog;
+import com.gxwebsoft.common.system.entity.User;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 控制器
+ *
+ * @author LX
+ * @since 2025-12-02 16:56:51
+ */
+@Api(tags = "管理")
+@RestController
+@RequestMapping("/api/cms/article-comment")
+public class ArticleCommentController extends BaseController {
+ @Resource
+ private ArticleCommentService articleCommentService;
+
+ @ApiOperation("分页查询")
+ @GetMapping("/page")
+ public ApiResult> page(ArticleCommentParam param) {
+ // 使用关联查询
+ return success(articleCommentService.pageRel(param));
+ }
+
+ @ApiOperation("查询全部")
+ @GetMapping()
+ public ApiResult> list(ArticleCommentParam param) {
+ // 使用关联查询
+ return success(articleCommentService.listRel(param));
+ }
+
+ @PreAuthorize("hasAuthority('cms:articleComment:list')")
+ @ApiOperation("根据id查询")
+ @GetMapping("/{id}")
+ public ApiResult get(@PathVariable("id") Integer id) {
+ // 使用关联查询
+ return success(articleCommentService.getByIdRel(id));
+ }
+
+ @ApiOperation("添加")
+ @PostMapping()
+ public ApiResult> save(@RequestBody ArticleComment articleComment) {
+ // 记录当前登录用户id
+ User loginUser = getLoginUser();
+ if (loginUser != null) {
+ articleComment.setUserId(loginUser.getUserId());
+ }
+ if (articleCommentService.save(articleComment)) {
+ return success("添加成功");
+ }
+ return fail("添加失败");
+ }
+
+ @ApiOperation("修改")
+ @PutMapping()
+ public ApiResult> update(@RequestBody ArticleComment articleComment) {
+ if (articleCommentService.updateById(articleComment)) {
+ return success("修改成功");
+ }
+ return fail("修改失败");
+ }
+
+ @ApiOperation("删除")
+ @DeleteMapping("/{id}")
+ public ApiResult> remove(@PathVariable("id") Integer id) {
+ if (articleCommentService.removeById(id)) {
+ return success("删除成功");
+ }
+ return fail("删除失败");
+ }
+
+ @ApiOperation("批量添加")
+ @PostMapping("/batch")
+ public ApiResult> saveBatch(@RequestBody List list) {
+ if (articleCommentService.saveBatch(list)) {
+ return success("添加成功");
+ }
+ return fail("添加失败");
+ }
+
+ @ApiOperation("批量修改")
+ @PutMapping("/batch")
+ public ApiResult> updateBatch(@RequestBody BatchParam batchParam) {
+ if (batchParam.update(articleCommentService, "id")) {
+ return success("修改成功");
+ }
+ return fail("修改失败");
+ }
+
+ @ApiOperation("批量删除")
+ @DeleteMapping("/batch")
+ public ApiResult> removeBatch(@RequestBody List ids) {
+ if (articleCommentService.removeByIds(ids)) {
+ return success("删除成功");
+ }
+ return fail("删除失败");
+ }
+
+}
diff --git a/src/main/java/com/gxwebsoft/cms/controller/ArticleController.java b/src/main/java/com/gxwebsoft/cms/controller/ArticleController.java
index 6d127c7..5675ecf 100644
--- a/src/main/java/com/gxwebsoft/cms/controller/ArticleController.java
+++ b/src/main/java/com/gxwebsoft/cms/controller/ArticleController.java
@@ -2,7 +2,9 @@ package com.gxwebsoft.cms.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gxwebsoft.cms.entity.ArticleCategory;
+import com.gxwebsoft.cms.entity.ArticleCollect;
import com.gxwebsoft.cms.service.ArticleCategoryService;
+import com.gxwebsoft.cms.service.ArticleCollectService;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.cms.service.ArticleService;
import com.gxwebsoft.cms.entity.Article;
@@ -35,6 +37,8 @@ public class ArticleController extends BaseController {
@Resource
private ArticleService articleService;
@Resource
+ private ArticleCollectService articleCollectService;
+ @Resource
private ArticleCategoryService articleCategoryService;
@ApiOperation("根据id查询文章记录表")
@@ -45,7 +49,6 @@ public class ArticleController extends BaseController {
}
- @PreAuthorize("hasAuthority('cms:article:list')")
@OperationLog
@ApiOperation("分页查询文章记录表")
@GetMapping("/page")
@@ -74,11 +77,13 @@ public class ArticleController extends BaseController {
if (!categoryIds.isEmpty()) {
queryWrapper.in(Article::getCategoryId, categoryIds);
}
+ if (param.getTitle() != null) {
+ queryWrapper.like(Article::getTitle, param.getTitle());
+ }
List articleList = articleService.list(queryWrapper);
return success(articleList);
}
- @PreAuthorize("hasAuthority('cms:article:list')")
@OperationLog
@ApiOperation("根据id查询文章记录表")
@GetMapping("/{id}")
@@ -89,6 +94,13 @@ public class ArticleController extends BaseController {
article.setArticleId(id);
article.setVirtualViews(article.getVirtualViews() + 1);
articleService.saveOrUpdate(article);
+ ArticleCategory category = articleCategoryService.getByIdRel(article.getCategoryId());
+ if (category != null) article.setCategory(category.getTitle());
+ article.setHasCollect(false);
+ if (getLoginUser() != null) {
+ ArticleCollect articleCollect = articleCollectService.check(getLoginUserId(), id);
+ article.setHasCollect(articleCollect != null);
+ }
return success(article);
}
diff --git a/src/main/java/com/gxwebsoft/cms/entity/Article.java b/src/main/java/com/gxwebsoft/cms/entity/Article.java
index 58ccd04..54b9c8f 100644
--- a/src/main/java/com/gxwebsoft/cms/entity/Article.java
+++ b/src/main/java/com/gxwebsoft/cms/entity/Article.java
@@ -37,6 +37,9 @@ public class Article implements Serializable {
@ApiModelProperty(value = "文章分类ID")
private Integer categoryId;
+ @TableField(exist = false)
+ private String category;
+
@ApiModelProperty(value = "封面图")
private String image;
@@ -88,4 +91,6 @@ public class Article implements Serializable {
@TableField(exist = false)
private String userAvatar;
+ @TableField(exist = false)
+ private Boolean hasCollect;
}
diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckContent.java b/src/main/java/com/gxwebsoft/cms/entity/ArticleCollect.java
similarity index 57%
rename from src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckContent.java
rename to src/main/java/com/gxwebsoft/cms/entity/ArticleCollect.java
index be40e08..4cbe2b8 100644
--- a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckContent.java
+++ b/src/main/java/com/gxwebsoft/cms/entity/ArticleCollect.java
@@ -1,44 +1,36 @@
-package com.gxwebsoft.law.entity;
+package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.*;
-import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;
-
-import com.gxwebsoft.common.system.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
- * 用户填写企业法制体检内容
+ *
*
* @author LX
- * @since 2025-04-17 17:48:54
+ * @since 2025-11-23 14:05:18
*/
@Data
@EqualsAndHashCode(callSuper = false)
-@ApiModel(value = "LawLegalOrgCheckContent对象", description = "用户填写企业法制体检内容")
-@TableName("law_legal_org_check_content")
-public class LawLegalOrgCheckContent implements Serializable {
+@ApiModel(value = "ArticleCollect对象", description = "")
+@TableName("cms_article_collect")
+public class ArticleCollect implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
- private Integer groupId;
-
- private String content;
-
- private String title;
+ private Integer articleId;
private Integer userId;
- private BigDecimal point;
-
- private String aiContent;
+ @ApiModelProperty(value = "状态, 0正常, 1冻结")
+ private Integer status;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@TableLogic
@@ -47,12 +39,12 @@ public class LawLegalOrgCheckContent implements Serializable {
@ApiModelProperty(value = "租户id")
private Integer tenantId;
- @ApiModelProperty(value = "创建时间")
+ @ApiModelProperty(value = "注册时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
@TableField(exist = false)
- private User user;
+ private Article article;
}
diff --git a/src/main/java/com/gxwebsoft/law/entity/LawOrgPeople.java b/src/main/java/com/gxwebsoft/cms/entity/ArticleComment.java
similarity index 64%
rename from src/main/java/com/gxwebsoft/law/entity/LawOrgPeople.java
rename to src/main/java/com/gxwebsoft/cms/entity/ArticleComment.java
index f027bfd..80f918c 100644
--- a/src/main/java/com/gxwebsoft/law/entity/LawOrgPeople.java
+++ b/src/main/java/com/gxwebsoft/cms/entity/ArticleComment.java
@@ -1,4 +1,4 @@
-package com.gxwebsoft.law.entity;
+package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.*;
@@ -13,32 +13,27 @@ import lombok.EqualsAndHashCode;
*
*
* @author LX
- * @since 2025-04-14 01:31:54
+ * @since 2025-12-02 16:56:51
*/
@Data
@EqualsAndHashCode(callSuper = false)
-@ApiModel(value = "LawOrgPeople对象", description = "")
-@TableName("law_org_people")
-public class LawOrgPeople implements Serializable {
+@ApiModel(value = "ArticleComment对象", description = "")
+@TableName("cms_article_comment")
+public class ArticleComment implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
- private Integer orgId;
-
- private String name;
-
- private String phone;
-
- private String position;
-
- private String type;
-
- private String positionType;
+ private Integer articleId;
private Integer userId;
+ private String content;
+
+ @ApiModelProperty(value = "状态, 0正常, 1冻结")
+ private Integer status;
+
@ApiModelProperty(value = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@@ -46,12 +41,12 @@ public class LawOrgPeople implements Serializable {
@ApiModelProperty(value = "租户id")
private Integer tenantId;
- @ApiModelProperty(value = "创建时间")
+ @ApiModelProperty(value = "注册时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
@TableField(exist = false)
- private LawOrg lawOrg;
+ private Article article;
}
diff --git a/src/main/java/com/gxwebsoft/cms/mapper/ArticleCollectMapper.java b/src/main/java/com/gxwebsoft/cms/mapper/ArticleCollectMapper.java
new file mode 100644
index 0000000..495d489
--- /dev/null
+++ b/src/main/java/com/gxwebsoft/cms/mapper/ArticleCollectMapper.java
@@ -0,0 +1,37 @@
+package com.gxwebsoft.cms.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gxwebsoft.cms.entity.ArticleCollect;
+import com.gxwebsoft.cms.param.ArticleCollectParam;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * Mapper
+ *
+ * @author LX
+ * @since 2025-11-23 14:05:18
+ */
+public interface ArticleCollectMapper extends BaseMapper {
+
+ /**
+ * 分页查询
+ *
+ * @param page 分页对象
+ * @param param 查询参数
+ * @return List
+ */
+ List selectPageRel(@Param("page") IPage page,
+ @Param("param") ArticleCollectParam param);
+
+ /**
+ * 查询全部
+ *
+ * @param param 查询参数
+ * @return List
+ */
+ List selectListRel(@Param("param") ArticleCollectParam param);
+
+}
diff --git a/src/main/java/com/gxwebsoft/cms/mapper/ArticleCommentMapper.java b/src/main/java/com/gxwebsoft/cms/mapper/ArticleCommentMapper.java
new file mode 100644
index 0000000..1362a4b
--- /dev/null
+++ b/src/main/java/com/gxwebsoft/cms/mapper/ArticleCommentMapper.java
@@ -0,0 +1,37 @@
+package com.gxwebsoft.cms.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.gxwebsoft.cms.entity.ArticleComment;
+import com.gxwebsoft.cms.param.ArticleCommentParam;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * Mapper
+ *
+ * @author LX
+ * @since 2025-12-02 16:56:51
+ */
+public interface ArticleCommentMapper extends BaseMapper {
+
+ /**
+ * 分页查询
+ *
+ * @param page 分页对象
+ * @param param 查询参数
+ * @return List
+ */
+ List selectPageRel(@Param("page") IPage page,
+ @Param("param") ArticleCommentParam param);
+
+ /**
+ * 查询全部
+ *
+ * @param param 查询参数
+ * @return List
+ */
+ List selectListRel(@Param("param") ArticleCommentParam param);
+
+}
diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocContentMapper.xml b/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCollectMapper.xml
similarity index 72%
rename from src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocContentMapper.xml
rename to src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCollectMapper.xml
index c55b9d9..36cb9e4 100644
--- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocContentMapper.xml
+++ b/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCollectMapper.xml
@@ -1,24 +1,24 @@
-
+
SELECT a.*
- FROM law_legal_doc_content a
+ FROM cms_article_collect a
AND a.id = #{param.id}
-
- AND a.group_id = #{param.groupId}
-
-
- AND a.content LIKE CONCAT('%', #{param.content}, '%')
+
+ AND a.article_id = #{param.articleId}
AND a.user_id = #{param.userId}
+
+ AND a.status = #{param.status}
+
AND a.deleted = #{param.deleted}
@@ -39,12 +39,12 @@
-