20260325稳定版
This commit is contained in:
@@ -259,10 +259,9 @@
|
||||
<version>2.8.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vaadin.external.google</groupId>
|
||||
<artifactId>android-json</artifactId>
|
||||
<version>0.0.20131108.vaadin1</version>
|
||||
<scope>compile</scope>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20170516</version>
|
||||
</dependency>
|
||||
|
||||
<!--微信小程序-->
|
||||
@@ -275,7 +274,37 @@
|
||||
<dependency>
|
||||
<groupId>com.github.wechatpay-apiv3</groupId>
|
||||
<artifactId>wechatpay-java</artifactId>
|
||||
<version>0.2.12</version>
|
||||
<version>0.2.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.nls</groupId>
|
||||
<artifactId>nls-sdk-tts</artifactId>
|
||||
<version>2.2.19</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-impl</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-core</artifactId>
|
||||
<version>2.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>3.7.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -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<PageResult<ArticleCollect>> page(ArticleCollectParam param) {
|
||||
// 使用关联查询
|
||||
return success(articleCollectService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ArticleCollect>> list(ArticleCollectParam param) {
|
||||
// 使用关联查询
|
||||
param.setUserId(getLoginUserId());
|
||||
return success(articleCollectService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ArticleCollect> 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<ArticleCollect> list) {
|
||||
if (articleCollectService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<ArticleCollect> batchParam) {
|
||||
if (batchParam.update(articleCollectService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (articleCollectService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<PageResult<ArticleComment>> page(ArticleCommentParam param) {
|
||||
// 使用关联查询
|
||||
return success(articleCommentService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部")
|
||||
@GetMapping()
|
||||
public ApiResult<List<ArticleComment>> list(ArticleCommentParam param) {
|
||||
// 使用关联查询
|
||||
return success(articleCommentService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('cms:articleComment:list')")
|
||||
@ApiOperation("根据id查询")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<ArticleComment> 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<ArticleComment> list) {
|
||||
if (articleCommentService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<ArticleComment> batchParam) {
|
||||
if (batchParam.update(articleCommentService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (articleCommentService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<Article> 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+11
-19
@@ -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;
|
||||
}
|
||||
+13
-18
@@ -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;
|
||||
}
|
||||
@@ -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<ArticleCollect> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ArticleCollect>
|
||||
*/
|
||||
List<ArticleCollect> selectPageRel(@Param("page") IPage<ArticleCollect> page,
|
||||
@Param("param") ArticleCollectParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ArticleCollect> selectListRel(@Param("param") ArticleCollectParam param);
|
||||
|
||||
}
|
||||
@@ -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<ArticleComment> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<ArticleComment>
|
||||
*/
|
||||
List<ArticleComment> selectPageRel(@Param("page") IPage<ArticleComment> page,
|
||||
@Param("param") ArticleCommentParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<ArticleComment> selectListRel(@Param("param") ArticleCommentParam param);
|
||||
|
||||
}
|
||||
+9
-9
@@ -1,24 +1,24 @@
|
||||
<?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.gxwebsoft.law.mapper.LawLegalDocContentMapper">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.ArticleCollectMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM law_legal_doc_content a
|
||||
FROM cms_article_collect a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.groupId != null">
|
||||
AND a.group_id = #{param.groupId}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
<if test="param.articleId != null">
|
||||
AND a.article_id = #{param.articleId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
@@ -39,12 +39,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalDocContent">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.ArticleCollect">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalDocContent">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.ArticleCollect">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+11
-8
@@ -1,23 +1,26 @@
|
||||
<?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.gxwebsoft.law.mapper.LawLegalOrgCheckContentMapper">
|
||||
<mapper namespace="com.gxwebsoft.cms.mapper.ArticleCommentMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM law_legal_org_check_content a
|
||||
FROM cms_article_comment a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.groupId != null">
|
||||
AND a.group_id = #{param.groupId}
|
||||
<if test="param.articleId != null">
|
||||
AND a.article_id = #{param.articleId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
@@ -39,12 +42,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckContent">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.cms.entity.ArticleComment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckContent">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.cms.entity.ArticleComment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
AND b.nickname LIKE CONCAT('%', #{param.nickname}, '%')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.create_time DESC
|
||||
ORDER BY a.sort_number ASC, a.create_time DESC
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
|
||||
+10
-8
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.param;
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
@@ -11,29 +11,31 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 用户填写法律文书内容查询参数
|
||||
* 查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:06:41
|
||||
* @since 2025-11-23 14:05:18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "LawLegalDocContentParam对象", description = "用户填写法律文书内容查询参数")
|
||||
public class LawLegalDocContentParam extends BaseParam {
|
||||
@ApiModel(value = "ArticleCollectParam对象", description = "查询参数")
|
||||
public class ArticleCollectParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer groupId;
|
||||
|
||||
private String content;
|
||||
private Integer articleId;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
+12
-8
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.param;
|
||||
package com.gxwebsoft.cms.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
@@ -11,29 +11,33 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 用户填写企业法制体检内容查询参数
|
||||
* 查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 17:48:54
|
||||
* @since 2025-12-02 16:56:51
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "LawLegalOrgCheckContentParam对象", description = "用户填写企业法制体检内容查询参数")
|
||||
public class LawLegalOrgCheckContentParam extends BaseParam {
|
||||
@ApiModel(value = "ArticleCommentParam对象", description = "查询参数")
|
||||
public class ArticleCommentParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer groupId;
|
||||
|
||||
private String content;
|
||||
private Integer articleId;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.ArticleCollect;
|
||||
import com.gxwebsoft.cms.param.ArticleCollectParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-23 14:05:18
|
||||
*/
|
||||
public interface ArticleCollectService extends IService<ArticleCollect> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<ArticleCollect>
|
||||
*/
|
||||
PageResult<ArticleCollect> pageRel(ArticleCollectParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<ArticleCollect>
|
||||
*/
|
||||
List<ArticleCollect> listRel(ArticleCollectParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return ArticleCollect
|
||||
*/
|
||||
ArticleCollect getByIdRel(Integer id);
|
||||
|
||||
ArticleCollect check(Integer userId, Integer id);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.cms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.cms.entity.ArticleComment;
|
||||
import com.gxwebsoft.cms.param.ArticleCommentParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-12-02 16:56:51
|
||||
*/
|
||||
public interface ArticleCommentService extends IService<ArticleComment> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<ArticleComment>
|
||||
*/
|
||||
PageResult<ArticleComment> pageRel(ArticleCommentParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<ArticleComment>
|
||||
*/
|
||||
List<ArticleComment> listRel(ArticleCommentParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return ArticleComment
|
||||
*/
|
||||
ArticleComment getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.ArticleCollectMapper;
|
||||
import com.gxwebsoft.cms.service.ArticleCollectService;
|
||||
import com.gxwebsoft.cms.entity.ArticleCollect;
|
||||
import com.gxwebsoft.cms.param.ArticleCollectParam;
|
||||
import com.gxwebsoft.cms.service.ArticleService;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service实现
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-23 14:05:18
|
||||
*/
|
||||
@Service
|
||||
public class ArticleCollectServiceImpl extends ServiceImpl<ArticleCollectMapper, ArticleCollect> implements ArticleCollectService {
|
||||
@Resource
|
||||
private ArticleService articleService;
|
||||
|
||||
@Override
|
||||
public PageResult<ArticleCollect> pageRel(ArticleCollectParam param) {
|
||||
PageParam<ArticleCollect, ArticleCollectParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<ArticleCollect> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ArticleCollect> listRel(ArticleCollectParam param) {
|
||||
List<ArticleCollect> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<ArticleCollect, ArticleCollectParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
for (ArticleCollect item : list) {
|
||||
item.setArticle(articleService.getByIdRel(item.getArticleId()));
|
||||
}
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArticleCollect getByIdRel(Integer id) {
|
||||
ArticleCollectParam param = new ArticleCollectParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArticleCollect check(Integer userId, Integer id) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<ArticleCollect>()
|
||||
.eq(ArticleCollect::getUserId, userId)
|
||||
.eq(ArticleCollect::getArticleId, id)
|
||||
.last("limit 1")
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.gxwebsoft.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.cms.mapper.ArticleCommentMapper;
|
||||
import com.gxwebsoft.cms.service.ArticleCommentService;
|
||||
import com.gxwebsoft.cms.entity.ArticleComment;
|
||||
import com.gxwebsoft.cms.param.ArticleCommentParam;
|
||||
import com.gxwebsoft.cms.service.ArticleService;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service实现
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-12-02 16:56:51
|
||||
*/
|
||||
@Service
|
||||
public class ArticleCommentServiceImpl extends ServiceImpl<ArticleCommentMapper, ArticleComment> implements ArticleCommentService {
|
||||
@Resource
|
||||
private ArticleService articleService;
|
||||
@Override
|
||||
public PageResult<ArticleComment> pageRel(ArticleCommentParam param) {
|
||||
PageParam<ArticleComment, ArticleCommentParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<ArticleComment> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ArticleComment> listRel(ArticleCommentParam param) {
|
||||
List<ArticleComment> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<ArticleComment, ArticleCommentParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
for (ArticleComment item : list) {
|
||||
item.setArticle(articleService.getById(item.getArticleId()));
|
||||
}
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArticleComment getByIdRel(Integer id) {
|
||||
ArticleCommentParam param = new ArticleCommentParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> impl
|
||||
@Override
|
||||
public PageResult<Article> pageRel(ArticleParam param) {
|
||||
PageParam<Article, ArticleParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
// page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<Article> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
@@ -33,7 +33,7 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> impl
|
||||
List<Article> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<Article, ArticleParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
// page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,8 @@ public class MybatisPlusConfig {
|
||||
return Arrays.asList(
|
||||
"sys_tenant",
|
||||
"sys_dictionary",
|
||||
"sys_dictionary_data"
|
||||
"sys_dictionary_data",
|
||||
"gx_coin_log"
|
||||
).contains(tableName);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -39,6 +39,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.permitAll()
|
||||
.antMatchers(
|
||||
"/api/login",
|
||||
"/api/system/user/loginByPhoneForTest",
|
||||
"/api/wx-login/loginByMpWxPhone",
|
||||
"/api/register",
|
||||
"/druid/**",
|
||||
"/swagger-ui.html",
|
||||
@@ -56,6 +58,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
"/api/shop/payment/mp-alipay/getPhoneNumber",
|
||||
"/api/shop/test/**",
|
||||
"/api/shop/wx-login/**",
|
||||
"/api/shop/getOpenId",
|
||||
"/api/shop/getOpenId/**",
|
||||
"/api/apps/hualala/**",
|
||||
"/api/apps/hualala-cart/**",
|
||||
"/api/apps/test-data/**",
|
||||
@@ -73,7 +77,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
"/api/law/law-org-people/**",
|
||||
"/api/system/dict-data/list-by-dict",
|
||||
"/api/cms/article-category",
|
||||
"/api/file/upload"
|
||||
"/api/cms/article",
|
||||
"/api/file/upload",
|
||||
"/api/voice",
|
||||
"/api/sys/sys-area",
|
||||
"/api/voice/**"
|
||||
)
|
||||
.permitAll()
|
||||
.anyRequest()
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
package com.gxwebsoft.common.core.utils;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import com.gxwebsoft.shop.service.OrderService;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 自动执行计划
|
||||
@@ -10,15 +19,20 @@ import javax.annotation.Resource;
|
||||
* @author WebSoft
|
||||
* @since 2018-12-14 08:38:19
|
||||
*/
|
||||
@Component
|
||||
public class SchedulingUtil {
|
||||
@Resource
|
||||
private OrderService orderService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
// @Scheduled(cron="*/5 * * * * *")
|
||||
// public void reportCurrentTime() {
|
||||
// System.out.println("定时任务开始 = " + new Date());
|
||||
// int count = orderService.count(new LambdaQueryWrapper<Order>().eq(Order::getPayStatus, 20));
|
||||
//// orderService.removeOrderByTimeOut();
|
||||
// System.out.println("count = " + count);
|
||||
// }
|
||||
@Scheduled(cron = "*/1 * * * * *")
|
||||
public void reportCurrentTime() {
|
||||
// 0点执行
|
||||
if (LocalDateTimeUtil.format(LocalDateTime.now(), "HH:mm:ss").equals("15:13:00")) {
|
||||
System.out.println("定时任务开始 = " + new Date());
|
||||
userService.update(
|
||||
new LambdaUpdateWrapper<User>()
|
||||
.set(User::getSendCoin, 0)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ public class CacheController extends BaseController {
|
||||
@Resource
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:cache:list')")
|
||||
@ApiOperation("查询全部缓存")
|
||||
@GetMapping()
|
||||
public ApiResult<HashMap<String, Object>> list() {
|
||||
@@ -65,7 +64,6 @@ public class CacheController extends BaseController {
|
||||
return success(map);
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:cache:list')")
|
||||
@ApiOperation("读取缓存")
|
||||
@GetMapping("/{key}")
|
||||
public ApiResult<?> get(@PathVariable("key") String key) {
|
||||
@@ -75,7 +73,6 @@ public class CacheController extends BaseController {
|
||||
return success("读取成功", JSONObject.parseObject(cache));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:cache:save')")
|
||||
@ApiOperation("添加缓存")
|
||||
@PostMapping()
|
||||
public ApiResult<?> add(@RequestBody Cache cache) {
|
||||
@@ -87,7 +84,6 @@ public class CacheController extends BaseController {
|
||||
return success("缓存成功");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:cache:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("删除缓存")
|
||||
@DeleteMapping("/{key}")
|
||||
@@ -98,7 +94,6 @@ public class CacheController extends BaseController {
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:cache:save')")
|
||||
@ApiOperation("缓存皮肤")
|
||||
@PostMapping("/theme")
|
||||
public ApiResult<?> saveTheme(@RequestBody Cache cache) {
|
||||
|
||||
@@ -53,7 +53,6 @@ public class DictDataController extends BaseController {
|
||||
return success(dictDataService.pageRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:dict:list')")
|
||||
@OperationLog
|
||||
@ApiOperation("查询全部字典数据")
|
||||
@GetMapping()
|
||||
@@ -79,11 +78,11 @@ public class DictDataController extends BaseController {
|
||||
.eq(DictData::getDictDataName, dictData.getDictDataName())) > 0) {
|
||||
return fail("字典数据名称已存在");
|
||||
}
|
||||
if (dictDataService.count(new LambdaQueryWrapper<DictData>()
|
||||
.eq(DictData::getDictId, dictData.getDictId())
|
||||
.eq(DictData::getDictDataCode, dictData.getDictDataCode())) > 0) {
|
||||
return fail("字典数据标识已存在");
|
||||
}
|
||||
// if (dictDataService.count(new LambdaQueryWrapper<DictData>()
|
||||
// .eq(DictData::getDictId, dictData.getDictId())
|
||||
// .eq(DictData::getDictDataCode, dictData.getDictDataCode())) > 0) {
|
||||
// return fail("字典数据标识已存在");
|
||||
// }
|
||||
// 自动添加字典
|
||||
final int count = dictService.count(new LambdaQueryWrapper<Dict>().eq(Dict::getDictCode, dictData.getDictCode()));
|
||||
if (dictData.getDictCode() != null && count == 0) {
|
||||
|
||||
@@ -55,14 +55,14 @@ public class FileController extends BaseController {
|
||||
File upload = FileServerUtil.upload(file, dir, config.getUploadUuidName());
|
||||
String path = upload.getAbsolutePath().replace("\\", "/").substring(dir.length() - 1);
|
||||
// String requestURL = StrUtil.removeSuffix(request.getRequestURL(), "/upload");
|
||||
String requestURL = config.getFileServer() + "/api/file";
|
||||
String requestURL = config.getFileServer() + "/api/file/";
|
||||
String originalName = file.getOriginalFilename();
|
||||
result = new FileRecord();
|
||||
result.setCreateUserId(getLoginUserId());
|
||||
result.setName(StrUtil.isBlank(originalName) ? upload.getName() : originalName);
|
||||
result.setLength(upload.length());
|
||||
result.setPath(path);
|
||||
result.setUrl(requestURL + path);
|
||||
result.setUrl((requestURL + path).replace("file//", "file/"));
|
||||
String contentType = FileServerUtil.getContentType(upload);
|
||||
result.setContentType(contentType);
|
||||
if (FileServerUtil.isImage(contentType)) {
|
||||
|
||||
@@ -2,6 +2,11 @@ package com.gxwebsoft.common.system.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.cms.entity.ArticleCollect;
|
||||
import com.gxwebsoft.cms.entity.ArticleComment;
|
||||
import com.gxwebsoft.cms.service.ArticleCollectService;
|
||||
import com.gxwebsoft.cms.service.ArticleCommentService;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.core.config.ConfigProperties;
|
||||
import com.gxwebsoft.common.core.security.JwtSubject;
|
||||
@@ -60,7 +65,9 @@ public class MainController extends BaseController {
|
||||
@Resource
|
||||
private CacheClient cacheClient;
|
||||
@Resource
|
||||
private StringRedisTemplate stringRedisTemplate;
|
||||
private ArticleCommentService articleCommentService;
|
||||
@Resource
|
||||
private ArticleCollectService articleCollectService;
|
||||
|
||||
@ApiOperation("用户登录")
|
||||
@PostMapping("/login")
|
||||
@@ -123,7 +130,14 @@ public class MainController extends BaseController {
|
||||
@ApiOperation("获取登录用户信息")
|
||||
@GetMapping("/auth/user")
|
||||
public ApiResult<User> userInfo() {
|
||||
return success(userService.getByIdRel(getLoginUserId()));
|
||||
User user = userService.getByIdRel(getLoginUserId());
|
||||
int commentNum = articleCommentService.count(new LambdaQueryWrapper<ArticleComment>()
|
||||
.eq(ArticleComment::getUserId, getLoginUser()));
|
||||
int collectNum = articleCollectService.count(new LambdaQueryWrapper<ArticleCollect>()
|
||||
.eq(ArticleCollect::getUserId, getLoginUser()));
|
||||
user.setArticleCommentNum(commentNum);
|
||||
user.setArticleCollectNum(collectNum);
|
||||
return success(user);
|
||||
}
|
||||
|
||||
@ApiOperation("获取登录用户菜单")
|
||||
|
||||
@@ -79,6 +79,16 @@ public class UserController extends BaseController {
|
||||
return success("登录成功", new LoginResult(access_token, user));
|
||||
}
|
||||
|
||||
@ApiOperation("手机号登录(测试用)")
|
||||
@PostMapping("/loginByPhoneForTest")
|
||||
public ApiResult<?> loginByPhoneForTest(@RequestBody User user) {
|
||||
User getLoginUser = userService.getByPhone(user.getPhone());
|
||||
if (!user.getPhoneLoginCode().equals("1700083")) return fail("验证码错误");
|
||||
String access_token = JwtUtil.buildToken(new JwtSubject(getLoginUser.getUsername(), getLoginUser.getTenantId()),
|
||||
configProperties.getTokenExpireTime(), configProperties.getTokenKey());
|
||||
return success("登录成功", new LoginResult(access_token, user));
|
||||
}
|
||||
|
||||
@PostMapping("/data")
|
||||
public ApiResult<User> userData() {
|
||||
User loginUser = getLoginUser();
|
||||
@@ -172,6 +182,17 @@ public class UserController extends BaseController {
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@OperationLog
|
||||
@ApiOperation("修改用户")
|
||||
@PutMapping("/self")
|
||||
public ApiResult<?> updateForSelf(@RequestBody User user) {
|
||||
user.setUserId(getLoginUser().getUserId());
|
||||
if (userService.updateUser(user)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:user:remove')")
|
||||
@OperationLog
|
||||
@ApiOperation("删除用户")
|
||||
|
||||
@@ -74,8 +74,11 @@ public class User implements UserDetails {
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty("出生日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date birthday;
|
||||
private String birthday;
|
||||
|
||||
private String birthTime;
|
||||
|
||||
private String birthAddress;
|
||||
|
||||
@ApiModelProperty("所在国家")
|
||||
private String country;
|
||||
@@ -135,6 +138,10 @@ public class User implements UserDetails {
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
private Integer coin;
|
||||
|
||||
private Integer sendCoin;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@@ -220,6 +227,14 @@ public class User implements UserDetails {
|
||||
@TableField(exist = false)
|
||||
private String mobile;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String phoneLoginCode;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer articleCollectNum;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer articleCommentNum;
|
||||
|
||||
@Override
|
||||
public boolean isAccountNonExpired() {
|
||||
|
||||
@@ -83,8 +83,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
|
||||
@Override
|
||||
public void listRanking(UserParam param) {
|
||||
List<User> list = baseMapper.selectListRel(param);
|
||||
Map<String, String> map = new HashMap<>();
|
||||
List<User> list = baseMapper.selectListRel(param);
|
||||
Map<String, String> map = new HashMap<>();
|
||||
// list.forEach(d -> {
|
||||
// int count = appService.count(new LambdaQueryWrapper<App>()
|
||||
// .eq(App::getUserId, d.getUserId()));
|
||||
@@ -130,7 +130,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
if (StrUtil.isBlank(username)) {
|
||||
return null;
|
||||
}
|
||||
User user = baseMapper.selectByUsername(username, tenantId);
|
||||
User user = getOne(new LambdaQueryWrapper<User>().eq(User::getUsername, username).last("limit 1"));
|
||||
if (user != null) {
|
||||
user.setRoles(userRoleService.listByUserId(user.getUserId()));
|
||||
user.setAuthorities(roleMenuService.listMenuByUserId(user.getUserId(), null));
|
||||
@@ -209,27 +209,31 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
|
||||
@Override
|
||||
public User getByPhone(String phone) {
|
||||
return query().eq("phone", phone).one();
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<User>()
|
||||
.eq(User::getPhone, phone)
|
||||
.last("limit 1")
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getByOpenId(String openId) {
|
||||
return query().eq("openId", openId).one();
|
||||
return query().eq("openId", openId).one();
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getByUnionId(UserParam param) {
|
||||
return param.getOne(baseMapper.getOne(param));
|
||||
return param.getOne(baseMapper.getOne(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getByOauthId(UserParam userParam) {
|
||||
return userParam.getOne(baseMapper.getOne(userParam));
|
||||
return userParam.getOne(baseMapper.getOne(userParam));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<User> listStatisticsRel(UserParam param) {
|
||||
List<User> list = baseMapper.selectListStatisticsRel(param);
|
||||
List<User> list = baseMapper.selectListStatisticsRel(param);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,305 @@
|
||||
package com.gxwebsoft.gx.controller;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.alibaba.nls.client.AccessToken;
|
||||
import com.alibaba.nls.client.protocol.NlsClient;
|
||||
import com.alibaba.nls.client.protocol.OutputFormatEnum;
|
||||
import com.alibaba.nls.client.protocol.SampleRateEnum;
|
||||
import com.alibaba.nls.client.protocol.tts.SpeechSynthesizer;
|
||||
import com.alibaba.nls.client.protocol.tts.SpeechSynthesizerListener;
|
||||
import com.alibaba.nls.client.protocol.tts.SpeechSynthesizerResponse;
|
||||
import com.aliyuncs.CommonRequest;
|
||||
import com.aliyuncs.CommonResponse;
|
||||
import com.aliyuncs.DefaultAcsClient;
|
||||
import com.aliyuncs.IAcsClient;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.aliyuncs.http.MethodType;
|
||||
import com.aliyuncs.profile.DefaultProfile;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.gx.entity.GxRole;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/voice")
|
||||
public class AliVoiceController extends BaseController {
|
||||
private static final String accessKeyId = "LTAI5tAAY8FpYU52dzKmn9LP";
|
||||
private static final String accessKeySecret = "AVp0ufPkHHlRCHtAQrpElQAVSilPrY";
|
||||
private static final String appKey = "1Z3xbVFOVc1btaOW";
|
||||
|
||||
// 地域ID,常量,固定值。
|
||||
public static final String REGIONID = "cn-shanghai";
|
||||
public static final String ENDPOINTNAME = "cn-shanghai";
|
||||
public static final String PRODUCT = "nls-filetrans";
|
||||
public static final String DOMAIN = "filetrans.cn-shanghai.aliyuncs.com";
|
||||
public static final String API_VERSION = "2018-08-17"; // 中国站版本
|
||||
// public static final String API_VERSION = "2019-08-23"; // 国际站版本
|
||||
public static final String POST_REQUEST_ACTION = "SubmitTask";
|
||||
public static final String GET_REQUEST_ACTION = "GetTaskResult";
|
||||
// 请求参数
|
||||
public static final String KEY_FILE_LINK = "file_link";
|
||||
public static final String KEY_VERSION = "version";
|
||||
public static final String KEY_ENABLE_WORDS = "enable_words";
|
||||
// 响应参数
|
||||
public static final String KEY_APP_KEY = "appkey";
|
||||
public static final String KEY_TASK = "Task";
|
||||
public static final String KEY_TASK_ID = "TaskId";
|
||||
public static final String KEY_STATUS_TEXT = "StatusText";
|
||||
public static final String KEY_RESULT = "Result";
|
||||
// 状态值
|
||||
public static final String STATUS_SUCCESS = "SUCCESS";
|
||||
private static final String STATUS_RUNNING = "RUNNING";
|
||||
private static final String STATUS_QUEUEING = "QUEUEING";
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
@Value("${config.server-url}")
|
||||
private String requestURL;
|
||||
|
||||
private IAcsClient client;
|
||||
|
||||
@PostConstruct
|
||||
public void init() throws ClientException {
|
||||
DefaultProfile.addEndpoint(ENDPOINTNAME, REGIONID, PRODUCT, DOMAIN);
|
||||
// 创建DefaultAcsClient实例并初始化
|
||||
DefaultProfile profile = DefaultProfile.getProfile(REGIONID, accessKeyId, accessKeySecret);
|
||||
client = new DefaultAcsClient(profile);
|
||||
}
|
||||
|
||||
@PostMapping("/make")
|
||||
public ApiResult<?> make(@RequestBody GxRole role) {
|
||||
AccessToken accessToken = new AccessToken(accessKeyId, accessKeySecret);
|
||||
NlsClient client;
|
||||
try {
|
||||
accessToken.apply();
|
||||
String time = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyyMMdd");
|
||||
if (!FileUtil.exist(uploadPath + "file/" + time))
|
||||
FileUtil.mkdir(uploadPath +"file/" + time);
|
||||
String filename = "file/" + time + "/" + RandomUtil.randomString(10) + ".mp3";
|
||||
String filePath = uploadPath + filename;
|
||||
System.out.println("get token: " + accessToken.getToken() + ", expire time: " + accessToken.getExpireTime());
|
||||
client = new NlsClient(accessToken.getToken());
|
||||
//创建实例,建立连接。
|
||||
SpeechSynthesizer synthesizer = new SpeechSynthesizer(client, getSynthesizerListener(filePath));
|
||||
synthesizer.setAppKey(appKey);
|
||||
//设置返回音频的编码格式
|
||||
synthesizer.setFormat(OutputFormatEnum.WAV);
|
||||
//设置返回音频的采样率
|
||||
synthesizer.setSampleRate(SampleRateEnum.SAMPLE_RATE_16K);
|
||||
//发音人
|
||||
synthesizer.setVoice(role.getVoice());
|
||||
|
||||
//语调,范围是-500~500,可选,默认是0。
|
||||
synthesizer.setPitchRate(0);
|
||||
//语速,范围是-500~500,默认是0。
|
||||
synthesizer.setSpeechRate(0);
|
||||
synthesizer.setFormat(OutputFormatEnum.MP3);
|
||||
//设置用于语音合成的文本
|
||||
String content = role.getContent();
|
||||
if (role.getEmo() != null && !role.getEmo().isEmpty()) {
|
||||
content = "<speak voice=\"" + role.getVoice() + "\"><emotion category=\""
|
||||
+ role.getEmo() + "\" intensity=\"1.0\">"
|
||||
+ role.getContent()
|
||||
+ " </emotion></speak>";
|
||||
}
|
||||
synthesizer.setText(content);
|
||||
// 是否开启字幕功能(返回相应文本的时间戳),默认不开启,需要注意并非所有发音人都支持该参数。
|
||||
synthesizer.addCustomedParam("enable_subtitle", false);
|
||||
//此方法将以上参数设置序列化为JSON格式发送给服务端,并等待服务端确认。
|
||||
synthesizer.start();
|
||||
//等待语音合成结束
|
||||
synthesizer.waitForComplete();
|
||||
return success("成功", requestURL + "/" + filename);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
@PostMapping("/makeTrans")
|
||||
public ApiResult<?> makeTrans(@RequestBody Map<String, String> map) {
|
||||
String fileUrl = map.get("file");
|
||||
|
||||
/**
|
||||
* 1. 创建CommonRequest,设置请求参数。
|
||||
*/
|
||||
CommonRequest postRequest = new CommonRequest();
|
||||
// 设置域名
|
||||
postRequest.setDomain(DOMAIN);
|
||||
// 设置API的版本号,格式为YYYY-MM-DD。
|
||||
postRequest.setVersion(API_VERSION);
|
||||
// 设置action
|
||||
postRequest.setAction(POST_REQUEST_ACTION);
|
||||
// 设置产品名称
|
||||
postRequest.setProduct(PRODUCT);
|
||||
/**
|
||||
* 2. 设置录音文件识别请求参数,以JSON字符串的格式设置到请求Body中。
|
||||
*/
|
||||
JSONObject taskObject = new JSONObject();
|
||||
// 设置appkey
|
||||
taskObject.put(KEY_APP_KEY, appKey);
|
||||
// 设置音频文件访问链接
|
||||
taskObject.put(KEY_FILE_LINK, fileUrl);
|
||||
// 新接入请使用4.0版本,已接入(默认2.0)如需维持现状,请注释掉该参数设置。
|
||||
taskObject.put(KEY_VERSION, "4.0");
|
||||
taskObject.put("enable_sample_rate_adaptive", true);
|
||||
// 设置是否输出词信息,默认为false,开启时需要设置version为4.0及以上。
|
||||
taskObject.put(KEY_ENABLE_WORDS, true);
|
||||
String task = taskObject.toJSONString();
|
||||
System.out.println(task);
|
||||
// 设置以上JSON字符串为Body参数。
|
||||
postRequest.putBodyParameter(KEY_TASK, task);
|
||||
// 设置为POST方式的请求。
|
||||
postRequest.setMethod(MethodType.POST);
|
||||
// postRequest.setHttpContentType(FormatType.JSON); //当aliyun-java-sdk-core 版本为4.6.0及以上时,请取消该行注释
|
||||
/**
|
||||
* 3. 提交录音文件识别请求,获取录音文件识别请求任务的ID,以供识别结果查询使用。
|
||||
*/
|
||||
String taskId = null;
|
||||
try {
|
||||
CommonResponse postResponse = client.getCommonResponse(postRequest);
|
||||
System.err.println("提交录音文件识别请求的响应:" + postResponse.getData());
|
||||
if (postResponse.getHttpStatus() == 200) {
|
||||
JSONObject result = JSONObject.parseObject(postResponse.getData());
|
||||
String statusText = result.getString(KEY_STATUS_TEXT);
|
||||
if (STATUS_SUCCESS.equals(statusText)) {
|
||||
taskId = result.getString(KEY_TASK_ID);
|
||||
}
|
||||
}
|
||||
} catch (ClientException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return success("成功", taskId);
|
||||
}
|
||||
|
||||
@PostMapping("/getRes/{taskId}")
|
||||
public ApiResult<?> getRes(@PathVariable("taskId") String taskId) {
|
||||
/**
|
||||
* 1. 创建CommonRequest,设置任务ID。
|
||||
*/
|
||||
CommonRequest getRequest = new CommonRequest();
|
||||
// 设置域名
|
||||
getRequest.setDomain(DOMAIN);
|
||||
// 设置API版本
|
||||
getRequest.setVersion(API_VERSION);
|
||||
// 设置action
|
||||
getRequest.setAction(GET_REQUEST_ACTION);
|
||||
// 设置产品名称
|
||||
getRequest.setProduct(PRODUCT);
|
||||
// 设置任务ID为查询参数
|
||||
getRequest.putQueryParameter(KEY_TASK_ID, taskId);
|
||||
// 设置为GET方式的请求
|
||||
getRequest.setMethod(MethodType.GET);
|
||||
/**
|
||||
* 2. 提交录音文件识别结果查询请求
|
||||
* 以轮询的方式进行识别结果的查询,直到服务端返回的状态描述为“SUCCESS”或错误描述,则结束轮询。
|
||||
*/
|
||||
String result = null;
|
||||
while (true) {
|
||||
try {
|
||||
CommonResponse getResponse = client.getCommonResponse(getRequest);
|
||||
System.err.println("识别查询结果:" + getResponse.getData());
|
||||
if (getResponse.getHttpStatus() != 200) {
|
||||
break;
|
||||
}
|
||||
JSONObject rootObj = JSONObject.parseObject(getResponse.getData());
|
||||
String statusText = rootObj.getString(KEY_STATUS_TEXT);
|
||||
if (STATUS_RUNNING.equals(statusText) || STATUS_QUEUEING.equals(statusText)) {
|
||||
// 继续轮询,注意设置轮询时间间隔。
|
||||
Thread.sleep(10000);
|
||||
} else {
|
||||
// 状态信息为成功,返回识别结果;状态信息为异常,返回空。
|
||||
if (STATUS_SUCCESS.equals(statusText)) {
|
||||
result = rootObj.getString(KEY_RESULT);
|
||||
// 状态信息为成功,但没有识别结果,则可能是由于文件里全是静音、噪音等导致识别为空。
|
||||
if (result == null) {
|
||||
result = "__NONE__";
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return success("成功", result);
|
||||
}
|
||||
|
||||
private IAcsClient makeClient() {
|
||||
try {
|
||||
DefaultProfile.addEndpoint(ENDPOINTNAME, REGIONID, PRODUCT, DOMAIN);
|
||||
} catch (ClientException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// 创建DefaultAcsClient实例并初始化
|
||||
DefaultProfile profile = DefaultProfile.getProfile(REGIONID, accessKeyId, accessKeySecret);
|
||||
return new DefaultAcsClient(profile);
|
||||
}
|
||||
|
||||
|
||||
private static SpeechSynthesizerListener getSynthesizerListener(String filePath) {
|
||||
SpeechSynthesizerListener listener = null;
|
||||
try {
|
||||
listener = new SpeechSynthesizerListener() {
|
||||
File f = new File(filePath);
|
||||
FileOutputStream fout = new FileOutputStream(f);
|
||||
private boolean firstRecvBinary = true;
|
||||
|
||||
//语音合成结束
|
||||
@Override
|
||||
public void onComplete(SpeechSynthesizerResponse response) {
|
||||
//调用onComplete时表示所有TTS数据已接收完成,因此为整个合成数据的延迟。该延迟可能较大,不一定满足实时场景。
|
||||
System.out.println("name: " + response.getName() +
|
||||
", status: " + response.getStatus() +
|
||||
", output file :" + f.getAbsolutePath()
|
||||
);
|
||||
}
|
||||
|
||||
//语音合成的语音二进制数据
|
||||
@Override
|
||||
public void onMessage(ByteBuffer message) {
|
||||
try {
|
||||
if (firstRecvBinary) {
|
||||
//计算首包语音流的延迟,收到第一包语音流时,即可以进行语音播放,以提升响应速度(特别是实时交互场景下)。
|
||||
firstRecvBinary = false;
|
||||
long now = System.currentTimeMillis();
|
||||
}
|
||||
byte[] bytesArray = new byte[message.remaining()];
|
||||
message.get(bytesArray, 0, bytesArray.length);
|
||||
fout.write(bytesArray);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFail(SpeechSynthesizerResponse response) {
|
||||
//task_id是调用方和服务端通信的唯一标识,当遇到问题时需要提供task_id以便排查。
|
||||
System.out.println(
|
||||
"task_id: " + response.getTaskId() +
|
||||
//状态码 20000000 表示识别成功
|
||||
", status: " + response.getStatus() +
|
||||
//错误信息
|
||||
", status_text: " + response.getStatusText());
|
||||
}
|
||||
};
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return listener;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.gxwebsoft.gx.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.gx.service.GxChatHistoryService;
|
||||
import com.gxwebsoft.gx.entity.GxChatHistory;
|
||||
import com.gxwebsoft.gx.param.GxChatHistoryParam;
|
||||
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-21 12:57:25
|
||||
*/
|
||||
@Api(tags = "管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gx/gx-chat-history")
|
||||
public class GxChatHistoryController extends BaseController {
|
||||
@Resource
|
||||
private GxChatHistoryService gxChatHistoryService;
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GxChatHistory>> page(GxChatHistoryParam param) {
|
||||
// 使用关联查询
|
||||
return success(gxChatHistoryService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GxChatHistory>> list(GxChatHistoryParam param) {
|
||||
// 使用关联查询
|
||||
return success(gxChatHistoryService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('gx:gxChatHistory:list')")
|
||||
@ApiOperation("根据id查询")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GxChatHistory> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(gxChatHistoryService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GxChatHistory gxChatHistory) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
gxChatHistory.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (gxChatHistoryService.save(gxChatHistory)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GxChatHistory gxChatHistory) {
|
||||
if (gxChatHistoryService.updateById(gxChatHistory)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (gxChatHistoryService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GxChatHistory> list) {
|
||||
if (gxChatHistoryService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<GxChatHistory> batchParam) {
|
||||
if (batchParam.update(gxChatHistoryService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (gxChatHistoryService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package com.gxwebsoft.gx.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.gx.service.GxChatListService;
|
||||
import com.gxwebsoft.gx.entity.GxChatList;
|
||||
import com.gxwebsoft.gx.param.GxChatListParam;
|
||||
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-21 12:57:25
|
||||
*/
|
||||
@Api(tags = "管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gx/gx-chat-list")
|
||||
public class GxChatListController extends BaseController {
|
||||
@Resource
|
||||
private GxChatListService gxChatListService;
|
||||
|
||||
@GetMapping("/userList")
|
||||
public ApiResult<List<GxChatList>> userList() {
|
||||
// 使用关联查询
|
||||
GxChatListParam param = new GxChatListParam();
|
||||
param.setUserId(getLoginUserId());
|
||||
return success(gxChatListService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GxChatList>> page(GxChatListParam param) {
|
||||
// 使用关联查询
|
||||
return success(gxChatListService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GxChatList>> list(GxChatListParam param) {
|
||||
// 使用关联查询
|
||||
return success(gxChatListService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('gx:gxChatList:list')")
|
||||
@ApiOperation("根据id查询")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GxChatList> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(gxChatListService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GxChatList gxChatList) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
gxChatList.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (gxChatListService.save(gxChatList)) {
|
||||
return success("添加成功", gxChatList);
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GxChatList gxChatList) {
|
||||
if (gxChatListService.updateById(gxChatList)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (gxChatListService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GxChatList> list) {
|
||||
if (gxChatListService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<GxChatList> batchParam) {
|
||||
if (batchParam.update(gxChatListService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (gxChatListService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
package com.gxwebsoft.gx.controller;
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.DictData;
|
||||
import com.gxwebsoft.common.system.service.DictDataService;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import com.gxwebsoft.gx.service.GxCoinLogService;
|
||||
import com.gxwebsoft.gx.entity.GxCoinLog;
|
||||
import com.gxwebsoft.gx.param.GxCoinLogParam;
|
||||
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 com.gxwebsoft.shop.controller.WxPayController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 金币记录控制器
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-30 02:03:35
|
||||
*/
|
||||
@Api(tags = "金币记录管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gx/gx-coin-log")
|
||||
public class GxCoinLogController extends BaseController {
|
||||
@Resource
|
||||
private GxCoinLogService gxCoinLogService;
|
||||
@Resource
|
||||
private DictDataService dictDataService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@Autowired
|
||||
private WxPayController wxPayController;
|
||||
|
||||
@ApiOperation("分页查询金币记录")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GxCoinLog>> page(GxCoinLogParam param) {
|
||||
// 使用关联查询
|
||||
return success(gxCoinLogService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部金币记录")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GxCoinLog>> list(GxCoinLogParam param) {
|
||||
// 使用关联查询
|
||||
param.setUserId(getLoginUserId());
|
||||
return success(gxCoinLogService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询金币记录")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GxCoinLog> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(gxCoinLogService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加金币记录")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GxCoinLog gxCoinLog) {
|
||||
if (gxCoinLog.getIsAdmin() != null && gxCoinLog.getIsAdmin()) {
|
||||
if (gxCoinLog.getType() != null) {
|
||||
if (gxCoinLog.getType().equals("+")) {
|
||||
if (gxCoinLog.getDesc() == null || gxCoinLog.getDesc().isEmpty()) gxCoinLog.setDesc("后台充值");
|
||||
User user = userService.getById(gxCoinLog.getUserId());
|
||||
user.setCoin(user.getCoin() + gxCoinLog.getNum());
|
||||
userService.updateById(user);
|
||||
} else {
|
||||
if (gxCoinLog.getDesc() == null || gxCoinLog.getDesc().isEmpty()) gxCoinLog.setDesc("后台扣除");
|
||||
User user = userService.getById(gxCoinLog.getUserId());
|
||||
user.setCoin(user.getCoin() - gxCoinLog.getNum());
|
||||
userService.updateById(user);
|
||||
}
|
||||
gxCoinLog.setStatus(1);
|
||||
gxCoinLogService.save(gxCoinLog);
|
||||
return success();
|
||||
}
|
||||
return fail("请选择类型");
|
||||
}
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
gxCoinLog.setUserId(loginUser.getUserId());
|
||||
if (gxCoinLog.getType() != null && gxCoinLog.getType().equals("+") && gxCoinLog.getDesc() != null && gxCoinLog.getDesc().equals("金币购买")) {
|
||||
String timestamp = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyyMMddHHmmss");
|
||||
String orderNo = timestamp + RandomUtil.randomNumbers(6);
|
||||
gxCoinLog.setOrderNo(orderNo);
|
||||
DictData dictData = dictDataService.getByDictCodeAndName("COIN_AMOUNT", "COIN_AMOUNT");
|
||||
BigDecimal amount = new BigDecimal(dictData.getDictDataCode());
|
||||
amount = amount.multiply(new BigDecimal(gxCoinLog.getNum()));
|
||||
gxCoinLog.setAmount(amount);
|
||||
}
|
||||
if (gxCoinLog.getType() != null && gxCoinLog.getType().equals("-")) {
|
||||
if (loginUser.getCoin() == 0 && loginUser.getSendCoin() == 0) {
|
||||
return fail("金币不足");
|
||||
}
|
||||
}
|
||||
if (gxCoinLog.getDesc() != null && gxCoinLog.getDesc().equals("分享获得")) {
|
||||
DictData dictDataNum = dictDataService.getByDictCodeAndName("SHARE_GET_COIN", "最多获得次数");
|
||||
Integer maxGetNum = Integer.valueOf(dictDataNum.getDictDataCode());
|
||||
String today = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy-MM-dd");
|
||||
Integer getLogNumByDesc = gxCoinLogService.getLogNumByDesc(loginUser.getUserId(), "分享获得", today);
|
||||
if (getLogNumByDesc < maxGetNum) {
|
||||
DictData dictData = dictDataService.getByDictCodeAndName("SHARE_GET_COIN", "每次获得数量");
|
||||
int coin = Integer.parseInt(dictData.getDictDataCode());
|
||||
gxCoinLog.setAmount(BigDecimal.ZERO);
|
||||
gxCoinLog.setNum(coin);
|
||||
gxCoinLog.setType("+");
|
||||
gxCoinLog.setDesc("分享获得");
|
||||
gxCoinLog.setDate(today);
|
||||
User user = userService.getById(loginUser.getUserId());
|
||||
user.setCoin(user.getCoin() + coin);
|
||||
userService.updateById(user);
|
||||
} else {
|
||||
return fail("分享获得金币次数已达到上限");
|
||||
}
|
||||
}
|
||||
if (gxCoinLogService.save(gxCoinLog)) {
|
||||
// User user = getLoginUser();
|
||||
// user.setCoin(user.getCoin() + gxCoinLog.getNum());
|
||||
// userService.updateById(user);
|
||||
|
||||
if (gxCoinLog.getType().equals("+")) {
|
||||
if (gxCoinLog.getDesc() != null && gxCoinLog.getDesc().equals("金币购买")) {
|
||||
String notifyUrl = "https://guoxue.gxwebsoft.com/api/shop/wx-pay/notify";
|
||||
Map<String, String> map = wxPayController.makePay(loginUser.getOpenId(), gxCoinLog.getOrderNo(),
|
||||
gxCoinLog.getAmount().multiply(new BigDecimal(100)).intValue(), "金币购买", notifyUrl);
|
||||
return success(map);
|
||||
}
|
||||
}
|
||||
if (gxCoinLog.getType().equals("-")) {
|
||||
if (loginUser.getSendCoin() > 0) {
|
||||
loginUser.setSendCoin(loginUser.getSendCoin() - gxCoinLog.getNum());
|
||||
userService.updateById(loginUser);
|
||||
} else {
|
||||
if (loginUser.getCoin() > 0) {
|
||||
loginUser.setCoin(loginUser.getCoin() - gxCoinLog.getNum());
|
||||
userService.updateById(loginUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改金币记录")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GxCoinLog gxCoinLog) {
|
||||
if (gxCoinLogService.updateById(gxCoinLog)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除金币记录")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (gxCoinLogService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加金币记录")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GxCoinLog> list) {
|
||||
if (gxCoinLogService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改金币记录")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<GxCoinLog> batchParam) {
|
||||
if (batchParam.update(gxCoinLogService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除金币记录")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (gxCoinLogService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
+26
-26
@@ -1,9 +1,9 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
package com.gxwebsoft.gx.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawOrgPeopleService;
|
||||
import com.gxwebsoft.law.entity.LawOrgPeople;
|
||||
import com.gxwebsoft.law.param.LawOrgPeopleParam;
|
||||
import com.gxwebsoft.gx.service.GxFeedbackService;
|
||||
import com.gxwebsoft.gx.entity.GxFeedback;
|
||||
import com.gxwebsoft.gx.param.GxFeedbackParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
@@ -22,46 +22,46 @@ import java.util.List;
|
||||
* 控制器
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-14 01:31:54
|
||||
* @since 2025-12-02 13:07:28
|
||||
*/
|
||||
@Api(tags = "管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-org-people")
|
||||
public class LawOrgPeopleController extends BaseController {
|
||||
@RequestMapping("/api/gx/gx-feedback")
|
||||
public class GxFeedbackController extends BaseController {
|
||||
@Resource
|
||||
private LawOrgPeopleService lawOrgPeopleService;
|
||||
private GxFeedbackService gxFeedbackService;
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawOrgPeople>> page(LawOrgPeopleParam param) {
|
||||
public ApiResult<PageResult<GxFeedback>> page(GxFeedbackParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawOrgPeopleService.pageRel(param));
|
||||
return success(gxFeedbackService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawOrgPeople>> list(LawOrgPeopleParam param) {
|
||||
public ApiResult<List<GxFeedback>> list(GxFeedbackParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawOrgPeopleService.listRel(param));
|
||||
return success(gxFeedbackService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawOrgPeople:list')")
|
||||
@PreAuthorize("hasAuthority('gx:gxFeedback:list')")
|
||||
@ApiOperation("根据id查询")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawOrgPeople> get(@PathVariable("id") Integer id) {
|
||||
public ApiResult<GxFeedback> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawOrgPeopleService.getByIdRel(id));
|
||||
return success(gxFeedbackService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawOrgPeople lawOrgPeople) {
|
||||
public ApiResult<?> save(@RequestBody GxFeedback gxFeedback) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawOrgPeople.setUserId(loginUser.getUserId());
|
||||
gxFeedback.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawOrgPeopleService.save(lawOrgPeople)) {
|
||||
if (gxFeedbackService.save(gxFeedback)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
@@ -69,8 +69,8 @@ public class LawOrgPeopleController extends BaseController {
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawOrgPeople lawOrgPeople) {
|
||||
if (lawOrgPeopleService.updateById(lawOrgPeople)) {
|
||||
public ApiResult<?> update(@RequestBody GxFeedback gxFeedback) {
|
||||
if (gxFeedbackService.updateById(gxFeedback)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
@@ -79,7 +79,7 @@ public class LawOrgPeopleController extends BaseController {
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawOrgPeopleService.removeById(id)) {
|
||||
if (gxFeedbackService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
@@ -87,8 +87,8 @@ public class LawOrgPeopleController extends BaseController {
|
||||
|
||||
@ApiOperation("批量添加")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawOrgPeople> list) {
|
||||
if (lawOrgPeopleService.saveBatch(list)) {
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GxFeedback> list) {
|
||||
if (gxFeedbackService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
@@ -96,8 +96,8 @@ public class LawOrgPeopleController extends BaseController {
|
||||
|
||||
@ApiOperation("批量修改")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawOrgPeople> batchParam) {
|
||||
if (batchParam.update(lawOrgPeopleService, "id")) {
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<GxFeedback> batchParam) {
|
||||
if (batchParam.update(gxFeedbackService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
@@ -106,7 +106,7 @@ public class LawOrgPeopleController extends BaseController {
|
||||
@ApiOperation("批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawOrgPeopleService.removeByIds(ids)) {
|
||||
if (gxFeedbackService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.gxwebsoft.gx.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.gx.service.GxRoleService;
|
||||
import com.gxwebsoft.gx.entity.GxRole;
|
||||
import com.gxwebsoft.gx.param.GxRoleParam;
|
||||
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 09:34:30
|
||||
*/
|
||||
@Api(tags = "管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gx/gx-role")
|
||||
public class GxRoleController extends BaseController {
|
||||
@Resource
|
||||
private GxRoleService gxRoleService;
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GxRole>> page(GxRoleParam param) {
|
||||
// 使用关联查询
|
||||
return success(gxRoleService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GxRole>> list(GxRoleParam param) {
|
||||
// 使用关联查询
|
||||
return success(gxRoleService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GxRole> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(gxRoleService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GxRole gxRole) {
|
||||
GxRole role = gxRoleService.getByRoleName(gxRole.getRoleName());
|
||||
if (role != null) {
|
||||
return fail("角色已存在");
|
||||
}
|
||||
if (gxRoleService.save(gxRole)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GxRole gxRole) {
|
||||
if (gxRoleService.updateById(gxRole)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (gxRoleService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GxRole> list) {
|
||||
if (gxRoleService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<GxRole> batchParam) {
|
||||
if (batchParam.update(gxRoleService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (gxRoleService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
package com.gxwebsoft.gx.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.DictData;
|
||||
import com.gxwebsoft.common.system.service.DictDataService;
|
||||
import com.gxwebsoft.common.system.service.UserService;
|
||||
import com.gxwebsoft.gx.entity.GxCoinLog;
|
||||
import com.gxwebsoft.gx.service.GxCoinLogService;
|
||||
import com.gxwebsoft.gx.service.GxSignLogService;
|
||||
import com.gxwebsoft.gx.entity.GxSignLog;
|
||||
import com.gxwebsoft.gx.param.GxSignLogParam;
|
||||
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 12:42:39
|
||||
*/
|
||||
@Api(tags = "管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/gx/gx-sign-log")
|
||||
public class GxSignLogController extends BaseController {
|
||||
@Resource
|
||||
private GxSignLogService gxSignLogService;
|
||||
@Resource
|
||||
private DictDataService dictDataService;
|
||||
@Resource
|
||||
private GxCoinLogService gxCoinLogService;
|
||||
@Resource
|
||||
private UserService userService;
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GxSignLog>> page(GxSignLogParam param) {
|
||||
// 使用关联查询
|
||||
return success(gxSignLogService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GxSignLog>> list(GxSignLogParam param) {
|
||||
// 使用关联查询
|
||||
return success(gxSignLogService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('gx:gxSignLog:list')")
|
||||
@ApiOperation("根据id查询")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GxSignLog> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(gxSignLogService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GxSignLog gxSignLog) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
gxSignLog.setUserId(loginUser.getUserId());
|
||||
}
|
||||
GxSignLog check = gxSignLogService.check(gxSignLog.getUserId(), gxSignLog.getDate());
|
||||
if (check != null) return fail("今天已经签到了");
|
||||
if (gxSignLogService.save(gxSignLog)) {
|
||||
DictData dictData = dictDataService.getByDictCodeAndName("SIGN_GET_COIN", "获得数量");
|
||||
Integer num = Integer.parseInt(dictData.getDictDataCode());
|
||||
GxCoinLog gxCoinLog = new GxCoinLog();
|
||||
gxCoinLog.setType("+");
|
||||
gxCoinLog.setNum(num);
|
||||
gxCoinLog.setUserId(getLoginUserId());
|
||||
gxCoinLog.setDesc("签到获得");
|
||||
gxCoinLogService.save(gxCoinLog);
|
||||
User user = userService.getById(loginUser.getUserId());
|
||||
user.setSendCoin(user.getSendCoin() + num);
|
||||
userService.updateById(user);
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GxSignLog gxSignLog) {
|
||||
if (gxSignLogService.updateById(gxSignLog)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (gxSignLogService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GxSignLog> list) {
|
||||
if (gxSignLogService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<GxSignLog> batchParam) {
|
||||
if (batchParam.update(gxSignLogService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (gxSignLogService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
+17
-16
@@ -1,9 +1,9 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
package com.gxwebsoft.gx.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@@ -12,44 +12,45 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 企业法制体检配置
|
||||
*
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 18:04:46
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalOrgCheckType对象", description = "企业法制体检配置")
|
||||
@TableName("law_legal_org_check_type")
|
||||
public class LawLegalOrgCheckType implements Serializable {
|
||||
@ApiModel(value = "GxChatHistory对象", description = "")
|
||||
@TableName("gx_chat_history")
|
||||
public class GxChatHistory implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String icon;
|
||||
private Integer chatId;
|
||||
|
||||
private String title;
|
||||
private String conversationId;
|
||||
|
||||
private String fileList;
|
||||
private Integer userId;
|
||||
|
||||
private String content;
|
||||
|
||||
private String scoreConfig;
|
||||
private String reply;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
private Integer sortNumber;
|
||||
|
||||
private Integer userId;
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "商户编码")
|
||||
private String merchantCode;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
+18
-18
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
package com.gxwebsoft.gx.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
@@ -10,32 +10,35 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律文书配置
|
||||
*
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:06:41
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalDocConfig对象", description = "法律文书配置")
|
||||
@TableName("law_legal_doc_config")
|
||||
public class LawLegalDocConfig implements Serializable {
|
||||
@ApiModel(value = "GxChatList对象", description = "")
|
||||
@TableName("gx_chat_list")
|
||||
public class GxChatList implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer typeId;
|
||||
private String conversationId;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
private String type;
|
||||
private Integer roleId;
|
||||
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String answer;
|
||||
private String roleName;
|
||||
|
||||
private Integer userId;
|
||||
private String roleDesc;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
@@ -44,18 +47,15 @@ public class LawLegalDocConfig implements Serializable {
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userContent;
|
||||
private GxChatHistory lastMessage;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String email;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String file;
|
||||
private GxRole role;
|
||||
}
|
||||
+30
-22
@@ -1,46 +1,50 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
package com.gxwebsoft.gx.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律意见书配置
|
||||
* 金币记录
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 18:55:31
|
||||
* @since 2025-11-30 02:03:35
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalOrgCheckConfigSuggest对象", description = "法律意见书配置")
|
||||
@TableName("law_legal_org_check_config_suggest")
|
||||
public class LawLegalOrgCheckConfigSuggest implements Serializable {
|
||||
@ApiModel(value = "GxCoinLog对象", description = "金币记录")
|
||||
@TableName("gx_coin_log")
|
||||
public class GxCoinLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer typeId;
|
||||
|
||||
private Integer parentId;
|
||||
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String answer;
|
||||
private String orderNo;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private String date;
|
||||
|
||||
private BigDecimal amount;
|
||||
|
||||
@ApiModelProperty(value = "+/-")
|
||||
private String type;
|
||||
|
||||
private Integer num;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
@TableField(value = "`desc`")
|
||||
private String desc;
|
||||
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
@@ -48,13 +52,17 @@ public class LawLegalOrgCheckConfigSuggest implements Serializable {
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<LawLegalOrgCheckConfigSuggest> children;
|
||||
private String paidNo;
|
||||
|
||||
@ApiModelProperty(value = "0待支付 1已支付")
|
||||
private Integer status;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Boolean isAdmin;
|
||||
}
|
||||
+17
-17
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
package com.gxwebsoft.gx.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
@@ -12,36 +12,36 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律文书配置
|
||||
*
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:06:41
|
||||
* @since 2025-12-02 13:07:28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalDocType对象", description = "法律文书配置")
|
||||
@TableName("law_legal_doc_type")
|
||||
public class LawLegalDocType implements Serializable {
|
||||
@ApiModel(value = "GxFeedback对象", description = "")
|
||||
@TableName("gx_feedback")
|
||||
public class GxFeedback implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String icon;
|
||||
@ApiModelProperty(value = "功能体验")
|
||||
private String funcExp;
|
||||
|
||||
private String title;
|
||||
@ApiModelProperty(value = "咨询体验")
|
||||
private String advisoryExp;
|
||||
|
||||
private String topContent;
|
||||
|
||||
private String extraContent;
|
||||
|
||||
private String comment;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
private Integer sortNumber;
|
||||
private String comments;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
@@ -49,7 +49,7 @@ public class LawLegalDocType implements Serializable {
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
+25
-26
@@ -1,54 +1,52 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
package com.gxwebsoft.gx.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
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-05-17 16:10:35
|
||||
* @since 2025-11-23 09:34:30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawNotaryList对象", description = "公证列表")
|
||||
@TableName("law_notary_list")
|
||||
public class LawNotaryList implements Serializable {
|
||||
@ApiModel(value = "GxRole对象", description = "")
|
||||
@TableName("gx_role")
|
||||
public class GxRole implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer uid;
|
||||
@ApiModelProperty(value = "角色名称")
|
||||
private String roleName;
|
||||
|
||||
private String nameList;
|
||||
@ApiModelProperty(value = "角色描述")
|
||||
private String roleDesc;
|
||||
|
||||
private String type;
|
||||
@ApiModelProperty(value = "角色头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "公证事项")
|
||||
private String content;
|
||||
private String emo;
|
||||
|
||||
@ApiModelProperty(value = "用途")
|
||||
private String application;
|
||||
@ApiModelProperty(value = "背景图片")
|
||||
private String bgImage;
|
||||
|
||||
@ApiModelProperty(value = "使用地")
|
||||
private String address;
|
||||
@ApiModelProperty(value = "音色")
|
||||
private String voice;
|
||||
|
||||
@ApiModelProperty(value = "译文")
|
||||
private String translate;
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "文件列表")
|
||||
private String fileList;
|
||||
|
||||
private Integer userId;
|
||||
@ApiModelProperty(value = "提示词")
|
||||
private String prompt;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
@@ -57,13 +55,14 @@ public class LawNotaryList 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 Integer sortNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String content;
|
||||
}
|
||||
+11
-11
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
package com.gxwebsoft.gx.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
@@ -12,29 +12,29 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律计算器配置
|
||||
*
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:23:47
|
||||
* @since 2025-12-02 12:42:39
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalCalType对象", description = "法律计算器配置")
|
||||
@TableName("law_legal_cal_type")
|
||||
public class LawLegalCalType implements Serializable {
|
||||
@ApiModel(value = "GxSignLog对象", description = "")
|
||||
@TableName("gx_sign_log")
|
||||
public class GxSignLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private String icon;
|
||||
private Integer userId;
|
||||
|
||||
private String title;
|
||||
private String date;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
private Integer sortNumber;
|
||||
|
||||
private Integer userId;
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
@@ -43,7 +43,7 @@ public class LawLegalCalType implements Serializable {
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gx.entity.GxChatHistory;
|
||||
import com.gxwebsoft.gx.param.GxChatHistoryParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
public interface GxChatHistoryMapper extends BaseMapper<GxChatHistory> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GxChatHistory>
|
||||
*/
|
||||
List<GxChatHistory> selectPageRel(@Param("page") IPage<GxChatHistory> page,
|
||||
@Param("param") GxChatHistoryParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GxChatHistory> selectListRel(@Param("param") GxChatHistoryParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gx.entity.GxChatList;
|
||||
import com.gxwebsoft.gx.param.GxChatListParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
public interface GxChatListMapper extends BaseMapper<GxChatList> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GxChatList>
|
||||
*/
|
||||
List<GxChatList> selectPageRel(@Param("page") IPage<GxChatList> page,
|
||||
@Param("param") GxChatListParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GxChatList> selectListRel(@Param("param") GxChatListParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gx.entity.GxCoinLog;
|
||||
import com.gxwebsoft.gx.param.GxCoinLogParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 金币记录Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-30 02:03:35
|
||||
*/
|
||||
public interface GxCoinLogMapper extends BaseMapper<GxCoinLog> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GxCoinLog>
|
||||
*/
|
||||
List<GxCoinLog> selectPageRel(@Param("page") IPage<GxCoinLog> page,
|
||||
@Param("param") GxCoinLogParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GxCoinLog> selectListRel(@Param("param") GxCoinLogParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gx.entity.GxFeedback;
|
||||
import com.gxwebsoft.gx.param.GxFeedbackParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-12-02 13:07:28
|
||||
*/
|
||||
public interface GxFeedbackMapper extends BaseMapper<GxFeedback> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GxFeedback>
|
||||
*/
|
||||
List<GxFeedback> selectPageRel(@Param("page") IPage<GxFeedback> page,
|
||||
@Param("param") GxFeedbackParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GxFeedback> selectListRel(@Param("param") GxFeedbackParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gx.entity.GxRole;
|
||||
import com.gxwebsoft.gx.param.GxRoleParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-23 09:34:30
|
||||
*/
|
||||
public interface GxRoleMapper extends BaseMapper<GxRole> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GxRole>
|
||||
*/
|
||||
List<GxRole> selectPageRel(@Param("page") IPage<GxRole> page,
|
||||
@Param("param") GxRoleParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GxRole> selectListRel(@Param("param") GxRoleParam param);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.gxwebsoft.gx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.gx.entity.GxSignLog;
|
||||
import com.gxwebsoft.gx.param.GxSignLogParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Mapper
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-12-02 12:42:39
|
||||
*/
|
||||
public interface GxSignLogMapper extends BaseMapper<GxSignLog> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GxSignLog>
|
||||
*/
|
||||
List<GxSignLog> selectPageRel(@Param("page") IPage<GxSignLog> page,
|
||||
@Param("param") GxSignLogParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GxSignLog> selectListRel(@Param("param") GxSignLogParam param);
|
||||
|
||||
}
|
||||
+20
-8
@@ -1,23 +1,32 @@
|
||||
<?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.gxwebsoft.law.mapper.LawLegalOrgCheckContentSuggestMapper">
|
||||
<mapper namespace="com.gxwebsoft.gx.mapper.GxChatHistoryMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM law_legal_org_check_content_suggest a
|
||||
FROM gx_chat_history a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.groupId != null">
|
||||
AND a.group_id = #{param.groupId}
|
||||
<if test="param.chatId != null">
|
||||
AND a.chat_id = #{param.chatId}
|
||||
</if>
|
||||
<if test="param.conversationId != null">
|
||||
AND a.conversation_id LIKE CONCAT('%', #{param.conversationId}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
<if test="param.reply != null">
|
||||
AND a.reply LIKE CONCAT('%', #{param.reply}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
@@ -25,6 +34,9 @@
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.merchantCode != null">
|
||||
AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
@@ -39,12 +51,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckContentSuggest">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gx.entity.GxChatHistory">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckContentSuggest">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gx.entity.GxChatHistory">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+9
-9
@@ -1,24 +1,24 @@
|
||||
<?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.gxwebsoft.law.mapper.LawLegalCalContentMapper">
|
||||
<mapper namespace="com.gxwebsoft.gx.mapper.GxChatListMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM law_legal_cal_content a
|
||||
FROM gx_chat_list a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.groupId != null">
|
||||
AND a.group_id = #{param.groupId}
|
||||
</if>
|
||||
<if test="param.content != null">
|
||||
AND a.content LIKE CONCAT('%', #{param.content}, '%')
|
||||
<if test="param.conversationId != null">
|
||||
AND a.conversation_id LIKE CONCAT('%', #{param.conversationId}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
@@ -39,12 +39,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalCalContent">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gx.entity.GxChatList">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalCalContent">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gx.entity.GxChatList">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+22
-15
@@ -1,32 +1,32 @@
|
||||
<?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.gxwebsoft.law.mapper.LawLegalOrgCheckConfigSuggestMapper">
|
||||
<mapper namespace="com.gxwebsoft.gx.mapper.GxCoinLogMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM law_legal_org_check_config_suggest a
|
||||
FROM gx_coin_log a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.typeId != null">
|
||||
AND a.type_id = #{param.typeId}
|
||||
<if test="param.orderNo != null">
|
||||
AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%')
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
AND a.parent_id = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.answer != null">
|
||||
AND a.answer LIKE CONCAT('%', #{param.answer}, '%')
|
||||
<if test="param.num != null">
|
||||
AND a.num = #{param.num}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
<if test="param.desc != null">
|
||||
AND a.desc LIKE CONCAT('%', #{param.desc}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
@@ -40,20 +40,27 @@
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.paidNo != null">
|
||||
AND a.paid_no LIKE CONCAT('%', #{param.paidNo}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.id DESC
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckConfigSuggest">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gx.entity.GxCoinLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckConfigSuggest">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gx.entity.GxCoinLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+16
-10
@@ -1,26 +1,32 @@
|
||||
<?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.gxwebsoft.law.mapper.LawLegalOrgCheckTypeMapper">
|
||||
<mapper namespace="com.gxwebsoft.gx.mapper.GxFeedbackMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM law_legal_org_check_type a
|
||||
FROM gx_feedback a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.icon != null">
|
||||
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||
<if test="param.funcExp != null">
|
||||
AND a.func_exp LIKE CONCAT('%', #{param.funcExp}, '%')
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
<if test="param.advisoryExp != null">
|
||||
AND a.advisory_exp LIKE CONCAT('%', #{param.advisoryExp}, '%')
|
||||
</if>
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
@@ -42,12 +48,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckType">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gx.entity.GxFeedback">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckType">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gx.entity.GxFeedback">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+17
-14
@@ -1,29 +1,32 @@
|
||||
<?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.gxwebsoft.law.mapper.LawLegalOrgCheckConfigMapper">
|
||||
<mapper namespace="com.gxwebsoft.gx.mapper.GxRoleMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM law_legal_org_check_config a
|
||||
FROM gx_role a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.typeId != null">
|
||||
AND a.type_id = #{param.typeId}
|
||||
<if test="param.roleName != null">
|
||||
AND a.role_name LIKE CONCAT('%', #{param.roleName}, '%')
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
<if test="param.roleDesc != null">
|
||||
AND a.role_desc LIKE CONCAT('%', #{param.roleDesc}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
<if test="param.avatar != null">
|
||||
AND a.avatar LIKE CONCAT('%', #{param.avatar}, '%')
|
||||
</if>
|
||||
<if test="param.answer != null">
|
||||
AND a.answer LIKE CONCAT('%', #{param.answer}, '%')
|
||||
<if test="param.bgImage != null">
|
||||
AND a.bg_image LIKE CONCAT('%', #{param.bgImage}, '%')
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
<if test="param.voice != null">
|
||||
AND a.voice LIKE CONCAT('%', #{param.voice}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
@@ -45,12 +48,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckConfig">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gx.entity.GxRole">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalOrgCheckConfig">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gx.entity.GxRole">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+10
-10
@@ -1,26 +1,26 @@
|
||||
<?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.gxwebsoft.law.mapper.LawLegalCalTypeMapper">
|
||||
<mapper namespace="com.gxwebsoft.gx.mapper.GxSignLogMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM law_legal_cal_type a
|
||||
FROM gx_sign_log a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.icon != null">
|
||||
AND a.icon LIKE CONCAT('%', #{param.icon}, '%')
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.title != null">
|
||||
AND a.title LIKE CONCAT('%', #{param.title}, '%')
|
||||
<if test="param.date != null">
|
||||
AND a.date LIKE CONCAT('%', #{param.date}, '%')
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
@@ -42,12 +42,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.law.entity.LawLegalCalType">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.gx.entity.GxSignLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.law.entity.LawLegalCalType">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.gx.entity.GxSignLog">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+18
-7
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.param;
|
||||
package com.gxwebsoft.gx.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
@@ -11,31 +11,42 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 用户填写法律意见书内容查询参数
|
||||
* 查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 18:55:31
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "LawLegalOrgCheckContentSuggestParam对象", description = "用户填写法律意见书内容查询参数")
|
||||
public class LawLegalOrgCheckContentSuggestParam extends BaseParam {
|
||||
@ApiModel(value = "GxChatHistoryParam对象", description = "查询参数")
|
||||
public class GxChatHistoryParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer groupId;
|
||||
private Integer chatId;
|
||||
|
||||
private String content;
|
||||
private String conversationId;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
private String content;
|
||||
|
||||
private String reply;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "商户编码")
|
||||
private String merchantCode;
|
||||
|
||||
}
|
||||
+9
-14
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.param;
|
||||
package com.gxwebsoft.gx.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
@@ -14,32 +14,27 @@ import lombok.EqualsAndHashCode;
|
||||
* 查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-14 01:31:54
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "LawOrgPeopleParam对象", description = "查询参数")
|
||||
public class LawOrgPeopleParam extends BaseParam {
|
||||
@ApiModel(value = "GxChatListParam对象", description = "查询参数")
|
||||
public class GxChatListParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer orgId;
|
||||
|
||||
private String name;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String position;
|
||||
|
||||
private String type;
|
||||
private String conversationId;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
+20
-15
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.param;
|
||||
package com.gxwebsoft.gx.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
@@ -11,41 +11,46 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 机构查询参数
|
||||
* 金币记录查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-14 00:35:34
|
||||
* @since 2025-11-30 02:03:35
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "LawOrgParam对象", description = "机构查询参数")
|
||||
public class LawOrgParam extends BaseParam {
|
||||
@ApiModel(value = "GxCoinLogParam对象", description = "金币记录查询参数")
|
||||
public class GxCoinLogParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
private String orderNo;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "+/-")
|
||||
private String type;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer provinceId;
|
||||
private Integer num;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String desc;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer cityId;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer areaId;
|
||||
|
||||
private String lat;
|
||||
|
||||
private String lng;
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
private String paidNo;
|
||||
|
||||
@ApiModelProperty(value = "0待支付 1已支付")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
+17
-10
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.param;
|
||||
package com.gxwebsoft.gx.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
@@ -11,32 +11,39 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律意见书配置查询参数
|
||||
* 查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 18:55:31
|
||||
* @since 2025-12-02 13:07:28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "LawLegalOrgCheckTypeSuggestParam对象", description = "法律意见书配置查询参数")
|
||||
public class LawLegalOrgCheckTypeSuggestParam extends BaseParam {
|
||||
@ApiModel(value = "GxFeedbackParam对象", description = "查询参数")
|
||||
public class GxFeedbackParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
private String icon;
|
||||
@ApiModelProperty(value = "功能体验")
|
||||
private String funcExp;
|
||||
|
||||
private String title;
|
||||
@ApiModelProperty(value = "咨询体验")
|
||||
private String advisoryExp;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
private String comments;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
+22
-12
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.param;
|
||||
package com.gxwebsoft.gx.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
@@ -11,34 +11,44 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律计算器配置查询参数
|
||||
* 查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:23:47
|
||||
* @since 2025-11-23 09:34:30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "LawLegalCalTypeParam对象", description = "法律计算器配置查询参数")
|
||||
public class LawLegalCalTypeParam extends BaseParam {
|
||||
@ApiModel(value = "GxRoleParam对象", description = "查询参数")
|
||||
public class GxRoleParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
private String icon;
|
||||
@ApiModelProperty(value = "角色名称")
|
||||
private String roleName;
|
||||
|
||||
private String title;
|
||||
@ApiModelProperty(value = "角色描述")
|
||||
private String roleDesc;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@ApiModelProperty(value = "角色头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "背景图片")
|
||||
private String bgImage;
|
||||
|
||||
@ApiModelProperty(value = "音色")
|
||||
private String voice;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
private Integer sortNumber;
|
||||
|
||||
}
|
||||
+10
-9
@@ -1,4 +1,4 @@
|
||||
package com.gxwebsoft.law.param;
|
||||
package com.gxwebsoft.gx.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
@@ -11,31 +11,32 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律文书配置查询参数
|
||||
* 查询参数
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:06:41
|
||||
* @since 2025-12-02 12:42:39
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "LawLegalDocTypeParam对象", description = "法律文书配置查询参数")
|
||||
public class LawLegalDocTypeParam extends BaseParam {
|
||||
@ApiModel(value = "GxSignLogParam对象", description = "查询参数")
|
||||
public class GxSignLogParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
private String icon;
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
private String title;
|
||||
private String date;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.gx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gx.entity.GxChatHistory;
|
||||
import com.gxwebsoft.gx.param.GxChatHistoryParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
public interface GxChatHistoryService extends IService<GxChatHistory> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GxChatHistory>
|
||||
*/
|
||||
PageResult<GxChatHistory> pageRel(GxChatHistoryParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GxChatHistory>
|
||||
*/
|
||||
List<GxChatHistory> listRel(GxChatHistoryParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GxChatHistory
|
||||
*/
|
||||
GxChatHistory getByIdRel(Integer id);
|
||||
|
||||
GxChatHistory getLast(Integer chatId);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.gx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gx.entity.GxChatList;
|
||||
import com.gxwebsoft.gx.param.GxChatListParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
public interface GxChatListService extends IService<GxChatList> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GxChatList>
|
||||
*/
|
||||
PageResult<GxChatList> pageRel(GxChatListParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GxChatList>
|
||||
*/
|
||||
List<GxChatList> listRel(GxChatListParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GxChatList
|
||||
*/
|
||||
GxChatList getByIdRel(Integer id);
|
||||
|
||||
void updateConversationId(Integer chatId, String conversationId);
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.gx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gx.entity.GxCoinLog;
|
||||
import com.gxwebsoft.gx.param.GxCoinLogParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 金币记录Service
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-30 02:03:35
|
||||
*/
|
||||
public interface GxCoinLogService extends IService<GxCoinLog> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GxCoinLog>
|
||||
*/
|
||||
PageResult<GxCoinLog> pageRel(GxCoinLogParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GxCoinLog>
|
||||
*/
|
||||
List<GxCoinLog> listRel(GxCoinLogParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GxCoinLog
|
||||
*/
|
||||
GxCoinLog getByIdRel(Integer id);
|
||||
|
||||
GxCoinLog getByOrderNo(String orderNo);
|
||||
|
||||
Integer getLogNumByDesc(Integer userId, String desc);
|
||||
|
||||
Integer getLogNumByDesc(Integer userId, String desc, String date);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.gx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gx.entity.GxFeedback;
|
||||
import com.gxwebsoft.gx.param.GxFeedbackParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-12-02 13:07:28
|
||||
*/
|
||||
public interface GxFeedbackService extends IService<GxFeedback> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GxFeedback>
|
||||
*/
|
||||
PageResult<GxFeedback> pageRel(GxFeedbackParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GxFeedback>
|
||||
*/
|
||||
List<GxFeedback> listRel(GxFeedbackParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GxFeedback
|
||||
*/
|
||||
GxFeedback getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.gx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gx.entity.GxRole;
|
||||
import com.gxwebsoft.gx.param.GxRoleParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-23 09:34:30
|
||||
*/
|
||||
public interface GxRoleService extends IService<GxRole> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GxRole>
|
||||
*/
|
||||
PageResult<GxRole> pageRel(GxRoleParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GxRole>
|
||||
*/
|
||||
List<GxRole> listRel(GxRoleParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GxRole
|
||||
*/
|
||||
GxRole getByIdRel(Integer id);
|
||||
|
||||
GxRole getByRoleName(String roleName);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.gxwebsoft.gx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gx.entity.GxSignLog;
|
||||
import com.gxwebsoft.gx.param.GxSignLogParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-12-02 12:42:39
|
||||
*/
|
||||
public interface GxSignLogService extends IService<GxSignLog> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GxSignLog>
|
||||
*/
|
||||
PageResult<GxSignLog> pageRel(GxSignLogParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GxSignLog>
|
||||
*/
|
||||
List<GxSignLog> listRel(GxSignLogParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GxSignLog
|
||||
*/
|
||||
GxSignLog getByIdRel(Integer id);
|
||||
|
||||
GxSignLog check(Integer userId, String date);
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.gxwebsoft.gx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.gx.mapper.GxChatHistoryMapper;
|
||||
import com.gxwebsoft.gx.service.GxChatHistoryService;
|
||||
import com.gxwebsoft.gx.entity.GxChatHistory;
|
||||
import com.gxwebsoft.gx.param.GxChatHistoryParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service实现
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
@Service
|
||||
public class GxChatHistoryServiceImpl extends ServiceImpl<GxChatHistoryMapper, GxChatHistory> implements GxChatHistoryService {
|
||||
|
||||
@Override
|
||||
public PageResult<GxChatHistory> pageRel(GxChatHistoryParam param) {
|
||||
PageParam<GxChatHistory, GxChatHistoryParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<GxChatHistory> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GxChatHistory> listRel(GxChatHistoryParam param) {
|
||||
List<GxChatHistory> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GxChatHistory, GxChatHistoryParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxChatHistory getByIdRel(Integer id) {
|
||||
GxChatHistoryParam param = new GxChatHistoryParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxChatHistory getLast(Integer chatId) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<GxChatHistory>()
|
||||
.eq(GxChatHistory::getChatId, chatId)
|
||||
.orderByDesc(GxChatHistory::getCreateTime)
|
||||
.last("limit 1")
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.gxwebsoft.gx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.gx.mapper.GxChatListMapper;
|
||||
import com.gxwebsoft.gx.service.GxChatHistoryService;
|
||||
import com.gxwebsoft.gx.service.GxChatListService;
|
||||
import com.gxwebsoft.gx.entity.GxChatList;
|
||||
import com.gxwebsoft.gx.param.GxChatListParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.gx.service.GxRoleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service实现
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-21 12:57:25
|
||||
*/
|
||||
@Service
|
||||
public class GxChatListServiceImpl extends ServiceImpl<GxChatListMapper, GxChatList> implements GxChatListService {
|
||||
@Resource
|
||||
private GxChatHistoryService gxChatHistoryService;
|
||||
@Resource
|
||||
private GxRoleService gxRoleService;
|
||||
|
||||
@Override
|
||||
public PageResult<GxChatList> pageRel(GxChatListParam param) {
|
||||
PageParam<GxChatList, GxChatListParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<GxChatList> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GxChatList> listRel(GxChatListParam param) {
|
||||
List<GxChatList> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GxChatList, GxChatListParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
for (GxChatList record : list) {
|
||||
record.setLastMessage(gxChatHistoryService.getLast(record.getId()));
|
||||
record.setRole(gxRoleService.getById(record.getRoleId()));
|
||||
}
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxChatList getByIdRel(Integer id) {
|
||||
GxChatListParam param = new GxChatListParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConversationId(Integer chatId, String conversationId) {
|
||||
update(
|
||||
new LambdaUpdateWrapper<GxChatList>()
|
||||
.eq(GxChatList::getId, chatId)
|
||||
.set(GxChatList::getConversationId, conversationId)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.gxwebsoft.gx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.gx.mapper.GxCoinLogMapper;
|
||||
import com.gxwebsoft.gx.service.GxCoinLogService;
|
||||
import com.gxwebsoft.gx.entity.GxCoinLog;
|
||||
import com.gxwebsoft.gx.param.GxCoinLogParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 金币记录Service实现
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-30 02:03:35
|
||||
*/
|
||||
@Service
|
||||
public class GxCoinLogServiceImpl extends ServiceImpl<GxCoinLogMapper, GxCoinLog> implements GxCoinLogService {
|
||||
|
||||
@Override
|
||||
public PageResult<GxCoinLog> pageRel(GxCoinLogParam param) {
|
||||
PageParam<GxCoinLog, GxCoinLogParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<GxCoinLog> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GxCoinLog> listRel(GxCoinLogParam param) {
|
||||
List<GxCoinLog> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GxCoinLog, GxCoinLogParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxCoinLog getByIdRel(Integer id) {
|
||||
GxCoinLogParam param = new GxCoinLogParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxCoinLog getByOrderNo(String orderNo) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<GxCoinLog>()
|
||||
.eq(GxCoinLog::getOrderNo, orderNo)
|
||||
.last("limit 1")
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getLogNumByDesc(Integer userId, String desc){
|
||||
return count(
|
||||
new LambdaQueryWrapper<GxCoinLog>()
|
||||
.eq(GxCoinLog::getUserId, userId)
|
||||
.eq(GxCoinLog::getDesc, desc)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getLogNumByDesc(Integer userId, String desc, String date){
|
||||
return count(
|
||||
new LambdaQueryWrapper<GxCoinLog>()
|
||||
.eq(GxCoinLog::getUserId, userId)
|
||||
.eq(GxCoinLog::getDesc, desc)
|
||||
.eq(GxCoinLog::getDate, date)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.gx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.gx.mapper.GxFeedbackMapper;
|
||||
import com.gxwebsoft.gx.service.GxFeedbackService;
|
||||
import com.gxwebsoft.gx.entity.GxFeedback;
|
||||
import com.gxwebsoft.gx.param.GxFeedbackParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service实现
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-12-02 13:07:28
|
||||
*/
|
||||
@Service
|
||||
public class GxFeedbackServiceImpl extends ServiceImpl<GxFeedbackMapper, GxFeedback> implements GxFeedbackService {
|
||||
|
||||
@Override
|
||||
public PageResult<GxFeedback> pageRel(GxFeedbackParam param) {
|
||||
PageParam<GxFeedback, GxFeedbackParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GxFeedback> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GxFeedback> listRel(GxFeedbackParam param) {
|
||||
List<GxFeedback> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GxFeedback, GxFeedbackParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxFeedback getByIdRel(Integer id) {
|
||||
GxFeedbackParam param = new GxFeedbackParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.gxwebsoft.gx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.gx.mapper.GxRoleMapper;
|
||||
import com.gxwebsoft.gx.service.GxRoleService;
|
||||
import com.gxwebsoft.gx.entity.GxRole;
|
||||
import com.gxwebsoft.gx.param.GxRoleParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service实现
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-11-23 09:34:30
|
||||
*/
|
||||
@Service
|
||||
public class GxRoleServiceImpl extends ServiceImpl<GxRoleMapper, GxRole> implements GxRoleService {
|
||||
|
||||
@Override
|
||||
public PageResult<GxRole> pageRel(GxRoleParam param) {
|
||||
PageParam<GxRole, GxRoleParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GxRole> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GxRole> listRel(GxRoleParam param) {
|
||||
List<GxRole> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GxRole, GxRoleParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxRole getByIdRel(Integer id) {
|
||||
GxRoleParam param = new GxRoleParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxRole getByRoleName(String roleName) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<GxRole>()
|
||||
.eq(GxRole::getRoleName, roleName)
|
||||
.last("limit 1")
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.gxwebsoft.gx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.gx.mapper.GxSignLogMapper;
|
||||
import com.gxwebsoft.gx.service.GxSignLogService;
|
||||
import com.gxwebsoft.gx.entity.GxSignLog;
|
||||
import com.gxwebsoft.gx.param.GxSignLogParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Service实现
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-12-02 12:42:39
|
||||
*/
|
||||
@Service
|
||||
public class GxSignLogServiceImpl extends ServiceImpl<GxSignLogMapper, GxSignLog> implements GxSignLogService {
|
||||
|
||||
@Override
|
||||
public PageResult<GxSignLog> pageRel(GxSignLogParam param) {
|
||||
PageParam<GxSignLog, GxSignLogParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GxSignLog> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GxSignLog> listRel(GxSignLogParam param) {
|
||||
List<GxSignLog> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GxSignLog, GxSignLogParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxSignLog getByIdRel(Integer id) {
|
||||
GxSignLogParam param = new GxSignLogParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public GxSignLog check(Integer userId, String date) {
|
||||
return getOne(
|
||||
new LambdaQueryWrapper<GxSignLog>()
|
||||
.eq(GxSignLog::getUserId, userId)
|
||||
.eq(GxSignLog::getDate, date)
|
||||
.last("limit 1")
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,31 +1,32 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.toolkit.sql.StringEscape;
|
||||
import com.gxwebsoft.common.core.utils.JSONUtil;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.gx.entity.GxChatHistory;
|
||||
import com.gxwebsoft.gx.entity.GxChatList;
|
||||
import com.gxwebsoft.gx.entity.GxRole;
|
||||
import com.gxwebsoft.gx.service.GxChatHistoryService;
|
||||
import com.gxwebsoft.gx.service.GxChatListService;
|
||||
import com.gxwebsoft.gx.service.GxRoleService;
|
||||
import com.gxwebsoft.law.config.WebSocketServer;
|
||||
import com.gxwebsoft.law.entity.ChatMessage;
|
||||
import com.gxwebsoft.law.entity.ChatResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -35,47 +36,87 @@ import java.util.Map;
|
||||
public class AiController extends BaseController {
|
||||
@Resource
|
||||
private WebSocketServer webSocketServer;
|
||||
@Resource
|
||||
private GxChatHistoryService gxChatHistoryService;
|
||||
@Resource
|
||||
private GxChatListService gxChatListService;
|
||||
@Resource
|
||||
private GxRoleService gxRoleService;
|
||||
|
||||
@PostMapping("/message")
|
||||
public ApiResult<?> message(@RequestBody ChatMessage message) throws IOException {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("query", message.getQuery());
|
||||
params.put("user", getLoginUserId());
|
||||
params.put("response_mode", "streaming");
|
||||
String token = "Bearer app-UxV82WXIRrScpf53exkJ7dIw";
|
||||
if (message.getType() != null) {
|
||||
token = "Bearer app-7AFseF5UTEJpZGkW93S0wybh";
|
||||
}
|
||||
if (message.getInputs() != null) {
|
||||
Map<String, Object> inputs = new HashMap<>();
|
||||
inputs.put("request_type", message.getRequestType());
|
||||
inputs.put("request_json", message.getInputs());
|
||||
params.put("inputs", inputs);
|
||||
} else {
|
||||
params.put("inputs", new HashMap<>());
|
||||
}
|
||||
Map<String, String> paramsJsonStr = new HashMap<>();
|
||||
GxRole gxRole = gxRoleService.getByRoleName(message.getRoleName());
|
||||
// Map<String, String> inputs = new HashMap<>();
|
||||
paramsJsonStr.put("query", message.getQuery());
|
||||
paramsJsonStr.put("role_name", message.getRoleName());
|
||||
paramsJsonStr.put("role_desc", gxRole.getPrompt() != null ? gxRole.getPrompt() : gxRole.getRoleDesc());
|
||||
String userInfo = "";
|
||||
User user = getLoginUser();
|
||||
if (user.getRealName() != null && !user.getRealName().isEmpty())
|
||||
userInfo = "姓名:" + user.getRealName();
|
||||
if (user.getSex() != null && !user.getSex().isEmpty())
|
||||
userInfo += ",性别:" + (user.getSex().equals("0") ? "男" : "女");
|
||||
if (user.getBirthday() != null)
|
||||
userInfo += ",出生日期:" + user.getBirthday();
|
||||
if (user.getBirthTime() != null)
|
||||
userInfo += ",生辰:" + user.getBirthTime();
|
||||
if (user.getBirthAddress() != null && !user.getBirthAddress().isEmpty())
|
||||
userInfo += ",出生地:" + user.getBirthAddress();
|
||||
paramsJsonStr.put("user_info", userInfo);
|
||||
|
||||
Map<String, String> formData = new HashMap<>();
|
||||
formData.put("user", getLoginUserId().toString());
|
||||
if (message.getConversationId() != null) paramsJsonStr.put("conversation_id", message.getConversationId());
|
||||
// formData.put("inputs", JSONUtil.toJSONString(inputs));
|
||||
formData.put("responseMode", "streaming");
|
||||
formData.put("paramsJsonStr", JSONUtil.toJSONString(paramsJsonStr));
|
||||
formData.put("authCode", "0e3909ca-b9b0-4c61-b555-a98523b68d51");
|
||||
// 使用 Java 自带的 HttpURLConnection 发送流式请求
|
||||
System.out.println("paramsJsonStr: " + JSONUtil.toJSONString(formData));
|
||||
try {
|
||||
URL url = new URL("http://workflow.gxshucheng.com:8010/v1/chat-messages");
|
||||
URL url = new URL("https://ai-console.gxshucheng.com/ai-console-api/run/v1");
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setRequestMethod("POST");
|
||||
connection.setRequestProperty("Authorization", token);
|
||||
connection.setRequestProperty("Content-Type", "application/json");
|
||||
connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
|
||||
connection.setDoOutput(true);
|
||||
connection.setConnectTimeout(600000);
|
||||
connection.setReadTimeout(600000);
|
||||
|
||||
// 写入请求体
|
||||
try (OutputStream os = connection.getOutputStream()) {
|
||||
os.write(JSONUtil.toJSONString(params).getBytes(StandardCharsets.UTF_8));
|
||||
try (OutputStream os = connection.getOutputStream();
|
||||
PrintWriter writer = new PrintWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) {
|
||||
for (Map.Entry<String, String> entry : formData.entrySet()) {
|
||||
writeFormField(writer, entry.getKey(), entry.getValue());
|
||||
}
|
||||
// 添加文件上传部分(可选)
|
||||
// writeFilePart(writer, "file", "test.txt", "text/plain", "This is the file content.");
|
||||
writer.append("--").append(boundary).append("--").append("\r\n");
|
||||
writer.flush();
|
||||
}
|
||||
|
||||
StringBuilder responseStr = new StringBuilder();
|
||||
// 读取响应流
|
||||
try (BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {
|
||||
String line;
|
||||
Integer chatId = message.getChatId();
|
||||
if (chatId == null || chatId == 0) {
|
||||
GxChatList gxChatList = new GxChatList();
|
||||
gxChatList.setUserId(getLoginUserId());
|
||||
gxChatListService.save(gxChatList);
|
||||
chatId = gxChatList.getId();
|
||||
}
|
||||
|
||||
GxChatHistory gxChatHistory = new GxChatHistory();
|
||||
gxChatHistory.setUserId(getLoginUserId());
|
||||
gxChatHistory.setContent(message.getQuery());
|
||||
gxChatHistory.setChatId(chatId);
|
||||
|
||||
StringBuilder reply = new StringBuilder();
|
||||
int flag = 0;
|
||||
int saveFlag = 0;
|
||||
while ((line = br.readLine()) != null) {
|
||||
System.out.println("Received chunk: " + line); // 打印接收到的每一部分数据
|
||||
System.out.println(LocalDateTimeUtil.format(LocalDateTimeUtil.now(), "yyyy-MM-dd HH:mm:ss") + " Received chunk: " + line); // 打印接收到的每一部分数据
|
||||
// 这里可以对每一部分数据进行处理,例如解析或发送给前端
|
||||
if (!line.isEmpty()) {
|
||||
String[] dataList = line.split("data: ");
|
||||
@@ -84,21 +125,54 @@ public class AiController extends BaseController {
|
||||
Map data = JSONUtil.parseObject(dataList[1], Map.class);
|
||||
if (data.get("event") != null && data.get("event").equals("message")) {
|
||||
String answer = (String) data.get("answer");
|
||||
String conversation_id = (String) data.get("conversation_id");
|
||||
String task_id = (String) data.get("task_id");
|
||||
if (answer != null && !answer.isEmpty()) {
|
||||
if (flag == 0) {
|
||||
flag = 1;
|
||||
gxChatListService.updateConversationId(chatId, conversation_id);
|
||||
}
|
||||
if (answer != null && !answer.isEmpty() && !answer.contains("搜索中")) {
|
||||
HashMap<String, String> answerData = new HashMap<>();
|
||||
answerData.put("answer", answer);
|
||||
answerData.put("taskId", task_id);
|
||||
webSocketServer.sendMessage(message.getUser(), JSONUtil.toJSONString(answerData));
|
||||
answerData.put("taskId", conversation_id);
|
||||
answerData.put("taskIdOrigin", task_id);
|
||||
webSocketServer.sendMessage(getLoginUserId().toString(), JSONUtil.toJSONString(answerData));
|
||||
}
|
||||
System.out.println(answer);
|
||||
System.out.println("answer: " + answer);
|
||||
responseStr.append(answer);
|
||||
}else if (data.get("event") != null && data.get("event").equals("message_end")) {
|
||||
reply.append(answer);
|
||||
} else if (data.get("event") != null && data.get("event").equals("agent_log")) {
|
||||
String answer = (String) data.get("answer");
|
||||
String conversation_id = (String) data.get("conversation_id");
|
||||
String task_id = (String) data.get("task_id");
|
||||
HashMap<String, String> answerData = new HashMap<>();
|
||||
answerData.put("answer", answer);
|
||||
answerData.put("loading", "true");
|
||||
answerData.put("taskId", conversation_id);
|
||||
answerData.put("taskIdOrigin", task_id);
|
||||
webSocketServer.sendMessage(getLoginUserId().toString(), JSONUtil.toJSONString(answerData));
|
||||
} else if (data.get("event") != null && data.get("event").equals("workflow_finished")) {
|
||||
String conversation_id = (String) data.get("conversation_id");
|
||||
String task_id = (String) data.get("task_id");
|
||||
|
||||
HashMap<String, String> answerData = new HashMap<>();
|
||||
answerData.put("answer", "__END__");
|
||||
answerData.put("taskId", task_id);
|
||||
webSocketServer.sendMessage(message.getUser(), JSONUtil.toJSONString(answerData));
|
||||
answerData.put("taskId", conversation_id);
|
||||
answerData.put("taskIdOrigin", task_id);
|
||||
if (saveFlag == 0) {
|
||||
saveFlag = 1;
|
||||
// gxChatHistory.setReply(reply.toString());
|
||||
// gxChatHistoryService.save(gxChatHistory);
|
||||
webSocketServer.sendMessage(getLoginUserId().toString(), JSONUtil.toJSONString(answerData));
|
||||
}
|
||||
}
|
||||
}else {
|
||||
Map data = JSONUtil.parseObject(dataList[0], Map.class);
|
||||
if (data.get("status") != null && data.get("status").equals(500)) {
|
||||
HashMap<String, String> answerData = new HashMap<>();
|
||||
answerData.put("answer", "出错了,请晚点再来提问吧~");
|
||||
answerData.put("taskId", "0");
|
||||
webSocketServer.sendMessage(getLoginUserId().toString(), JSONUtil.toJSONString(answerData));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,7 +183,11 @@ public class AiController extends BaseController {
|
||||
for (StackTraceElement stackTraceElement : e.getStackTrace()) {
|
||||
System.out.println(stackTraceElement);
|
||||
}
|
||||
webSocketServer.sendMessage(message.getUser(), "出错了,请晚点再来提问吧~");
|
||||
HashMap<String, String> answerData = new HashMap<>();
|
||||
answerData.put("answer", "出错了,请晚点再来提问吧~");
|
||||
answerData.put("taskId", "0");
|
||||
webSocketServer.sendMessage(getLoginUserId().toString(), JSONUtil.toJSONString(answerData));
|
||||
// webSocketServer.sendMessage(getLoginUserId().toString(), "出错了,请晚点再来提问吧~");
|
||||
return fail("出错了,请晚点再来提问吧~");
|
||||
}
|
||||
|
||||
@@ -117,17 +195,29 @@ public class AiController extends BaseController {
|
||||
return success("Stream processing completed");
|
||||
}
|
||||
|
||||
private static final String boundary = "---" + System.currentTimeMillis() + "---";
|
||||
|
||||
private static void writeFormField(PrintWriter writer, String fieldName, String value) {
|
||||
writer.append("--").append(boundary).append("\r\n");
|
||||
writer.append("Content-Disposition: form-data; name=\"").append(fieldName).append("\"\r\n");
|
||||
writer.append("\r\n");
|
||||
writer.append(value).append("\r\n");
|
||||
}
|
||||
|
||||
@PostMapping("/messageStop")
|
||||
public ApiResult<?> stop(@RequestBody Map<String, Object> data) {
|
||||
if (data.get("taskId") == null) return success();
|
||||
String taskId = data.get("taskId").toString();
|
||||
Map<String, Integer> postData = new HashMap<>();
|
||||
Map<String, Object> postData = new HashMap<>();
|
||||
postData.put("user", getLoginUserId());
|
||||
postData.put("taskId", taskId);
|
||||
postData.put("authCode", "0e3909ca-b9b0-4c61-b555-a98523b68d51");
|
||||
String token = "Bearer app-UxV82WXIRrScpf53exkJ7dIw";
|
||||
if (data.get("type") != null) {
|
||||
token = "Bearer app-7AFseF5UTEJpZGkW93S0wybh";
|
||||
}
|
||||
String res = HttpRequest.post("http://workflow.gxshucheng.com:8010/v1/chat-messages/" + taskId + "/stop")
|
||||
System.out.println("stop payload:" + postData);
|
||||
String res = HttpRequest.post("https://ai-console.gxshucheng.com/ai-console-api/stop/v1")
|
||||
.header("Authorization", token)
|
||||
.header("Content-Type", "application/json")
|
||||
.body(JSONObject.toJSONString(postData))
|
||||
|
||||
@@ -1,207 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalAidService;
|
||||
import com.gxwebsoft.law.entity.LawLegalAid;
|
||||
import com.gxwebsoft.law.param.LawLegalAidParam;
|
||||
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.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTable;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 法律援助申请控制器
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 17:33:28
|
||||
*/
|
||||
@Api(tags = "法律援助申请管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-aid")
|
||||
public class LawLegalAidController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalAidService lawLegalAidService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
@Value("${config.server-url}")
|
||||
private String serverUrl;
|
||||
|
||||
@ApiOperation("分页查询法律援助申请")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalAid>> page(LawLegalAidParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalAidService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部法律援助申请")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalAid>> list(LawLegalAidParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalAidService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawLegalAid:list')")
|
||||
@ApiOperation("根据id查询法律援助申请")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalAid> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalAidService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加法律援助申请")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalAid lawLegalAid) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalAid.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalAidService.save(lawLegalAid)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改法律援助申请")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalAid lawLegalAid) {
|
||||
if (lawLegalAidService.updateById(lawLegalAid)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除法律援助申请")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalAidService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加法律援助申请")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalAid> list) {
|
||||
if (lawLegalAidService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改法律援助申请")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalAid> batchParam) {
|
||||
if (batchParam.update(lawLegalAidService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除法律援助申请")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalAidService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("导出")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export() throws IOException {
|
||||
List<LawLegalAid> list = lawLegalAidService.list();
|
||||
XWPFDocument doc = new XWPFDocument(Files.newInputStream(Paths.get(uploadPath + "/file/法律援助申请表.docx")));
|
||||
List<String> pathList = new ArrayList<>();
|
||||
for (LawLegalAid lawLegalAid : list) {
|
||||
String outputPath = uploadPath + "file/doc/法律援助申请表/" + lawLegalAid.getName() + "-" + lawLegalAid.getId() + ".docx";
|
||||
pathList.add(outputPath);
|
||||
FileOutputStream fos = new FileOutputStream(outputPath);
|
||||
List<XWPFTable> tables = doc.getTables();
|
||||
XWPFTable table = tables.get(0);
|
||||
for (int i = 0; i < table.getRows().size(); i++) {
|
||||
XWPFTableRow row = table.getRow(i);
|
||||
switch (i) {
|
||||
case 0: {
|
||||
row.getCell(2).setText(lawLegalAid.getName());
|
||||
row.getCell(4).setText(lawLegalAid.getGender().equals(0) ? "男" : "女");
|
||||
row.getCell(6).setText(lawLegalAid.getNation());
|
||||
}
|
||||
break;
|
||||
case 1: {
|
||||
row.getCell(2).setText("身份证 " + lawLegalAid.getIdCard());
|
||||
}
|
||||
break;
|
||||
case 2: {
|
||||
row.getCell(2).setText(lawLegalAid.getHouseholdAddress());
|
||||
}
|
||||
break;
|
||||
case 3: {
|
||||
row.getCell(2).setText(lawLegalAid.getLiveAddress());
|
||||
}
|
||||
break;
|
||||
case 5: {
|
||||
row.getCell(2).setText(lawLegalAid.getCompanyName());
|
||||
}
|
||||
break;
|
||||
case 6: {
|
||||
row.getCell(2).setText(lawLegalAid.getPhone());
|
||||
}
|
||||
break;
|
||||
case 7: {
|
||||
row.getCell(2).setText(lawLegalAid.getEmail());
|
||||
}
|
||||
break;
|
||||
case 9: {
|
||||
if (lawLegalAid.getProxyName() != null && !lawLegalAid.getProxyName().isEmpty())
|
||||
row.getCell(2).setText(lawLegalAid.getProxyName());
|
||||
if (lawLegalAid.getProxyRelation() != null && !lawLegalAid.getProxyRelation().isEmpty())
|
||||
row.getCell(4).setText(lawLegalAid.getProxyRelation());
|
||||
if (lawLegalAid.getProxyPhone() != null && !lawLegalAid.getProxyPhone().isEmpty())
|
||||
row.getCell(6).setText(lawLegalAid.getProxyPhone());
|
||||
}
|
||||
break;
|
||||
case 10: {
|
||||
if (lawLegalAid.getProxyIdCard() != null && !lawLegalAid.getProxyIdCard().isEmpty())
|
||||
row.getCell(2).setText("身份证 " + lawLegalAid.getProxyIdCard());
|
||||
}
|
||||
break;
|
||||
case 12: {
|
||||
row.getCell(1).setText(lawLegalAid.getContent());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
doc.write(fos);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
}
|
||||
ZipUtil.zip(uploadPath + "file/doc/法律援助申请表");
|
||||
for (String path : pathList) {
|
||||
FileUtil.del(path);
|
||||
}
|
||||
return success("导出成功", serverUrl + "/file/doc/法律援助申请表.zip");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalAppraisalService;
|
||||
import com.gxwebsoft.law.entity.LawLegalAppraisal;
|
||||
import com.gxwebsoft.law.param.LawLegalAppraisalParam;
|
||||
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-05-06 17:11:41
|
||||
*/
|
||||
@Api(tags = "司法鉴定申请管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-appraisal")
|
||||
public class LawLegalAppraisalController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalAppraisalService lawLegalAppraisalService;
|
||||
|
||||
@ApiOperation("分页查询司法鉴定申请")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalAppraisal>> page(LawLegalAppraisalParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalAppraisalService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部司法鉴定申请")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalAppraisal>> list(LawLegalAppraisalParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalAppraisalService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawLegalAppraisal:list')")
|
||||
@ApiOperation("根据id查询司法鉴定申请")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalAppraisal> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalAppraisalService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加司法鉴定申请")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalAppraisal lawLegalAppraisal) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalAppraisal.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalAppraisalService.save(lawLegalAppraisal)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改司法鉴定申请")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalAppraisal lawLegalAppraisal) {
|
||||
if (lawLegalAppraisalService.updateById(lawLegalAppraisal)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除司法鉴定申请")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalAppraisalService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加司法鉴定申请")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalAppraisal> list) {
|
||||
if (lawLegalAppraisalService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改司法鉴定申请")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalAppraisal> batchParam) {
|
||||
if (batchParam.update(lawLegalAppraisalService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除司法鉴定申请")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalAppraisalService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,223 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.ZipUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.entity.LawLegalAid;
|
||||
import com.gxwebsoft.law.service.LawLegalArbitrateService;
|
||||
import com.gxwebsoft.law.entity.LawLegalArbitrate;
|
||||
import com.gxwebsoft.law.param.LawLegalArbitrateParam;
|
||||
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.apache.poi.xwpf.usermodel.*;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 法律仲裁申请控制器
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-05-06 15:56:26
|
||||
*/
|
||||
@Api(tags = "法律仲裁申请管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-arbitrate")
|
||||
public class LawLegalArbitrateController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalArbitrateService lawLegalArbitrateService;
|
||||
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
@Value("${config.server-url}")
|
||||
private String serverUrl;
|
||||
|
||||
@ApiOperation("分页查询法律仲裁申请")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalArbitrate>> page(LawLegalArbitrateParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalArbitrateService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部法律仲裁申请")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalArbitrate>> list(LawLegalArbitrateParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalArbitrateService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawLegalArbitrate:list')")
|
||||
@ApiOperation("根据id查询法律仲裁申请")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalArbitrate> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalArbitrateService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加法律仲裁申请")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalArbitrate lawLegalArbitrate) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalArbitrate.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalArbitrateService.save(lawLegalArbitrate)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改法律仲裁申请")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalArbitrate lawLegalArbitrate) {
|
||||
if (lawLegalArbitrateService.updateById(lawLegalArbitrate)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除法律仲裁申请")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalArbitrateService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加法律仲裁申请")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalArbitrate> list) {
|
||||
if (lawLegalArbitrateService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改法律仲裁申请")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalArbitrate> batchParam) {
|
||||
if (batchParam.update(lawLegalArbitrateService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除法律仲裁申请")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalArbitrateService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("导出")
|
||||
@PostMapping("/export")
|
||||
public ApiResult<?> export() throws IOException {
|
||||
List<LawLegalArbitrate> list = lawLegalArbitrateService.list();
|
||||
List<String> pathList = new ArrayList<>();
|
||||
for (LawLegalArbitrate lawLegalArbitrate : list) {
|
||||
XWPFDocument doc = new XWPFDocument();
|
||||
String outputPath = uploadPath + "file/doc/仲裁申请书/" + lawLegalArbitrate.getName() + "-" + lawLegalArbitrate.getId() + ".docx";
|
||||
pathList.add(outputPath);
|
||||
FileOutputStream fos = new FileOutputStream(outputPath);
|
||||
XWPFParagraph paragraph = doc.createParagraph();
|
||||
paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
XWPFRun titleRun = paragraph.createRun();
|
||||
titleRun.setFontFamily("宋体");
|
||||
titleRun.setBold(true);
|
||||
titleRun.setFontSize(26f);
|
||||
titleRun.setText("仲裁申请书");
|
||||
|
||||
String line0 = " 申请人:";
|
||||
line0 += lawLegalArbitrate.getName() + ",";
|
||||
line0 += lawLegalArbitrate.getGender().equals(0) ? "男," : "女,";
|
||||
line0 += lawLegalArbitrate.getBirthday() + "出生,";
|
||||
line0 += (lawLegalArbitrate.getNation().contains("族") ? lawLegalArbitrate.getNation() : lawLegalArbitrate.getNation() + "族") + ",";
|
||||
line0 += "住" + lawLegalArbitrate.getLiveAddress() + ",";
|
||||
line0 += "身份证号码:" + lawLegalArbitrate.getIdCard() + ",";
|
||||
line0 += "联系电话:" + lawLegalArbitrate.getPhone() + "。";
|
||||
setContent(doc, line0);
|
||||
|
||||
String line1 = " 被申请人:";
|
||||
line1 += lawLegalArbitrate.getBeenName() + ",";
|
||||
line1 += "住所地:" + lawLegalArbitrate.getBeenAddress() + "。";
|
||||
line1 += "统一社会信用代码:" + lawLegalArbitrate.getBeenCode() + "。";
|
||||
line1 += "联系电话:" + lawLegalArbitrate.getBeenPhone() + "。";
|
||||
setContent(doc, line1);
|
||||
|
||||
String line2 = " 法定代表人:";
|
||||
line2 += lawLegalArbitrate.getBeenLegalName() + "," + lawLegalArbitrate.getBeenLegalPosition() + "。";
|
||||
setContent(doc, line2);
|
||||
|
||||
setTitle(doc, " 仲裁请求:");
|
||||
setContent(doc, " " + lawLegalArbitrate.getRequestContent());
|
||||
|
||||
setTitle(doc, " 事实和理由:");
|
||||
setContent(doc, " " + lawLegalArbitrate.getContent());
|
||||
|
||||
setContent(doc, " 此致");
|
||||
setContent(doc, " 贵港仲裁委员会");
|
||||
|
||||
setEndContent(doc, "申请人: ");
|
||||
String date = LocalDateTimeUtil.format(lawLegalArbitrate.getCreateTime(), "yyyy年MM月dd日");
|
||||
setEndContent(doc, date);
|
||||
|
||||
doc.write(fos);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
}
|
||||
ZipUtil.zip(uploadPath + "file/doc/仲裁申请书");
|
||||
for (String path : pathList) {
|
||||
FileUtil.del(path);
|
||||
}
|
||||
return success("导出成功", serverUrl + "/file/doc/仲裁申请书.zip");
|
||||
}
|
||||
|
||||
private void setContent(XWPFDocument doc, String content) {
|
||||
XWPFParagraph paragraph1 = doc.createParagraph();
|
||||
paragraph1.setAlignment(ParagraphAlignment.LEFT);
|
||||
XWPFRun pRun1 = paragraph1.createRun();
|
||||
pRun1.setFontFamily("仿宋");
|
||||
pRun1.setFontSize(16f);
|
||||
pRun1.setText(content);
|
||||
}
|
||||
|
||||
private void setEndContent(XWPFDocument doc, String content) {
|
||||
XWPFParagraph paragraph1 = doc.createParagraph();
|
||||
paragraph1.setAlignment(ParagraphAlignment.RIGHT);
|
||||
XWPFRun pRun1 = paragraph1.createRun();
|
||||
pRun1.setFontFamily("仿宋");
|
||||
pRun1.setFontSize(16f);
|
||||
pRun1.setText(content);
|
||||
}
|
||||
|
||||
private void setTitle(XWPFDocument doc, String content) {
|
||||
XWPFParagraph paragraph1 = doc.createParagraph();
|
||||
paragraph1.setAlignment(ParagraphAlignment.LEFT);
|
||||
XWPFRun pRun1 = paragraph1.createRun();
|
||||
pRun1.setFontFamily("仿宋");
|
||||
pRun1.setFontSize(16f);
|
||||
pRun1.setBold(true);
|
||||
pRun1.setText(content);
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalCalConfigService;
|
||||
import com.gxwebsoft.law.entity.LawLegalCalConfig;
|
||||
import com.gxwebsoft.law.param.LawLegalCalConfigParam;
|
||||
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-04-17 19:23:47
|
||||
*/
|
||||
@Api(tags = "法律计算器配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-cal-config")
|
||||
public class LawLegalCalConfigController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalCalConfigService lawLegalCalConfigService;
|
||||
|
||||
@ApiOperation("分页查询法律计算器配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalCalConfig>> page(LawLegalCalConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalCalConfigService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部法律计算器配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalCalConfig>> list(LawLegalCalConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalCalConfigService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawLegalCalConfig:list')")
|
||||
@ApiOperation("根据id查询法律计算器配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalCalConfig> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalCalConfigService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加法律计算器配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalCalConfig lawLegalCalConfig) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalCalConfig.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalCalConfigService.save(lawLegalCalConfig)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改法律计算器配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalCalConfig lawLegalCalConfig) {
|
||||
if (lawLegalCalConfigService.updateById(lawLegalCalConfig)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除法律计算器配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalCalConfigService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加法律计算器配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalCalConfig> list) {
|
||||
if (lawLegalCalConfigService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改法律计算器配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalCalConfig> batchParam) {
|
||||
if (batchParam.update(lawLegalCalConfigService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除法律计算器配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalCalConfigService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalCalContentService;
|
||||
import com.gxwebsoft.law.entity.LawLegalCalContent;
|
||||
import com.gxwebsoft.law.param.LawLegalCalContentParam;
|
||||
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-04-17 19:23:47
|
||||
*/
|
||||
@Api(tags = "用户填写法律计算器内容管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-cal-content")
|
||||
public class LawLegalCalContentController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalCalContentService lawLegalCalContentService;
|
||||
|
||||
@ApiOperation("分页查询用户填写法律计算器内容")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalCalContent>> page(LawLegalCalContentParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalCalContentService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部用户填写法律计算器内容")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalCalContent>> list(LawLegalCalContentParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalCalContentService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawLegalCalContent:list')")
|
||||
@ApiOperation("根据id查询用户填写法律计算器内容")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalCalContent> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalCalContentService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加用户填写法律计算器内容")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalCalContent lawLegalCalContent) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalCalContent.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalCalContentService.save(lawLegalCalContent)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改用户填写法律计算器内容")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalCalContent lawLegalCalContent) {
|
||||
if (lawLegalCalContentService.updateById(lawLegalCalContent)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除用户填写法律计算器内容")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalCalContentService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加用户填写法律计算器内容")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalCalContent> list) {
|
||||
if (lawLegalCalContentService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改用户填写法律计算器内容")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalCalContent> batchParam) {
|
||||
if (batchParam.update(lawLegalCalContentService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除用户填写法律计算器内容")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalCalContentService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalCalTypeService;
|
||||
import com.gxwebsoft.law.entity.LawLegalCalType;
|
||||
import com.gxwebsoft.law.param.LawLegalCalTypeParam;
|
||||
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-04-17 19:23:47
|
||||
*/
|
||||
@Api(tags = "法律计算器配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-cal-type")
|
||||
public class LawLegalCalTypeController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalCalTypeService lawLegalCalTypeService;
|
||||
|
||||
@ApiOperation("分页查询法律计算器配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalCalType>> page(LawLegalCalTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalCalTypeService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部法律计算器配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalCalType>> list(LawLegalCalTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalCalTypeService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询法律计算器配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalCalType> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalCalTypeService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加法律计算器配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalCalType lawLegalCalType) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalCalType.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalCalTypeService.save(lawLegalCalType)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改法律计算器配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalCalType lawLegalCalType) {
|
||||
if (lawLegalCalTypeService.updateById(lawLegalCalType)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除法律计算器配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalCalTypeService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加法律计算器配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalCalType> list) {
|
||||
if (lawLegalCalTypeService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改法律计算器配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalCalType> batchParam) {
|
||||
if (batchParam.update(lawLegalCalTypeService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除法律计算器配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalCalTypeService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,203 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalDocConfigService;
|
||||
import com.gxwebsoft.law.entity.LawLegalDocConfig;
|
||||
import com.gxwebsoft.law.param.LawLegalDocConfigParam;
|
||||
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.apache.poi.xwpf.usermodel.ParagraphAlignment;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.mail.SimpleMailMessage;
|
||||
import org.springframework.mail.javamail.JavaMailSender;
|
||||
import org.springframework.mail.javamail.MimeMessageHelper;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.mail.Authenticator;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.PasswordAuthentication;
|
||||
import javax.mail.Session;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* 法律文书配置控制器
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:06:41
|
||||
*/
|
||||
@Api(tags = "法律文书配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-doc-config")
|
||||
public class LawLegalDocConfigController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalDocConfigService lawLegalDocConfigService;
|
||||
@Value("${config.upload-path}")
|
||||
private String uploadPath;
|
||||
@Autowired
|
||||
private JavaMailSender javaMailSender;
|
||||
|
||||
@ApiOperation("分页查询法律文书配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalDocConfig>> page(LawLegalDocConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalDocConfigService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部法律文书配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalDocConfig>> list(LawLegalDocConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalDocConfigService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawLegalDocConfig:list')")
|
||||
@ApiOperation("根据id查询法律文书配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalDocConfig> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalDocConfigService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加法律文书配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalDocConfig lawLegalDocConfig) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalDocConfig.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalDocConfigService.save(lawLegalDocConfig)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改法律文书配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalDocConfig lawLegalDocConfig) {
|
||||
if (lawLegalDocConfigService.updateById(lawLegalDocConfig)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除法律文书配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalDocConfigService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加法律文书配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalDocConfig> list) {
|
||||
if (lawLegalDocConfigService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改法律文书配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalDocConfig> batchParam) {
|
||||
if (batchParam.update(lawLegalDocConfigService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除法律文书配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalDocConfigService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@PostMapping("/make")
|
||||
public ApiResult<?> makeDoc(@RequestBody LawLegalDocConfig lawLegalDocConfig) throws IOException {
|
||||
String filePath = "/file/doc/" + lawLegalDocConfig.getTitle() + DateUtil.currentSeconds() + ".docx";
|
||||
String levelOutputPath = uploadPath + filePath;
|
||||
String userContent = lawLegalDocConfig.getUserContent();
|
||||
XWPFDocument doc = new XWPFDocument();
|
||||
XWPFParagraph paragraph = doc.createParagraph();
|
||||
XWPFRun run = paragraph.createRun();
|
||||
paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||
run.setText(lawLegalDocConfig.getTitle());
|
||||
run.setFontSize(16);
|
||||
run.setBold(true);
|
||||
run.addCarriageReturn();
|
||||
XWPFParagraph newParagraph = doc.createParagraph();
|
||||
XWPFRun newRun = newParagraph.createRun();
|
||||
String[] userContentArray = userContent.split("\n");
|
||||
run.setFontSize(14);
|
||||
for (String item : userContentArray) {
|
||||
newRun.setText(item);
|
||||
newRun.addCarriageReturn();
|
||||
}
|
||||
FileOutputStream fos = new FileOutputStream(levelOutputPath);
|
||||
doc.write(fos);
|
||||
fos.flush();
|
||||
fos.close();
|
||||
return success("生成成功", filePath);
|
||||
}
|
||||
|
||||
@PostMapping("/send-email")
|
||||
public ApiResult<?> sendEmail(@RequestBody LawLegalDocConfig lawLegalDocConfig) throws IOException, MessagingException {
|
||||
Properties properties = new Properties();// 创建Properties对象
|
||||
properties.setProperty("mail.transport.protocol", "smtp");
|
||||
properties.put("mail.smtp.host", "smtp.qq.com");
|
||||
properties.setProperty("mail.smtp.auth", "true");
|
||||
String from = "517289602@qq.com";
|
||||
Authenticator auth = new MailAuthenticator(from, "fhvgbekxmxrxcaec");
|
||||
Session session = Session.getDefaultInstance(properties, auth);
|
||||
MimeMessage mimeMessage = new MimeMessage(session);
|
||||
MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);
|
||||
|
||||
helper.setFrom(new InternetAddress(from));
|
||||
helper.setTo(lawLegalDocConfig.getEmail());
|
||||
helper.setSubject(lawLegalDocConfig.getTitle());
|
||||
helper.setText("请注意查收");
|
||||
File file = new File(uploadPath + lawLegalDocConfig.getFile());
|
||||
helper.addAttachment(lawLegalDocConfig.getTitle(), file);
|
||||
javaMailSender.send(mimeMessage);
|
||||
return success("发送成功");
|
||||
}
|
||||
|
||||
static class MailAuthenticator extends Authenticator {
|
||||
private final String user;
|
||||
private final String pwd;
|
||||
|
||||
public MailAuthenticator(String user, String pwd) {
|
||||
this.user = user;
|
||||
this.pwd = pwd;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(user, pwd);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalDocContentService;
|
||||
import com.gxwebsoft.law.entity.LawLegalDocContent;
|
||||
import com.gxwebsoft.law.param.LawLegalDocContentParam;
|
||||
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-04-17 19:06:41
|
||||
*/
|
||||
@Api(tags = "用户填写法律文书内容管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-doc-content")
|
||||
public class LawLegalDocContentController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalDocContentService lawLegalDocContentService;
|
||||
|
||||
@ApiOperation("分页查询用户填写法律文书内容")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalDocContent>> page(LawLegalDocContentParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalDocContentService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部用户填写法律文书内容")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalDocContent>> list(LawLegalDocContentParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalDocContentService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawLegalDocContent:list')")
|
||||
@ApiOperation("根据id查询用户填写法律文书内容")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalDocContent> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalDocContentService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加用户填写法律文书内容")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalDocContent lawLegalDocContent) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalDocContent.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalDocContentService.save(lawLegalDocContent)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改用户填写法律文书内容")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalDocContent lawLegalDocContent) {
|
||||
if (lawLegalDocContentService.updateById(lawLegalDocContent)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除用户填写法律文书内容")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalDocContentService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加用户填写法律文书内容")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalDocContent> list) {
|
||||
if (lawLegalDocContentService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改用户填写法律文书内容")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalDocContent> batchParam) {
|
||||
if (batchParam.update(lawLegalDocContentService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除用户填写法律文书内容")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalDocContentService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalDocTypeService;
|
||||
import com.gxwebsoft.law.entity.LawLegalDocType;
|
||||
import com.gxwebsoft.law.param.LawLegalDocTypeParam;
|
||||
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-04-17 19:06:41
|
||||
*/
|
||||
@Api(tags = "法律文书配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-doc-type")
|
||||
public class LawLegalDocTypeController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalDocTypeService lawLegalDocTypeService;
|
||||
|
||||
@ApiOperation("分页查询法律文书配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalDocType>> page(LawLegalDocTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalDocTypeService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部法律文书配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalDocType>> list(LawLegalDocTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalDocTypeService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询法律文书配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalDocType> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalDocTypeService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加法律文书配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalDocType lawLegalDocType) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalDocType.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalDocTypeService.save(lawLegalDocType)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改法律文书配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalDocType lawLegalDocType) {
|
||||
if (lawLegalDocTypeService.updateById(lawLegalDocType)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除法律文书配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalDocTypeService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加法律文书配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalDocType> list) {
|
||||
if (lawLegalDocTypeService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改法律文书配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalDocType> batchParam) {
|
||||
if (batchParam.update(lawLegalDocTypeService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除法律文书配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalDocTypeService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalOrgCheckConfigService;
|
||||
import com.gxwebsoft.law.entity.LawLegalOrgCheckConfig;
|
||||
import com.gxwebsoft.law.param.LawLegalOrgCheckConfigParam;
|
||||
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-04-17 17:51:15
|
||||
*/
|
||||
@Api(tags = "企业法制体检配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-org-check-config")
|
||||
public class LawLegalOrgCheckConfigController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalOrgCheckConfigService lawLegalOrgCheckConfigService;
|
||||
|
||||
@ApiOperation("分页查询企业法制体检配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalOrgCheckConfig>> page(LawLegalOrgCheckConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckConfigService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部企业法制体检配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalOrgCheckConfig>> list(LawLegalOrgCheckConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckConfigService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawLegalOrgCheckConfig:list')")
|
||||
@ApiOperation("根据id查询企业法制体检配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalOrgCheckConfig> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckConfigService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加企业法制体检配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalOrgCheckConfig lawLegalOrgCheckConfig) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalOrgCheckConfig.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalOrgCheckConfigService.save(lawLegalOrgCheckConfig)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改企业法制体检配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalOrgCheckConfig lawLegalOrgCheckConfig) {
|
||||
if (lawLegalOrgCheckConfigService.updateById(lawLegalOrgCheckConfig)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除企业法制体检配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalOrgCheckConfigService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加企业法制体检配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalOrgCheckConfig> list) {
|
||||
if (lawLegalOrgCheckConfigService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改企业法制体检配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalOrgCheckConfig> batchParam) {
|
||||
if (batchParam.update(lawLegalOrgCheckConfigService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除企业法制体检配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalOrgCheckConfigService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
-122
@@ -1,122 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalOrgCheckConfigSuggestService;
|
||||
import com.gxwebsoft.law.entity.LawLegalOrgCheckConfigSuggest;
|
||||
import com.gxwebsoft.law.param.LawLegalOrgCheckConfigSuggestParam;
|
||||
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-04-17 18:55:31
|
||||
*/
|
||||
@Api(tags = "法律意见书配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-org-check-config-suggest")
|
||||
public class LawLegalOrgCheckConfigSuggestController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalOrgCheckConfigSuggestService lawLegalOrgCheckConfigSuggestService;
|
||||
|
||||
@ApiOperation("分页查询法律意见书配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalOrgCheckConfigSuggest>> page(LawLegalOrgCheckConfigSuggestParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckConfigSuggestService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部法律意见书配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalOrgCheckConfigSuggest>> list(LawLegalOrgCheckConfigSuggestParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckConfigSuggestService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("树形")
|
||||
@GetMapping("/tree")
|
||||
public ApiResult<List<LawLegalOrgCheckConfigSuggest>> tree(LawLegalOrgCheckConfigSuggestParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckConfigSuggestService.listByLevel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawLegalOrgCheckConfigSuggest:list')")
|
||||
@ApiOperation("根据id查询法律意见书配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalOrgCheckConfigSuggest> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckConfigSuggestService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加法律意见书配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalOrgCheckConfigSuggest lawLegalOrgCheckConfigSuggest) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalOrgCheckConfigSuggest.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalOrgCheckConfigSuggestService.save(lawLegalOrgCheckConfigSuggest)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改法律意见书配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalOrgCheckConfigSuggest lawLegalOrgCheckConfigSuggest) {
|
||||
if (lawLegalOrgCheckConfigSuggestService.updateById(lawLegalOrgCheckConfigSuggest)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除法律意见书配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalOrgCheckConfigSuggestService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加法律意见书配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalOrgCheckConfigSuggest> list) {
|
||||
if (lawLegalOrgCheckConfigSuggestService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改法律意见书配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalOrgCheckConfigSuggest> batchParam) {
|
||||
if (batchParam.update(lawLegalOrgCheckConfigSuggestService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除法律意见书配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalOrgCheckConfigSuggestService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalOrgCheckContentService;
|
||||
import com.gxwebsoft.law.entity.LawLegalOrgCheckContent;
|
||||
import com.gxwebsoft.law.param.LawLegalOrgCheckContentParam;
|
||||
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-04-17 17:48:54
|
||||
*/
|
||||
@Api(tags = "用户填写企业法制体检内容管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-org-check-content")
|
||||
public class LawLegalOrgCheckContentController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalOrgCheckContentService lawLegalOrgCheckContentService;
|
||||
|
||||
@ApiOperation("分页查询用户填写企业法制体检内容")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalOrgCheckContent>> page(LawLegalOrgCheckContentParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckContentService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部用户填写企业法制体检内容")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalOrgCheckContent>> list(LawLegalOrgCheckContentParam param) {
|
||||
// 使用关联查询
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
param.setUserId(loginUser.getUserId());
|
||||
}
|
||||
return success(lawLegalOrgCheckContentService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询用户填写企业法制体检内容")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalOrgCheckContent> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckContentService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加用户填写企业法制体检内容")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalOrgCheckContent lawLegalOrgCheckContent) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalOrgCheckContent.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalOrgCheckContentService.save(lawLegalOrgCheckContent)) {
|
||||
return success("添加成功", lawLegalOrgCheckContent.getId());
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改用户填写企业法制体检内容")
|
||||
@PostMapping("/update")
|
||||
public ApiResult<?> update(@RequestBody LawLegalOrgCheckContent lawLegalOrgCheckContent) {
|
||||
if (lawLegalOrgCheckContentService.updateById(lawLegalOrgCheckContent)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除用户填写企业法制体检内容")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalOrgCheckContentService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加用户填写企业法制体检内容")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalOrgCheckContent> list) {
|
||||
if (lawLegalOrgCheckContentService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改用户填写企业法制体检内容")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalOrgCheckContent> batchParam) {
|
||||
if (batchParam.update(lawLegalOrgCheckContentService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除用户填写企业法制体检内容")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalOrgCheckContentService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
-114
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalOrgCheckContentSuggestService;
|
||||
import com.gxwebsoft.law.entity.LawLegalOrgCheckContentSuggest;
|
||||
import com.gxwebsoft.law.param.LawLegalOrgCheckContentSuggestParam;
|
||||
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-04-17 18:55:31
|
||||
*/
|
||||
@Api(tags = "用户填写法律意见书内容管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-org-check-content-suggest")
|
||||
public class LawLegalOrgCheckContentSuggestController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalOrgCheckContentSuggestService lawLegalOrgCheckContentSuggestService;
|
||||
|
||||
@ApiOperation("分页查询用户填写法律意见书内容")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalOrgCheckContentSuggest>> page(LawLegalOrgCheckContentSuggestParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckContentSuggestService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部用户填写法律意见书内容")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalOrgCheckContentSuggest>> list(LawLegalOrgCheckContentSuggestParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckContentSuggestService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询用户填写法律意见书内容")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalOrgCheckContentSuggest> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckContentSuggestService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加用户填写法律意见书内容")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalOrgCheckContentSuggest lawLegalOrgCheckContentSuggest) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalOrgCheckContentSuggest.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalOrgCheckContentSuggestService.save(lawLegalOrgCheckContentSuggest)) {
|
||||
return success("添加成功", lawLegalOrgCheckContentSuggest.getId());
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改用户填写法律意见书内容")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalOrgCheckContentSuggest lawLegalOrgCheckContentSuggest) {
|
||||
if (lawLegalOrgCheckContentSuggestService.updateById(lawLegalOrgCheckContentSuggest)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除用户填写法律意见书内容")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalOrgCheckContentSuggestService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加用户填写法律意见书内容")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalOrgCheckContentSuggest> list) {
|
||||
if (lawLegalOrgCheckContentSuggestService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改用户填写法律意见书内容")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalOrgCheckContentSuggest> batchParam) {
|
||||
if (batchParam.update(lawLegalOrgCheckContentSuggestService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除用户填写法律意见书内容")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalOrgCheckContentSuggestService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalOrgCheckTypeService;
|
||||
import com.gxwebsoft.law.entity.LawLegalOrgCheckType;
|
||||
import com.gxwebsoft.law.param.LawLegalOrgCheckTypeParam;
|
||||
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-04-17 18:04:46
|
||||
*/
|
||||
@Api(tags = "企业法制体检配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-org-check-type")
|
||||
public class LawLegalOrgCheckTypeController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalOrgCheckTypeService lawLegalOrgCheckTypeService;
|
||||
|
||||
@ApiOperation("分页查询企业法制体检配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalOrgCheckType>> page(LawLegalOrgCheckTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckTypeService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部企业法制体检配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalOrgCheckType>> list(LawLegalOrgCheckTypeParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckTypeService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询企业法制体检配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalOrgCheckType> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckTypeService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加企业法制体检配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalOrgCheckType lawLegalOrgCheckType) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalOrgCheckType.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalOrgCheckTypeService.save(lawLegalOrgCheckType)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改企业法制体检配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalOrgCheckType lawLegalOrgCheckType) {
|
||||
if (lawLegalOrgCheckTypeService.updateById(lawLegalOrgCheckType)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除企业法制体检配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalOrgCheckTypeService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加企业法制体检配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalOrgCheckType> list) {
|
||||
if (lawLegalOrgCheckTypeService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改企业法制体检配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalOrgCheckType> batchParam) {
|
||||
if (batchParam.update(lawLegalOrgCheckTypeService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除企业法制体检配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalOrgCheckTypeService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
-114
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawLegalOrgCheckTypeSuggestService;
|
||||
import com.gxwebsoft.law.entity.LawLegalOrgCheckTypeSuggest;
|
||||
import com.gxwebsoft.law.param.LawLegalOrgCheckTypeSuggestParam;
|
||||
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-04-17 18:55:31
|
||||
*/
|
||||
@Api(tags = "法律意见书配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-legal-org-check-type-suggest")
|
||||
public class LawLegalOrgCheckTypeSuggestController extends BaseController {
|
||||
@Resource
|
||||
private LawLegalOrgCheckTypeSuggestService lawLegalOrgCheckTypeSuggestService;
|
||||
|
||||
@ApiOperation("分页查询法律意见书配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawLegalOrgCheckTypeSuggest>> page(LawLegalOrgCheckTypeSuggestParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckTypeSuggestService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部法律意见书配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawLegalOrgCheckTypeSuggest>> list(LawLegalOrgCheckTypeSuggestParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckTypeSuggestService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询法律意见书配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawLegalOrgCheckTypeSuggest> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawLegalOrgCheckTypeSuggestService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加法律意见书配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawLegalOrgCheckTypeSuggest lawLegalOrgCheckTypeSuggest) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawLegalOrgCheckTypeSuggest.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawLegalOrgCheckTypeSuggestService.save(lawLegalOrgCheckTypeSuggest)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改法律意见书配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawLegalOrgCheckTypeSuggest lawLegalOrgCheckTypeSuggest) {
|
||||
if (lawLegalOrgCheckTypeSuggestService.updateById(lawLegalOrgCheckTypeSuggest)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除法律意见书配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawLegalOrgCheckTypeSuggestService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加法律意见书配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawLegalOrgCheckTypeSuggest> list) {
|
||||
if (lawLegalOrgCheckTypeSuggestService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改法律意见书配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawLegalOrgCheckTypeSuggest> batchParam) {
|
||||
if (batchParam.update(lawLegalOrgCheckTypeSuggestService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除法律意见书配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawLegalOrgCheckTypeSuggestService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawNotaryConfigService;
|
||||
import com.gxwebsoft.law.entity.LawNotaryConfig;
|
||||
import com.gxwebsoft.law.param.LawNotaryConfigParam;
|
||||
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-05-17 16:10:35
|
||||
*/
|
||||
@Api(tags = "公证配置管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-notary-config")
|
||||
public class LawNotaryConfigController extends BaseController {
|
||||
@Resource
|
||||
private LawNotaryConfigService lawNotaryConfigService;
|
||||
|
||||
@ApiOperation("分页查询公证配置")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawNotaryConfig>> page(LawNotaryConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawNotaryConfigService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部公证配置")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawNotaryConfig>> list(LawNotaryConfigParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawNotaryConfigService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawNotaryConfig:list')")
|
||||
@ApiOperation("根据id查询公证配置")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawNotaryConfig> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawNotaryConfigService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加公证配置")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawNotaryConfig lawNotaryConfig) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawNotaryConfig.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawNotaryConfigService.save(lawNotaryConfig)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改公证配置")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawNotaryConfig lawNotaryConfig) {
|
||||
if (lawNotaryConfigService.updateById(lawNotaryConfig)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除公证配置")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawNotaryConfigService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加公证配置")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawNotaryConfig> list) {
|
||||
if (lawNotaryConfigService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改公证配置")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawNotaryConfig> batchParam) {
|
||||
if (batchParam.update(lawNotaryConfigService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除公证配置")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawNotaryConfigService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawNotaryListService;
|
||||
import com.gxwebsoft.law.entity.LawNotaryList;
|
||||
import com.gxwebsoft.law.param.LawNotaryListParam;
|
||||
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-05-17 16:10:35
|
||||
*/
|
||||
@Api(tags = "公证列表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-notary-list")
|
||||
public class LawNotaryListController extends BaseController {
|
||||
@Resource
|
||||
private LawNotaryListService lawNotaryListService;
|
||||
|
||||
@ApiOperation("分页查询公证列表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawNotaryList>> page(LawNotaryListParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawNotaryListService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部公证列表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawNotaryList>> list(LawNotaryListParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawNotaryListService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawNotaryList:list')")
|
||||
@ApiOperation("根据id查询公证列表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawNotaryList> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawNotaryListService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加公证列表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawNotaryList lawNotaryList) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawNotaryList.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawNotaryListService.save(lawNotaryList)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改公证列表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawNotaryList lawNotaryList) {
|
||||
if (lawNotaryListService.updateById(lawNotaryList)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除公证列表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawNotaryListService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加公证列表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawNotaryList> list) {
|
||||
if (lawNotaryListService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改公证列表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawNotaryList> batchParam) {
|
||||
if (batchParam.update(lawNotaryListService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除公证列表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawNotaryListService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.law.service.LawOrgCheckLogService;
|
||||
import com.gxwebsoft.law.entity.LawOrgCheckLog;
|
||||
import com.gxwebsoft.law.param.LawOrgCheckLogParam;
|
||||
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-04-20 07:43:09
|
||||
*/
|
||||
@Api(tags = "企业法制检查报告管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-org-check-log")
|
||||
public class LawOrgCheckLogController extends BaseController {
|
||||
@Resource
|
||||
private LawOrgCheckLogService lawOrgCheckLogService;
|
||||
|
||||
@ApiOperation("分页查询企业法制检查报告")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawOrgCheckLog>> page(LawOrgCheckLogParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawOrgCheckLogService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部企业法制检查报告")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawOrgCheckLog>> list(LawOrgCheckLogParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawOrgCheckLogService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawOrgCheckLog:list')")
|
||||
@ApiOperation("根据id查询企业法制检查报告")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawOrgCheckLog> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawOrgCheckLogService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加企业法制检查报告")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawOrgCheckLog lawOrgCheckLog) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
lawOrgCheckLog.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (lawOrgCheckLogService.save(lawOrgCheckLog)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改企业法制检查报告")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawOrgCheckLog lawOrgCheckLog) {
|
||||
if (lawOrgCheckLogService.updateById(lawOrgCheckLog)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除企业法制检查报告")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawOrgCheckLogService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加企业法制检查报告")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawOrgCheckLog> list) {
|
||||
if (lawOrgCheckLogService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改企业法制检查报告")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawOrgCheckLog> batchParam) {
|
||||
if (batchParam.update(lawOrgCheckLogService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除企业法制检查报告")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawOrgCheckLogService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
package com.gxwebsoft.law.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.system.entity.Area;
|
||||
import com.gxwebsoft.common.system.service.AreaService;
|
||||
import com.gxwebsoft.law.service.LawOrgService;
|
||||
import com.gxwebsoft.law.entity.LawOrg;
|
||||
import com.gxwebsoft.law.param.LawOrgParam;
|
||||
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-04-14 00:35:34
|
||||
*/
|
||||
@Api(tags = "机构管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/law/law-org")
|
||||
public class LawOrgController extends BaseController {
|
||||
@Resource
|
||||
private LawOrgService lawOrgService;
|
||||
@Resource
|
||||
private AreaService areaService;
|
||||
|
||||
@ApiOperation("分页查询机构")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<LawOrg>> page(LawOrgParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawOrgService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部机构")
|
||||
@GetMapping()
|
||||
public ApiResult<List<LawOrg>> list(LawOrgParam param) {
|
||||
// 使用关联查询
|
||||
return success(lawOrgService.listRel(param));
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('law:lawOrg:list')")
|
||||
@ApiOperation("根据id查询机构")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<LawOrg> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(lawOrgService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加机构")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody LawOrg lawOrg) {
|
||||
if (lawOrg.getProvince() != null) {
|
||||
Area province = areaService.getProvinceByName(lawOrg.getProvince());
|
||||
if (province != null) {
|
||||
lawOrg.setProvinceId(province.getId());
|
||||
}
|
||||
}
|
||||
if (lawOrg.getCity() != null) {
|
||||
Area city = areaService.getCityByName(lawOrg.getCity());
|
||||
if (city != null) {
|
||||
lawOrg.setCityId(city.getId());
|
||||
}
|
||||
}
|
||||
if (lawOrg.getRegion() != null) {
|
||||
Area region = areaService.getRegionByName(lawOrg.getRegion());
|
||||
if (region != null) {
|
||||
lawOrg.setAreaId(region.getId());
|
||||
}
|
||||
}
|
||||
if (lawOrgService.save(lawOrg)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改机构")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody LawOrg lawOrg) {
|
||||
if (lawOrg.getProvince() != null) {
|
||||
Area province = areaService.getProvinceByName(lawOrg.getProvince());
|
||||
if (province != null) {
|
||||
lawOrg.setProvinceId(province.getId());
|
||||
}
|
||||
if (lawOrg.getCity() != null) {
|
||||
Area city = areaService.getCityByName(lawOrg.getCity());
|
||||
if (city != null) {
|
||||
lawOrg.setCityId(city.getId());
|
||||
}
|
||||
if (lawOrg.getRegion() != null) {
|
||||
Area region = areaService.getRegionByName(lawOrg.getRegion());
|
||||
if (region != null) {
|
||||
lawOrg.setAreaId(region.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (lawOrgService.updateById(lawOrg)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除机构")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (lawOrgService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加机构")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<LawOrg> list) {
|
||||
if (lawOrgService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改机构")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> updateBatch(@RequestBody BatchParam<LawOrg> batchParam) {
|
||||
if (batchParam.update(lawOrgService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除机构")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (lawOrgService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,6 +45,15 @@ public class ChatMessage implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private Integer requestType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer chatId;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String roleName;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String roleDesc;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> files;
|
||||
}
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律援助申请
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 17:33:28
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalAid对象", description = "法律援助申请")
|
||||
@TableName("law_legal_aid")
|
||||
public class LawLegalAid implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer gender;
|
||||
|
||||
private String nation;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String birthday;
|
||||
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty(value = "住所地址")
|
||||
private String liveAddress;
|
||||
|
||||
@ApiModelProperty(value = "户籍地址")
|
||||
private String householdAddress;
|
||||
|
||||
private String companyName;
|
||||
|
||||
private String email;
|
||||
|
||||
private String proxyName;
|
||||
|
||||
private String proxyPhone;
|
||||
|
||||
private String proxyRelation;
|
||||
|
||||
private String proxyIdCard;
|
||||
|
||||
@ApiModelProperty(value = "说明")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 司法鉴定申请
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-05-06 17:11:41
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalAppraisal对象", description = "司法鉴定申请")
|
||||
@TableName("law_legal_appraisal")
|
||||
public class LawLegalAppraisal implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer gender;
|
||||
|
||||
private Integer isNew;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String birthday;
|
||||
|
||||
private String idCard;
|
||||
|
||||
private String fileList;
|
||||
|
||||
private String standard;
|
||||
|
||||
private String application;
|
||||
|
||||
@ApiModelProperty(value = "住所地址")
|
||||
private String liveAddress;
|
||||
|
||||
@ApiModelProperty(value = "户籍地址")
|
||||
private String householdAddress;
|
||||
|
||||
private Integer orgId;
|
||||
|
||||
@ApiModelProperty(value = "说明")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "详情")
|
||||
private String detail;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private LawOrg lawOrg;
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律仲裁申请
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-05-06 15:56:26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalArbitrate对象", description = "法律仲裁申请")
|
||||
@TableName("law_legal_arbitrate")
|
||||
public class LawLegalArbitrate implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer gender;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String birthday;
|
||||
|
||||
private String idCard;
|
||||
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty(value = "住所地址")
|
||||
private String liveAddress;
|
||||
|
||||
@ApiModelProperty(value = "户籍地址")
|
||||
private String householdAddress;
|
||||
|
||||
@ApiModelProperty(value = "事实和理由")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "仲裁请求")
|
||||
private String requestContent;
|
||||
|
||||
@ApiModelProperty(value = "被申请人")
|
||||
private String beenName;
|
||||
|
||||
@ApiModelProperty(value = "被申请人地址")
|
||||
private String beenAddress;
|
||||
|
||||
@ApiModelProperty(value = "被申请人代码")
|
||||
private String beenCode;
|
||||
|
||||
@ApiModelProperty(value = "被申请人联系方式")
|
||||
private String beenPhone;
|
||||
|
||||
@ApiModelProperty(value = "法定代表人")
|
||||
private String beenLegalName;
|
||||
|
||||
@ApiModelProperty(value = "职位")
|
||||
private String beenLegalPosition;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 法律计算器配置
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:23:47
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalCalConfig对象", description = "法律计算器配置")
|
||||
@TableName("law_legal_cal_config")
|
||||
public class LawLegalCalConfig implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer typeId;
|
||||
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String answer;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 用户填写法律计算器内容
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:23:47
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalCalContent对象", description = "用户填写法律计算器内容")
|
||||
@TableName("law_legal_cal_content")
|
||||
public class LawLegalCalContent implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer groupId;
|
||||
|
||||
private String content;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package com.gxwebsoft.law.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 用户填写法律文书内容
|
||||
*
|
||||
* @author LX
|
||||
* @since 2025-04-17 19:06:41
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "LawLegalDocContent对象", description = "用户填写法律文书内容")
|
||||
@TableName("law_legal_doc_content")
|
||||
public class LawLegalDocContent implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
private Integer groupId;
|
||||
|
||||
private String content;
|
||||
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user