diff --git a/mvnw b/mvnw
old mode 100644
new mode 100755
diff --git a/pom.xml b/pom.xml
index 18470f3..0458eee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.gxwebsoft
- com-gxwebsoft-server
+ yaoxiaoer-java
1.5.2
com-gxwebsoft-api
@@ -21,6 +21,7 @@
1.8
UTF-8
UTF-8
+ 2.13.5
@@ -256,13 +257,12 @@
com.google.code.gson
gson
- 2.8.0
+ 2.10.1
- com.vaadin.external.google
- android-json
- 0.0.20131108.vaadin1
- compile
+ org.json
+ json
+ 20170516
@@ -275,7 +275,63 @@
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
+
+
+ com.alibaba
+ dashscope-sdk-java
+
+
+ org.slf4j
+ slf4j-simple
+
+
+ 2.22.5
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ 3.18.4
+
+
+ com.aliyun
+ sts20150401
+ 1.1.6
+
+
+ com.aliyun
+ ocr_api20210707
+ 3.1.2
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/law/controller/LawFeedbackController.java b/src/main/java/com/gxwebsoft/cms/controller/ArticleCommentController.java
similarity index 57%
rename from src/main/java/com/gxwebsoft/law/controller/LawFeedbackController.java
rename to src/main/java/com/gxwebsoft/cms/controller/ArticleCommentController.java
index 4b79316..29d2ed5 100644
--- a/src/main/java/com/gxwebsoft/law/controller/LawFeedbackController.java
+++ b/src/main/java/com/gxwebsoft/cms/controller/ArticleCommentController.java
@@ -1,9 +1,9 @@
-package com.gxwebsoft.law.controller;
+package com.gxwebsoft.cms.controller;
import com.gxwebsoft.common.core.web.BaseController;
-import com.gxwebsoft.law.service.LawFeedbackService;
-import com.gxwebsoft.law.entity.LawFeedback;
-import com.gxwebsoft.law.param.LawFeedbackParam;
+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;
@@ -22,50 +22,46 @@ import java.util.List;
* 控制器
*
* @author LX
- * @since 2025-05-06 10:27:16
+ * @since 2025-12-02 16:56:51
*/
@Api(tags = "管理")
@RestController
-@RequestMapping("/api/law/law-feedback")
-public class LawFeedbackController extends BaseController {
+@RequestMapping("/api/cms/article-comment")
+public class ArticleCommentController extends BaseController {
@Resource
- private LawFeedbackService lawFeedbackService;
+ private ArticleCommentService articleCommentService;
@ApiOperation("分页查询")
@GetMapping("/page")
- public ApiResult> page(LawFeedbackParam param) {
+ public ApiResult> page(ArticleCommentParam param) {
// 使用关联查询
- return success(lawFeedbackService.pageRel(param));
+ return success(articleCommentService.pageRel(param));
}
@ApiOperation("查询全部")
@GetMapping()
- public ApiResult> list(LawFeedbackParam param) {
- User loginUser = getLoginUser();
- if (loginUser != null) {
- param.setUserId(loginUser.getUserId());
- }
+ public ApiResult> list(ArticleCommentParam param) {
// 使用关联查询
- return success(lawFeedbackService.listRel(param));
+ return success(articleCommentService.listRel(param));
}
- @PreAuthorize("hasAuthority('law:lawFeedback:list')")
+ @PreAuthorize("hasAuthority('cms:articleComment:list')")
@ApiOperation("根据id查询")
@GetMapping("/{id}")
- public ApiResult get(@PathVariable("id") Integer id) {
+ public ApiResult get(@PathVariable("id") Integer id) {
// 使用关联查询
- return success(lawFeedbackService.getByIdRel(id));
+ return success(articleCommentService.getByIdRel(id));
}
@ApiOperation("添加")
@PostMapping()
- public ApiResult> save(@RequestBody LawFeedback lawFeedback) {
+ public ApiResult> save(@RequestBody ArticleComment articleComment) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
- lawFeedback.setUserId(loginUser.getUserId());
+ articleComment.setUserId(loginUser.getUserId());
}
- if (lawFeedbackService.save(lawFeedback)) {
+ if (articleCommentService.save(articleComment)) {
return success("添加成功");
}
return fail("添加失败");
@@ -73,8 +69,8 @@ public class LawFeedbackController extends BaseController {
@ApiOperation("修改")
@PutMapping()
- public ApiResult> update(@RequestBody LawFeedback lawFeedback) {
- if (lawFeedbackService.updateById(lawFeedback)) {
+ public ApiResult> update(@RequestBody ArticleComment articleComment) {
+ if (articleCommentService.updateById(articleComment)) {
return success("修改成功");
}
return fail("修改失败");
@@ -83,7 +79,7 @@ public class LawFeedbackController extends BaseController {
@ApiOperation("删除")
@DeleteMapping("/{id}")
public ApiResult> remove(@PathVariable("id") Integer id) {
- if (lawFeedbackService.removeById(id)) {
+ if (articleCommentService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
@@ -91,8 +87,8 @@ public class LawFeedbackController extends BaseController {
@ApiOperation("批量添加")
@PostMapping("/batch")
- public ApiResult> saveBatch(@RequestBody List list) {
- if (lawFeedbackService.saveBatch(list)) {
+ public ApiResult> saveBatch(@RequestBody List list) {
+ if (articleCommentService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
@@ -100,8 +96,8 @@ public class LawFeedbackController extends BaseController {
@ApiOperation("批量修改")
@PutMapping("/batch")
- public ApiResult> updateBatch(@RequestBody BatchParam batchParam) {
- if (batchParam.update(lawFeedbackService, "id")) {
+ public ApiResult> updateBatch(@RequestBody BatchParam batchParam) {
+ if (batchParam.update(articleCommentService, "id")) {
return success("修改成功");
}
return fail("修改失败");
@@ -110,7 +106,7 @@ public class LawFeedbackController extends BaseController {
@ApiOperation("批量删除")
@DeleteMapping("/batch")
public ApiResult> removeBatch(@RequestBody List ids) {
- if (lawFeedbackService.removeByIds(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/shop/entity/GoodsPhoneModel.java b/src/main/java/com/gxwebsoft/cms/entity/ArticleCollect.java
similarity index 62%
rename from src/main/java/com/gxwebsoft/shop/entity/GoodsPhoneModel.java
rename to src/main/java/com/gxwebsoft/cms/entity/ArticleCollect.java
index d14aff6..4cbe2b8 100644
--- a/src/main/java/com/gxwebsoft/shop/entity/GoodsPhoneModel.java
+++ b/src/main/java/com/gxwebsoft/cms/entity/ArticleCollect.java
@@ -1,4 +1,4 @@
-package com.gxwebsoft.shop.entity;
+package com.gxwebsoft.cms.entity;
import com.baomidou.mybatisplus.annotation.*;
@@ -10,26 +10,26 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
/**
- * 商品匹配机型
+ *
*
- * @author 科技小王子
- * @since 2024-03-12 01:30:55
+ * @author LX
+ * @since 2025-11-23 14:05:18
*/
@Data
@EqualsAndHashCode(callSuper = false)
-@ApiModel(value = "GoodsPhoneModel对象", description = "商品匹配机型")
-@TableName("shop_goods_phone_model")
-public class GoodsPhoneModel 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 goodsId;
+ private Integer articleId;
- private Integer modelId;
+ private Integer userId;
- @ApiModelProperty(value = "状态, 0上架, 1下架")
+ @ApiModelProperty(value = "状态, 0正常, 1冻结")
private Integer status;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@@ -46,9 +46,5 @@ public class GoodsPhoneModel implements Serializable {
private LocalDateTime updateTime;
@TableField(exist = false)
- private String phoneModelName;
-
- @TableField(exist = false)
- private String phoneModelCode;
-
+ 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/LawLegalCalContentMapper.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/LawLegalCalContentMapper.xml
rename to src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCollectMapper.xml
index e9a9b40..36cb9e4 100644
--- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalContentMapper.xml
+++ b/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCollectMapper.xml
@@ -1,24 +1,24 @@
-
+
SELECT a.*
- FROM law_legal_cal_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 @@
-