diff --git a/mvnw b/mvnw old mode 100644 new mode 100755 diff --git a/pom.xml b/pom.xml index 18470f3..4c6c660 100644 --- a/pom.xml +++ b/pom.xml @@ -259,10 +259,9 @@ 2.8.0 - com.vaadin.external.google - android-json - 0.0.20131108.vaadin1 - compile + org.json + json + 20170516 @@ -275,7 +274,37 @@ com.github.wechatpay-apiv3 wechatpay-java - 0.2.12 + 0.2.17 + + + com.alibaba.nls + nls-sdk-tts + 2.2.19 + + + javax.xml.bind + jaxb-api + 2.3.0 + + + com.sun.xml.bind + jaxb-impl + 2.3.0 + + + com.sun.xml.bind + jaxb-core + 2.3.0 + + + javax.activation + activation + 1.1.1 + + + com.aliyun + aliyun-java-sdk-core + 3.7.1 diff --git a/src/main/java/com/gxwebsoft/cms/controller/ArticleCollectController.java b/src/main/java/com/gxwebsoft/cms/controller/ArticleCollectController.java new file mode 100644 index 0000000..c2ac511 --- /dev/null +++ b/src/main/java/com/gxwebsoft/cms/controller/ArticleCollectController.java @@ -0,0 +1,121 @@ +package com.gxwebsoft.cms.controller; + +import com.gxwebsoft.common.core.web.BaseController; +import com.gxwebsoft.cms.service.ArticleCollectService; +import com.gxwebsoft.cms.entity.ArticleCollect; +import com.gxwebsoft.cms.param.ArticleCollectParam; +import com.gxwebsoft.common.core.web.ApiResult; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.BatchParam; +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.system.entity.User; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 控制器 + * + * @author LX + * @since 2025-11-23 14:05:18 + */ +@Api(tags = "管理") +@RestController +@RequestMapping("/api/cms/article-collect") +public class ArticleCollectController extends BaseController { + @Resource + private ArticleCollectService articleCollectService; + + @ApiOperation("分页查询") + @GetMapping("/page") + public ApiResult> page(ArticleCollectParam param) { + // 使用关联查询 + return success(articleCollectService.pageRel(param)); + } + + @ApiOperation("查询全部") + @GetMapping() + public ApiResult> list(ArticleCollectParam param) { + // 使用关联查询 + param.setUserId(getLoginUserId()); + return success(articleCollectService.listRel(param)); + } + + @ApiOperation("根据id查询") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(articleCollectService.getByIdRel(id)); + } + + @ApiOperation("添加") + @PostMapping() + public ApiResult save(@RequestBody ArticleCollect articleCollect) { + // 记录当前登录用户id + User loginUser = getLoginUser(); + if (loginUser != null) { + articleCollect.setUserId(loginUser.getUserId()); + } + ArticleCollect check = articleCollectService.check(getLoginUserId(), articleCollect.getArticleId()); + if (check == null) { + if (articleCollectService.save(articleCollect)) { + return success("添加成功"); + } + }else { + articleCollectService.removeById(check.getId()); + return success("取消成功"); + } + return fail("添加失败"); + } + + @ApiOperation("修改") + @PutMapping() + public ApiResult update(@RequestBody ArticleCollect articleCollect) { + if (articleCollectService.updateById(articleCollect)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("删除") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (articleCollectService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @ApiOperation("批量添加") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (articleCollectService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(articleCollectService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (articleCollectService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/cms/controller/ArticleCommentController.java b/src/main/java/com/gxwebsoft/cms/controller/ArticleCommentController.java new file mode 100644 index 0000000..29d2ed5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/cms/controller/ArticleCommentController.java @@ -0,0 +1,115 @@ +package com.gxwebsoft.cms.controller; + +import com.gxwebsoft.common.core.web.BaseController; +import com.gxwebsoft.cms.service.ArticleCommentService; +import com.gxwebsoft.cms.entity.ArticleComment; +import com.gxwebsoft.cms.param.ArticleCommentParam; +import com.gxwebsoft.common.core.web.ApiResult; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.common.core.web.PageParam; +import com.gxwebsoft.common.core.web.BatchParam; +import com.gxwebsoft.common.core.annotation.OperationLog; +import com.gxwebsoft.common.system.entity.User; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 控制器 + * + * @author LX + * @since 2025-12-02 16:56:51 + */ +@Api(tags = "管理") +@RestController +@RequestMapping("/api/cms/article-comment") +public class ArticleCommentController extends BaseController { + @Resource + private ArticleCommentService articleCommentService; + + @ApiOperation("分页查询") + @GetMapping("/page") + public ApiResult> page(ArticleCommentParam param) { + // 使用关联查询 + return success(articleCommentService.pageRel(param)); + } + + @ApiOperation("查询全部") + @GetMapping() + public ApiResult> list(ArticleCommentParam param) { + // 使用关联查询 + return success(articleCommentService.listRel(param)); + } + + @PreAuthorize("hasAuthority('cms:articleComment:list')") + @ApiOperation("根据id查询") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(articleCommentService.getByIdRel(id)); + } + + @ApiOperation("添加") + @PostMapping() + public ApiResult save(@RequestBody ArticleComment articleComment) { + // 记录当前登录用户id + User loginUser = getLoginUser(); + if (loginUser != null) { + articleComment.setUserId(loginUser.getUserId()); + } + if (articleCommentService.save(articleComment)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("修改") + @PutMapping() + public ApiResult update(@RequestBody ArticleComment articleComment) { + if (articleCommentService.updateById(articleComment)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("删除") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (articleCommentService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @ApiOperation("批量添加") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (articleCommentService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(articleCommentService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (articleCommentService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/cms/controller/ArticleController.java b/src/main/java/com/gxwebsoft/cms/controller/ArticleController.java index 6d127c7..5675ecf 100644 --- a/src/main/java/com/gxwebsoft/cms/controller/ArticleController.java +++ b/src/main/java/com/gxwebsoft/cms/controller/ArticleController.java @@ -2,7 +2,9 @@ package com.gxwebsoft.cms.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.gxwebsoft.cms.entity.ArticleCategory; +import com.gxwebsoft.cms.entity.ArticleCollect; import com.gxwebsoft.cms.service.ArticleCategoryService; +import com.gxwebsoft.cms.service.ArticleCollectService; import com.gxwebsoft.common.core.web.BaseController; import com.gxwebsoft.cms.service.ArticleService; import com.gxwebsoft.cms.entity.Article; @@ -35,6 +37,8 @@ public class ArticleController extends BaseController { @Resource private ArticleService articleService; @Resource + private ArticleCollectService articleCollectService; + @Resource private ArticleCategoryService articleCategoryService; @ApiOperation("根据id查询文章记录表") @@ -45,7 +49,6 @@ public class ArticleController extends BaseController { } - @PreAuthorize("hasAuthority('cms:article:list')") @OperationLog @ApiOperation("分页查询文章记录表") @GetMapping("/page") @@ -74,11 +77,13 @@ public class ArticleController extends BaseController { if (!categoryIds.isEmpty()) { queryWrapper.in(Article::getCategoryId, categoryIds); } + if (param.getTitle() != null) { + queryWrapper.like(Article::getTitle, param.getTitle()); + } List
articleList = articleService.list(queryWrapper); return success(articleList); } - @PreAuthorize("hasAuthority('cms:article:list')") @OperationLog @ApiOperation("根据id查询文章记录表") @GetMapping("/{id}") @@ -89,6 +94,13 @@ public class ArticleController extends BaseController { article.setArticleId(id); article.setVirtualViews(article.getVirtualViews() + 1); articleService.saveOrUpdate(article); + ArticleCategory category = articleCategoryService.getByIdRel(article.getCategoryId()); + if (category != null) article.setCategory(category.getTitle()); + article.setHasCollect(false); + if (getLoginUser() != null) { + ArticleCollect articleCollect = articleCollectService.check(getLoginUserId(), id); + article.setHasCollect(articleCollect != null); + } return success(article); } diff --git a/src/main/java/com/gxwebsoft/cms/entity/Article.java b/src/main/java/com/gxwebsoft/cms/entity/Article.java index 58ccd04..54b9c8f 100644 --- a/src/main/java/com/gxwebsoft/cms/entity/Article.java +++ b/src/main/java/com/gxwebsoft/cms/entity/Article.java @@ -37,6 +37,9 @@ public class Article implements Serializable { @ApiModelProperty(value = "文章分类ID") private Integer categoryId; + @TableField(exist = false) + private String category; + @ApiModelProperty(value = "封面图") private String image; @@ -88,4 +91,6 @@ public class Article implements Serializable { @TableField(exist = false) private String userAvatar; + @TableField(exist = false) + private Boolean hasCollect; } diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckContent.java b/src/main/java/com/gxwebsoft/cms/entity/ArticleCollect.java similarity index 57% rename from src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckContent.java rename to src/main/java/com/gxwebsoft/cms/entity/ArticleCollect.java index be40e08..4cbe2b8 100644 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckContent.java +++ b/src/main/java/com/gxwebsoft/cms/entity/ArticleCollect.java @@ -1,44 +1,36 @@ -package com.gxwebsoft.law.entity; +package com.gxwebsoft.cms.entity; import com.baomidou.mybatisplus.annotation.*; -import java.math.BigDecimal; import java.time.LocalDateTime; import java.io.Serializable; - -import com.gxwebsoft.common.system.entity.User; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; /** - * 用户填写企业法制体检内容 + * * * @author LX - * @since 2025-04-17 17:48:54 + * @since 2025-11-23 14:05:18 */ @Data @EqualsAndHashCode(callSuper = false) -@ApiModel(value = "LawLegalOrgCheckContent对象", description = "用户填写企业法制体检内容") -@TableName("law_legal_org_check_content") -public class LawLegalOrgCheckContent implements Serializable { +@ApiModel(value = "ArticleCollect对象", description = "") +@TableName("cms_article_collect") +public class ArticleCollect implements Serializable { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Integer id; - private Integer groupId; - - private String content; - - private String title; + private Integer articleId; private Integer userId; - private BigDecimal point; - - private String aiContent; + @ApiModelProperty(value = "状态, 0正常, 1冻结") + private Integer status; @ApiModelProperty(value = "是否删除, 0否, 1是") @TableLogic @@ -47,12 +39,12 @@ public class LawLegalOrgCheckContent implements Serializable { @ApiModelProperty(value = "租户id") private Integer tenantId; - @ApiModelProperty(value = "创建时间") + @ApiModelProperty(value = "注册时间") private LocalDateTime createTime; @ApiModelProperty(value = "修改时间") private LocalDateTime updateTime; @TableField(exist = false) - private User user; + private Article article; } diff --git a/src/main/java/com/gxwebsoft/law/entity/LawOrgPeople.java b/src/main/java/com/gxwebsoft/cms/entity/ArticleComment.java similarity index 64% rename from src/main/java/com/gxwebsoft/law/entity/LawOrgPeople.java rename to src/main/java/com/gxwebsoft/cms/entity/ArticleComment.java index f027bfd..80f918c 100644 --- a/src/main/java/com/gxwebsoft/law/entity/LawOrgPeople.java +++ b/src/main/java/com/gxwebsoft/cms/entity/ArticleComment.java @@ -1,4 +1,4 @@ -package com.gxwebsoft.law.entity; +package com.gxwebsoft.cms.entity; import com.baomidou.mybatisplus.annotation.*; @@ -13,32 +13,27 @@ import lombok.EqualsAndHashCode; * * * @author LX - * @since 2025-04-14 01:31:54 + * @since 2025-12-02 16:56:51 */ @Data @EqualsAndHashCode(callSuper = false) -@ApiModel(value = "LawOrgPeople对象", description = "") -@TableName("law_org_people") -public class LawOrgPeople implements Serializable { +@ApiModel(value = "ArticleComment对象", description = "") +@TableName("cms_article_comment") +public class ArticleComment implements Serializable { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Integer id; - private Integer orgId; - - private String name; - - private String phone; - - private String position; - - private String type; - - private String positionType; + private Integer articleId; private Integer userId; + private String content; + + @ApiModelProperty(value = "状态, 0正常, 1冻结") + private Integer status; + @ApiModelProperty(value = "是否删除, 0否, 1是") @TableLogic private Integer deleted; @@ -46,12 +41,12 @@ public class LawOrgPeople implements Serializable { @ApiModelProperty(value = "租户id") private Integer tenantId; - @ApiModelProperty(value = "创建时间") + @ApiModelProperty(value = "注册时间") private LocalDateTime createTime; @ApiModelProperty(value = "修改时间") private LocalDateTime updateTime; @TableField(exist = false) - private LawOrg lawOrg; + private Article article; } diff --git a/src/main/java/com/gxwebsoft/cms/mapper/ArticleCollectMapper.java b/src/main/java/com/gxwebsoft/cms/mapper/ArticleCollectMapper.java new file mode 100644 index 0000000..495d489 --- /dev/null +++ b/src/main/java/com/gxwebsoft/cms/mapper/ArticleCollectMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.cms.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.cms.entity.ArticleCollect; +import com.gxwebsoft.cms.param.ArticleCollectParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * Mapper + * + * @author LX + * @since 2025-11-23 14:05:18 + */ +public interface ArticleCollectMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") ArticleCollectParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") ArticleCollectParam param); + +} diff --git a/src/main/java/com/gxwebsoft/cms/mapper/ArticleCommentMapper.java b/src/main/java/com/gxwebsoft/cms/mapper/ArticleCommentMapper.java new file mode 100644 index 0000000..1362a4b --- /dev/null +++ b/src/main/java/com/gxwebsoft/cms/mapper/ArticleCommentMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.cms.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.cms.entity.ArticleComment; +import com.gxwebsoft.cms.param.ArticleCommentParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * Mapper + * + * @author LX + * @since 2025-12-02 16:56:51 + */ +public interface ArticleCommentMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") ArticleCommentParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") ArticleCommentParam param); + +} diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocContentMapper.xml b/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCollectMapper.xml similarity index 72% rename from src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocContentMapper.xml rename to src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCollectMapper.xml index c55b9d9..36cb9e4 100644 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocContentMapper.xml +++ b/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCollectMapper.xml @@ -1,24 +1,24 @@ - + SELECT a.* - FROM law_legal_doc_content a + FROM cms_article_collect a AND a.id = #{param.id} - - AND a.group_id = #{param.groupId} - - - AND a.content LIKE CONCAT('%', #{param.content}, '%') + + AND a.article_id = #{param.articleId} AND a.user_id = #{param.userId} + + AND a.status = #{param.status} + AND a.deleted = #{param.deleted} @@ -39,12 +39,12 @@ - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckContentMapper.xml b/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCommentMapper.xml similarity index 74% rename from src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckContentMapper.xml rename to src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCommentMapper.xml index 4235089..9bdaff1 100644 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckContentMapper.xml +++ b/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleCommentMapper.xml @@ -1,23 +1,26 @@ - + SELECT a.* - FROM law_legal_org_check_content a + FROM cms_article_comment a AND a.id = #{param.id} - - AND a.group_id = #{param.groupId} + + AND a.article_id = #{param.articleId} + + + AND a.user_id = #{param.userId} AND a.content LIKE CONCAT('%', #{param.content}, '%') - - AND a.user_id = #{param.userId} + + AND a.status = #{param.status} AND a.deleted = #{param.deleted} @@ -39,12 +42,12 @@ - - diff --git a/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleMapper.xml b/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleMapper.xml index 15b46fd..06b9e32 100644 --- a/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleMapper.xml +++ b/src/main/java/com/gxwebsoft/cms/mapper/xml/ArticleMapper.xml @@ -72,7 +72,7 @@ AND b.nickname LIKE CONCAT('%', #{param.nickname}, '%') - ORDER BY a.create_time DESC + ORDER BY a.sort_number ASC, a.create_time DESC diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalDocContentParam.java b/src/main/java/com/gxwebsoft/cms/param/ArticleCollectParam.java similarity index 69% rename from src/main/java/com/gxwebsoft/law/param/LawLegalDocContentParam.java rename to src/main/java/com/gxwebsoft/cms/param/ArticleCollectParam.java index 4b4f492..7d3dd09 100644 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalDocContentParam.java +++ b/src/main/java/com/gxwebsoft/cms/param/ArticleCollectParam.java @@ -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; diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckContentParam.java b/src/main/java/com/gxwebsoft/cms/param/ArticleCommentParam.java similarity index 70% rename from src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckContentParam.java rename to src/main/java/com/gxwebsoft/cms/param/ArticleCommentParam.java index 8c846a9..801b4ff 100644 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckContentParam.java +++ b/src/main/java/com/gxwebsoft/cms/param/ArticleCommentParam.java @@ -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; diff --git a/src/main/java/com/gxwebsoft/cms/service/ArticleCollectService.java b/src/main/java/com/gxwebsoft/cms/service/ArticleCollectService.java new file mode 100644 index 0000000..c3fdba4 --- /dev/null +++ b/src/main/java/com/gxwebsoft/cms/service/ArticleCollectService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(ArticleCollectParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(ArticleCollectParam param); + + /** + * 根据id查询 + * + * @param id + * @return ArticleCollect + */ + ArticleCollect getByIdRel(Integer id); + + ArticleCollect check(Integer userId, Integer id); +} diff --git a/src/main/java/com/gxwebsoft/cms/service/ArticleCommentService.java b/src/main/java/com/gxwebsoft/cms/service/ArticleCommentService.java new file mode 100644 index 0000000..3b5023a --- /dev/null +++ b/src/main/java/com/gxwebsoft/cms/service/ArticleCommentService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(ArticleCommentParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(ArticleCommentParam param); + + /** + * 根据id查询 + * + * @param id + * @return ArticleComment + */ + ArticleComment getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/cms/service/impl/ArticleCollectServiceImpl.java b/src/main/java/com/gxwebsoft/cms/service/impl/ArticleCollectServiceImpl.java new file mode 100644 index 0000000..b424de2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/cms/service/impl/ArticleCollectServiceImpl.java @@ -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 implements ArticleCollectService { + @Resource + private ArticleService articleService; + + @Override + public PageResult pageRel(ArticleCollectParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(ArticleCollectParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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() + .eq(ArticleCollect::getUserId, userId) + .eq(ArticleCollect::getArticleId, id) + .last("limit 1") + ); + } + +} diff --git a/src/main/java/com/gxwebsoft/cms/service/impl/ArticleCommentServiceImpl.java b/src/main/java/com/gxwebsoft/cms/service/impl/ArticleCommentServiceImpl.java new file mode 100644 index 0000000..ab0acce --- /dev/null +++ b/src/main/java/com/gxwebsoft/cms/service/impl/ArticleCommentServiceImpl.java @@ -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 implements ArticleCommentService { + @Resource + private ArticleService articleService; + @Override + public PageResult pageRel(ArticleCommentParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(ArticleCommentParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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)); + } + +} diff --git a/src/main/java/com/gxwebsoft/cms/service/impl/ArticleServiceImpl.java b/src/main/java/com/gxwebsoft/cms/service/impl/ArticleServiceImpl.java index 8bb8b98..618a6d7 100644 --- a/src/main/java/com/gxwebsoft/cms/service/impl/ArticleServiceImpl.java +++ b/src/main/java/com/gxwebsoft/cms/service/impl/ArticleServiceImpl.java @@ -23,7 +23,7 @@ public class ArticleServiceImpl extends ServiceImpl impl @Override public PageResult
pageRel(ArticleParam param) { PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); +// page.setDefaultOrder("sort_number asc, create_time desc"); List
list = baseMapper.selectPageRel(page, param); return new PageResult<>(list, page.getTotal()); } @@ -33,7 +33,7 @@ public class ArticleServiceImpl extends ServiceImpl impl List
list = baseMapper.selectListRel(param); // 排序 PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); +// page.setDefaultOrder("sort_number asc, create_time desc"); return page.sortRecords(list); } diff --git a/src/main/java/com/gxwebsoft/common/core/config/MybatisPlusConfig.java b/src/main/java/com/gxwebsoft/common/core/config/MybatisPlusConfig.java index d02e6f3..3936187 100644 --- a/src/main/java/com/gxwebsoft/common/core/config/MybatisPlusConfig.java +++ b/src/main/java/com/gxwebsoft/common/core/config/MybatisPlusConfig.java @@ -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); } }; diff --git a/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java b/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java index 8b8c38e..59a8de1 100644 --- a/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java +++ b/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java @@ -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() diff --git a/src/main/java/com/gxwebsoft/common/core/utils/SchedulingUtil.java b/src/main/java/com/gxwebsoft/common/core/utils/SchedulingUtil.java index afc62d6..69df68e 100644 --- a/src/main/java/com/gxwebsoft/common/core/utils/SchedulingUtil.java +++ b/src/main/java/com/gxwebsoft/common/core/utils/SchedulingUtil.java @@ -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().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() + .set(User::getSendCoin, 0) + ); + } + } } diff --git a/src/main/java/com/gxwebsoft/common/system/controller/CacheController.java b/src/main/java/com/gxwebsoft/common/system/controller/CacheController.java index e4192dc..8fd1603 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/CacheController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/CacheController.java @@ -37,7 +37,6 @@ public class CacheController extends BaseController { @Resource private StringRedisTemplate stringRedisTemplate; - @PreAuthorize("hasAuthority('sys:cache:list')") @ApiOperation("查询全部缓存") @GetMapping() public ApiResult> 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) { diff --git a/src/main/java/com/gxwebsoft/common/system/controller/DictDataController.java b/src/main/java/com/gxwebsoft/common/system/controller/DictDataController.java index 1323f23..3b24fe8 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/DictDataController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/DictDataController.java @@ -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() - .eq(DictData::getDictId, dictData.getDictId()) - .eq(DictData::getDictDataCode, dictData.getDictDataCode())) > 0) { - return fail("字典数据标识已存在"); - } +// if (dictDataService.count(new LambdaQueryWrapper() +// .eq(DictData::getDictId, dictData.getDictId()) +// .eq(DictData::getDictDataCode, dictData.getDictDataCode())) > 0) { +// return fail("字典数据标识已存在"); +// } // 自动添加字典 final int count = dictService.count(new LambdaQueryWrapper().eq(Dict::getDictCode, dictData.getDictCode())); if (dictData.getDictCode() != null && count == 0) { diff --git a/src/main/java/com/gxwebsoft/common/system/controller/FileController.java b/src/main/java/com/gxwebsoft/common/system/controller/FileController.java index ceab101..828a822 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/FileController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/FileController.java @@ -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)) { diff --git a/src/main/java/com/gxwebsoft/common/system/controller/MainController.java b/src/main/java/com/gxwebsoft/common/system/controller/MainController.java index 0b99a08..f41ce55 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/MainController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/MainController.java @@ -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 userInfo() { - return success(userService.getByIdRel(getLoginUserId())); + User user = userService.getByIdRel(getLoginUserId()); + int commentNum = articleCommentService.count(new LambdaQueryWrapper() + .eq(ArticleComment::getUserId, getLoginUser())); + int collectNum = articleCollectService.count(new LambdaQueryWrapper() + .eq(ArticleCollect::getUserId, getLoginUser())); + user.setArticleCommentNum(commentNum); + user.setArticleCollectNum(collectNum); + return success(user); } @ApiOperation("获取登录用户菜单") diff --git a/src/main/java/com/gxwebsoft/common/system/controller/UserController.java b/src/main/java/com/gxwebsoft/common/system/controller/UserController.java index ce9043f..de320b7 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/UserController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/UserController.java @@ -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 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("删除用户") diff --git a/src/main/java/com/gxwebsoft/common/system/entity/User.java b/src/main/java/com/gxwebsoft/common/system/entity/User.java index 643825d..f625a00 100644 --- a/src/main/java/com/gxwebsoft/common/system/entity/User.java +++ b/src/main/java/com/gxwebsoft/common/system/entity/User.java @@ -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() { diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java index d4e958d..3547326 100644 --- a/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java @@ -83,8 +83,8 @@ public class UserServiceImpl extends ServiceImpl implements Us @Override public void listRanking(UserParam param) { - List list = baseMapper.selectListRel(param); - Map map = new HashMap<>(); + List list = baseMapper.selectListRel(param); + Map map = new HashMap<>(); // list.forEach(d -> { // int count = appService.count(new LambdaQueryWrapper() // .eq(App::getUserId, d.getUserId())); @@ -130,7 +130,7 @@ public class UserServiceImpl extends ServiceImpl implements Us if (StrUtil.isBlank(username)) { return null; } - User user = baseMapper.selectByUsername(username, tenantId); + User user = getOne(new LambdaQueryWrapper().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 implements Us @Override public User getByPhone(String phone) { - return query().eq("phone", phone).one(); + return getOne( + new LambdaQueryWrapper() + .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 listStatisticsRel(UserParam param) { - List list = baseMapper.selectListStatisticsRel(param); + List list = baseMapper.selectListStatisticsRel(param); return list; } diff --git a/src/main/java/com/gxwebsoft/gx/controller/AliVoiceController.java b/src/main/java/com/gxwebsoft/gx/controller/AliVoiceController.java new file mode 100644 index 0000000..0704852 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/controller/AliVoiceController.java @@ -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 = "" + + role.getContent() + + " "; + } + 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 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; + } +} diff --git a/src/main/java/com/gxwebsoft/gx/controller/GxChatHistoryController.java b/src/main/java/com/gxwebsoft/gx/controller/GxChatHistoryController.java new file mode 100644 index 0000000..7259a02 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/controller/GxChatHistoryController.java @@ -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> page(GxChatHistoryParam param) { + // 使用关联查询 + return success(gxChatHistoryService.pageRel(param)); + } + + @ApiOperation("查询全部") + @GetMapping() + public ApiResult> list(GxChatHistoryParam param) { + // 使用关联查询 + return success(gxChatHistoryService.listRel(param)); + } + + @PreAuthorize("hasAuthority('gx:gxChatHistory:list')") + @ApiOperation("根据id查询") + @GetMapping("/{id}") + public ApiResult 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 list) { + if (gxChatHistoryService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(gxChatHistoryService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (gxChatHistoryService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/gx/controller/GxChatListController.java b/src/main/java/com/gxwebsoft/gx/controller/GxChatListController.java new file mode 100644 index 0000000..11818f1 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/controller/GxChatListController.java @@ -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> userList() { + // 使用关联查询 + GxChatListParam param = new GxChatListParam(); + param.setUserId(getLoginUserId()); + return success(gxChatListService.listRel(param)); + } + + @ApiOperation("分页查询") + @GetMapping("/page") + public ApiResult> page(GxChatListParam param) { + // 使用关联查询 + return success(gxChatListService.pageRel(param)); + } + + @ApiOperation("查询全部") + @GetMapping() + public ApiResult> list(GxChatListParam param) { + // 使用关联查询 + return success(gxChatListService.listRel(param)); + } + + @PreAuthorize("hasAuthority('gx:gxChatList:list')") + @ApiOperation("根据id查询") + @GetMapping("/{id}") + public ApiResult 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 list) { + if (gxChatListService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(gxChatListService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (gxChatListService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/gx/controller/GxCoinLogController.java b/src/main/java/com/gxwebsoft/gx/controller/GxCoinLogController.java new file mode 100644 index 0000000..e3c72eb --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/controller/GxCoinLogController.java @@ -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> page(GxCoinLogParam param) { + // 使用关联查询 + return success(gxCoinLogService.pageRel(param)); + } + + @ApiOperation("查询全部金币记录") + @GetMapping() + public ApiResult> list(GxCoinLogParam param) { + // 使用关联查询 + param.setUserId(getLoginUserId()); + return success(gxCoinLogService.listRel(param)); + } + + @ApiOperation("根据id查询金币记录") + @GetMapping("/{id}") + public ApiResult 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 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 list) { + if (gxCoinLogService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改金币记录") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(gxCoinLogService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除金币记录") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (gxCoinLogService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawOrgPeopleController.java b/src/main/java/com/gxwebsoft/gx/controller/GxFeedbackController.java similarity index 58% rename from src/main/java/com/gxwebsoft/law/controller/LawOrgPeopleController.java rename to src/main/java/com/gxwebsoft/gx/controller/GxFeedbackController.java index 0aaa6cd..5857d18 100644 --- a/src/main/java/com/gxwebsoft/law/controller/LawOrgPeopleController.java +++ b/src/main/java/com/gxwebsoft/gx/controller/GxFeedbackController.java @@ -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> page(LawOrgPeopleParam param) { + public ApiResult> page(GxFeedbackParam param) { // 使用关联查询 - return success(lawOrgPeopleService.pageRel(param)); + return success(gxFeedbackService.pageRel(param)); } @ApiOperation("查询全部") @GetMapping() - public ApiResult> list(LawOrgPeopleParam param) { + public ApiResult> 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 get(@PathVariable("id") Integer id) { + public ApiResult 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 list) { - if (lawOrgPeopleService.saveBatch(list)) { + public ApiResult saveBatch(@RequestBody List 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 batchParam) { - if (batchParam.update(lawOrgPeopleService, "id")) { + public ApiResult updateBatch(@RequestBody BatchParam 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 ids) { - if (lawOrgPeopleService.removeByIds(ids)) { + if (gxFeedbackService.removeByIds(ids)) { return success("删除成功"); } return fail("删除失败"); diff --git a/src/main/java/com/gxwebsoft/gx/controller/GxRoleController.java b/src/main/java/com/gxwebsoft/gx/controller/GxRoleController.java new file mode 100644 index 0000000..0b0e450 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/controller/GxRoleController.java @@ -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> page(GxRoleParam param) { + // 使用关联查询 + return success(gxRoleService.pageRel(param)); + } + + @ApiOperation("查询全部") + @GetMapping() + public ApiResult> list(GxRoleParam param) { + // 使用关联查询 + return success(gxRoleService.listRel(param)); + } + + @ApiOperation("根据id查询") + @GetMapping("/{id}") + public ApiResult 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 list) { + if (gxRoleService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(gxRoleService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (gxRoleService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/gx/controller/GxSignLogController.java b/src/main/java/com/gxwebsoft/gx/controller/GxSignLogController.java new file mode 100644 index 0000000..cf991e2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/controller/GxSignLogController.java @@ -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> page(GxSignLogParam param) { + // 使用关联查询 + return success(gxSignLogService.pageRel(param)); + } + + @ApiOperation("查询全部") + @GetMapping() + public ApiResult> list(GxSignLogParam param) { + // 使用关联查询 + return success(gxSignLogService.listRel(param)); + } + + @PreAuthorize("hasAuthority('gx:gxSignLog:list')") + @ApiOperation("根据id查询") + @GetMapping("/{id}") + public ApiResult 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 list) { + if (gxSignLogService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(gxSignLogService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (gxSignLogService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckType.java b/src/main/java/com/gxwebsoft/gx/entity/GxChatHistory.java similarity index 65% rename from src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckType.java rename to src/main/java/com/gxwebsoft/gx/entity/GxChatHistory.java index 58cd4f5..9baa600 100644 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckType.java +++ b/src/main/java/com/gxwebsoft/gx/entity/GxChatHistory.java @@ -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 = "修改时间") diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalDocConfig.java b/src/main/java/com/gxwebsoft/gx/entity/GxChatList.java similarity index 60% rename from src/main/java/com/gxwebsoft/law/entity/LawLegalDocConfig.java rename to src/main/java/com/gxwebsoft/gx/entity/GxChatList.java index 85ae235..5f36465 100644 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalDocConfig.java +++ b/src/main/java/com/gxwebsoft/gx/entity/GxChatList.java @@ -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; } diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckConfigSuggest.java b/src/main/java/com/gxwebsoft/gx/entity/GxCoinLog.java similarity index 54% rename from src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckConfigSuggest.java rename to src/main/java/com/gxwebsoft/gx/entity/GxCoinLog.java index e1b079f..7d114cf 100644 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckConfigSuggest.java +++ b/src/main/java/com/gxwebsoft/gx/entity/GxCoinLog.java @@ -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 children; + private String paidNo; + @ApiModelProperty(value = "0待支付 1已支付") + private Integer status; + + @TableField(exist = false) + private Boolean isAdmin; } diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalDocType.java b/src/main/java/com/gxwebsoft/gx/entity/GxFeedback.java similarity index 65% rename from src/main/java/com/gxwebsoft/law/entity/LawLegalDocType.java rename to src/main/java/com/gxwebsoft/gx/entity/GxFeedback.java index fde8df7..ab03a2a 100644 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalDocType.java +++ b/src/main/java/com/gxwebsoft/gx/entity/GxFeedback.java @@ -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 = "修改时间") diff --git a/src/main/java/com/gxwebsoft/law/entity/LawNotaryList.java b/src/main/java/com/gxwebsoft/gx/entity/GxRole.java similarity index 50% rename from src/main/java/com/gxwebsoft/law/entity/LawNotaryList.java rename to src/main/java/com/gxwebsoft/gx/entity/GxRole.java index 59c2cf6..a74621a 100644 --- a/src/main/java/com/gxwebsoft/law/entity/LawNotaryList.java +++ b/src/main/java/com/gxwebsoft/gx/entity/GxRole.java @@ -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; } diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalCalType.java b/src/main/java/com/gxwebsoft/gx/entity/GxSignLog.java similarity index 71% rename from src/main/java/com/gxwebsoft/law/entity/LawLegalCalType.java rename to src/main/java/com/gxwebsoft/gx/entity/GxSignLog.java index a0a362e..93d63bc 100644 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalCalType.java +++ b/src/main/java/com/gxwebsoft/gx/entity/GxSignLog.java @@ -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 = "修改时间") diff --git a/src/main/java/com/gxwebsoft/gx/mapper/GxChatHistoryMapper.java b/src/main/java/com/gxwebsoft/gx/mapper/GxChatHistoryMapper.java new file mode 100644 index 0000000..fcba4b1 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/mapper/GxChatHistoryMapper.java @@ -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 { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") GxChatHistoryParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") GxChatHistoryParam param); + +} diff --git a/src/main/java/com/gxwebsoft/gx/mapper/GxChatListMapper.java b/src/main/java/com/gxwebsoft/gx/mapper/GxChatListMapper.java new file mode 100644 index 0000000..ceb1a08 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/mapper/GxChatListMapper.java @@ -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 { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") GxChatListParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") GxChatListParam param); + +} diff --git a/src/main/java/com/gxwebsoft/gx/mapper/GxCoinLogMapper.java b/src/main/java/com/gxwebsoft/gx/mapper/GxCoinLogMapper.java new file mode 100644 index 0000000..014dbe8 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/mapper/GxCoinLogMapper.java @@ -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 { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") GxCoinLogParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") GxCoinLogParam param); + +} diff --git a/src/main/java/com/gxwebsoft/gx/mapper/GxFeedbackMapper.java b/src/main/java/com/gxwebsoft/gx/mapper/GxFeedbackMapper.java new file mode 100644 index 0000000..a466620 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/mapper/GxFeedbackMapper.java @@ -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 { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") GxFeedbackParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") GxFeedbackParam param); + +} diff --git a/src/main/java/com/gxwebsoft/gx/mapper/GxRoleMapper.java b/src/main/java/com/gxwebsoft/gx/mapper/GxRoleMapper.java new file mode 100644 index 0000000..978e8b2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/mapper/GxRoleMapper.java @@ -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 { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") GxRoleParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") GxRoleParam param); + +} diff --git a/src/main/java/com/gxwebsoft/gx/mapper/GxSignLogMapper.java b/src/main/java/com/gxwebsoft/gx/mapper/GxSignLogMapper.java new file mode 100644 index 0000000..037fa86 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/mapper/GxSignLogMapper.java @@ -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 { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") GxSignLogParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") GxSignLogParam param); + +} diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckContentSuggestMapper.xml b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxChatHistoryMapper.xml similarity index 61% rename from src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckContentSuggestMapper.xml rename to src/main/java/com/gxwebsoft/gx/mapper/xml/GxChatHistoryMapper.xml index 62d38bc..9f91021 100644 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckContentSuggestMapper.xml +++ b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxChatHistoryMapper.xml @@ -1,23 +1,32 @@ - + SELECT a.* - FROM law_legal_org_check_content_suggest a + FROM gx_chat_history a AND a.id = #{param.id} - - AND a.group_id = #{param.groupId} + + AND a.chat_id = #{param.chatId} + + + AND a.conversation_id LIKE CONCAT('%', #{param.conversationId}, '%') + + + AND a.user_id = #{param.userId} AND a.content LIKE CONCAT('%', #{param.content}, '%') - - AND a.user_id = #{param.userId} + + AND a.reply LIKE CONCAT('%', #{param.reply}, '%') + + + AND a.status = #{param.status} AND a.deleted = #{param.deleted} @@ -25,6 +34,9 @@ AND a.deleted = 0 + + AND a.merchant_code LIKE CONCAT('%', #{param.merchantCode}, '%') + AND a.create_time >= #{param.createTimeStart} @@ -39,12 +51,12 @@ - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalContentMapper.xml b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxChatListMapper.xml similarity index 72% rename from src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalContentMapper.xml rename to src/main/java/com/gxwebsoft/gx/mapper/xml/GxChatListMapper.xml index e9a9b40..42ef333 100644 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalContentMapper.xml +++ b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxChatListMapper.xml @@ -1,24 +1,24 @@ - + SELECT a.* - FROM law_legal_cal_content a + FROM gx_chat_list a AND a.id = #{param.id} - - AND a.group_id = #{param.groupId} - - - AND a.content LIKE CONCAT('%', #{param.content}, '%') + + AND a.conversation_id LIKE CONCAT('%', #{param.conversationId}, '%') AND a.user_id = #{param.userId} + + AND a.status = #{param.status} + AND a.deleted = #{param.deleted} @@ -39,12 +39,12 @@ - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckConfigSuggestMapper.xml b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxCoinLogMapper.xml similarity index 61% rename from src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckConfigSuggestMapper.xml rename to src/main/java/com/gxwebsoft/gx/mapper/xml/GxCoinLogMapper.xml index c6f4bef..e1998b7 100644 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckConfigSuggestMapper.xml +++ b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxCoinLogMapper.xml @@ -1,32 +1,32 @@ - + SELECT a.* - FROM law_legal_org_check_config_suggest a + FROM gx_coin_log a AND a.id = #{param.id} - - AND a.type_id = #{param.typeId} + + AND a.order_no LIKE CONCAT('%', #{param.orderNo}, '%') - - AND a.parent_id = #{param.parentId} - - - AND a.title LIKE CONCAT('%', #{param.title}, '%') + + AND a.user_id = #{param.userId} AND a.type LIKE CONCAT('%', #{param.type}, '%') - - AND a.answer LIKE CONCAT('%', #{param.answer}, '%') + + AND a.num = #{param.num} - - AND a.user_id = #{param.userId} + + AND a.desc LIKE CONCAT('%', #{param.desc}, '%') + + + AND a.sort_number = #{param.sortNumber} AND a.deleted = #{param.deleted} @@ -40,20 +40,27 @@ AND a.create_time <= #{param.createTimeEnd} + + AND a.paid_no LIKE CONCAT('%', #{param.paidNo}, '%') + + + AND a.status = #{param.status} + AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') ) + ORDER BY a.id DESC - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckTypeMapper.xml b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxFeedbackMapper.xml similarity index 66% rename from src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckTypeMapper.xml rename to src/main/java/com/gxwebsoft/gx/mapper/xml/GxFeedbackMapper.xml index 1f4d9ff..111e87c 100644 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckTypeMapper.xml +++ b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxFeedbackMapper.xml @@ -1,26 +1,32 @@ - + SELECT a.* - FROM law_legal_org_check_type a + FROM gx_feedback a AND a.id = #{param.id} - - AND a.icon LIKE CONCAT('%', #{param.icon}, '%') + + AND a.func_exp LIKE CONCAT('%', #{param.funcExp}, '%') - - AND a.title LIKE CONCAT('%', #{param.title}, '%') + + AND a.advisory_exp LIKE CONCAT('%', #{param.advisoryExp}, '%') + + + AND a.comments LIKE CONCAT('%', #{param.comments}, '%') + + + AND a.user_id = #{param.userId} AND a.sort_number = #{param.sortNumber} - - AND a.user_id = #{param.userId} + + AND a.status = #{param.status} AND a.deleted = #{param.deleted} @@ -42,12 +48,12 @@ - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckConfigMapper.xml b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxRoleMapper.xml similarity index 58% rename from src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckConfigMapper.xml rename to src/main/java/com/gxwebsoft/gx/mapper/xml/GxRoleMapper.xml index c0d6646..03f211f 100644 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckConfigMapper.xml +++ b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxRoleMapper.xml @@ -1,29 +1,32 @@ - + SELECT a.* - FROM law_legal_org_check_config a + FROM gx_role a AND a.id = #{param.id} - - AND a.type_id = #{param.typeId} + + AND a.role_name LIKE CONCAT('%', #{param.roleName}, '%') - - AND a.title LIKE CONCAT('%', #{param.title}, '%') + + AND a.role_desc LIKE CONCAT('%', #{param.roleDesc}, '%') - - AND a.type LIKE CONCAT('%', #{param.type}, '%') + + AND a.avatar LIKE CONCAT('%', #{param.avatar}, '%') - - AND a.answer LIKE CONCAT('%', #{param.answer}, '%') + + AND a.bg_image LIKE CONCAT('%', #{param.bgImage}, '%') - - AND a.user_id = #{param.userId} + + AND a.voice LIKE CONCAT('%', #{param.voice}, '%') + + + AND a.status = #{param.status} AND a.deleted = #{param.deleted} @@ -45,12 +48,12 @@ - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalTypeMapper.xml b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxSignLogMapper.xml similarity index 74% rename from src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalTypeMapper.xml rename to src/main/java/com/gxwebsoft/gx/mapper/xml/GxSignLogMapper.xml index e5aead6..2c39e31 100644 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalTypeMapper.xml +++ b/src/main/java/com/gxwebsoft/gx/mapper/xml/GxSignLogMapper.xml @@ -1,26 +1,26 @@ - + SELECT a.* - FROM law_legal_cal_type a + FROM gx_sign_log a AND a.id = #{param.id} - - AND a.icon LIKE CONCAT('%', #{param.icon}, '%') + + AND a.user_id = #{param.userId} - - AND a.title LIKE CONCAT('%', #{param.title}, '%') + + AND a.date LIKE CONCAT('%', #{param.date}, '%') AND a.sort_number = #{param.sortNumber} - - AND a.user_id = #{param.userId} + + AND a.status = #{param.status} AND a.deleted = #{param.deleted} @@ -42,12 +42,12 @@ - - diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckContentSuggestParam.java b/src/main/java/com/gxwebsoft/gx/param/GxChatHistoryParam.java similarity index 63% rename from src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckContentSuggestParam.java rename to src/main/java/com/gxwebsoft/gx/param/GxChatHistoryParam.java index 4dbaf37..026703c 100644 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckContentSuggestParam.java +++ b/src/main/java/com/gxwebsoft/gx/param/GxChatHistoryParam.java @@ -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; + } diff --git a/src/main/java/com/gxwebsoft/law/param/LawOrgPeopleParam.java b/src/main/java/com/gxwebsoft/gx/param/GxChatListParam.java similarity index 72% rename from src/main/java/com/gxwebsoft/law/param/LawOrgPeopleParam.java rename to src/main/java/com/gxwebsoft/gx/param/GxChatListParam.java index e715619..b23f7f8 100644 --- a/src/main/java/com/gxwebsoft/law/param/LawOrgPeopleParam.java +++ b/src/main/java/com/gxwebsoft/gx/param/GxChatListParam.java @@ -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; diff --git a/src/main/java/com/gxwebsoft/law/param/LawOrgParam.java b/src/main/java/com/gxwebsoft/gx/param/GxCoinLogParam.java similarity index 62% rename from src/main/java/com/gxwebsoft/law/param/LawOrgParam.java rename to src/main/java/com/gxwebsoft/gx/param/GxCoinLogParam.java index 8da8a85..3a36617 100644 --- a/src/main/java/com/gxwebsoft/law/param/LawOrgParam.java +++ b/src/main/java/com/gxwebsoft/gx/param/GxCoinLogParam.java @@ -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; + } diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckTypeSuggestParam.java b/src/main/java/com/gxwebsoft/gx/param/GxFeedbackParam.java similarity index 63% rename from src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckTypeSuggestParam.java rename to src/main/java/com/gxwebsoft/gx/param/GxFeedbackParam.java index 5fd5c5d..c058ce8 100644 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckTypeSuggestParam.java +++ b/src/main/java/com/gxwebsoft/gx/param/GxFeedbackParam.java @@ -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; diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalCalTypeParam.java b/src/main/java/com/gxwebsoft/gx/param/GxRoleParam.java similarity index 55% rename from src/main/java/com/gxwebsoft/law/param/LawLegalCalTypeParam.java rename to src/main/java/com/gxwebsoft/gx/param/GxRoleParam.java index 0788f57..72766dd 100644 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalCalTypeParam.java +++ b/src/main/java/com/gxwebsoft/gx/param/GxRoleParam.java @@ -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; + } diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalDocTypeParam.java b/src/main/java/com/gxwebsoft/gx/param/GxSignLogParam.java similarity index 71% rename from src/main/java/com/gxwebsoft/law/param/LawLegalDocTypeParam.java rename to src/main/java/com/gxwebsoft/gx/param/GxSignLogParam.java index a27374b..b3904e0 100644 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalDocTypeParam.java +++ b/src/main/java/com/gxwebsoft/gx/param/GxSignLogParam.java @@ -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) diff --git a/src/main/java/com/gxwebsoft/gx/service/GxChatHistoryService.java b/src/main/java/com/gxwebsoft/gx/service/GxChatHistoryService.java new file mode 100644 index 0000000..4a3e1e5 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/GxChatHistoryService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(GxChatHistoryParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(GxChatHistoryParam param); + + /** + * 根据id查询 + * + * @param id + * @return GxChatHistory + */ + GxChatHistory getByIdRel(Integer id); + + GxChatHistory getLast(Integer chatId); +} diff --git a/src/main/java/com/gxwebsoft/gx/service/GxChatListService.java b/src/main/java/com/gxwebsoft/gx/service/GxChatListService.java new file mode 100644 index 0000000..f1abe5e --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/GxChatListService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(GxChatListParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(GxChatListParam param); + + /** + * 根据id查询 + * + * @param id + * @return GxChatList + */ + GxChatList getByIdRel(Integer id); + + void updateConversationId(Integer chatId, String conversationId); +} diff --git a/src/main/java/com/gxwebsoft/gx/service/GxCoinLogService.java b/src/main/java/com/gxwebsoft/gx/service/GxCoinLogService.java new file mode 100644 index 0000000..5954a89 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/GxCoinLogService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(GxCoinLogParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List 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); +} diff --git a/src/main/java/com/gxwebsoft/gx/service/GxFeedbackService.java b/src/main/java/com/gxwebsoft/gx/service/GxFeedbackService.java new file mode 100644 index 0000000..bde7cff --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/GxFeedbackService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(GxFeedbackParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(GxFeedbackParam param); + + /** + * 根据id查询 + * + * @param id + * @return GxFeedback + */ + GxFeedback getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/gx/service/GxRoleService.java b/src/main/java/com/gxwebsoft/gx/service/GxRoleService.java new file mode 100644 index 0000000..30eaaf8 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/GxRoleService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(GxRoleParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(GxRoleParam param); + + /** + * 根据id查询 + * + * @param id + * @return GxRole + */ + GxRole getByIdRel(Integer id); + + GxRole getByRoleName(String roleName); +} diff --git a/src/main/java/com/gxwebsoft/gx/service/GxSignLogService.java b/src/main/java/com/gxwebsoft/gx/service/GxSignLogService.java new file mode 100644 index 0000000..18c62ed --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/GxSignLogService.java @@ -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 { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(GxSignLogParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(GxSignLogParam param); + + /** + * 根据id查询 + * + * @param id + * @return GxSignLog + */ + GxSignLog getByIdRel(Integer id); + + GxSignLog check(Integer userId, String date); +} diff --git a/src/main/java/com/gxwebsoft/gx/service/impl/GxChatHistoryServiceImpl.java b/src/main/java/com/gxwebsoft/gx/service/impl/GxChatHistoryServiceImpl.java new file mode 100644 index 0000000..05a455f --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/impl/GxChatHistoryServiceImpl.java @@ -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 implements GxChatHistoryService { + + @Override + public PageResult pageRel(GxChatHistoryParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(GxChatHistoryParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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() + .eq(GxChatHistory::getChatId, chatId) + .orderByDesc(GxChatHistory::getCreateTime) + .last("limit 1") + ); + } + +} diff --git a/src/main/java/com/gxwebsoft/gx/service/impl/GxChatListServiceImpl.java b/src/main/java/com/gxwebsoft/gx/service/impl/GxChatListServiceImpl.java new file mode 100644 index 0000000..5183029 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/impl/GxChatListServiceImpl.java @@ -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 implements GxChatListService { + @Resource + private GxChatHistoryService gxChatHistoryService; + @Resource + private GxRoleService gxRoleService; + + @Override + public PageResult pageRel(GxChatListParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(GxChatListParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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() + .eq(GxChatList::getId, chatId) + .set(GxChatList::getConversationId, conversationId) + ); + } + +} diff --git a/src/main/java/com/gxwebsoft/gx/service/impl/GxCoinLogServiceImpl.java b/src/main/java/com/gxwebsoft/gx/service/impl/GxCoinLogServiceImpl.java new file mode 100644 index 0000000..796dbe2 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/impl/GxCoinLogServiceImpl.java @@ -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 implements GxCoinLogService { + + @Override + public PageResult pageRel(GxCoinLogParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(GxCoinLogParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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() + .eq(GxCoinLog::getOrderNo, orderNo) + .last("limit 1") + ); + } + + @Override + public Integer getLogNumByDesc(Integer userId, String desc){ + return count( + new LambdaQueryWrapper() + .eq(GxCoinLog::getUserId, userId) + .eq(GxCoinLog::getDesc, desc) + ); + } + + @Override + public Integer getLogNumByDesc(Integer userId, String desc, String date){ + return count( + new LambdaQueryWrapper() + .eq(GxCoinLog::getUserId, userId) + .eq(GxCoinLog::getDesc, desc) + .eq(GxCoinLog::getDate, date) + ); + } +} diff --git a/src/main/java/com/gxwebsoft/gx/service/impl/GxFeedbackServiceImpl.java b/src/main/java/com/gxwebsoft/gx/service/impl/GxFeedbackServiceImpl.java new file mode 100644 index 0000000..d485803 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/impl/GxFeedbackServiceImpl.java @@ -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 implements GxFeedbackService { + + @Override + public PageResult pageRel(GxFeedbackParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(GxFeedbackParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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)); + } + +} diff --git a/src/main/java/com/gxwebsoft/gx/service/impl/GxRoleServiceImpl.java b/src/main/java/com/gxwebsoft/gx/service/impl/GxRoleServiceImpl.java new file mode 100644 index 0000000..18f80de --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/impl/GxRoleServiceImpl.java @@ -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 implements GxRoleService { + + @Override + public PageResult pageRel(GxRoleParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(GxRoleParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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() + .eq(GxRole::getRoleName, roleName) + .last("limit 1") + ); + } + +} diff --git a/src/main/java/com/gxwebsoft/gx/service/impl/GxSignLogServiceImpl.java b/src/main/java/com/gxwebsoft/gx/service/impl/GxSignLogServiceImpl.java new file mode 100644 index 0000000..c9e3b51 --- /dev/null +++ b/src/main/java/com/gxwebsoft/gx/service/impl/GxSignLogServiceImpl.java @@ -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 implements GxSignLogService { + + @Override + public PageResult pageRel(GxSignLogParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("sort_number asc, create_time desc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(GxSignLogParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam 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() + .eq(GxSignLog::getUserId, userId) + .eq(GxSignLog::getDate, date) + .last("limit 1") + ); + } + +} diff --git a/src/main/java/com/gxwebsoft/law/controller/AiController.java b/src/main/java/com/gxwebsoft/law/controller/AiController.java index fff484a..098e91f 100644 --- a/src/main/java/com/gxwebsoft/law/controller/AiController.java +++ b/src/main/java/com/gxwebsoft/law/controller/AiController.java @@ -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 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 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 paramsJsonStr = new HashMap<>(); + GxRole gxRole = gxRoleService.getByRoleName(message.getRoleName()); +// Map 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 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 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 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 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 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 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 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 data) { if (data.get("taskId") == null) return success(); String taskId = data.get("taskId").toString(); - Map postData = new HashMap<>(); + Map 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)) diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalAidController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalAidController.java deleted file mode 100644 index 013c714..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalAidController.java +++ /dev/null @@ -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> page(LawLegalAidParam param) { - // 使用关联查询 - return success(lawLegalAidService.pageRel(param)); - } - - @ApiOperation("查询全部法律援助申请") - @GetMapping() - public ApiResult> list(LawLegalAidParam param) { - // 使用关联查询 - return success(lawLegalAidService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawLegalAid:list')") - @ApiOperation("根据id查询法律援助申请") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalAidService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改法律援助申请") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalAidService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除法律援助申请") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalAidService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @ApiOperation("导出") - @PostMapping("/export") - public ApiResult export() throws IOException { - List list = lawLegalAidService.list(); - XWPFDocument doc = new XWPFDocument(Files.newInputStream(Paths.get(uploadPath + "/file/法律援助申请表.docx"))); - List 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 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"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalAppraisalController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalAppraisalController.java deleted file mode 100644 index 40faa4c..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalAppraisalController.java +++ /dev/null @@ -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> page(LawLegalAppraisalParam param) { - // 使用关联查询 - return success(lawLegalAppraisalService.pageRel(param)); - } - - @ApiOperation("查询全部司法鉴定申请") - @GetMapping() - public ApiResult> list(LawLegalAppraisalParam param) { - // 使用关联查询 - return success(lawLegalAppraisalService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawLegalAppraisal:list')") - @ApiOperation("根据id查询司法鉴定申请") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalAppraisalService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改司法鉴定申请") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalAppraisalService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除司法鉴定申请") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalAppraisalService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalArbitrateController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalArbitrateController.java deleted file mode 100644 index 5216fbe..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalArbitrateController.java +++ /dev/null @@ -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> page(LawLegalArbitrateParam param) { - // 使用关联查询 - return success(lawLegalArbitrateService.pageRel(param)); - } - - @ApiOperation("查询全部法律仲裁申请") - @GetMapping() - public ApiResult> list(LawLegalArbitrateParam param) { - // 使用关联查询 - return success(lawLegalArbitrateService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawLegalArbitrate:list')") - @ApiOperation("根据id查询法律仲裁申请") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalArbitrateService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改法律仲裁申请") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalArbitrateService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除法律仲裁申请") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalArbitrateService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - - @ApiOperation("导出") - @PostMapping("/export") - public ApiResult export() throws IOException { - List list = lawLegalArbitrateService.list(); - List 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); - } -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalCalConfigController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalCalConfigController.java deleted file mode 100644 index 2ff0ab0..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalCalConfigController.java +++ /dev/null @@ -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> page(LawLegalCalConfigParam param) { - // 使用关联查询 - return success(lawLegalCalConfigService.pageRel(param)); - } - - @ApiOperation("查询全部法律计算器配置") - @GetMapping() - public ApiResult> list(LawLegalCalConfigParam param) { - // 使用关联查询 - return success(lawLegalCalConfigService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawLegalCalConfig:list')") - @ApiOperation("根据id查询法律计算器配置") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalCalConfigService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改法律计算器配置") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalCalConfigService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除法律计算器配置") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalCalConfigService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalCalContentController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalCalContentController.java deleted file mode 100644 index 78c18bf..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalCalContentController.java +++ /dev/null @@ -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> page(LawLegalCalContentParam param) { - // 使用关联查询 - return success(lawLegalCalContentService.pageRel(param)); - } - - @ApiOperation("查询全部用户填写法律计算器内容") - @GetMapping() - public ApiResult> list(LawLegalCalContentParam param) { - // 使用关联查询 - return success(lawLegalCalContentService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawLegalCalContent:list')") - @ApiOperation("根据id查询用户填写法律计算器内容") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalCalContentService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改用户填写法律计算器内容") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalCalContentService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除用户填写法律计算器内容") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalCalContentService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalCalTypeController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalCalTypeController.java deleted file mode 100644 index 7652146..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalCalTypeController.java +++ /dev/null @@ -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> page(LawLegalCalTypeParam param) { - // 使用关联查询 - return success(lawLegalCalTypeService.pageRel(param)); - } - - @ApiOperation("查询全部法律计算器配置") - @GetMapping() - public ApiResult> list(LawLegalCalTypeParam param) { - // 使用关联查询 - return success(lawLegalCalTypeService.listRel(param)); - } - - @ApiOperation("根据id查询法律计算器配置") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalCalTypeService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改法律计算器配置") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalCalTypeService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除法律计算器配置") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalCalTypeService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalDocConfigController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalDocConfigController.java deleted file mode 100644 index 6fe4c60..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalDocConfigController.java +++ /dev/null @@ -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> page(LawLegalDocConfigParam param) { - // 使用关联查询 - return success(lawLegalDocConfigService.pageRel(param)); - } - - @ApiOperation("查询全部法律文书配置") - @GetMapping() - public ApiResult> list(LawLegalDocConfigParam param) { - // 使用关联查询 - return success(lawLegalDocConfigService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawLegalDocConfig:list')") - @ApiOperation("根据id查询法律文书配置") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalDocConfigService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改法律文书配置") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalDocConfigService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除法律文书配置") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List 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); - } - } -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalDocContentController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalDocContentController.java deleted file mode 100644 index a9388e1..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalDocContentController.java +++ /dev/null @@ -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> page(LawLegalDocContentParam param) { - // 使用关联查询 - return success(lawLegalDocContentService.pageRel(param)); - } - - @ApiOperation("查询全部用户填写法律文书内容") - @GetMapping() - public ApiResult> list(LawLegalDocContentParam param) { - // 使用关联查询 - return success(lawLegalDocContentService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawLegalDocContent:list')") - @ApiOperation("根据id查询用户填写法律文书内容") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalDocContentService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改用户填写法律文书内容") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalDocContentService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除用户填写法律文书内容") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalDocContentService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalDocTypeController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalDocTypeController.java deleted file mode 100644 index a5a30d2..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalDocTypeController.java +++ /dev/null @@ -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> page(LawLegalDocTypeParam param) { - // 使用关联查询 - return success(lawLegalDocTypeService.pageRel(param)); - } - - @ApiOperation("查询全部法律文书配置") - @GetMapping() - public ApiResult> list(LawLegalDocTypeParam param) { - // 使用关联查询 - return success(lawLegalDocTypeService.listRel(param)); - } - - @ApiOperation("根据id查询法律文书配置") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalDocTypeService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改法律文书配置") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalDocTypeService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除法律文书配置") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalDocTypeService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckConfigController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckConfigController.java deleted file mode 100644 index b89bdcd..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckConfigController.java +++ /dev/null @@ -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> page(LawLegalOrgCheckConfigParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckConfigService.pageRel(param)); - } - - @ApiOperation("查询全部企业法制体检配置") - @GetMapping() - public ApiResult> list(LawLegalOrgCheckConfigParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckConfigService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawLegalOrgCheckConfig:list')") - @ApiOperation("根据id查询企业法制体检配置") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalOrgCheckConfigService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改企业法制体检配置") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalOrgCheckConfigService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除企业法制体检配置") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalOrgCheckConfigService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckConfigSuggestController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckConfigSuggestController.java deleted file mode 100644 index 30f4c96..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckConfigSuggestController.java +++ /dev/null @@ -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> page(LawLegalOrgCheckConfigSuggestParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckConfigSuggestService.pageRel(param)); - } - - @ApiOperation("查询全部法律意见书配置") - @GetMapping() - public ApiResult> list(LawLegalOrgCheckConfigSuggestParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckConfigSuggestService.listRel(param)); - } - - @ApiOperation("树形") - @GetMapping("/tree") - public ApiResult> tree(LawLegalOrgCheckConfigSuggestParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckConfigSuggestService.listByLevel(param)); - } - - @PreAuthorize("hasAuthority('law:lawLegalOrgCheckConfigSuggest:list')") - @ApiOperation("根据id查询法律意见书配置") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalOrgCheckConfigSuggestService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改法律意见书配置") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalOrgCheckConfigSuggestService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除法律意见书配置") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalOrgCheckConfigSuggestService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckContentController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckContentController.java deleted file mode 100644 index 7411f29..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckContentController.java +++ /dev/null @@ -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> page(LawLegalOrgCheckContentParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckContentService.pageRel(param)); - } - - @ApiOperation("查询全部用户填写企业法制体检内容") - @GetMapping() - public ApiResult> list(LawLegalOrgCheckContentParam param) { - // 使用关联查询 - User loginUser = getLoginUser(); - if (loginUser != null) { - param.setUserId(loginUser.getUserId()); - } - return success(lawLegalOrgCheckContentService.listRel(param)); - } - - @ApiOperation("根据id查询用户填写企业法制体检内容") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalOrgCheckContentService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改用户填写企业法制体检内容") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalOrgCheckContentService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除用户填写企业法制体检内容") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalOrgCheckContentService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckContentSuggestController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckContentSuggestController.java deleted file mode 100644 index 63f0836..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckContentSuggestController.java +++ /dev/null @@ -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> page(LawLegalOrgCheckContentSuggestParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckContentSuggestService.pageRel(param)); - } - - @ApiOperation("查询全部用户填写法律意见书内容") - @GetMapping() - public ApiResult> list(LawLegalOrgCheckContentSuggestParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckContentSuggestService.listRel(param)); - } - - @ApiOperation("根据id查询用户填写法律意见书内容") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalOrgCheckContentSuggestService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改用户填写法律意见书内容") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalOrgCheckContentSuggestService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除用户填写法律意见书内容") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalOrgCheckContentSuggestService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckTypeController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckTypeController.java deleted file mode 100644 index 3d3e647..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckTypeController.java +++ /dev/null @@ -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> page(LawLegalOrgCheckTypeParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckTypeService.pageRel(param)); - } - - @ApiOperation("查询全部企业法制体检配置") - @GetMapping() - public ApiResult> list(LawLegalOrgCheckTypeParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckTypeService.listRel(param)); - } - - @ApiOperation("根据id查询企业法制体检配置") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalOrgCheckTypeService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改企业法制体检配置") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalOrgCheckTypeService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除企业法制体检配置") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalOrgCheckTypeService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckTypeSuggestController.java b/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckTypeSuggestController.java deleted file mode 100644 index 27eeb04..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawLegalOrgCheckTypeSuggestController.java +++ /dev/null @@ -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> page(LawLegalOrgCheckTypeSuggestParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckTypeSuggestService.pageRel(param)); - } - - @ApiOperation("查询全部法律意见书配置") - @GetMapping() - public ApiResult> list(LawLegalOrgCheckTypeSuggestParam param) { - // 使用关联查询 - return success(lawLegalOrgCheckTypeSuggestService.listRel(param)); - } - - @ApiOperation("根据id查询法律意见书配置") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawLegalOrgCheckTypeSuggestService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改法律意见书配置") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawLegalOrgCheckTypeSuggestService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除法律意见书配置") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawLegalOrgCheckTypeSuggestService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawNotaryConfigController.java b/src/main/java/com/gxwebsoft/law/controller/LawNotaryConfigController.java deleted file mode 100644 index d131edc..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawNotaryConfigController.java +++ /dev/null @@ -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> page(LawNotaryConfigParam param) { - // 使用关联查询 - return success(lawNotaryConfigService.pageRel(param)); - } - - @ApiOperation("查询全部公证配置") - @GetMapping() - public ApiResult> list(LawNotaryConfigParam param) { - // 使用关联查询 - return success(lawNotaryConfigService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawNotaryConfig:list')") - @ApiOperation("根据id查询公证配置") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawNotaryConfigService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改公证配置") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawNotaryConfigService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除公证配置") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawNotaryConfigService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawNotaryListController.java b/src/main/java/com/gxwebsoft/law/controller/LawNotaryListController.java deleted file mode 100644 index 18ae913..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawNotaryListController.java +++ /dev/null @@ -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> page(LawNotaryListParam param) { - // 使用关联查询 - return success(lawNotaryListService.pageRel(param)); - } - - @ApiOperation("查询全部公证列表") - @GetMapping() - public ApiResult> list(LawNotaryListParam param) { - // 使用关联查询 - return success(lawNotaryListService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawNotaryList:list')") - @ApiOperation("根据id查询公证列表") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawNotaryListService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改公证列表") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawNotaryListService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除公证列表") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawNotaryListService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawOrgCheckLogController.java b/src/main/java/com/gxwebsoft/law/controller/LawOrgCheckLogController.java deleted file mode 100644 index b3d90bc..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawOrgCheckLogController.java +++ /dev/null @@ -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> page(LawOrgCheckLogParam param) { - // 使用关联查询 - return success(lawOrgCheckLogService.pageRel(param)); - } - - @ApiOperation("查询全部企业法制检查报告") - @GetMapping() - public ApiResult> list(LawOrgCheckLogParam param) { - // 使用关联查询 - return success(lawOrgCheckLogService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawOrgCheckLog:list')") - @ApiOperation("根据id查询企业法制检查报告") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawOrgCheckLogService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改企业法制检查报告") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawOrgCheckLogService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除企业法制检查报告") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawOrgCheckLogService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/controller/LawOrgController.java b/src/main/java/com/gxwebsoft/law/controller/LawOrgController.java deleted file mode 100644 index a6ff687..0000000 --- a/src/main/java/com/gxwebsoft/law/controller/LawOrgController.java +++ /dev/null @@ -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> page(LawOrgParam param) { - // 使用关联查询 - return success(lawOrgService.pageRel(param)); - } - - @ApiOperation("查询全部机构") - @GetMapping() - public ApiResult> list(LawOrgParam param) { - // 使用关联查询 - return success(lawOrgService.listRel(param)); - } - - @PreAuthorize("hasAuthority('law:lawOrg:list')") - @ApiOperation("根据id查询机构") - @GetMapping("/{id}") - public ApiResult 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 list) { - if (lawOrgService.saveBatch(list)) { - return success("添加成功"); - } - return fail("添加失败"); - } - - @ApiOperation("批量修改机构") - @PutMapping("/batch") - public ApiResult updateBatch(@RequestBody BatchParam batchParam) { - if (batchParam.update(lawOrgService, "id")) { - return success("修改成功"); - } - return fail("修改失败"); - } - - @ApiOperation("批量删除机构") - @DeleteMapping("/batch") - public ApiResult removeBatch(@RequestBody List ids) { - if (lawOrgService.removeByIds(ids)) { - return success("删除成功"); - } - return fail("删除失败"); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/ChatMessage.java b/src/main/java/com/gxwebsoft/law/entity/ChatMessage.java index 9165f9c..f9e899b 100644 --- a/src/main/java/com/gxwebsoft/law/entity/ChatMessage.java +++ b/src/main/java/com/gxwebsoft/law/entity/ChatMessage.java @@ -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 files; } diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalAid.java b/src/main/java/com/gxwebsoft/law/entity/LawLegalAid.java deleted file mode 100644 index e7cfb13..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalAid.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalAppraisal.java b/src/main/java/com/gxwebsoft/law/entity/LawLegalAppraisal.java deleted file mode 100644 index 42beb3a..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalAppraisal.java +++ /dev/null @@ -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; -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalArbitrate.java b/src/main/java/com/gxwebsoft/law/entity/LawLegalArbitrate.java deleted file mode 100644 index 3a53056..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalArbitrate.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalCalConfig.java b/src/main/java/com/gxwebsoft/law/entity/LawLegalCalConfig.java deleted file mode 100644 index e348809..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalCalConfig.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalCalContent.java b/src/main/java/com/gxwebsoft/law/entity/LawLegalCalContent.java deleted file mode 100644 index d2d40fe..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalCalContent.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalDocContent.java b/src/main/java/com/gxwebsoft/law/entity/LawLegalDocContent.java deleted file mode 100644 index 853fd2e..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalDocContent.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckConfig.java b/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckConfig.java deleted file mode 100644 index a453959..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckConfig.java +++ /dev/null @@ -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 17:51:15 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "LawLegalOrgCheckConfig对象", description = "企业法制体检配置") -@TableName("law_legal_org_check_config") -public class LawLegalOrgCheckConfig 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; - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckContentSuggest.java b/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckContentSuggest.java deleted file mode 100644 index 647bd8a..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckContentSuggest.java +++ /dev/null @@ -1,53 +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 18:55:31 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "LawLegalOrgCheckContentSuggest对象", description = "用户填写法律意见书内容") -@TableName("law_legal_org_check_content_suggest") -public class LawLegalOrgCheckContentSuggest 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 aiContent; - - private String title; - - 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; - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckTypeSuggest.java b/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckTypeSuggest.java deleted file mode 100644 index ab66312..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawLegalOrgCheckTypeSuggest.java +++ /dev/null @@ -1,62 +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 18:55:31 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "LawLegalOrgCheckTypeSuggest对象", description = "法律意见书配置") -@TableName("law_legal_org_check_type_suggest") -public class LawLegalOrgCheckTypeSuggest implements Serializable { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - private String icon; - - private String title; - - private String fileList; - - private String tips; - - private String methods; - - private String urls; - - private Integer articleCateId; - - @ApiModelProperty(value = "类型") - private Integer sortNumber; - - 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; - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawNotaryConfig.java b/src/main/java/com/gxwebsoft/law/entity/LawNotaryConfig.java deleted file mode 100644 index 260c8d1..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawNotaryConfig.java +++ /dev/null @@ -1,52 +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-05-17 16:10:35 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "LawNotaryConfig对象", description = "公证配置") -@TableName("law_notary_config") -public class LawNotaryConfig implements Serializable { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - private String title; - - private String type; - - @ApiModelProperty(value = "配置") - private String configList; - - 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; - -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawOrg.java b/src/main/java/com/gxwebsoft/law/entity/LawOrg.java deleted file mode 100644 index 6c0f5af..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawOrg.java +++ /dev/null @@ -1,68 +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-04-14 00:35:34 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "LawOrg对象", description = "机构") -@TableName("law_org") -public class LawOrg implements Serializable { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - private String title; - - @ApiModelProperty(value = "0律所 1基层法律服务所 2仲裁机构 3公证处") - private String type; - - private Integer provinceId; - - private Integer cityId; - - private String phone; - - private String address; - - private Integer areaId; - - private String lat; - - private String lng; - - @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 String province; - - @TableField(exist = false) - private String city; - - @TableField(exist = false) - private String region; -} diff --git a/src/main/java/com/gxwebsoft/law/entity/LawOrgCheckLog.java b/src/main/java/com/gxwebsoft/law/entity/LawOrgCheckLog.java deleted file mode 100644 index 31a2d2e..0000000 --- a/src/main/java/com/gxwebsoft/law/entity/LawOrgCheckLog.java +++ /dev/null @@ -1,61 +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-20 07:43:09 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@ApiModel(value = "LawOrgCheckLog对象", description = "企业法制检查报告") -@TableName("law_org_check_log") -public class LawOrgCheckLog implements Serializable { - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - private String companyName; - - @ApiModelProperty(value = "来访单位") - private String checkCompanyName; - - private String checkDate; - - private String type; - - @ApiModelProperty(value = "本月检查次数") - private Integer checkNum; - - private String comment; - - private String remark; - - 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; - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalAidMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalAidMapper.java deleted file mode 100644 index 979ab08..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalAidMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalAid; -import com.gxwebsoft.law.param.LawLegalAidParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 法律援助申请Mapper - * - * @author LX - * @since 2025-04-17 17:33:28 - */ -public interface LawLegalAidMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalAidParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalAidParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalAppraisalMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalAppraisalMapper.java deleted file mode 100644 index 9826b3a..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalAppraisalMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalAppraisal; -import com.gxwebsoft.law.param.LawLegalAppraisalParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 司法鉴定申请Mapper - * - * @author LX - * @since 2025-05-06 17:11:41 - */ -public interface LawLegalAppraisalMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalAppraisalParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalAppraisalParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalArbitrateMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalArbitrateMapper.java deleted file mode 100644 index e6a5e83..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalArbitrateMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalArbitrate; -import com.gxwebsoft.law.param.LawLegalArbitrateParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 法律仲裁申请Mapper - * - * @author LX - * @since 2025-05-06 15:56:26 - */ -public interface LawLegalArbitrateMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalArbitrateParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalArbitrateParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalCalConfigMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalCalConfigMapper.java deleted file mode 100644 index 68e5e82..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalCalConfigMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalCalConfig; -import com.gxwebsoft.law.param.LawLegalCalConfigParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 法律计算器配置Mapper - * - * @author LX - * @since 2025-04-17 19:23:47 - */ -public interface LawLegalCalConfigMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalCalConfigParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalCalConfigParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalCalContentMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalCalContentMapper.java deleted file mode 100644 index 3488367..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalCalContentMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalCalContent; -import com.gxwebsoft.law.param.LawLegalCalContentParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 用户填写法律计算器内容Mapper - * - * @author LX - * @since 2025-04-17 19:23:47 - */ -public interface LawLegalCalContentMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalCalContentParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalCalContentParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalCalTypeMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalCalTypeMapper.java deleted file mode 100644 index 2adae06..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalCalTypeMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalCalType; -import com.gxwebsoft.law.param.LawLegalCalTypeParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 法律计算器配置Mapper - * - * @author LX - * @since 2025-04-17 19:23:47 - */ -public interface LawLegalCalTypeMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalCalTypeParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalCalTypeParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalDocConfigMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalDocConfigMapper.java deleted file mode 100644 index 19cb755..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalDocConfigMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalDocConfig; -import com.gxwebsoft.law.param.LawLegalDocConfigParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 法律文书配置Mapper - * - * @author LX - * @since 2025-04-17 19:06:41 - */ -public interface LawLegalDocConfigMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalDocConfigParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalDocConfigParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalDocContentMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalDocContentMapper.java deleted file mode 100644 index 1cb051c..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalDocContentMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalDocContent; -import com.gxwebsoft.law.param.LawLegalDocContentParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 用户填写法律文书内容Mapper - * - * @author LX - * @since 2025-04-17 19:06:41 - */ -public interface LawLegalDocContentMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalDocContentParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalDocContentParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalDocTypeMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalDocTypeMapper.java deleted file mode 100644 index 5aeb487..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalDocTypeMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalDocType; -import com.gxwebsoft.law.param.LawLegalDocTypeParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 法律文书配置Mapper - * - * @author LX - * @since 2025-04-17 19:06:41 - */ -public interface LawLegalDocTypeMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalDocTypeParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalDocTypeParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckConfigMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckConfigMapper.java deleted file mode 100644 index 261c681..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckConfigMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalOrgCheckConfig; -import com.gxwebsoft.law.param.LawLegalOrgCheckConfigParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 企业法制体检配置Mapper - * - * @author LX - * @since 2025-04-17 17:51:15 - */ -public interface LawLegalOrgCheckConfigMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalOrgCheckConfigParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalOrgCheckConfigParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckConfigSuggestMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckConfigSuggestMapper.java deleted file mode 100644 index e6a9edc..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckConfigSuggestMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalOrgCheckConfigSuggest; -import com.gxwebsoft.law.param.LawLegalOrgCheckConfigSuggestParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 法律意见书配置Mapper - * - * @author LX - * @since 2025-04-17 18:55:31 - */ -public interface LawLegalOrgCheckConfigSuggestMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalOrgCheckConfigSuggestParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalOrgCheckConfigSuggestParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckContentMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckContentMapper.java deleted file mode 100644 index 6031823..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckContentMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalOrgCheckContent; -import com.gxwebsoft.law.param.LawLegalOrgCheckContentParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 用户填写企业法制体检内容Mapper - * - * @author LX - * @since 2025-04-17 17:48:54 - */ -public interface LawLegalOrgCheckContentMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalOrgCheckContentParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalOrgCheckContentParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckContentSuggestMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckContentSuggestMapper.java deleted file mode 100644 index 283685d..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckContentSuggestMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalOrgCheckContentSuggest; -import com.gxwebsoft.law.param.LawLegalOrgCheckContentSuggestParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 用户填写法律意见书内容Mapper - * - * @author LX - * @since 2025-04-17 18:55:31 - */ -public interface LawLegalOrgCheckContentSuggestMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalOrgCheckContentSuggestParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalOrgCheckContentSuggestParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckTypeMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckTypeMapper.java deleted file mode 100644 index b2110bf..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckTypeMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalOrgCheckType; -import com.gxwebsoft.law.param.LawLegalOrgCheckTypeParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 企业法制体检配置Mapper - * - * @author LX - * @since 2025-04-17 18:04:46 - */ -public interface LawLegalOrgCheckTypeMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalOrgCheckTypeParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalOrgCheckTypeParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckTypeSuggestMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckTypeSuggestMapper.java deleted file mode 100644 index a9069d9..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawLegalOrgCheckTypeSuggestMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawLegalOrgCheckTypeSuggest; -import com.gxwebsoft.law.param.LawLegalOrgCheckTypeSuggestParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 法律意见书配置Mapper - * - * @author LX - * @since 2025-04-17 18:55:31 - */ -public interface LawLegalOrgCheckTypeSuggestMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawLegalOrgCheckTypeSuggestParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawLegalOrgCheckTypeSuggestParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawNotaryConfigMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawNotaryConfigMapper.java deleted file mode 100644 index 294ccb5..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawNotaryConfigMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawNotaryConfig; -import com.gxwebsoft.law.param.LawNotaryConfigParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 公证配置Mapper - * - * @author LX - * @since 2025-05-17 16:10:35 - */ -public interface LawNotaryConfigMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawNotaryConfigParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawNotaryConfigParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawNotaryListMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawNotaryListMapper.java deleted file mode 100644 index 9c09fa9..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawNotaryListMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawNotaryList; -import com.gxwebsoft.law.param.LawNotaryListParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 公证列表Mapper - * - * @author LX - * @since 2025-05-17 16:10:35 - */ -public interface LawNotaryListMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawNotaryListParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawNotaryListParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawOrgCheckLogMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawOrgCheckLogMapper.java deleted file mode 100644 index 2727e46..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawOrgCheckLogMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawOrgCheckLog; -import com.gxwebsoft.law.param.LawOrgCheckLogParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 企业法制检查报告Mapper - * - * @author LX - * @since 2025-04-20 07:43:09 - */ -public interface LawOrgCheckLogMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawOrgCheckLogParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawOrgCheckLogParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawOrgMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawOrgMapper.java deleted file mode 100644 index 0915659..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawOrgMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawOrg; -import com.gxwebsoft.law.param.LawOrgParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 机构Mapper - * - * @author LX - * @since 2025-04-14 00:35:34 - */ -public interface LawOrgMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawOrgParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawOrgParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/LawOrgPeopleMapper.java b/src/main/java/com/gxwebsoft/law/mapper/LawOrgPeopleMapper.java deleted file mode 100644 index c560195..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/LawOrgPeopleMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.gxwebsoft.law.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.gxwebsoft.law.entity.LawOrgPeople; -import com.gxwebsoft.law.param.LawOrgPeopleParam; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * Mapper - * - * @author LX - * @since 2025-04-14 01:31:54 - */ -public interface LawOrgPeopleMapper extends BaseMapper { - - /** - * 分页查询 - * - * @param page 分页对象 - * @param param 查询参数 - * @return List - */ - List selectPageRel(@Param("page") IPage page, - @Param("param") LawOrgPeopleParam param); - - /** - * 查询全部 - * - * @param param 查询参数 - * @return List - */ - List selectListRel(@Param("param") LawOrgPeopleParam param); - -} diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalAidMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalAidMapper.xml deleted file mode 100644 index 454a426..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalAidMapper.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - SELECT a.* - FROM law_legal_aid a - - - AND a.id = #{param.id} - - - AND a.user_id = #{param.userId} - - - AND a.name LIKE CONCAT('%', #{param.name}, '%') - - - AND a.gender = #{param.gender} - - - AND a.phone LIKE CONCAT('%', #{param.phone}, '%') - - - AND a.birthday LIKE CONCAT('%', #{param.birthday}, '%') - - - AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%') - - - AND a.live_address LIKE CONCAT('%', #{param.liveAddress}, '%') - - - AND a.household_adderss LIKE CONCAT('%', #{param.householdAdderss}, '%') - - - AND a.content LIKE CONCAT('%', #{param.content}, '%') - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND ( - a.name LIKE CONCAT('%', #{param.keywords}, '%') - OR a.phone LIKE CONCAT('%', #{param.keywords}, '%') - OR a.id_card LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - ORDER BY a.create_time DESC - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalAppraisalMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalAppraisalMapper.xml deleted file mode 100644 index 440b212..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalAppraisalMapper.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - SELECT a.* - FROM law_legal_appraisal a - - - AND a.id = #{param.id} - - - AND a.user_id = #{param.userId} - - - AND a.name LIKE CONCAT('%', #{param.name}, '%') - - - AND a.gender = #{param.gender} - - - AND a.phone LIKE CONCAT('%', #{param.phone}, '%') - - - AND a.birthday LIKE CONCAT('%', #{param.birthday}, '%') - - - AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%') - - - AND a.live_address LIKE CONCAT('%', #{param.liveAddress}, '%') - - - AND a.household_address LIKE CONCAT('%', #{param.householdAddress}, '%') - - - AND a.org_id = #{param.orgId} - - - AND a.content LIKE CONCAT('%', #{param.content}, '%') - - - AND a.detail LIKE CONCAT('%', #{param.detail}, '%') - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - ORDER BY a.create_time DESC - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalArbitrateMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalArbitrateMapper.xml deleted file mode 100644 index ec7ccb0..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalArbitrateMapper.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - SELECT a.* - FROM law_legal_arbitrate a - - - AND a.id = #{param.id} - - - AND a.user_id = #{param.userId} - - - AND a.name LIKE CONCAT('%', #{param.name}, '%') - - - AND a.gender = #{param.gender} - - - AND a.phone LIKE CONCAT('%', #{param.phone}, '%') - - - AND a.birthday LIKE CONCAT('%', #{param.birthday}, '%') - - - AND a.id_card LIKE CONCAT('%', #{param.idCard}, '%') - - - AND a.live_address LIKE CONCAT('%', #{param.liveAddress}, '%') - - - AND a.household_address LIKE CONCAT('%', #{param.householdAddress}, '%') - - - AND a.content LIKE CONCAT('%', #{param.content}, '%') - - - AND a.request_content LIKE CONCAT('%', #{param.requestContent}, '%') - - - AND a.been_name LIKE CONCAT('%', #{param.beenName}, '%') - - - AND a.been_address LIKE CONCAT('%', #{param.beenAddress}, '%') - - - AND a.been_code LIKE CONCAT('%', #{param.beenCode}, '%') - - - AND a.been_phone LIKE CONCAT('%', #{param.beenPhone}, '%') - - - AND a.been_legal_name LIKE CONCAT('%', #{param.beenLegalName}, '%') - - - AND a.been_legal_position LIKE CONCAT('%', #{param.beenLegalPosition}, '%') - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND ( - a.name LIKE CONCAT('%', #{param.keywords}, '%') - OR a.phone LIKE CONCAT('%', #{param.keywords}, '%') - OR a.id_card LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - ORDER BY a.create_time DESC - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalConfigMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalConfigMapper.xml deleted file mode 100644 index 0111948..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalCalConfigMapper.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - SELECT a.* - FROM law_legal_cal_config a - - - AND a.id = #{param.id} - - - AND a.type_id = #{param.typeId} - - - AND a.title LIKE CONCAT('%', #{param.title}, '%') - - - AND a.type LIKE CONCAT('%', #{param.type}, '%') - - - AND a.answer LIKE CONCAT('%', #{param.answer}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocConfigMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocConfigMapper.xml deleted file mode 100644 index f74e99f..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocConfigMapper.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - SELECT a.* - FROM law_legal_doc_config a - - - AND a.id = #{param.id} - - - AND a.type_id = #{param.typeId} - - - AND a.title LIKE CONCAT('%', #{param.title}, '%') - - - AND a.type LIKE CONCAT('%', #{param.type}, '%') - - - AND a.answer LIKE CONCAT('%', #{param.answer}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocTypeMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocTypeMapper.xml deleted file mode 100644 index 0fa11f0..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalDocTypeMapper.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - SELECT a.* - FROM law_legal_doc_type a - - - AND a.id = #{param.id} - - - AND a.icon LIKE CONCAT('%', #{param.icon}, '%') - - - AND a.title LIKE CONCAT('%', #{param.title}, '%') - - - AND a.sort_number = #{param.sortNumber} - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckTypeSuggestMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckTypeSuggestMapper.xml deleted file mode 100644 index 5b3308f..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawLegalOrgCheckTypeSuggestMapper.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - SELECT a.* - FROM law_legal_org_check_type_suggest a - - - AND a.id = #{param.id} - - - AND a.icon LIKE CONCAT('%', #{param.icon}, '%') - - - AND a.title LIKE CONCAT('%', #{param.title}, '%') - - - AND a.sort_number = #{param.sortNumber} - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawNotaryConfigMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawNotaryConfigMapper.xml deleted file mode 100644 index 9c64dc7..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawNotaryConfigMapper.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - SELECT a.* - FROM law_notary_config a - - - AND a.id = #{param.id} - - - AND a.title LIKE CONCAT('%', #{param.title}, '%') - - - AND a.config_list LIKE CONCAT('%', #{param.configList}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawNotaryListMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawNotaryListMapper.xml deleted file mode 100644 index 7bdf96c..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawNotaryListMapper.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - SELECT a.* - FROM law_notary_list a - - - AND a.id = #{param.id} - - - AND a.uid = #{param.uid} - - - AND a.name_list LIKE CONCAT('%', #{param.nameList}, '%') - - - AND a.content LIKE CONCAT('%', #{param.content}, '%') - - - AND a.application LIKE CONCAT('%', #{param.application}, '%') - - - AND a.address LIKE CONCAT('%', #{param.address}, '%') - - - AND a.translate LIKE CONCAT('%', #{param.translate}, '%') - - - AND a.file_list LIKE CONCAT('%', #{param.fileList}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - ORDER BY a.id DESC - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawOrgCheckLogMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawOrgCheckLogMapper.xml deleted file mode 100644 index 52a2081..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawOrgCheckLogMapper.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - SELECT a.* - FROM law_org_check_log a - - - AND a.id = #{param.id} - - - AND a.company_name LIKE CONCAT('%', #{param.companyName}, '%') - - - AND a.check_company_name LIKE CONCAT('%', #{param.checkCompanyName}, '%') - - - AND a.check_date LIKE CONCAT('%', #{param.checkDate}, '%') - - - AND a.type LIKE CONCAT('%', #{param.type}, '%') - - - AND a.check_num = #{param.checkNum} - - - AND a.comment LIKE CONCAT('%', #{param.comment}, '%') - - - AND a.remark LIKE CONCAT('%', #{param.remark}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawOrgMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawOrgMapper.xml deleted file mode 100644 index 177f65f..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawOrgMapper.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - SELECT a.* - FROM law_org a - - - AND a.id = #{param.id} - - - AND a.title LIKE CONCAT('%', #{param.title}, '%') - - - AND a.type = #{param.type} - - - AND a.province_id = #{param.provinceId} - - - AND a.city_id = #{param.cityId} - - - AND a.area_id = #{param.areaId} - - - AND a.lat LIKE CONCAT('%', #{param.lat}, '%') - - - AND a.lng LIKE CONCAT('%', #{param.lng}, '%') - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.title LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/mapper/xml/LawOrgPeopleMapper.xml b/src/main/java/com/gxwebsoft/law/mapper/xml/LawOrgPeopleMapper.xml deleted file mode 100644 index a02f573..0000000 --- a/src/main/java/com/gxwebsoft/law/mapper/xml/LawOrgPeopleMapper.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - SELECT a.* - FROM law_org_people a - - - AND a.id = #{param.id} - - - AND a.org_id = #{param.orgId} - - - AND a.name LIKE CONCAT('%', #{param.name}, '%') - - - AND a.phone LIKE CONCAT('%', #{param.phone}, '%') - - - AND a.position LIKE CONCAT('%', #{param.position}, '%') - - - AND a.type LIKE CONCAT('%', #{param.type}, '%') - - - AND a.user_id = #{param.userId} - - - AND a.deleted = #{param.deleted} - - - AND a.deleted = 0 - - - AND a.create_time >= #{param.createTimeStart} - - - AND a.create_time <= #{param.createTimeEnd} - - - AND (a.name LIKE CONCAT('%', #{param.keywords}, '%') - ) - - - - - - - - - - - diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalAidParam.java b/src/main/java/com/gxwebsoft/law/param/LawLegalAidParam.java deleted file mode 100644 index 7217158..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalAidParam.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -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) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawLegalAidParam对象", description = "法律援助申请查询参数") -public class LawLegalAidParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - private String name; - - @QueryField(type = QueryType.EQ) - private Integer gender; - - private String phone; - - private String birthday; - - private String idCard; - - @ApiModelProperty(value = "住所地址") - private String liveAddress; - - @ApiModelProperty(value = "户籍地址") - private String householdAdderss; - - @ApiModelProperty(value = "说明") - private String content; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalAppraisalParam.java b/src/main/java/com/gxwebsoft/law/param/LawLegalAppraisalParam.java deleted file mode 100644 index aa38cd9..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalAppraisalParam.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -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) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawLegalAppraisalParam对象", description = "司法鉴定申请查询参数") -public class LawLegalAppraisalParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - private String name; - - @QueryField(type = QueryType.EQ) - private Integer gender; - - private String phone; - - private String birthday; - - private String idCard; - - @ApiModelProperty(value = "住所地址") - private String liveAddress; - - @ApiModelProperty(value = "户籍地址") - private String householdAddress; - - @QueryField(type = QueryType.EQ) - private Integer orgId; - - @ApiModelProperty(value = "说明") - private String content; - - @ApiModelProperty(value = "详情") - private String detail; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalArbitrateParam.java b/src/main/java/com/gxwebsoft/law/param/LawLegalArbitrateParam.java deleted file mode 100644 index 5dd62bd..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalArbitrateParam.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -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) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawLegalArbitrateParam对象", description = "法律仲裁申请查询参数") -public class LawLegalArbitrateParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - private String name; - - @QueryField(type = QueryType.EQ) - private Integer gender; - - private String phone; - - private String birthday; - - private String idCard; - - @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是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalCalConfigParam.java b/src/main/java/com/gxwebsoft/law/param/LawLegalCalConfigParam.java deleted file mode 100644 index daa195d..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalCalConfigParam.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -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) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawLegalCalConfigParam对象", description = "法律计算器配置查询参数") -public class LawLegalCalConfigParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - @QueryField(type = QueryType.EQ) - private Integer typeId; - - private String title; - - @ApiModelProperty(value = "类型") - private String type; - - @ApiModelProperty(value = "内容") - private String answer; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalCalContentParam.java b/src/main/java/com/gxwebsoft/law/param/LawLegalCalContentParam.java deleted file mode 100644 index 8433c39..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalCalContentParam.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -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) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawLegalCalContentParam对象", description = "用户填写法律计算器内容查询参数") -public class LawLegalCalContentParam 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; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalDocConfigParam.java b/src/main/java/com/gxwebsoft/law/param/LawLegalDocConfigParam.java deleted file mode 100644 index 45b64fb..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalDocConfigParam.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -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) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawLegalDocConfigParam对象", description = "法律文书配置查询参数") -public class LawLegalDocConfigParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - @QueryField(type = QueryType.EQ) - private Integer typeId; - - private String title; - - @ApiModelProperty(value = "类型") - private String type; - - @ApiModelProperty(value = "内容") - private String answer; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckConfigParam.java b/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckConfigParam.java deleted file mode 100644 index 0804fa6..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckConfigParam.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 企业法制体检配置查询参数 - * - * @author LX - * @since 2025-04-17 17:51:15 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawLegalOrgCheckConfigParam对象", description = "企业法制体检配置查询参数") -public class LawLegalOrgCheckConfigParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - private Integer typeId; - - private String title; - - @ApiModelProperty(value = "类型") - private String type; - - @ApiModelProperty(value = "内容") - private String answer; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckConfigSuggestParam.java b/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckConfigSuggestParam.java deleted file mode 100644 index 0179528..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckConfigSuggestParam.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -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 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawLegalOrgCheckConfigSuggestParam对象", description = "法律意见书配置查询参数") -public class LawLegalOrgCheckConfigSuggestParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - @QueryField(type = QueryType.EQ) - private Integer typeId; - - private Integer parentId; - - private String title; - - @ApiModelProperty(value = "类型") - private String type; - - @ApiModelProperty(value = "内容") - private String answer; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckTypeParam.java b/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckTypeParam.java deleted file mode 100644 index 31ac842..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawLegalOrgCheckTypeParam.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 企业法制体检配置查询参数 - * - * @author LX - * @since 2025-04-17 18:04:46 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawLegalOrgCheckTypeParam对象", description = "企业法制体检配置查询参数") -public class LawLegalOrgCheckTypeParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - private String icon; - - private String title; - - @ApiModelProperty(value = "类型") - @QueryField(type = QueryType.EQ) - private Integer sortNumber; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawNotaryListParam.java b/src/main/java/com/gxwebsoft/law/param/LawNotaryListParam.java deleted file mode 100644 index c88d212..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawNotaryListParam.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -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 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawNotaryListParam对象", description = "公证列表查询参数") -public class LawNotaryListParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - @QueryField(type = QueryType.EQ) - private Integer uid; - - private String nameList; - - @ApiModelProperty(value = "公证事项") - private String content; - - @ApiModelProperty(value = "用途") - private String application; - - @ApiModelProperty(value = "使用地") - private String address; - - @ApiModelProperty(value = "译文") - private String translate; - - @ApiModelProperty(value = "文件列表") - private String fileList; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/param/LawOrgCheckLogParam.java b/src/main/java/com/gxwebsoft/law/param/LawOrgCheckLogParam.java deleted file mode 100644 index 33e3ae0..0000000 --- a/src/main/java/com/gxwebsoft/law/param/LawOrgCheckLogParam.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.gxwebsoft.law.param; - -import java.math.BigDecimal; -import com.gxwebsoft.common.core.annotation.QueryField; -import com.gxwebsoft.common.core.annotation.QueryType; -import com.gxwebsoft.common.core.web.BaseParam; -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 企业法制检查报告查询参数 - * - * @author LX - * @since 2025-04-20 07:43:09 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawOrgCheckLogParam对象", description = "企业法制检查报告查询参数") -public class LawOrgCheckLogParam extends BaseParam { - private static final long serialVersionUID = 1L; - - @QueryField(type = QueryType.EQ) - private Integer id; - - private String companyName; - - @ApiModelProperty(value = "来访单位") - private String checkCompanyName; - - private String checkDate; - - private String type; - - @ApiModelProperty(value = "本月检查次数") - @QueryField(type = QueryType.EQ) - private Integer checkNum; - - private String comment; - - private String remark; - - @QueryField(type = QueryType.EQ) - private Integer userId; - - @ApiModelProperty(value = "是否删除, 0否, 1是") - @QueryField(type = QueryType.EQ) - private Integer deleted; - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalAidService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalAidService.java deleted file mode 100644 index 6dc29b0..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalAidService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalAid; -import com.gxwebsoft.law.param.LawLegalAidParam; - -import java.util.List; - -/** - * 法律援助申请Service - * - * @author LX - * @since 2025-04-17 17:33:28 - */ -public interface LawLegalAidService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalAidParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalAidParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalAid - */ - LawLegalAid getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalAppraisalService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalAppraisalService.java deleted file mode 100644 index cf45e3b..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalAppraisalService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalAppraisal; -import com.gxwebsoft.law.param.LawLegalAppraisalParam; - -import java.util.List; - -/** - * 司法鉴定申请Service - * - * @author LX - * @since 2025-05-06 17:11:41 - */ -public interface LawLegalAppraisalService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalAppraisalParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalAppraisalParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalAppraisal - */ - LawLegalAppraisal getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalArbitrateService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalArbitrateService.java deleted file mode 100644 index cb3a6ef..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalArbitrateService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalArbitrate; -import com.gxwebsoft.law.param.LawLegalArbitrateParam; - -import java.util.List; - -/** - * 法律仲裁申请Service - * - * @author LX - * @since 2025-05-06 15:56:26 - */ -public interface LawLegalArbitrateService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalArbitrateParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalArbitrateParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalArbitrate - */ - LawLegalArbitrate getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalCalConfigService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalCalConfigService.java deleted file mode 100644 index e45ba3c..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalCalConfigService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalCalConfig; -import com.gxwebsoft.law.param.LawLegalCalConfigParam; - -import java.util.List; - -/** - * 法律计算器配置Service - * - * @author LX - * @since 2025-04-17 19:23:47 - */ -public interface LawLegalCalConfigService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalCalConfigParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalCalConfigParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalCalConfig - */ - LawLegalCalConfig getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalCalContentService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalCalContentService.java deleted file mode 100644 index 1e96610..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalCalContentService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalCalContent; -import com.gxwebsoft.law.param.LawLegalCalContentParam; - -import java.util.List; - -/** - * 用户填写法律计算器内容Service - * - * @author LX - * @since 2025-04-17 19:23:47 - */ -public interface LawLegalCalContentService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalCalContentParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalCalContentParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalCalContent - */ - LawLegalCalContent getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalCalTypeService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalCalTypeService.java deleted file mode 100644 index fe4efff..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalCalTypeService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalCalType; -import com.gxwebsoft.law.param.LawLegalCalTypeParam; - -import java.util.List; - -/** - * 法律计算器配置Service - * - * @author LX - * @since 2025-04-17 19:23:47 - */ -public interface LawLegalCalTypeService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalCalTypeParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalCalTypeParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalCalType - */ - LawLegalCalType getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalDocConfigService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalDocConfigService.java deleted file mode 100644 index bc11a15..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalDocConfigService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalDocConfig; -import com.gxwebsoft.law.param.LawLegalDocConfigParam; - -import java.util.List; - -/** - * 法律文书配置Service - * - * @author LX - * @since 2025-04-17 19:06:41 - */ -public interface LawLegalDocConfigService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalDocConfigParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalDocConfigParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalDocConfig - */ - LawLegalDocConfig getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalDocContentService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalDocContentService.java deleted file mode 100644 index 3a66710..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalDocContentService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalDocContent; -import com.gxwebsoft.law.param.LawLegalDocContentParam; - -import java.util.List; - -/** - * 用户填写法律文书内容Service - * - * @author LX - * @since 2025-04-17 19:06:41 - */ -public interface LawLegalDocContentService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalDocContentParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalDocContentParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalDocContent - */ - LawLegalDocContent getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalDocTypeService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalDocTypeService.java deleted file mode 100644 index bd08f8f..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalDocTypeService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalDocType; -import com.gxwebsoft.law.param.LawLegalDocTypeParam; - -import java.util.List; - -/** - * 法律文书配置Service - * - * @author LX - * @since 2025-04-17 19:06:41 - */ -public interface LawLegalDocTypeService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalDocTypeParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalDocTypeParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalDocType - */ - LawLegalDocType getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckConfigService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckConfigService.java deleted file mode 100644 index 31905eb..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckConfigService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalOrgCheckConfig; -import com.gxwebsoft.law.param.LawLegalOrgCheckConfigParam; - -import java.util.List; - -/** - * 企业法制体检配置Service - * - * @author LX - * @since 2025-04-17 17:51:15 - */ -public interface LawLegalOrgCheckConfigService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalOrgCheckConfigParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalOrgCheckConfigParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalOrgCheckConfig - */ - LawLegalOrgCheckConfig getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckConfigSuggestService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckConfigSuggestService.java deleted file mode 100644 index 389042f..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckConfigSuggestService.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalOrgCheckConfigSuggest; -import com.gxwebsoft.law.param.LawLegalOrgCheckConfigSuggestParam; - -import java.util.List; - -/** - * 法律意见书配置Service - * - * @author LX - * @since 2025-04-17 18:55:31 - */ -public interface LawLegalOrgCheckConfigSuggestService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalOrgCheckConfigSuggestParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalOrgCheckConfigSuggestParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalOrgCheckConfigSuggest - */ - LawLegalOrgCheckConfigSuggest getByIdRel(Integer id); - - List listByLevel(LawLegalOrgCheckConfigSuggestParam param); -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckContentService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckContentService.java deleted file mode 100644 index 4a32478..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckContentService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalOrgCheckContent; -import com.gxwebsoft.law.param.LawLegalOrgCheckContentParam; - -import java.util.List; - -/** - * 用户填写企业法制体检内容Service - * - * @author LX - * @since 2025-04-17 17:48:54 - */ -public interface LawLegalOrgCheckContentService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalOrgCheckContentParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalOrgCheckContentParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalOrgCheckContent - */ - LawLegalOrgCheckContent getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckContentSuggestService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckContentSuggestService.java deleted file mode 100644 index a20b02e..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckContentSuggestService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalOrgCheckContentSuggest; -import com.gxwebsoft.law.param.LawLegalOrgCheckContentSuggestParam; - -import java.util.List; - -/** - * 用户填写法律意见书内容Service - * - * @author LX - * @since 2025-04-17 18:55:31 - */ -public interface LawLegalOrgCheckContentSuggestService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalOrgCheckContentSuggestParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalOrgCheckContentSuggestParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalOrgCheckContentSuggest - */ - LawLegalOrgCheckContentSuggest getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckTypeService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckTypeService.java deleted file mode 100644 index 9a86a07..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckTypeService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalOrgCheckType; -import com.gxwebsoft.law.param.LawLegalOrgCheckTypeParam; - -import java.util.List; - -/** - * 企业法制体检配置Service - * - * @author LX - * @since 2025-04-17 18:04:46 - */ -public interface LawLegalOrgCheckTypeService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalOrgCheckTypeParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalOrgCheckTypeParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalOrgCheckType - */ - LawLegalOrgCheckType getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckTypeSuggestService.java b/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckTypeSuggestService.java deleted file mode 100644 index 40b3b15..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawLegalOrgCheckTypeSuggestService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawLegalOrgCheckTypeSuggest; -import com.gxwebsoft.law.param.LawLegalOrgCheckTypeSuggestParam; - -import java.util.List; - -/** - * 法律意见书配置Service - * - * @author LX - * @since 2025-04-17 18:55:31 - */ -public interface LawLegalOrgCheckTypeSuggestService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawLegalOrgCheckTypeSuggestParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawLegalOrgCheckTypeSuggestParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawLegalOrgCheckTypeSuggest - */ - LawLegalOrgCheckTypeSuggest getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawNotaryConfigService.java b/src/main/java/com/gxwebsoft/law/service/LawNotaryConfigService.java deleted file mode 100644 index 0cc04b3..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawNotaryConfigService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawNotaryConfig; -import com.gxwebsoft.law.param.LawNotaryConfigParam; - -import java.util.List; - -/** - * 公证配置Service - * - * @author LX - * @since 2025-05-17 16:10:35 - */ -public interface LawNotaryConfigService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawNotaryConfigParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawNotaryConfigParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawNotaryConfig - */ - LawNotaryConfig getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawNotaryListService.java b/src/main/java/com/gxwebsoft/law/service/LawNotaryListService.java deleted file mode 100644 index d5ee672..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawNotaryListService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawNotaryList; -import com.gxwebsoft.law.param.LawNotaryListParam; - -import java.util.List; - -/** - * 公证列表Service - * - * @author LX - * @since 2025-05-17 16:10:35 - */ -public interface LawNotaryListService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawNotaryListParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawNotaryListParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawNotaryList - */ - LawNotaryList getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawOrgCheckLogService.java b/src/main/java/com/gxwebsoft/law/service/LawOrgCheckLogService.java deleted file mode 100644 index 3874f26..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawOrgCheckLogService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawOrgCheckLog; -import com.gxwebsoft.law.param.LawOrgCheckLogParam; - -import java.util.List; - -/** - * 企业法制检查报告Service - * - * @author LX - * @since 2025-04-20 07:43:09 - */ -public interface LawOrgCheckLogService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawOrgCheckLogParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawOrgCheckLogParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawOrgCheckLog - */ - LawOrgCheckLog getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawOrgPeopleService.java b/src/main/java/com/gxwebsoft/law/service/LawOrgPeopleService.java deleted file mode 100644 index b817f4c..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawOrgPeopleService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawOrgPeople; -import com.gxwebsoft.law.param.LawOrgPeopleParam; - -import java.util.List; - -/** - * Service - * - * @author LX - * @since 2025-04-14 01:31:54 - */ -public interface LawOrgPeopleService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawOrgPeopleParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawOrgPeopleParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawOrgPeople - */ - LawOrgPeople getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/LawOrgService.java b/src/main/java/com/gxwebsoft/law/service/LawOrgService.java deleted file mode 100644 index 314e0ee..0000000 --- a/src/main/java/com/gxwebsoft/law/service/LawOrgService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.gxwebsoft.law.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.entity.LawOrg; -import com.gxwebsoft.law.param.LawOrgParam; - -import java.util.List; - -/** - * 机构Service - * - * @author LX - * @since 2025-04-14 00:35:34 - */ -public interface LawOrgService extends IService { - - /** - * 分页关联查询 - * - * @param param 查询参数 - * @return PageResult - */ - PageResult pageRel(LawOrgParam param); - - /** - * 关联查询全部 - * - * @param param 查询参数 - * @return List - */ - List listRel(LawOrgParam param); - - /** - * 根据id查询 - * - * @param id - * @return LawOrg - */ - LawOrg getByIdRel(Integer id); - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalAidServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalAidServiceImpl.java deleted file mode 100644 index 59a1a31..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalAidServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalAidMapper; -import com.gxwebsoft.law.service.LawLegalAidService; -import com.gxwebsoft.law.entity.LawLegalAid; -import com.gxwebsoft.law.param.LawLegalAidParam; -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-04-17 17:33:28 - */ -@Service -public class LawLegalAidServiceImpl extends ServiceImpl implements LawLegalAidService { - - @Override - public PageResult pageRel(LawLegalAidParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalAidParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalAid getByIdRel(Integer id) { - LawLegalAidParam param = new LawLegalAidParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalAppraisalServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalAppraisalServiceImpl.java deleted file mode 100644 index 6010001..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalAppraisalServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalAppraisalMapper; -import com.gxwebsoft.law.service.LawLegalAppraisalService; -import com.gxwebsoft.law.entity.LawLegalAppraisal; -import com.gxwebsoft.law.param.LawLegalAppraisalParam; -import com.gxwebsoft.common.core.web.PageParam; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.service.LawOrgService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.List; - -/** - * 司法鉴定申请Service实现 - * - * @author LX - * @since 2025-05-06 17:11:41 - */ -@Service -public class LawLegalAppraisalServiceImpl extends ServiceImpl implements LawLegalAppraisalService { - - @Resource - private LawOrgService lawOrgService; - @Override - public PageResult pageRel(LawLegalAppraisalParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - for (LawLegalAppraisal lawLegalAppraisal : list) { - lawLegalAppraisal.setLawOrg(lawOrgService.getById(lawLegalAppraisal.getOrgId())); - } - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalAppraisalParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalAppraisal getByIdRel(Integer id) { - LawLegalAppraisalParam param = new LawLegalAppraisalParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalArbitrateServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalArbitrateServiceImpl.java deleted file mode 100644 index ad39171..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalArbitrateServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalArbitrateMapper; -import com.gxwebsoft.law.service.LawLegalArbitrateService; -import com.gxwebsoft.law.entity.LawLegalArbitrate; -import com.gxwebsoft.law.param.LawLegalArbitrateParam; -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-05-06 15:56:26 - */ -@Service -public class LawLegalArbitrateServiceImpl extends ServiceImpl implements LawLegalArbitrateService { - - @Override - public PageResult pageRel(LawLegalArbitrateParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder(" create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalArbitrateParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder(" create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalArbitrate getByIdRel(Integer id) { - LawLegalArbitrateParam param = new LawLegalArbitrateParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalCalConfigServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalCalConfigServiceImpl.java deleted file mode 100644 index d5ec471..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalCalConfigServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalCalConfigMapper; -import com.gxwebsoft.law.service.LawLegalCalConfigService; -import com.gxwebsoft.law.entity.LawLegalCalConfig; -import com.gxwebsoft.law.param.LawLegalCalConfigParam; -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-04-17 19:23:47 - */ -@Service -public class LawLegalCalConfigServiceImpl extends ServiceImpl implements LawLegalCalConfigService { - - @Override - public PageResult pageRel(LawLegalCalConfigParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time asc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalCalConfigParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("create_time asc"); - return page.sortRecords(list); - } - - @Override - public LawLegalCalConfig getByIdRel(Integer id) { - LawLegalCalConfigParam param = new LawLegalCalConfigParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalCalContentServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalCalContentServiceImpl.java deleted file mode 100644 index b88561e..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalCalContentServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalCalContentMapper; -import com.gxwebsoft.law.service.LawLegalCalContentService; -import com.gxwebsoft.law.entity.LawLegalCalContent; -import com.gxwebsoft.law.param.LawLegalCalContentParam; -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-04-17 19:23:47 - */ -@Service -public class LawLegalCalContentServiceImpl extends ServiceImpl implements LawLegalCalContentService { - - @Override - public PageResult pageRel(LawLegalCalContentParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalCalContentParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalCalContent getByIdRel(Integer id) { - LawLegalCalContentParam param = new LawLegalCalContentParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalCalTypeServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalCalTypeServiceImpl.java deleted file mode 100644 index f17f002..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalCalTypeServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalCalTypeMapper; -import com.gxwebsoft.law.service.LawLegalCalTypeService; -import com.gxwebsoft.law.entity.LawLegalCalType; -import com.gxwebsoft.law.param.LawLegalCalTypeParam; -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-04-17 19:23:47 - */ -@Service -public class LawLegalCalTypeServiceImpl extends ServiceImpl implements LawLegalCalTypeService { - - @Override - public PageResult pageRel(LawLegalCalTypeParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalCalTypeParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalCalType getByIdRel(Integer id) { - LawLegalCalTypeParam param = new LawLegalCalTypeParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalDocConfigServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalDocConfigServiceImpl.java deleted file mode 100644 index b9c0d20..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalDocConfigServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalDocConfigMapper; -import com.gxwebsoft.law.service.LawLegalDocConfigService; -import com.gxwebsoft.law.entity.LawLegalDocConfig; -import com.gxwebsoft.law.param.LawLegalDocConfigParam; -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-04-17 19:06:41 - */ -@Service -public class LawLegalDocConfigServiceImpl extends ServiceImpl implements LawLegalDocConfigService { - - @Override - public PageResult pageRel(LawLegalDocConfigParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time asc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalDocConfigParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("create_time asc"); - return page.sortRecords(list); - } - - @Override - public LawLegalDocConfig getByIdRel(Integer id) { - LawLegalDocConfigParam param = new LawLegalDocConfigParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalDocContentServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalDocContentServiceImpl.java deleted file mode 100644 index 947bb02..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalDocContentServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalDocContentMapper; -import com.gxwebsoft.law.service.LawLegalDocContentService; -import com.gxwebsoft.law.entity.LawLegalDocContent; -import com.gxwebsoft.law.param.LawLegalDocContentParam; -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-04-17 19:06:41 - */ -@Service -public class LawLegalDocContentServiceImpl extends ServiceImpl implements LawLegalDocContentService { - - @Override - public PageResult pageRel(LawLegalDocContentParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalDocContentParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalDocContent getByIdRel(Integer id) { - LawLegalDocContentParam param = new LawLegalDocContentParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalDocTypeServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalDocTypeServiceImpl.java deleted file mode 100644 index 6b73cae..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalDocTypeServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalDocTypeMapper; -import com.gxwebsoft.law.service.LawLegalDocTypeService; -import com.gxwebsoft.law.entity.LawLegalDocType; -import com.gxwebsoft.law.param.LawLegalDocTypeParam; -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-04-17 19:06:41 - */ -@Service -public class LawLegalDocTypeServiceImpl extends ServiceImpl implements LawLegalDocTypeService { - - @Override - public PageResult pageRel(LawLegalDocTypeParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalDocTypeParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalDocType getByIdRel(Integer id) { - LawLegalDocTypeParam param = new LawLegalDocTypeParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckConfigServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckConfigServiceImpl.java deleted file mode 100644 index 82318ce..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckConfigServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalOrgCheckConfigMapper; -import com.gxwebsoft.law.service.LawLegalOrgCheckConfigService; -import com.gxwebsoft.law.entity.LawLegalOrgCheckConfig; -import com.gxwebsoft.law.param.LawLegalOrgCheckConfigParam; -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-04-17 17:51:15 - */ -@Service -public class LawLegalOrgCheckConfigServiceImpl extends ServiceImpl implements LawLegalOrgCheckConfigService { - - @Override - public PageResult pageRel(LawLegalOrgCheckConfigParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time asc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalOrgCheckConfigParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("create_time asc"); - return page.sortRecords(list); - } - - @Override - public LawLegalOrgCheckConfig getByIdRel(Integer id) { - LawLegalOrgCheckConfigParam param = new LawLegalOrgCheckConfigParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckConfigSuggestServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckConfigSuggestServiceImpl.java deleted file mode 100644 index 7711030..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckConfigSuggestServiceImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalOrgCheckConfigSuggestMapper; -import com.gxwebsoft.law.service.LawLegalOrgCheckConfigSuggestService; -import com.gxwebsoft.law.entity.LawLegalOrgCheckConfigSuggest; -import com.gxwebsoft.law.param.LawLegalOrgCheckConfigSuggestParam; -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-04-17 18:55:31 - */ -@Service -public class LawLegalOrgCheckConfigSuggestServiceImpl extends ServiceImpl implements LawLegalOrgCheckConfigSuggestService { - - @Override - public PageResult pageRel(LawLegalOrgCheckConfigSuggestParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalOrgCheckConfigSuggestParam param) { - return baseMapper.selectListRel(param); - } - - @Override - public LawLegalOrgCheckConfigSuggest getByIdRel(Integer id) { - LawLegalOrgCheckConfigSuggestParam param = new LawLegalOrgCheckConfigSuggestParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - - @Override - public List listByLevel(LawLegalOrgCheckConfigSuggestParam param) { - List topList = list( - new LambdaQueryWrapper() - .eq(LawLegalOrgCheckConfigSuggest::getParentId, 0) - ); - if (!topList.isEmpty()) { - for (LawLegalOrgCheckConfigSuggest top : topList) { - top.setChildren(getChildrenList(top.getId())); - } - } - return topList; - } - - private List getChildrenList(Integer parentId) { - List children = list( - new LambdaQueryWrapper() - .eq(LawLegalOrgCheckConfigSuggest::getParentId, parentId) - ); - if (!children.isEmpty()) { - for (LawLegalOrgCheckConfigSuggest child : children) { - child.setChildren(getChildrenList(child.getId())); - } - } - return children; - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckContentServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckContentServiceImpl.java deleted file mode 100644 index b46d2f5..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckContentServiceImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.common.system.service.UserService; -import com.gxwebsoft.law.mapper.LawLegalOrgCheckContentMapper; -import com.gxwebsoft.law.service.LawLegalOrgCheckContentService; -import com.gxwebsoft.law.entity.LawLegalOrgCheckContent; -import com.gxwebsoft.law.param.LawLegalOrgCheckContentParam; -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-04-17 17:48:54 - */ -@Service -public class LawLegalOrgCheckContentServiceImpl extends ServiceImpl implements LawLegalOrgCheckContentService { - - @Resource - private UserService userService; - @Override - public PageResult pageRel(LawLegalOrgCheckContentParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("create_time desc"); - List list = baseMapper.selectPageRel(page, param); - for (LawLegalOrgCheckContent lawLegalOrgCheckContent : list) { - if (lawLegalOrgCheckContent.getUserId() != null) { - lawLegalOrgCheckContent.setUser(userService.getByIdRel(lawLegalOrgCheckContent.getUserId())); - } - } - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalOrgCheckContentParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalOrgCheckContent getByIdRel(Integer id) { - LawLegalOrgCheckContentParam param = new LawLegalOrgCheckContentParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckContentSuggestServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckContentSuggestServiceImpl.java deleted file mode 100644 index 8536fb3..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckContentSuggestServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalOrgCheckContentSuggestMapper; -import com.gxwebsoft.law.service.LawLegalOrgCheckContentSuggestService; -import com.gxwebsoft.law.entity.LawLegalOrgCheckContentSuggest; -import com.gxwebsoft.law.param.LawLegalOrgCheckContentSuggestParam; -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-04-17 18:55:31 - */ -@Service -public class LawLegalOrgCheckContentSuggestServiceImpl extends ServiceImpl implements LawLegalOrgCheckContentSuggestService { - - @Override - public PageResult pageRel(LawLegalOrgCheckContentSuggestParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalOrgCheckContentSuggestParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalOrgCheckContentSuggest getByIdRel(Integer id) { - LawLegalOrgCheckContentSuggestParam param = new LawLegalOrgCheckContentSuggestParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckTypeServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckTypeServiceImpl.java deleted file mode 100644 index f6ffdc9..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckTypeServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalOrgCheckTypeMapper; -import com.gxwebsoft.law.service.LawLegalOrgCheckTypeService; -import com.gxwebsoft.law.entity.LawLegalOrgCheckType; -import com.gxwebsoft.law.param.LawLegalOrgCheckTypeParam; -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-04-17 18:04:46 - */ -@Service -public class LawLegalOrgCheckTypeServiceImpl extends ServiceImpl implements LawLegalOrgCheckTypeService { - - @Override - public PageResult pageRel(LawLegalOrgCheckTypeParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalOrgCheckTypeParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalOrgCheckType getByIdRel(Integer id) { - LawLegalOrgCheckTypeParam param = new LawLegalOrgCheckTypeParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckTypeSuggestServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckTypeSuggestServiceImpl.java deleted file mode 100644 index a975c48..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawLegalOrgCheckTypeSuggestServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawLegalOrgCheckTypeSuggestMapper; -import com.gxwebsoft.law.service.LawLegalOrgCheckTypeSuggestService; -import com.gxwebsoft.law.entity.LawLegalOrgCheckTypeSuggest; -import com.gxwebsoft.law.param.LawLegalOrgCheckTypeSuggestParam; -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-04-17 18:55:31 - */ -@Service -public class LawLegalOrgCheckTypeSuggestServiceImpl extends ServiceImpl implements LawLegalOrgCheckTypeSuggestService { - - @Override - public PageResult pageRel(LawLegalOrgCheckTypeSuggestParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawLegalOrgCheckTypeSuggestParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawLegalOrgCheckTypeSuggest getByIdRel(Integer id) { - LawLegalOrgCheckTypeSuggestParam param = new LawLegalOrgCheckTypeSuggestParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawNotaryConfigServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawNotaryConfigServiceImpl.java deleted file mode 100644 index dadaa53..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawNotaryConfigServiceImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawNotaryConfigMapper; -import com.gxwebsoft.law.service.LawNotaryConfigService; -import com.gxwebsoft.law.entity.LawNotaryConfig; -import com.gxwebsoft.law.param.LawNotaryConfigParam; -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-05-17 16:10:35 - */ -@Service -public class LawNotaryConfigServiceImpl extends ServiceImpl implements LawNotaryConfigService { - - @Override - public PageResult pageRel(LawNotaryConfigParam param) { - PageParam page = new PageParam<>(param); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawNotaryConfigParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - return page.sortRecords(list); - } - - @Override - public LawNotaryConfig getByIdRel(Integer id) { - LawNotaryConfigParam param = new LawNotaryConfigParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawNotaryListServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawNotaryListServiceImpl.java deleted file mode 100644 index 546dece..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawNotaryListServiceImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.common.system.service.UserService; -import com.gxwebsoft.law.mapper.LawNotaryListMapper; -import com.gxwebsoft.law.service.LawNotaryListService; -import com.gxwebsoft.law.entity.LawNotaryList; -import com.gxwebsoft.law.param.LawNotaryListParam; -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-05-17 16:10:35 - */ -@Service -public class LawNotaryListServiceImpl extends ServiceImpl implements LawNotaryListService { - - @Resource - private UserService userService; - - @Override - public PageResult pageRel(LawNotaryListParam param) { - PageParam page = new PageParam<>(param); - List list = baseMapper.selectPageRel(page, param); - for (LawNotaryList item : list) { - item.setUser(userService.getByIdRel(item.getUserId())); - } - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawNotaryListParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - return page.sortRecords(list); - } - - @Override - public LawNotaryList getByIdRel(Integer id) { - LawNotaryListParam param = new LawNotaryListParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawOrgCheckLogServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawOrgCheckLogServiceImpl.java deleted file mode 100644 index f70c814..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawOrgCheckLogServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.mapper.LawOrgCheckLogMapper; -import com.gxwebsoft.law.service.LawOrgCheckLogService; -import com.gxwebsoft.law.entity.LawOrgCheckLog; -import com.gxwebsoft.law.param.LawOrgCheckLogParam; -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-04-20 07:43:09 - */ -@Service -public class LawOrgCheckLogServiceImpl extends ServiceImpl implements LawOrgCheckLogService { - - @Override - public PageResult pageRel(LawOrgCheckLogParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawOrgCheckLogParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - return page.sortRecords(list); - } - - @Override - public LawOrgCheckLog getByIdRel(Integer id) { - LawOrgCheckLogParam param = new LawOrgCheckLogParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawOrgPeopleServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawOrgPeopleServiceImpl.java deleted file mode 100644 index b026573..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawOrgPeopleServiceImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.law.entity.LawOrg; -import com.gxwebsoft.law.mapper.LawOrgPeopleMapper; -import com.gxwebsoft.law.service.LawOrgPeopleService; -import com.gxwebsoft.law.entity.LawOrgPeople; -import com.gxwebsoft.law.param.LawOrgPeopleParam; -import com.gxwebsoft.common.core.web.PageParam; -import com.gxwebsoft.common.core.web.PageResult; -import com.gxwebsoft.law.service.LawOrgService; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -/** - * Service实现 - * - * @author LX - * @since 2025-04-14 01:31:54 - */ -@Service -public class LawOrgPeopleServiceImpl extends ServiceImpl implements LawOrgPeopleService { - @Resource - private LawOrgService lawOrgService; - - @Override - public PageResult pageRel(LawOrgPeopleParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - for (LawOrgPeople lawOrgPeople : list) { - lawOrgPeople.setLawOrg(lawOrgService.getByIdRel(lawOrgPeople.getOrgId())); - } - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawOrgPeopleParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - List orgIdList = new ArrayList<>(); - if (!list.isEmpty()) { - orgIdList = list.stream().map(LawOrgPeople::getOrgId).collect(Collectors.toList()); - List lawOrgList = lawOrgService.listByIds(orgIdList); - for (LawOrgPeople lawOrgPeople: list) { - LawOrg lawOrg = lawOrgList.stream().filter(x -> x.getId().equals(lawOrgPeople.getOrgId())).findFirst().orElse(null); - lawOrgPeople.setLawOrg(lawOrg); - } - } - return list; - } - - @Override - public LawOrgPeople getByIdRel(Integer id) { - LawOrgPeopleParam param = new LawOrgPeopleParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/law/service/impl/LawOrgServiceImpl.java b/src/main/java/com/gxwebsoft/law/service/impl/LawOrgServiceImpl.java deleted file mode 100644 index edcc70f..0000000 --- a/src/main/java/com/gxwebsoft/law/service/impl/LawOrgServiceImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.gxwebsoft.law.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.gxwebsoft.common.system.service.AreaService; -import com.gxwebsoft.law.mapper.LawOrgMapper; -import com.gxwebsoft.law.service.LawOrgService; -import com.gxwebsoft.law.entity.LawOrg; -import com.gxwebsoft.law.param.LawOrgParam; -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-04-14 00:35:34 - */ -@Service -public class LawOrgServiceImpl extends ServiceImpl implements LawOrgService { - - @Resource - private AreaService areaService; - - @Override - public PageResult pageRel(LawOrgParam param) { - PageParam page = new PageParam<>(param); - page.setDefaultOrder("sort_number asc, create_time desc"); - List list = baseMapper.selectPageRel(page, param); - for (LawOrg lawOrg : list) { - lawOrg.setProvince(lawOrg.getProvinceId() == null ? "" : areaService.getById(lawOrg.getProvinceId()).getName()); - lawOrg.setCity(lawOrg.getCityId() == null ? "" : areaService.getById(lawOrg.getCityId()).getName()); - lawOrg.setRegion(lawOrg.getAreaId() == null ? "" : areaService.getById(lawOrg.getAreaId()).getName()); - } - return new PageResult<>(list, page.getTotal()); - } - - @Override - public List listRel(LawOrgParam param) { - List list = baseMapper.selectListRel(param); - // 排序 - PageParam page = new PageParam<>(); - page.setDefaultOrder("sort_number asc, create_time desc"); - for (LawOrg lawOrg : list) { - lawOrg.setProvince(lawOrg.getProvinceId() == null ? "" : areaService.getById(lawOrg.getProvinceId()).getName()); - lawOrg.setCity(lawOrg.getCityId() == null ? "" : areaService.getById(lawOrg.getCityId()).getName()); - lawOrg.setRegion(lawOrg.getAreaId() == null ? "" : areaService.getById(lawOrg.getAreaId()).getName()); - } - return list; - } - - @Override - public LawOrg getByIdRel(Integer id) { - LawOrgParam param = new LawOrgParam(); - param.setId(id); - return param.getOne(baseMapper.selectListRel(param)); - } - -} diff --git a/src/main/java/com/gxwebsoft/open/controller/OpenFileController.java b/src/main/java/com/gxwebsoft/open/controller/OpenFileController.java index a0699f6..9549d2c 100644 --- a/src/main/java/com/gxwebsoft/open/controller/OpenFileController.java +++ b/src/main/java/com/gxwebsoft/open/controller/OpenFileController.java @@ -58,7 +58,7 @@ public class OpenFileController extends BaseController { 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)) { diff --git a/src/main/java/com/gxwebsoft/shop/config/WxPayConfig.java b/src/main/java/com/gxwebsoft/shop/config/WxPayConfig.java index 90bd86f..a3107c2 100644 --- a/src/main/java/com/gxwebsoft/shop/config/WxPayConfig.java +++ b/src/main/java/com/gxwebsoft/shop/config/WxPayConfig.java @@ -23,6 +23,10 @@ public class WxPayConfig { // 商户私钥文件 private String privateKeyPath; + private String pubKeyId; + + private String pubKeyPath; + // APIv3秘钥 private String apiV3Key; diff --git a/src/main/java/com/gxwebsoft/shop/controller/WxLoginController.java b/src/main/java/com/gxwebsoft/shop/controller/WxLoginController.java index c12f92f..eae5e93 100644 --- a/src/main/java/com/gxwebsoft/shop/controller/WxLoginController.java +++ b/src/main/java/com/gxwebsoft/shop/controller/WxLoginController.java @@ -47,7 +47,7 @@ import java.util.stream.Collectors; import static com.gxwebsoft.common.core.constants.RedisConstants.ACCESS_TOKEN_KEY; @RestController -@RequestMapping("/api/shop/wx-login") +@RequestMapping("/api/wx-login") @Api(tags = "微信小程序登录API") public class WxLoginController extends BaseController { @Resource @@ -109,6 +109,8 @@ public class WxLoginController extends BaseController { @PostMapping("/loginByMpWxPhone") public ApiResult loginByMpWxPhone(@RequestBody UserParam userParam, HttpServletRequest request) throws WxErrorException { // 获取手机号码 + JSONObject result = getOpenIdByCode(userParam); + String openid = result.getString("openid"); String phone = getPhoneByCode(userParam); System.out.println("phone:" + phone); @@ -117,7 +119,17 @@ public class WxLoginController extends BaseController { System.out.println("用户:" + user); // 不存在 if (user == null) { - return fail("该用户不存在", new LoginResult()); + user = addUser(userParam); + user.setPhone(phone); + user.setOpenId(openid); + userService.updateById(user); + // 添加第三方用户信息 + UserOauth uo = new UserOauth(); + uo.setUserId(user.getUserId()); + uo.setTenantId(user.getTenantId()); + uo.setOauthType("MP-WEIXIN"); + uo.setOauthId(openid); + userOauthService.save(uo); } // 签发token String access_token = JwtUtil.buildToken(new JwtSubject(user.getUsername(), user.getTenantId()), @@ -222,9 +234,10 @@ public class WxLoginController extends BaseController { public String getAccessToken() { System.out.println(getTenantId()); // 获取微信小程序配置信息 + JSONObject setting = settingService.getBySettingKey("mp-weixin"); // JSONObject setting = settingService.getBySettingKey("mp-weixin"); - String appid = "wx7bdcb7c68d53062b"; - String secret = "8d747742fa81da3211da1d504e494531"; + String appid = setting.getString("appId"); + String secret = setting.getString("appSecret"); // 从缓存获取access_token String value = redisTemplate.opsForValue().get(ACCESS_TOKEN_KEY.concat(getTenantId().toString())); // if (value != null) { diff --git a/src/main/java/com/gxwebsoft/shop/controller/WxPayController.java b/src/main/java/com/gxwebsoft/shop/controller/WxPayController.java index e511e22..c00ebbd 100644 --- a/src/main/java/com/gxwebsoft/shop/controller/WxPayController.java +++ b/src/main/java/com/gxwebsoft/shop/controller/WxPayController.java @@ -4,13 +4,17 @@ import cn.hutool.core.date.DateUtil; import com.gxwebsoft.common.core.web.ApiResult; import com.gxwebsoft.common.core.web.BaseController; import com.gxwebsoft.common.system.entity.DictData; +import com.gxwebsoft.common.system.entity.User; 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.shop.constants.OrderConstants; import com.gxwebsoft.shop.entity.*; import com.gxwebsoft.shop.service.*; import com.wechat.pay.java.core.RSAAutoCertificateConfig; import com.wechat.pay.java.core.RSAConfig; +import com.wechat.pay.java.core.RSAPublicKeyConfig; import com.wechat.pay.java.core.notification.NotificationConfig; import com.wechat.pay.java.core.notification.NotificationParser; import com.wechat.pay.java.core.notification.RequestParam; @@ -20,6 +24,9 @@ import com.wechat.pay.java.service.partnerpayments.nativepay.model.Transaction; import com.wechat.pay.java.service.partnerpayments.model.TransactionAmount; import com.wechat.pay.java.service.partnerpayments.nativepay.NativePayService; import com.wechat.pay.java.service.partnerpayments.nativepay.model.PrepayResponse; +import com.wechat.pay.java.service.payments.jsapi.JsapiServiceExtension; +import com.wechat.pay.java.service.payments.jsapi.model.Payer; +import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse; import com.wechat.pay.java.service.refund.RefundService; import com.wechat.pay.java.service.refund.model.AmountReq; import com.wechat.pay.java.service.refund.model.CreateRequest; @@ -39,6 +46,7 @@ import com.wechat.pay.java.core.Config; import javax.annotation.Resource; import java.math.BigDecimal; import java.text.ParseException; +import java.util.HashMap; import java.util.Map; @RestController @@ -52,8 +60,10 @@ public class WxPayController extends BaseController { private DictDataService dictDataService; @Resource private OrderRefundService orderRefundService; - @Autowired - private UserBalanceLogController userBalanceLogController; + @Resource + private GxCoinLogService gxCoinLogService; + @Resource + private UserService userService; private final Integer tenantId = 10036; @@ -63,88 +73,69 @@ public class WxPayController extends BaseController { * 商户号 */ @Value("${wxpay.mch-id}") - public String merchantId; + public String mchId; /** * 商户API私钥路径 */ @Value("${wxpay.private-key-path}") public String privateKeyPath; - /** - * 商户证书序列号 - */ + + @Value("${wxpay.pub-key-path}") + public String publicKeyPath; + + @Value("${wxpay.pub-key-id}") + public String publicKeyId; + @Value("${wxpay.mch-serial-no}") - public String merchantSerialNumber; + public String serialNo; + /** * 商户APIV3密钥 */ @Value("${wxpay.api-v3-key}") public String apiV3key; - @Value("${wxpay.notify-domain}") - public String notifyUrl; - - @Value("${wxpay.cert-path}") - public String wechatPayCertificatePath; - - private final String spAppId = "wxa67c676fc445590e"; - private final String spMerchantId = "1615739384"; - - public String nativePay(String orderNo, Integer payAmount, String title) { - Config config = new RSAAutoCertificateConfig.Builder() - .merchantId(spMerchantId) - .privateKeyFromPath(privateKeyPath) - .merchantSerialNumber(merchantSerialNumber) - .apiV3Key(apiV3key) - .build(); - // 构建service - NativePayService service = new NativePayService.Builder().config(config).build(); - PrepayRequest request = new PrepayRequest(); - Amount amount = new Amount(); - DictData dictData = dictDataService.getByDictCodeAndName("PAY_TEST_MODE", "模式"); - if (Integer.valueOf(dictData.getDictDataCode()).equals(0)) { - amount.setTotal(1); - }else { + public HashMap makePay(String openId, String orderNo, Integer payAmount, String title, String notifyUrl) { + try { + Config config = new RSAPublicKeyConfig.Builder() + .merchantId(mchId) + .privateKeyFromPath(privateKeyPath) + .publicKeyFromPath(publicKeyPath) + .publicKeyId(publicKeyId) + .apiV3Key(apiV3key) + .merchantSerialNumber(serialNo) + .build(); + JsapiServiceExtension service = new JsapiServiceExtension.Builder().config(config).build(); + // 跟之前下单示例一样,填充预下单参数 + com.wechat.pay.java.service.payments.jsapi.model.PrepayRequest request = new com.wechat.pay.java.service.payments.jsapi.model.PrepayRequest(); + com.wechat.pay.java.service.payments.jsapi.model.Amount amount = new com.wechat.pay.java.service.payments.jsapi.model.Amount(); amount.setTotal(payAmount); + amount.setCurrency("CNY"); + request.setAmount(amount); + request.setAppid(appId); + request.setMchid(mchId); + request.setDescription(title); + request.setOutTradeNo(orderNo); + request.setAttach(getTenantId().toString()); + final Payer payer = new Payer(); + payer.setOpenid(openId); + request.setPayer(payer); + request.setNotifyUrl(notifyUrl); + System.out.println("request = " + request); + PrepayWithRequestPaymentResponse response = service.prepayWithRequestPayment(request); + final HashMap orderInfo = new HashMap<>(); + orderInfo.put("provider", "wxpay"); + orderInfo.put("timeStamp", response.getTimeStamp()); + orderInfo.put("nonceStr", response.getNonceStr()); + orderInfo.put("package", response.getPackageVal()); + orderInfo.put("signType", "RSA"); + orderInfo.put("paySign", response.getPaySign()); + return orderInfo; + } catch (Exception e) { + System.out.println(e); + System.out.println(e.getMessage()); } - request.setSpAppid(spAppId); - request.setSpMchid(spMerchantId); - request.setSubAppid(appId); - request.setSubMchid(merchantId); - request.setAmount(amount); - request.setDescription(title); - request.setNotifyUrl(notifyUrl); - request.setOutTradeNo(orderNo); - PrepayResponse response = service.prepay(request); - // 调用下单方法,得到应答 - return response.getCodeUrl(); - } - - /*** - * 退款申请 - * @param orderRefund - */ - public void refund(OrderRefund orderRefund) { - Config config = new RSAAutoCertificateConfig.Builder() - .merchantId(spMerchantId) - .privateKeyFromPath(privateKeyPath) - .merchantSerialNumber(merchantSerialNumber) - .apiV3Key(apiV3key) - .build(); - RefundService service = new RefundService.Builder().config(config).build(); - CreateRequest request = new CreateRequest(); - // 金额 - AmountReq amount = new AmountReq(); - amount.setTotal(orderRefund.getRefundMoney().multiply(BigDecimal.valueOf(100)).longValue()); - amount.setRefund(orderRefund.getRefundMoney().multiply(BigDecimal.valueOf(100)).longValue()); - amount.setCurrency("CNY"); - request.setSubMchid(merchantId); - request.setAmount(amount); - request.setOutTradeNo(orderRefund.getOrder().getOrderNo()); - request.setOutRefundNo("R" + orderRefund.getOrder().getOrderNo()); - String wechatRefundNotifyUrl = "https://vivo-server.gxwebsoft.com/api/shop/wx-pay/refund-notify"; - request.setNotifyUrl(wechatRefundNotifyUrl); - service.create(request); - + return null; } @PostMapping("/notify") @@ -156,11 +147,13 @@ public class WxPayController extends BaseController { .timestamp(header.get("wechatpay-timestamp").toString()) .body(body) .build(); - NotificationConfig config = new RSAAutoCertificateConfig.Builder() - .merchantId(spMerchantId) + NotificationConfig config = new RSAPublicKeyConfig.Builder() + .merchantId(mchId) .privateKeyFromPath(privateKeyPath) - .merchantSerialNumber(merchantSerialNumber) + .publicKeyFromPath(publicKeyPath) + .publicKeyId(publicKeyId) .apiV3Key(apiV3key) + .merchantSerialNumber(serialNo) .build(); // 初始化 NotificationParser NotificationParser parser = new NotificationParser(config); @@ -178,45 +171,18 @@ public class WxPayController extends BaseController { Transaction.TradeStateEnum tradeStateEnum = transaction.getTradeState(); System.out.println("支付结果:" + transaction); if (tradeStateEnum == Transaction.TradeStateEnum.SUCCESS) { - Order order = orderService.getByOutTradeNo(orderNo); - order.setOrderStatus(OrderConstants.ORDER_STATUS_PAID); - order.setPayMethod(OrderConstants.ORDER_PAY_METHOD_WECHAT.toString()); - order.setTradeId(transactionId); - order.setReceiptAmount(userPaid); - order.setPayTime(DateUtil.date()); - orderService.updateById(order); + GxCoinLog coinLog = gxCoinLogService.getByOrderNo(orderNo); + if (coinLog != null && coinLog.getStatus().equals(0)) { + coinLog.setStatus(1); + coinLog.setPaidNo(transactionId); + gxCoinLogService.updateById(coinLog); - } - return success(); - } - - @PostMapping("/refund-notify") - public ApiResult refundNotify(@RequestBody String body, @RequestHeader Map header) throws ParseException { - RequestParam requestParam = new RequestParam.Builder() - .serialNumber(header.get("wechatpay-serial").toString()) - .nonce(header.get("wechatpay-nonce").toString()) - .signature(header.get("wechatpay-signature").toString()) - .timestamp(header.get("wechatpay-timestamp").toString()) - .body(body) - .build(); - NotificationConfig config = new RSAAutoCertificateConfig.Builder() - .merchantId(spMerchantId) - .privateKeyFromPath(privateKeyPath) - .merchantSerialNumber(merchantSerialNumber) - .apiV3Key(apiV3key) - .build(); - // 初始化 NotificationParser - NotificationParser parser = new NotificationParser(config); - RefundNotification notification = parser.parse(requestParam, RefundNotification.class); - String orderNo = notification.getOutTradeNo(); - if (notification.getRefundStatus().equals(Status.SUCCESS)) { - Order order = orderService.getByOutTradeNo(orderNo); - OrderRefund orderRefund = orderRefundService.getByOrderId(order.getOrderId()); - if (orderRefund.getRefundStatus().equals(0)) { - orderRefund.setRefundStatus(1); - orderRefundService.updateById(orderRefund); + User user = userService.getById(coinLog.getUserId()); + user.setCoin(user.getCoin() + coinLog.getNum()); + userService.updateById(user); } } return success(); } + } diff --git a/src/main/java/com/gxwebsoft/sys/controller/SysAreaController.java b/src/main/java/com/gxwebsoft/sys/controller/SysAreaController.java new file mode 100644 index 0000000..5f94f3d --- /dev/null +++ b/src/main/java/com/gxwebsoft/sys/controller/SysAreaController.java @@ -0,0 +1,110 @@ +package com.gxwebsoft.sys.controller; + +import com.gxwebsoft.common.core.web.BaseController; +import com.gxwebsoft.sys.service.SysAreaService; +import com.gxwebsoft.sys.entity.SysArea; +import com.gxwebsoft.sys.param.SysAreaParam; +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 11:36:29 + */ +@Api(tags = "管理") +@RestController +@RequestMapping("/api/sys/sys-area") +public class SysAreaController extends BaseController { + @Resource + private SysAreaService sysAreaService; + + @ApiOperation("分页查询") + @GetMapping("/page") + public ApiResult> page(SysAreaParam param) { + // 使用关联查询 + return success(sysAreaService.pageRel(param)); + } + + @ApiOperation("查询全部") + @GetMapping() + public ApiResult> list(SysAreaParam param) { + // 使用关联查询 + return success(sysAreaService.listRel(param)); + } + + @PreAuthorize("hasAuthority('sys:sysArea:list')") + @ApiOperation("根据id查询") + @GetMapping("/{id}") + public ApiResult get(@PathVariable("id") Integer id) { + // 使用关联查询 + return success(sysAreaService.getByIdRel(id)); + } + + @ApiOperation("添加") + @PostMapping() + public ApiResult save(@RequestBody SysArea sysArea) { + if (sysAreaService.save(sysArea)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("修改") + @PutMapping() + public ApiResult update(@RequestBody SysArea sysArea) { + if (sysAreaService.updateById(sysArea)) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("删除") + @DeleteMapping("/{id}") + public ApiResult remove(@PathVariable("id") Integer id) { + if (sysAreaService.removeById(id)) { + return success("删除成功"); + } + return fail("删除失败"); + } + + @ApiOperation("批量添加") + @PostMapping("/batch") + public ApiResult saveBatch(@RequestBody List list) { + if (sysAreaService.saveBatch(list)) { + return success("添加成功"); + } + return fail("添加失败"); + } + + @ApiOperation("批量修改") + @PutMapping("/batch") + public ApiResult updateBatch(@RequestBody BatchParam batchParam) { + if (batchParam.update(sysAreaService, "id")) { + return success("修改成功"); + } + return fail("修改失败"); + } + + @ApiOperation("批量删除") + @DeleteMapping("/batch") + public ApiResult removeBatch(@RequestBody List ids) { + if (sysAreaService.removeByIds(ids)) { + return success("删除成功"); + } + return fail("删除失败"); + } + +} diff --git a/src/main/java/com/gxwebsoft/sys/entity/SysArea.java b/src/main/java/com/gxwebsoft/sys/entity/SysArea.java new file mode 100644 index 0000000..eb1f352 --- /dev/null +++ b/src/main/java/com/gxwebsoft/sys/entity/SysArea.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.sys.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * + * + * @author LX + * @since 2025-12-02 11:36:29 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "SysArea对象", description = "") +@TableName("sys_area") +public class SysArea implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + private String name; + + private Integer fid; + + private Integer levelId; + + @ApiModelProperty(value = "租户id") + private Integer tenantId; + +} diff --git a/src/main/java/com/gxwebsoft/sys/mapper/SysAreaMapper.java b/src/main/java/com/gxwebsoft/sys/mapper/SysAreaMapper.java new file mode 100644 index 0000000..8f0e8a1 --- /dev/null +++ b/src/main/java/com/gxwebsoft/sys/mapper/SysAreaMapper.java @@ -0,0 +1,37 @@ +package com.gxwebsoft.sys.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.gxwebsoft.sys.entity.SysArea; +import com.gxwebsoft.sys.param.SysAreaParam; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * Mapper + * + * @author LX + * @since 2025-12-02 11:36:29 + */ +public interface SysAreaMapper extends BaseMapper { + + /** + * 分页查询 + * + * @param page 分页对象 + * @param param 查询参数 + * @return List + */ + List selectPageRel(@Param("page") IPage page, + @Param("param") SysAreaParam param); + + /** + * 查询全部 + * + * @param param 查询参数 + * @return List + */ + List selectListRel(@Param("param") SysAreaParam param); + +} diff --git a/src/main/java/com/gxwebsoft/sys/mapper/xml/SysAreaMapper.xml b/src/main/java/com/gxwebsoft/sys/mapper/xml/SysAreaMapper.xml new file mode 100644 index 0000000..2fc2e28 --- /dev/null +++ b/src/main/java/com/gxwebsoft/sys/mapper/xml/SysAreaMapper.xml @@ -0,0 +1,39 @@ + + + + + + + SELECT a.* + FROM sys_area a + + + AND a.id = #{param.id} + + + AND a.name LIKE CONCAT('%', #{param.name}, '%') + + + AND a.fid = #{param.fid} + + + AND a.level_id = #{param.levelId} + + + AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') + ) + + + + + + + + + + + diff --git a/src/main/java/com/gxwebsoft/law/param/LawNotaryConfigParam.java b/src/main/java/com/gxwebsoft/sys/param/SysAreaParam.java similarity index 60% rename from src/main/java/com/gxwebsoft/law/param/LawNotaryConfigParam.java rename to src/main/java/com/gxwebsoft/sys/param/SysAreaParam.java index a185d10..ca45846 100644 --- a/src/main/java/com/gxwebsoft/law/param/LawNotaryConfigParam.java +++ b/src/main/java/com/gxwebsoft/sys/param/SysAreaParam.java @@ -1,4 +1,4 @@ -package com.gxwebsoft.law.param; +package com.gxwebsoft.sys.param; import java.math.BigDecimal; import com.gxwebsoft.common.core.annotation.QueryField; @@ -11,31 +11,27 @@ import lombok.Data; import lombok.EqualsAndHashCode; /** - * 公证配置查询参数 + * 查询参数 * * @author LX - * @since 2025-05-17 16:10:35 + * @since 2025-12-02 11:36:29 */ @Data @EqualsAndHashCode(callSuper = false) @JsonInclude(JsonInclude.Include.NON_NULL) -@ApiModel(value = "LawNotaryConfigParam对象", description = "公证配置查询参数") -public class LawNotaryConfigParam extends BaseParam { +@ApiModel(value = "SysAreaParam对象", description = "查询参数") +public class SysAreaParam extends BaseParam { private static final long serialVersionUID = 1L; @QueryField(type = QueryType.EQ) private Integer id; - private String title; - - @ApiModelProperty(value = "配置") - private String configList; + private String name; @QueryField(type = QueryType.EQ) - private Integer userId; + private Integer fid; - @ApiModelProperty(value = "是否删除, 0否, 1是") @QueryField(type = QueryType.EQ) - private Integer deleted; + private Integer levelId; } diff --git a/src/main/java/com/gxwebsoft/sys/service/SysAreaService.java b/src/main/java/com/gxwebsoft/sys/service/SysAreaService.java new file mode 100644 index 0000000..d025f8c --- /dev/null +++ b/src/main/java/com/gxwebsoft/sys/service/SysAreaService.java @@ -0,0 +1,42 @@ +package com.gxwebsoft.sys.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.gxwebsoft.common.core.web.PageResult; +import com.gxwebsoft.sys.entity.SysArea; +import com.gxwebsoft.sys.param.SysAreaParam; + +import java.util.List; + +/** + * Service + * + * @author LX + * @since 2025-12-02 11:36:29 + */ +public interface SysAreaService extends IService { + + /** + * 分页关联查询 + * + * @param param 查询参数 + * @return PageResult + */ + PageResult pageRel(SysAreaParam param); + + /** + * 关联查询全部 + * + * @param param 查询参数 + * @return List + */ + List listRel(SysAreaParam param); + + /** + * 根据id查询 + * + * @param id + * @return SysArea + */ + SysArea getByIdRel(Integer id); + +} diff --git a/src/main/java/com/gxwebsoft/sys/service/impl/SysAreaServiceImpl.java b/src/main/java/com/gxwebsoft/sys/service/impl/SysAreaServiceImpl.java new file mode 100644 index 0000000..0afe984 --- /dev/null +++ b/src/main/java/com/gxwebsoft/sys/service/impl/SysAreaServiceImpl.java @@ -0,0 +1,47 @@ +package com.gxwebsoft.sys.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.gxwebsoft.sys.mapper.SysAreaMapper; +import com.gxwebsoft.sys.service.SysAreaService; +import com.gxwebsoft.sys.entity.SysArea; +import com.gxwebsoft.sys.param.SysAreaParam; +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 11:36:29 + */ +@Service +public class SysAreaServiceImpl extends ServiceImpl implements SysAreaService { + + @Override + public PageResult pageRel(SysAreaParam param) { + PageParam page = new PageParam<>(param); + page.setDefaultOrder("id asc"); + List list = baseMapper.selectPageRel(page, param); + return new PageResult<>(list, page.getTotal()); + } + + @Override + public List listRel(SysAreaParam param) { + List list = baseMapper.selectListRel(param); + // 排序 + PageParam page = new PageParam<>(); + page.setDefaultOrder("id asc"); + return page.sortRecords(list); + } + + @Override + public SysArea getByIdRel(Integer id) { + SysAreaParam param = new SysAreaParam(); + param.setId(id); + return param.getOne(baseMapper.selectListRel(param)); + } + +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 11c717f..ef5c0a4 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -3,9 +3,9 @@ # 数据源配置 spring: datasource: - url: jdbc:mysql://127.0.0.1:3306/law?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 - username: root - password: root + url: jdbc:mysql://47.121.133.163:3308/guoxue?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 + username: guoxue + password: cDrcxzjSELdt3FFN driver-class-name: com.mysql.cj.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource @@ -21,9 +21,8 @@ config: # 开发环境接口 server-url: http://localhost:10051/api # upload-path: /Users/gxwebsoft/Documents/uploads/ - upload-path: /Users/liangxin/Project/JAVA/law-java/ + upload-path: /Users/liangxin/Project/JAVA/guoxue-java/ wxpay: - private-key-path: /Users/liangxin/Project/JAVA/law-java/src/main/resources/cert/apiclient_key.pem - cert-path: /Users/liangxin/Project/JAVA/law-java/src/main/resources/cert/apiclient_cert.pem - + private-key-path: /Users/liangxin/Project/JAVA/guoxue-java/src/main/resources/cert/apiclient_key.pem + pub-key-path: /Users/liangxin/Project/JAVA/guoxue-java/src/main/resources/cert/44ad9c08a0ab46dd8fc555178df581c4.pem diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 158fd23..5bff5f6 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -3,9 +3,9 @@ # 数据源配置 spring: datasource: - url: jdbc:mysql://127.0.0.1:3318/law?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 - username: law - password: HAXx4Ar2aNPCnBKi + url: jdbc:mysql://127.0.0.1:3308/guoxue?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 + username: guoxue + password: cDrcxzjSELdt3FFN driver-class-name: com.mysql.cj.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource @@ -21,11 +21,11 @@ logging: # 框架配置 config: # 开发环境接口 - server-url: https://sifa-api.wsdns.cn/api - upload-path: /www/wwwroot/sifa-api.wsdns.cn/ - file-server: https://sifa-api.wsdns.cn + server-url: https://guoxue.gxwebsoft.com/api + upload-path: /www/wwwroot/guoxue/ + file-server: https://guoxue.gxwebsoft.com wxpay: - private-key-path: /www/wwwroot/sifa-api.wsdns.cn/cert/apiclient_key.pem - cert-path: /www/wwwroot/sifa-api.wsdns.cn/cert/wechatpay_4A3231584E93B6AE77820074D07EADEACCB7E223.pem - + private-key-path: /www/wwwroot/guoxue/cert/apiclient_key.pem + pub-key-path: /www/wwwroot/guoxue/cert/44ad9c08a0ab46dd8fc555178df581c4.pem + \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 84ba41f..a1e343b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -94,6 +94,13 @@ config: wx: miniapp: configs: - - appid: wx25deb2f4b5cd2b81 - secret: f5b623a28ec2e593a6ce6860eeaaf299 - msgDataFormat: JSON \ No newline at end of file + - appid: wx79d17ac6147366fd + secret: 8a020ad08e5c6f0439a93f9b0f0eccfa + msgDataFormat: JSON + +wxpay: + api-v3-key: g4ny70843ynmcoxwfej0v2yuv9n28nut + pub-key-id: PUB_KEY_ID_0117329300312025112800181693000807 + app-id: wx79d17ac6147366fd + mch-id: 1732930031 + mch-serial-no: 7EE24C695B278DB2C4F0C1CB42069065ECCBE3FD \ No newline at end of file diff --git a/src/main/resources/cert/44ad9c08a0ab46dd8fc555178df581c4.pem b/src/main/resources/cert/44ad9c08a0ab46dd8fc555178df581c4.pem new file mode 100644 index 0000000..fa8f6b9 --- /dev/null +++ b/src/main/resources/cert/44ad9c08a0ab46dd8fc555178df581c4.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwKxSpBlNtDurWOlPNHXM +EJND/BVEmLU8bMVo9NyR+eZay3o/VwOojytHk8RwWxP9vRtY+d7wQtC0T9P05buK +pTBrC1qX1L5ekrJBtkG/EXNA9AYzbI3uvb8v0/ohyvw9qhYNEhOGB2VwQUYI4HfE +HswirY7HPUaK/524V9sMlCNzybodatL2Qgk0ZnQH+Rb86kDUi1YZsFYj3JOFHAoA +gyhIgTf86HALsO0ElBqQDVv5lEuGM6EZ2RprYikI3RasnmH5RqfiL2Fmj+TTdMog +RxQ0SH0XbzAAjZjOpRqD/XyzKC3u2mSenucTiT09hRrW2u9PT9jpPFMsfv79B8R7 +DQIDAQAB +-----END PUBLIC KEY----- diff --git a/src/main/resources/cert/apiclient_cert.p12 b/src/main/resources/cert/apiclient_cert.p12 index c561841..d34c9c2 100644 Binary files a/src/main/resources/cert/apiclient_cert.p12 and b/src/main/resources/cert/apiclient_cert.p12 differ diff --git a/src/main/resources/cert/apiclient_cert.pem b/src/main/resources/cert/apiclient_cert.pem index 6880e1f..912b5ea 100644 --- a/src/main/resources/cert/apiclient_cert.pem +++ b/src/main/resources/cert/apiclient_cert.pem @@ -1,24 +1,25 @@ -----BEGIN CERTIFICATE----- -MIID8zCCAtugAwIBAgIUXCoPmnLcPykMyQydi3234TGalk4wDQYJKoZIhvcNAQEL +MIIEKDCCAxCgAwIBAgIUfuJMaVsnjbLE8MHLQgaQZezL4/0wDQYJKoZIhvcNAQEL BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg -Q0EwHhcNMjIwNDA4MDQ1MjAxWhcNMjcwNDA3MDQ1MjAxWjCBhDETMBEGA1UEAwwK -MTYxNTczOTM4NDEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTAwLgYDVQQL -DCfljZflroHluILnvZHlrr/kv6Hmga/np5HmioDmnInpmZDlhazlj7gxCzAJBgNV -BAYMAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBAKp/F0BGSkAlJYZz19iGg0sKrF7uHxZhBxaO1Jxbm626HkhahF+B -6GG5qKbFyw9eNiZjrGz6q71ScHfAUN/5AoE/Ae6TSnFMUDsXSaG7VCYUlgo4P+BQ -nUCtsGfqJOLKNkcvkyoO2GUHulJALe62r9J/MQdvB6YjOY/XCP2sz5ww2GWJW0tS -M3IYPz1DwYWxVMnOnQhUChruUQymj37rXKqyz/pRWluzCKxB36lO3HsVBTKjn2x2 -9Y/hXCNOueRGfoNzJKdr8Nk8Kd39baRF5Ru8PXvcdBQFEQT/ilvoDs+RuNvJWIed -Ax0T416PJMJx/3hi/Tn/BobuHZZKkHmq4HMCAwEAAaOBgTB/MAkGA1UdEwQCMAAw -CwYDVR0PBAQDAgTwMGUGA1UdHwReMFwwWqBYoFaGVGh0dHA6Ly9ldmNhLml0cnVz -LmNvbS5jbi9wdWJsaWMvaXRydXNjcmw/Q0E9MUJENDIyMEU1MERCQzA0QjA2QUQz -OTc1NDk4NDZDMDFDM0U4RUJEMjANBgkqhkiG9w0BAQsFAAOCAQEAbl5p24AlmfVq -ppjO+EuQ2/3B94ThjKd6tx9tXSTbwHoBzYHF+qR/k2uflECJaSOs/az9iegTDSal -oJ+mK+OHxlvGKNlDtff22KYDpeO0FRrEP5x5tOVpvd8n9t3aGG8r90I23yoxAy0A -dDzzysHaw8d8CmV4UfbDR368BzlWEDByAWbu9kE4+4/A/0MmTZuivUEOvvNG5JBM -kU/P5eKI8MNZ/RrriuW7vCaODI5QVYNwc7lBZyolEjFyPBLfyXL8XbmKMjTd+zEE -4wmktem2hJLrMb7Q5A/XQmFFyk/JtcXbQCDFeA476xQ92w3pmJ218D4iolThzed6 -CpV7eWJ27A== +Q0EwHhcNMjUxMTI4MDM1MjQ0WhcNMzAxMTI3MDM1MjQ0WjCBgTETMBEGA1UEAwwK +MTczMjkzMDAzMTEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMS0wKwYDVQQL +DCTlub/lt57nroDlubjkv6Hmga/np5HmioDmnInpmZDlhazlj7gxCzAJBgNVBAYT +AkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAPCWcxFUEW7cGVCkCW2/lGM9ByVOC3h+Bxvzb0DDu4KedMMFp9rOGPZj +uvYNRGzJfaepLVPXFBEo6WaMYYnyZ4W0GSqDaynZsZpowEKUQ+q6Hpfq6A0og7bd +gKZ1PuSyTyKqVrXg+WrGT2XfgbRpXQVevpiIcrzfWznYBxeSigc3xQf9DJtyUNUa +tgFJ+hR8tkYqzS5GoqRvyG7OULFw7jBZyEQ74rUNpPjUASBoXSN+awQxHtAQbljD +4E25KVrEGph9u5Mf94I8Btkh8p9JQJOuKScRDAqdMLbfzYwISTZF1uUPbhmuS7Ra +FEHx/9vdLhja8RnExOe/blEwj2cm5E0CAwEAAaOBuTCBtjAJBgNVHRMEAjAAMAsG +A1UdDwQEAwID+DCBmwYDVR0fBIGTMIGQMIGNoIGKoIGHhoGEaHR0cDovL2V2Y2Eu +aXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRC +MDZBRDM5NzU0OTg0NkMwMUMzRThFQkQyJnNnPUhBQ0M0NzFCNjU0MjJFMTJCMjdB +OUQzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IBAQBu+6Vq +4DdIq+6Jw26uD2g3uZUBxj3lc9RfNPotJjcP5Ag81hYyNyj0w7Xhlz3enDRSHAFK +Z0IeF+WwrmCVzUwC9YzQ0khMcFSQkjIC7kQAGON4JtPPCEefilZJ2Xr/7gYKu4Cy ++bkr0jt5/pLPqi3ngC81GWz935pqMNJo2oGbZQviV+97AXluifGbNoQh+0e0Fkj0 +2411GLvW8PToLlXM+g2+AmcxA3ADrjmmMv3Cq0OiPj9X2h8sGreoEBW0bT6+Jzfd +CvIHKCttxq27m6V1AyA+CnTxtZBiG/MSsBRhu0FxWL6F8ZWBNIDkfszbcx2MdzvQ +qUVN9nEYPbxpv4bO -----END CERTIFICATE----- diff --git a/src/main/resources/cert/apiclient_key.pem b/src/main/resources/cert/apiclient_key.pem index 88e170f..3995b00 100644 --- a/src/main/resources/cert/apiclient_key.pem +++ b/src/main/resources/cert/apiclient_key.pem @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqfxdARkpAJSWG -c9fYhoNLCqxe7h8WYQcWjtScW5utuh5IWoRfgehhuaimxcsPXjYmY6xs+qu9UnB3 -wFDf+QKBPwHuk0pxTFA7F0mhu1QmFJYKOD/gUJ1ArbBn6iTiyjZHL5MqDthlB7pS -QC3utq/SfzEHbwemIzmP1wj9rM+cMNhliVtLUjNyGD89Q8GFsVTJzp0IVAoa7lEM -po9+61yqss/6UVpbswisQd+pTtx7FQUyo59sdvWP4VwjTrnkRn6DcySna/DZPCnd -/W2kReUbvD173HQUBREE/4pb6A7PkbjbyViHnQMdE+NejyTCcf94Yv05/waG7h2W -SpB5quBzAgMBAAECggEAN+7RtehZW4nUMbO3T/VxBSFPQyVjVXgnVyMsZM8411mD -rcDkRGDd15GM3oltAHGr2hRA8M+bn9R3yRFydse+JqCBBb+UYG7ksz4EjeZiyMtg -HaIucmx/6kQQ50ZNK4mjHN9irB2KqDpMycb8Sp/sNmY7s3CdVcegjqvA61fSFC74 -+w2HEDm0b2tDb0nU5v1BXsVL1i+kRqIpK9s7IrErjJG5YCn1ttqvtRTRZaWkgAkw -WHHtK30r1Stc3QYeGkO2Cjjunv41eSvrhcBSHSuQPrzJa6BkX6Oe1JfFeQ/4Spyc -eYcsRBBV2YNklsCwFVPhOA176EeB8iJ+c6FtXSwk4QKBgQDRVicrl0qd335ocrw3 -4eFfB1NTS8AnL7B1HbG8ryWNGTdRLRnF6Faz1xlSf6qq0s8DCc8cjsDRGDJ8tTWC -s8rxHvX7Veih6YUkVl2QaYvxfshgbHtOZ4jOpFkJSsb+OTI6zSTTwUBwhOKq6al6 -UMN+Ll2RF5GxDlF/iDFsFyJI7wKBgQDQgISAOJ3XqrRJQhuofjVO0tV22K8yDKW8 -51TCEkHzOIvCyrNj3Ee5wkqfnOmP8Mpo02f+302PRN+qy/AHINbNwy94YbJPwOFO -kjMhmvZf5D1BmQCnLHYuXww2eMAUCJLxAWgChYhqR37sm4IW9s1WbMHi8fLnVfsm -3WBVgYV4vQKBgA/jSAnI68LbqY5n1t0u6Zn6xlo2D5lpxyy8WjcF3AW/ejFRCPm6 -TopLswJN6jgY09lZLzztoLi962cHoc4Ps0FlpimzNXrEbHR7kZJaUGK9ypt24Ezt -ErcMRi2sXToCQUuxMjBYJHnlvAZYwaIk6xFyl2thrI8RlSHmxkl74ABFAoGBALO7 -dXzKUVZN8qeL8yel0/Ik0JpoY22zdVOH3oqFDpDJV8EM1uLoSnQYxhcdPkE0gmcm -hekxOTydVGl472pVppUtAki1fu49CHugj68SU/uJVjyr1eJF84I5sN9r67fZREG4 -wp4Z2eQzyXfQ/a0qBwvPKLuncYp1ldCE2LwcsJ/JAoGAecsQKQFx5+apuPHTBihi -MhiZEdO+5wLJiF+X8S78zCH3kvQhGvQvrUncBaKG1pOMJw+ewrJDtL4Y/++17gPL -chQuScdIwG72lMWV4T7AItu0YiM6I+UZA77FADpX1icWfd2s4QKJTgpJiZYJMuNF -OAN6OLXWbQZlD5CPVjS4wK4= +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDwlnMRVBFu3BlQ +pAltv5RjPQclTgt4fgcb829Aw7uCnnTDBafazhj2Y7r2DURsyX2nqS1T1xQRKOlm +jGGJ8meFtBkqg2sp2bGaaMBClEPquh6X6ugNKIO23YCmdT7ksk8iqla14Plqxk9l +34G0aV0FXr6YiHK831s52AcXkooHN8UH/QybclDVGrYBSfoUfLZGKs0uRqKkb8hu +zlCxcO4wWchEO+K1DaT41AEgaF0jfmsEMR7QEG5Yw+BNuSlaxBqYfbuTH/eCPAbZ +IfKfSUCTriknEQwKnTC2382MCEk2RdblD24Zrku0WhRB8f/b3S4Y2vEZxMTnv25R +MI9nJuRNAgMBAAECggEAQKHKS89v135ddqJ6vfcHoBlXABiVUEtbEZE2RAnRJ+f1 +qiasz0Uqw5ZLNaqexTLkBNSYDrvq8ikxepEf6vUqBms5j4g6k8WdxsN5UumNzVMu +wNUkfdRyff/HffBlcv7L754fKUFFAABCeDWxHIxppvWq8kNFv6OpWELGtPhzCDjX +540CoUBcMP68hOjgWBGGdncTJRuPl/0mlS5etFrvseXjmviOz4WUij8ytpr22yEb +2k8SmoUzHE9gYTgAR/e1fzy3LujeT2S+YKnKZX74EBQRlkEwRAsnaBLGjJ6wGPN5 ++PKSccUNFfuVnUh39NSEsQHtsn1uNcK13IgIokayqQKBgQD5j0iJwRW/12EiwFtJ +y+dCp8DVaAixlYz8qv3QJXDeGw+Ffj2uh7d3lR8OBxwDGBlhLe6rXfAPGjuE5IYe +qL49+QozSAZLCJwCFy1o/nt6wD4URnog/Vvz3daQqC+HTJ6V4ifJw11WIgJXCTxH +VsoaJPlRTFLjx2FQEjWrAG6TcwKBgQD2y+R9/h3nqW9Hw7fpLmmtUM2xOKLmkQM2 +hDNSLmTMdS0ZjZpBb9bUqnb2y4Li7Wml5N+1LL33osSLca98k7h8LTBg1f2I4Et0 +UipZ4zR206O0hvrNx0Prz2/MJtxEDi9tRDZ9RsPnbFprov/q3oVQps7E/bPw9VB8 +EoRIb3Q5PwKBgECSJ0WlVPhPRQ3V0Yj1nj+r4gQVp/Iy7MjPgV6i4WJGhCyZLmKD +MSBa0C8z/bZ7PM3dMZzbcGqn8fB/pIg4RwkH7/C22RH/B0avMouxFMf9B9L9LUpt +46Xkp0jEi4+pbnr/iiX1S6gmoo5ckGEw/pfnKy8y3VucUfyCyaoWMYYrAoGABbOM +IcT/F9z4LyY8V2y1EEXvmop+aOkss9O2A84Ckh6a3h5BVAWrZtpRST5GVcu6RxTU +fjD8an4eIEKOFUisWGIK3hHTe5gC5jsHs2/mRGB7Ra5gmORjk00FfiffqsrRGasb +vyUlXXFJXXc0hk6Bse1IlZBu2cAxDcy3tZytiK0CgYEA7ehzpizOu2AENX17nM52 +E6D/PIkW60pG/40Eqx8NZH0SSweOOaxTfoH5sXeaovOu+WNr6rF66VaOCUzF2Qu9 +viXzWFmsFVA/dcO7p5DoZwR8/nn74OX7lIgfJN2lgJJ6WKPHCBpjRk5WB1FYL3Ox +nfFZWbPqISq7mHewpprGQvA= -----END PRIVATE KEY----- diff --git a/src/main/resources/cert/appPublicCert.crt b/src/main/resources/cert/appPublicCert.crt deleted file mode 100644 index a12dea4..0000000 --- a/src/main/resources/cert/appPublicCert.crt +++ /dev/null @@ -1,19 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDjzCCAnegAwIBAgIQICISFPMNDPadFdV3VF7atzANBgkqhkiG9w0BAQsFADCBkTELMAkGA1UE -BhMCQ04xGzAZBgNVBAoMEkFudCBGaW5hbmNpYWwgdGVzdDElMCMGA1UECwwcQ2VydGlmaWNhdGlv -biBBdXRob3JpdHkgdGVzdDE+MDwGA1UEAww1QW50IEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1 -dGhvcml0eSBDbGFzcyAyIFIxIHRlc3QwHhcNMjIxMjE0MTEzNjE3WhcNMjMxMjE5MTEzNjE3WjBh -MQswCQYDVQQGEwJDTjEVMBMGA1UECgwM5rKZ566x546v5aKDMQ8wDQYDVQQLDAZBbGlwYXkxKjAo -BgNVBAMMITIwODgxMDIxNzUyMDcyOTItMjAxNjA5MTEwMDQ4OTQ4NjCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBAJFjmRNQkJ1d2kWZ4bn8WvIUWKu2+wMDQ5nOMaIGtKo+bx3o1RaAWYct -XJL82GkdUr+JpiBy7W1iFl0quZJIo2n9tyxsTGTswq1mtYJVKonHELxN1L2Xz9PjU8wlzQwxb2Rm -JlW2/SpUGaRiZxzYJHhHXbqvPH8D/xG+x6Hwq9zEF/ZIDMCLi5wiXhK7KFXDOBFYdOw0zwCmGIeY -73htk56kay1HoTjwACvZzkw8ff5FRA76/5/7ZEj6R6Hga/LMmYJXfntPPYW/wuMiBI7rU5f4s6El -S1A2uwK4+kbepg9klOYR2Lg30SNz4hj4k8KNtoeWnzrTlWoZj3SfDErJuuMCAwEAAaMSMBAwDgYD -VR0PAQH/BAQDAgTwMA0GCSqGSIb3DQEBCwUAA4IBAQC9YAgw5uwHUgY73t8eABW8LzrhLoUafN/j -WG6QataRgaTHbNCuCz5yWTMmD7hZGmb8NuZzaLOPD+/0yM5nz+w/nc+Emc6hzTCrBVtFX80nnM3j -lIDBRGJRS2JlyrwL80DxoVCbY7JLkSRpGhc9RYLrNfPjpxhxchJ/8V1JU21rL5GKSdaR2YJDvANi -Bth321Q0G6djxfLPjx3zXp8VTGDdhRZjblJ7EddK4kaQ3RKTm4+UivUYMMQ+esD8NnoHTGvDXRCi -rqd+EtAZZ84yqW7YKKTjsh9a3tLBFwFMc2A2WM3s6fXtrFAiffsXwcyqaKTXibVTFE9t2sTUUaPF -IoJu ------END CERTIFICATE----- \ No newline at end of file diff --git a/src/main/resources/cert/backup/apiclient_cert.p12 b/src/main/resources/cert/backup/apiclient_cert.p12 deleted file mode 100755 index b597ba5..0000000 Binary files a/src/main/resources/cert/backup/apiclient_cert.p12 and /dev/null differ diff --git a/src/main/resources/cert/backup/apiclient_cert.pem b/src/main/resources/cert/backup/apiclient_cert.pem deleted file mode 100755 index a2c2df2..0000000 --- a/src/main/resources/cert/backup/apiclient_cert.pem +++ /dev/null @@ -1,25 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEKzCCAxOgAwIBAgIUY2ZU9GvIGE/T4LjKpdDlRIMEIaswDQYJKoZIhvcNAQEL -BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT -FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg -Q0EwHhcNMjMwNzI0MTM0ODM3WhcNMjgwNzIyMTM0ODM3WjCBhDETMBEGA1UEAwwK -MTI0NjYxMDEwMTEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTAwLgYDVQQL -DCfljZflroHluILnvZHlrr/kv6Hmga/np5HmioDmnInpmZDlhazlj7gxCzAJBgNV -BAYMAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEP -ADCCAQoCggEBALb2qbByODjQWx8Z+eRmwO3YqwzoqbeTeVL53/zJY9MfTZKOX8Xd -giOWM7nUE0KlFsB6Yc2tAEvOTz6baTywyKPzSIbhdDvqYjr/KJ8VLJyPEj7d4z8p -5RjkwEMBs5dX0UxtS0zLyKNtWOXsiw+tTMoWCbFZCcaA6JNqw9Us6yo1JXsCJQcb -fwU9AMML+CQRqraZ8NkOIKVis1yfMnPuEoWP+/wmpit3/PJuQkXeFlRS7U946xiu -FexzLhFTmX/vR9VLbegn3ewmhEiAlZGHZn/9q+mQT7j4g8k063ccFr2kXrLepJQ2 -zyv07lznpCOdzsvVm2cJHvRAI/UKQqWwDuMCAwEAAaOBuTCBtjAJBgNVHRMEAjAA -MAsGA1UdDwQEAwID+DCBmwYDVR0fBIGTMIGQMIGNoIGKoIGHhoGEaHR0cDovL2V2 -Y2EuaXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJD -MDRCMDZBRDM5NzU0OTg0NkMwMUMzRThFQkQyJnNnPUhBQ0M0NzFCNjU0MjJFMTJC -MjdBOUQzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IBAQA4 -/45dk0japlJEgE6p0LoLrYU8m3cZgth+XJGVmf4PfqYX25RayIIwpwiNXUvwul5H -nW+ePNhuZqRXTVZsrsyG+Id/r46HDUu8zFsm3Bp8PpU2EazJiJgzNNxQxVPrM06m -CU/zwLmFsyLyNL8VedGErFWsl2TI+Z6cD5d3NCPZNsOlvluInRe14+89ZQaljT5Q -BabUy+ug0v19TfYVXEoQc+QxQbtR6x4uxiGBCWoHRXKrGsssCbBZSSM+YtkwPcX4 -cJer4Nf3ZIom5eA7yAV4sRWU9HTXgiECGI2CWA+B+VGgSLpu4VthTDwHwIpC2m/C -MjtMuHD7RHxUMhf6GWng ------END CERTIFICATE----- diff --git a/src/main/resources/cert/backup/apiclient_key.pem b/src/main/resources/cert/backup/apiclient_key.pem deleted file mode 100755 index 3cbd6d2..0000000 --- a/src/main/resources/cert/backup/apiclient_key.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC29qmwcjg40Fsf -GfnkZsDt2KsM6Km3k3lS+d/8yWPTH02Sjl/F3YIjljO51BNCpRbAemHNrQBLzk8+ -m2k8sMij80iG4XQ76mI6/yifFSycjxI+3eM/KeUY5MBDAbOXV9FMbUtMy8ijbVjl -7IsPrUzKFgmxWQnGgOiTasPVLOsqNSV7AiUHG38FPQDDC/gkEaq2mfDZDiClYrNc -nzJz7hKFj/v8JqYrd/zybkJF3hZUUu1PeOsYrhXscy4RU5l/70fVS23oJ93sJoRI -gJWRh2Z//avpkE+4+IPJNOt3HBa9pF6y3qSUNs8r9O5c56Qjnc7L1ZtnCR70QCP1 -CkKlsA7jAgMBAAECggEBAJf7B3PJPUh8UuTf6ANBE4u/Cj872RbjyskRRW0vQNuz -yfUujQHIgXzcHPWE48bdaavTPQDjbzaJFqxz3hQK6W++/AUGrE3E4XoOUAjtRtR5 -x/cuy8DBJUvrYIWImUzjJrmso/sT4ANZJpo/RjhshTfs3HpT8tnQZOFns2qV2HaC -raIasa69LZpM6mA+1+pDDTFCYRqNZTFSAIawiEPz5C6YRoSLoSkJLVnwh10MGQJb -Z2RWIt9kcvpUT2bYirYG1HgZJjuygCu80JMHFLhxOWAEQXknILYs5YfJcS7QjFrH -7q5YYe/SKoRgMGUUL6src/mHan5yzLK4bXlW4vU627kCgYEA2jIlLMjVPx5N3iy9 -6dLa+Od5NhXCo+Cd3tr0EJGOpXquiw5wkSX6av6DNsObmMW9gkSwRKah8Iw+dQR7 -r5xYI8quT0tVqZLaL6j2xh3FSzGFSdF5a/IoKq4UrhmA05PwS2BtAwJTnMxBNoF9 -cSdoLUHVgRNmfI0Yk/vys23gy98CgYEA1qnSnG8hI/eIE46hHs3Cgx8AhACgm9Wy -bg3qeH9eu+pZ6Na3HQRtGGzeBug1P3ezBYjx6eol55TGIpocn8Ujm28Q3Zng61Tx -luV8LwTThVs+dvndEX0BTXbKx/dcbmpA4W6Kg/dzq6FXT2ryZPw96VUXMl8MAe/M -rRGMT96z3X0CgYAE82RSitAD2Z0ssFkyx/z97sqaRo4fB8atOsyU36ib6pexQged -033GFbZGdNO/+KSfIw3Y0OsVuSjloM9poaOCVGP2GqB784AN2siWoDBMz3fVv/IA -WAM/TKnddWit5Epse2idy9y3zw6fvPpqqdk8RaUhg54sr0rieLH+Dj0ugwKBgGtt -pcdAHle/o0wWTy/5TWUNeNaW8cnLUnadZEBVjfWBPOm3uwA8nNRid2MBhtRydRdK -B7dGxR12aQocEkMrB7zcApbEUbm0UwtvYYyuX6UXmtU0Cpyb8LDxyF32vz1K05l+ -FrggeLTmE6ndHd3IFrvVJ7y/sGSvu8DJTW0TSPSJAoGBAKKj3/21zJZZWMW0Hzdn -d7gKb8ros7SkWkN+xa7PeaScujA3MyE8r9/gsvC/5qLqa+3xAp7FA5MFY24d0vAf -cA1QAic1eCNZsHA0Qy+/VEyTSE/alKYEDvj5NV0WcC3mlmfZ+uRTL3HwXYqSbM4F -aI+vUhQJuXHpkybb3fM1ncwg ------END PRIVATE KEY----- diff --git a/src/main/resources/cert/wechatpay_0BC92BA528729B58B39CC69E58D3855EACFF9DC4.pem b/src/main/resources/cert/wechatpay_0BC92BA528729B58B39CC69E58D3855EACFF9DC4.pem deleted file mode 100644 index bc98d23..0000000 --- a/src/main/resources/cert/wechatpay_0BC92BA528729B58B39CC69E58D3855EACFF9DC4.pem +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIID8TCCAtmgAwIBAgIUC8krpShym1iznMaeWNOFXqz/ncQwDQYJKoZIhvcNAQEL -BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT -FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg -Q0EwHhcNMTgxMDAyMDQ1OTQwWhcNMjMxMDAxMDQ1OTQwWjCBgjEYMBYGA1UEAwwP -VGVucGF5LmNvbSBzaWduMRMwEQYDVQQKDApUZW5wYXkuY29tMR0wGwYDVQQLDBRU -ZW5wYXkuY29tIENBIENlbnRlcjELMAkGA1UEBgwCQ04xEjAQBgNVBAgMCUd1YW5n -RG9uZzERMA8GA1UEBwwIU2hlblpoZW4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQDSTNiV/fluUKBKHf2SmeulAsPXwhSBP4N5QzLQD95fx07yUjBFCXz7 -RSh2dSozgyic994HAps6MqAIEMJG6UBgzDEyL3dL2cbYs4DuZpnZsaOoHj+aabVP -2zE9Sdp4xE4F4VCvhI8AQwHhEM0qXAEHHXN549E1bB5jFgSJTxsOKYgO7xGek1iO -GGb08yLNZEGmtvXaVlu9JaSmSVxxH8ZjbHNq3cVF5Grum5rtC3o4qHifcki/JwvX -oS9t7F+AJmsIEXujodclHbjS1gmOVq2R90qqteX5nif/Gp8mDpnme6g8lwEdjO5n -JzQzSPpfDsh2+HLPKQUGadSrgMfWFrMZAgMBAAGjgYEwfzAJBgNVHRMEAjAAMAsG -A1UdDwQEAwIE8DBlBgNVHR8EXjBcMFqgWKBWhlRodHRwOi8vZXZjYS5pdHJ1cy5j -b20uY24vcHVibGljL2l0cnVzY3JsP0NBPTFCRDQyMjBFNTBEQkMwNEIwNkFEMzk3 -NTQ5ODQ2QzAxQzNFOEVCRDIwDQYJKoZIhvcNAQELBQADggEBADmXaYGIbV9iV3HT -FMGABfdASY085vGP4G5qqItcIPUt3N8Rv4dmPCyPCUQtXVD3mpE+V/FnRRSelf2R -rWIGV0tlIaAXpLnJ+rg9fvCH/lf2Dv0PSMg2ye4OW8YbrPcXs2AGqhaRGQyerJxw -fEaALL/89Ri5H/2bb6YenvJ+U8xpkU0+yMRSQF0lhR96CeqRVajBEjb3oi1daeFx -GBuDLTD8SDxf/XntREek20MLOupkplvTdudtSOOpD7iSXa21dw/rFXvDaGQ/wj6D -tG8xDA55V1JYPJcdEsdVOvj9L+loyaltYjCBoUg/ah9ihjDJlYwhHnVAcqqi8r2o -Hse2KNE= ------END CERTIFICATE----- \ No newline at end of file diff --git a/src/main/resources/cert/wechatpay_4A3231584E93B6AE77820074D07EADEACCB7E223.pem b/src/main/resources/cert/wechatpay_4A3231584E93B6AE77820074D07EADEACCB7E223.pem deleted file mode 100644 index 50afe22..0000000 --- a/src/main/resources/cert/wechatpay_4A3231584E93B6AE77820074D07EADEACCB7E223.pem +++ /dev/null @@ -1,24 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEFDCCAvygAwIBAgIUSjIxWE6Ttq53ggB00H6t6sy34iMwDQYJKoZIhvcNAQEL -BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT -FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg -Q0EwHhcNMjMwOTE5MTUxNTQ4WhcNMjgwOTE3MTUxNTQ4WjBuMRgwFgYDVQQDDA9U -ZW5wYXkuY29tIHNpZ24xEzARBgNVBAoMClRlbnBheS5jb20xHTAbBgNVBAsMFFRl -bnBheS5jb20gQ0EgQ2VudGVyMQswCQYDVQQGDAJDTjERMA8GA1UEBwwIU2hlblpo -ZW4wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5AOeoNuRReVPfOodE -TTE/wq96OK/7MI1lkwgtRlOIqwFGbGPxPx+wiLweWOWAeGrd0h+YuktIZezLhMhB -8pkJBzxz4U+zoQ9n3yY4CgDUBeAO8eNHhEQTTOTFUIvIlRxyr0EVuTHNP7pIkxA6 -gUvajWjJFbvU393vDHA9RflWrBNw1qVjkPPUx6axizD3wS8f77bwuspEWGTza/pS -g96HWUwFh9OSlQNPOjPG4km2YRQwGhoRMlLeZsUB+a0PtV0HI/B0TbY5u2EmPt0R -uNZLmcwImtiANYmySww6gp5uo4+im0P/kHKynPrW1SkS+8M9JP5T7Xck3bnHNv4S -9UOPAgMBAAGjgbkwgbYwCQYDVR0TBAIwADALBgNVHQ8EBAMCA/gwgZsGA1UdHwSB -kzCBkDCBjaCBiqCBh4aBhGh0dHA6Ly9ldmNhLml0cnVzLmNvbS5jbi9wdWJsaWMv -aXRydXNjcmw/Q0E9MUJENDIyMEU1MERCQzA0QjA2QUQzOTc1NDk4NDZDMDFDM0U4 -RUJEMiZzZz1IQUNDNDcxQjY1NDIyRTEyQjI3QTlEMzNBODdBRDFDREY1OTI2RTE0 -MDM3MTANBgkqhkiG9w0BAQsFAAOCAQEAHd42YyvxvvjYEIkCURHweCSQpWQrdsnP -AU2rcVzOx0kDxjq7+W2HkIkYeAZfE8pyBs5c39tgK+qospiDsKa9WYeBNyIRcCvN -q9ObLqSV4Cy/8lQMNh4Q37cdc3X+pAlTr7MtKka8ZcXYvbMBqus0dfJZayZvW7Ak -nnaXXJ4k7urgHOGYsZlZ+HC+DC/sYoN3DXzvg3XPlL0SNEQH0cWrRbaQnpOKVMk5 -TptbeNHKJfUxVW5jh4GtBFqvLeiOruY+gFYg7UkCKWo9ZIYe7/mEvJeHYh3acTTl -DOl3L0fR5KR7vqFMwZEUZxVOs6K2ANSCr57OQPBV++MG4DPr3yOhCQ== ------END CERTIFICATE----- \ No newline at end of file diff --git a/src/test/java/com/gxwebsoft/generator/CmsGenerator.java b/src/test/java/com/gxwebsoft/generator/CmsGenerator.java index 4abde04..0ce5181 100644 --- a/src/test/java/com/gxwebsoft/generator/CmsGenerator.java +++ b/src/test/java/com/gxwebsoft/generator/CmsGenerator.java @@ -26,38 +26,30 @@ public class CmsGenerator { //private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径 // 输出目录 private static final String OUTPUT_DIR = "/src/main/java"; + // Vue文件输出位置 + private static final String OUTPUT_LOCATION_VUE = "/Users/liangxin/Project/Html/web/guoxue-admin"; + // Vue文件输出目录 + private static final String OUTPUT_DIR_VUE = "/src"; // 作者名称 - private static final String AUTHOR = "科技小王子"; + private static final String AUTHOR = "LX"; // 是否在xml中添加二级缓存配置 private static final boolean ENABLE_CACHE = false; // 数据库连接配置 - private static final String DB_URL = "jdbc:mysql://47.119.165.234:3308/com_gxwebsoft_oa?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; + private static final String DB_URL = "jdbc:mysql://47.121.133.163:3308/guoxue?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; - private static final String DB_USERNAME = "com_gxwebsoft_oa"; - private static final String DB_PASSWORD = "EZfW2R4YiWfbLHLw"; + private static final String DB_USERNAME = "guoxue"; + private static final String DB_PASSWORD = "cDrcxzjSELdt3FFN"; // 包名 private static final String PACKAGE_NAME = "com.gxwebsoft"; // 模块名 private static final String MODULE_NAME = "cms"; // 需要生成的表 private static final String[] TABLE_NAMES = new String[]{ -// "cms_article", - "cms_article_category", -// "cms_docs", -// "cms_docs", -// "cms_docs", -// "cms_docs", -// "cms_docs", -// "cms_docs", -// "cms_docs", -// "cms_docs", -// "cms_docs", -// "cms_docs", + "cms_article_comment", }; // 需要去除的表前缀 private static final String[] TABLE_PREFIX = new String[]{ - "cms_", - "tb_" + "cms" }; // 不需要作为查询参数的字段 private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{ @@ -79,9 +71,9 @@ public class CmsGenerator { "BigDecimal" }; // 是否添加权限注解 - private static final boolean AUTH_ANNOTATION = true; + private static final boolean AUTH_ANNOTATION = false; // 是否添加日志注解 - private static final boolean LOG_ANNOTATION = true; + private static final boolean LOG_ANNOTATION = false; // controller的mapping前缀 private static final String CONTROLLER_MAPPING_PREFIX = "/api"; // 模板所在位置 @@ -168,6 +160,63 @@ public class CmsGenerator { + tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA; } }); + /** + * 以下是生成VUE项目代码 + * 生成文件的路径 /api/shop/goods/index.ts + */ + templatePath = TEMPLATES_DIR + "/index.ts.btl"; + + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/api/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "index.ts"; + } + }); + // 生成TS文件 (/api/shop/goods/model/index.ts) + templatePath = TEMPLATES_DIR + "/model.ts.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/api/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/model/" + "index.ts"; + } + }); + // 生成Vue文件(/views/shop/goods/index.vue) + templatePath = TEMPLATES_DIR + "/index.vue.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/views/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "index.vue"; + } + }); + + // 生成components文件(/views/shop/goods/components/edit.vue) + templatePath = TEMPLATES_DIR + "/components.edit.vue.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/views/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/components/" + tableInfo.getEntityPath() + "Edit.vue"; + } + }); + + // 生成components文件(/views/shop/goods/components/search.vue) + templatePath = TEMPLATES_DIR + "/components.search.vue.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/views/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/components/" + "search.vue"; + } + }); + cfg.setFileOutConfigList(focList); mpg.setCfg(cfg); diff --git a/src/test/java/com/gxwebsoft/generator/GxGenerator.java b/src/test/java/com/gxwebsoft/generator/GxGenerator.java new file mode 100644 index 0000000..093f0f1 --- /dev/null +++ b/src/test/java/com/gxwebsoft/generator/GxGenerator.java @@ -0,0 +1,226 @@ +package com.gxwebsoft.generator; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.core.toolkit.StringPool; +import com.baomidou.mybatisplus.generator.AutoGenerator; +import com.baomidou.mybatisplus.generator.InjectionConfig; +import com.baomidou.mybatisplus.generator.config.*; +import com.baomidou.mybatisplus.generator.config.po.TableInfo; +import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; +import com.gxwebsoft.generator.engine.BeetlTemplateEnginePlus; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 代码生成工具 + * + * @author WebSoft + * @since 2021-09-05 00:31:14 + */ +public class GxGenerator { + // 输出位置 + private static final String OUTPUT_LOCATION = System.getProperty("user.dir"); + //private static final String OUTPUT_LOCATION = "D:/codegen"; // 不想生成到项目中可以写磁盘路径 + // 输出目录 + private static final String OUTPUT_DIR = "/src/main/java"; + // Vue文件输出位置 + private static final String OUTPUT_LOCATION_VUE = "/Users/liangxin/Project/Html/web/guoxue-admin"; + // Vue文件输出目录 + private static final String OUTPUT_DIR_VUE = "/src"; + // 作者名称 + private static final String AUTHOR = "LX"; + // 是否在xml中添加二级缓存配置 + private static final boolean ENABLE_CACHE = false; + // 数据库连接配置 + private static final String DB_URL = "jdbc:mysql://47.121.133.163:3308/guoxue?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; + private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; + private static final String DB_USERNAME = "guoxue"; + private static final String DB_PASSWORD = "cDrcxzjSELdt3FFN"; + // 包名 + private static final String PACKAGE_NAME = "com.gxwebsoft"; + // 模块名 + private static final String MODULE_NAME = "gx"; + // 需要生成的表 + private static final String[] TABLE_NAMES = new String[]{ + "gx_feedback", + }; + // 需要去除的表前缀 + private static final String[] TABLE_PREFIX = new String[]{ + "" + }; + // 不需要作为查询参数的字段 + private static final String[] PARAM_EXCLUDE_FIELDS = new String[]{ + "tenant_id", + "create_time", + "update_time" + }; + // 查询参数使用String的类型 + private static final String[] PARAM_TO_STRING_TYPE = new String[]{ + "Date", + "LocalDate", + "LocalTime", + "LocalDateTime" + }; + // 查询参数使用EQ的类型 + private static final String[] PARAM_EQ_TYPE = new String[]{ + "Integer", + "Boolean", + "BigDecimal" + }; + // 是否添加权限注解 + private static final boolean AUTH_ANNOTATION = false; + // 是否添加日志注解 + private static final boolean LOG_ANNOTATION = false; + // controller的mapping前缀 + private static final String CONTROLLER_MAPPING_PREFIX = "/api"; + // 模板所在位置 + private static final String TEMPLATES_DIR = "/src/test/java/com/gxwebsoft/generator/templates"; + + public static void main(String[] args) { + // 代码生成器 + AutoGenerator mpg = new AutoGenerator(); + + // 全局配置 + GlobalConfig gc = new GlobalConfig(); + gc.setOutputDir(OUTPUT_LOCATION + OUTPUT_DIR); + gc.setAuthor(AUTHOR); + gc.setOpen(false); + gc.setFileOverride(true); + gc.setEnableCache(ENABLE_CACHE); + gc.setSwagger2(true); + gc.setIdType(IdType.AUTO); + gc.setServiceName("%sService"); + mpg.setGlobalConfig(gc); + + // 数据源配置 + DataSourceConfig dsc = new DataSourceConfig(); + dsc.setUrl(DB_URL); + // dsc.setSchemaName("public"); + dsc.setDriverName(DB_DRIVER); + dsc.setUsername(DB_USERNAME); + dsc.setPassword(DB_PASSWORD); + mpg.setDataSource(dsc); + + // 包配置 + PackageConfig pc = new PackageConfig(); + pc.setModuleName(MODULE_NAME); + pc.setParent(PACKAGE_NAME); + mpg.setPackageInfo(pc); + + // 策略配置 + StrategyConfig strategy = new StrategyConfig(); + strategy.setNaming(NamingStrategy.underline_to_camel); + strategy.setColumnNaming(NamingStrategy.underline_to_camel); + strategy.setInclude(TABLE_NAMES); + strategy.setTablePrefix(TABLE_PREFIX); + strategy.setSuperControllerClass(PACKAGE_NAME + ".common.core.web.BaseController"); + strategy.setEntityLombokModel(true); + strategy.setRestControllerStyle(true); + strategy.setControllerMappingHyphenStyle(true); + strategy.setLogicDeleteFieldName("deleted"); + mpg.setStrategy(strategy); + + // 模板配置 + TemplateConfig templateConfig = new TemplateConfig(); + templateConfig.setController(TEMPLATES_DIR + "/controller.java"); + templateConfig.setEntity(TEMPLATES_DIR + "/entity.java"); + templateConfig.setMapper(TEMPLATES_DIR + "/mapper.java"); + templateConfig.setXml(TEMPLATES_DIR + "/mapper.xml"); + templateConfig.setService(TEMPLATES_DIR + "/service.java"); + templateConfig.setServiceImpl(TEMPLATES_DIR + "/serviceImpl.java"); + mpg.setTemplate(templateConfig); + mpg.setTemplateEngine(new BeetlTemplateEnginePlus()); + + // 自定义模板配置 + InjectionConfig cfg = new InjectionConfig() { + @Override + public void initMap() { + Map map = new HashMap<>(); + map.put("packageName", PACKAGE_NAME); + map.put("paramExcludeFields", PARAM_EXCLUDE_FIELDS); + map.put("paramToStringType", PARAM_TO_STRING_TYPE); + map.put("paramEqType", PARAM_EQ_TYPE); + map.put("authAnnotation", AUTH_ANNOTATION); + map.put("logAnnotation", LOG_ANNOTATION); + map.put("controllerMappingPrefix", CONTROLLER_MAPPING_PREFIX); + this.setMap(map); + } + }; + String templatePath = TEMPLATES_DIR + "/param.java.btl"; + List focList = new ArrayList<>(); + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION + OUTPUT_DIR + "/" + + PACKAGE_NAME.replace(".", "/") + + "/" + pc.getModuleName() + "/param/" + + tableInfo.getEntityName() + "Param" + StringPool.DOT_JAVA; + } + }); + /** + * 以下是生成VUE项目代码 + * 生成文件的路径 /api/shop/goods/index.ts + */ + templatePath = TEMPLATES_DIR + "/index.ts.btl"; + + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/api/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "index.ts"; + } + }); + // 生成TS文件 (/api/shop/goods/model/index.ts) + templatePath = TEMPLATES_DIR + "/model.ts.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/api/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/model/" + "index.ts"; + } + }); + // 生成Vue文件(/views/shop/goods/index.vue) + templatePath = TEMPLATES_DIR + "/index.vue.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/views/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/" + "index.vue"; + } + }); + + // 生成components文件(/views/shop/goods/components/edit.vue) + templatePath = TEMPLATES_DIR + "/components.edit.vue.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/views/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/components/" + tableInfo.getEntityPath() + "Edit.vue"; + } + }); + + // 生成components文件(/views/shop/goods/components/search.vue) + templatePath = TEMPLATES_DIR + "/components.search.vue.btl"; + focList.add(new FileOutConfig(templatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + return OUTPUT_LOCATION_VUE + OUTPUT_DIR_VUE + + "/views/" + pc.getModuleName() + "/" + + tableInfo.getEntityPath() + "/components/" + "search.vue"; + } + }); + + cfg.setFileOutConfigList(focList); + mpg.setCfg(cfg); + + mpg.execute(); + } + +} diff --git a/src/test/java/com/gxwebsoft/generator/LawGenerator.java b/src/test/java/com/gxwebsoft/generator/LawGenerator.java index de1f0e6..02e3375 100644 --- a/src/test/java/com/gxwebsoft/generator/LawGenerator.java +++ b/src/test/java/com/gxwebsoft/generator/LawGenerator.java @@ -45,8 +45,8 @@ public class LawGenerator { private static final String MODULE_NAME = "law"; // 需要生成的表 private static final String[] TABLE_NAMES = new String[]{ - "law_notary_config", - "law_notary_list", + "law_poor_request", +// "law_notary_list", }; // 需要去除的表前缀 diff --git a/src/test/java/com/gxwebsoft/generator/SysGenerator.java b/src/test/java/com/gxwebsoft/generator/SysGenerator.java index 0c54bbf..8230d57 100644 --- a/src/test/java/com/gxwebsoft/generator/SysGenerator.java +++ b/src/test/java/com/gxwebsoft/generator/SysGenerator.java @@ -27,7 +27,7 @@ public class SysGenerator { // 输出目录 private static final String OUTPUT_DIR = "/src/main/java"; // Vue文件输出位置 - private static final String OUTPUT_LOCATION_VUE = "/Users/liangxin/Project/Html/web/law-admin"; + private static final String OUTPUT_LOCATION_VUE = "/Users/liangxin/Project/Html/web/guoxue-admin"; // Vue文件输出目录 private static final String OUTPUT_DIR_VUE = "/src"; // 作者名称 @@ -35,17 +35,17 @@ public class SysGenerator { // 是否在xml中添加二级缓存配置 private static final boolean ENABLE_CACHE = false; // 数据库连接配置 - private static final String DB_URL = "jdbc:mysql://127.0.0.1:3306/law?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; + private static final String DB_URL = "jdbc:mysql://47.121.133.163:3308/guoxue?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"; private static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver"; - private static final String DB_USERNAME = "root"; - private static final String DB_PASSWORD = "root"; + private static final String DB_USERNAME = "guoxue"; + private static final String DB_PASSWORD = "cDrcxzjSELdt3FFN"; // 包名 private static final String PACKAGE_NAME = "com.gxwebsoft"; // 模块名 private static final String MODULE_NAME = "sys"; // 需要生成的表 private static final String[] TABLE_NAMES = new String[]{ - "sys_swiper", + "sys_area", }; // 需要去除的表前缀 private static final String[] TABLE_PREFIX = new String[]{