diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/CommentsController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/CommentsController.java new file mode 100644 index 0000000..1b05174 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/CommentsController.java @@ -0,0 +1,98 @@ +package com.chenhai.web.controller.system; + +import com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.core.page.TableDataInfo; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.system.domain.Comments; +import com.chenhai.system.service.vet.ICommentsService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 评论(仅问答帖子可用)Controller + * + * @author ruoyi + * @date 2025-12-26 + */ +@RestController +@RequestMapping("/system/comments") +public class CommentsController extends BaseController +{ + @Autowired + private ICommentsService commentsService; + + /** + * 查询评论(仅问答帖子可用)列表 + */ + @PreAuthorize("@ss.hasPermi('system:comments:list')") + @GetMapping("/list") + public TableDataInfo list(Comments comments) + { + startPage(); + List list = commentsService.selectCommentsList(comments); + return getDataTable(list); + } + + /** + * 导出评论(仅问答帖子可用)列表 + */ + @PreAuthorize("@ss.hasPermi('system:comments:export')") + @Log(title = "评论(仅问答帖子可用)", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Comments comments) + { + List list = commentsService.selectCommentsList(comments); + ExcelUtil util = new ExcelUtil(Comments.class); + util.exportExcel(response, list, "评论(仅问答帖子可用)数据"); + } + + /** + * 获取评论(仅问答帖子可用)详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:comments:query')") + @GetMapping(value = "/{commentId}") + public AjaxResult getInfo(@PathVariable("commentId") Long commentId) + { + return success(commentsService.selectCommentsByCommentId(commentId)); + } + + /** + * 新增评论(仅问答帖子可用) + */ + @PreAuthorize("@ss.hasPermi('system:comments:add')") + @Log(title = "评论(仅问答帖子可用)", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Comments comments) + { + return toAjax(commentsService.insertComments(comments)); + } + + /** + * 修改评论(仅问答帖子可用) + */ + @PreAuthorize("@ss.hasPermi('system:comments:edit')") + @Log(title = "评论(仅问答帖子可用)", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Comments comments) + { + return toAjax(commentsService.updateComments(comments)); + } + + /** + * 删除评论(仅问答帖子可用) + */ + @PreAuthorize("@ss.hasPermi('system:comments:remove')") + @Log(title = "评论(仅问答帖子可用)", businessType = BusinessType.DELETE) + @DeleteMapping("/{commentIds}") + public AjaxResult remove(@PathVariable Long[] commentIds) + { + return toAjax(commentsService.deleteCommentsByCommentIds(commentIds)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/ConsultationFormsController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/ConsultationFormsController.java new file mode 100644 index 0000000..03cb161 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/ConsultationFormsController.java @@ -0,0 +1,98 @@ +package com.chenhai.web.controller.system; + +import com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.core.page.TableDataInfo; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.system.domain.ConsultationForms; +import com.chenhai.system.service.vet.IConsultationFormsService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 问诊单Controller + * + * @author ruoyi + * @date 2025-12-26 + */ +@RestController +@RequestMapping("/system/forms") +public class ConsultationFormsController extends BaseController +{ + @Autowired + private IConsultationFormsService consultationFormsService; + + /** + * 查询问诊单列表 + */ + @PreAuthorize("@ss.hasPermi('system:forms:list')") + @GetMapping("/list") + public TableDataInfo list(ConsultationForms consultationForms) + { + startPage(); + List list = consultationFormsService.selectConsultationFormsList(consultationForms); + return getDataTable(list); + } + + /** + * 导出问诊单列表 + */ + @PreAuthorize("@ss.hasPermi('system:forms:export')") + @Log(title = "问诊单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ConsultationForms consultationForms) + { + List list = consultationFormsService.selectConsultationFormsList(consultationForms); + ExcelUtil util = new ExcelUtil(ConsultationForms.class); + util.exportExcel(response, list, "问诊单数据"); + } + + /** + * 获取问诊单详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:forms:query')") + @GetMapping(value = "/{formId}") + public AjaxResult getInfo(@PathVariable("formId") Long formId) + { + return success(consultationFormsService.selectConsultationFormsByFormId(formId)); + } + + /** + * 新增问诊单 + */ + @PreAuthorize("@ss.hasPermi('system:forms:add')") + @Log(title = "问诊单", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ConsultationForms consultationForms) + { + return toAjax(consultationFormsService.insertConsultationForms(consultationForms)); + } + + /** + * 修改问诊单 + */ + @PreAuthorize("@ss.hasPermi('system:forms:edit')") + @Log(title = "问诊单", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ConsultationForms consultationForms) + { + return toAjax(consultationFormsService.updateConsultationForms(consultationForms)); + } + + /** + * 删除问诊单 + */ + @PreAuthorize("@ss.hasPermi('system:forms:remove')") + @Log(title = "问诊单", businessType = BusinessType.DELETE) + @DeleteMapping("/{formIds}") + public AjaxResult remove(@PathVariable Long[] formIds) + { + return toAjax(consultationFormsService.deleteConsultationFormsByFormIds(formIds)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/ExpertMessagesController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/ExpertMessagesController.java new file mode 100644 index 0000000..0c5b29b --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/ExpertMessagesController.java @@ -0,0 +1,98 @@ +package com.chenhai.web.controller.system; + +import com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.core.page.TableDataInfo; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.system.domain.ExpertMessages; +import com.chenhai.system.service.vet.IExpertMessagesService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 专家一对一聊天消息Controller + * + * @author ruoyi + * @date 2025-12-26 + */ +@RestController +@RequestMapping("/system/messages") +public class ExpertMessagesController extends BaseController +{ + @Autowired + private IExpertMessagesService expertMessagesService; + + /** + * 查询专家一对一聊天消息列表 + */ + @PreAuthorize("@ss.hasPermi('system:messages:list')") + @GetMapping("/list") + public TableDataInfo list(ExpertMessages expertMessages) + { + startPage(); + List list = expertMessagesService.selectExpertMessagesList(expertMessages); + return getDataTable(list); + } + + /** + * 导出专家一对一聊天消息列表 + */ + @PreAuthorize("@ss.hasPermi('system:messages:export')") + @Log(title = "专家一对一聊天消息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ExpertMessages expertMessages) + { + List list = expertMessagesService.selectExpertMessagesList(expertMessages); + ExcelUtil util = new ExcelUtil(ExpertMessages.class); + util.exportExcel(response, list, "专家一对一聊天消息数据"); + } + + /** + * 获取专家一对一聊天消息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:messages:query')") + @GetMapping(value = "/{messageId}") + public AjaxResult getInfo(@PathVariable("messageId") Long messageId) + { + return success(expertMessagesService.selectExpertMessagesByMessageId(messageId)); + } + + /** + * 新增专家一对一聊天消息 + */ + @PreAuthorize("@ss.hasPermi('system:messages:add')") + @Log(title = "专家一对一聊天消息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ExpertMessages expertMessages) + { + return toAjax(expertMessagesService.insertExpertMessages(expertMessages)); + } + + /** + * 修改专家一对一聊天消息 + */ + @PreAuthorize("@ss.hasPermi('system:messages:edit')") + @Log(title = "专家一对一聊天消息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ExpertMessages expertMessages) + { + return toAjax(expertMessagesService.updateExpertMessages(expertMessages)); + } + + /** + * 删除专家一对一聊天消息 + */ + @PreAuthorize("@ss.hasPermi('system:messages:remove')") + @Log(title = "专家一对一聊天消息", businessType = BusinessType.DELETE) + @DeleteMapping("/{messageIds}") + public AjaxResult remove(@PathVariable Long[] messageIds) + { + return toAjax(expertMessagesService.deleteExpertMessagesByMessageIds(messageIds)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/PostsController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/PostsController.java new file mode 100644 index 0000000..e4dc48b --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/PostsController.java @@ -0,0 +1,98 @@ +package com.chenhai.web.controller.system; + +import com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.core.page.TableDataInfo; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.system.domain.Posts; +import com.chenhai.system.service.vet.IPostsService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 帖子(包含问答和经验分享)Controller + * + * @author ruoyi + * @date 2025-12-26 + */ +@RestController +@RequestMapping("/system/posts") +public class PostsController extends BaseController +{ + @Autowired + private IPostsService postsService; + + /** + * 查询帖子(包含问答和经验分享)列表 + */ + @PreAuthorize("@ss.hasPermi('system:posts:list')") + @GetMapping("/list") + public TableDataInfo list(Posts posts) + { + startPage(); + List list = postsService.selectPostsList(posts); + return getDataTable(list); + } + + /** + * 导出帖子(包含问答和经验分享)列表 + */ + @PreAuthorize("@ss.hasPermi('system:posts:export')") + @Log(title = "帖子(包含问答和经验分享)", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Posts posts) + { + List list = postsService.selectPostsList(posts); + ExcelUtil util = new ExcelUtil(Posts.class); + util.exportExcel(response, list, "帖子(包含问答和经验分享)数据"); + } + + /** + * 获取帖子(包含问答和经验分享)详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:posts:query')") + @GetMapping(value = "/{postId}") + public AjaxResult getInfo(@PathVariable("postId") Long postId) + { + return success(postsService.selectPostsByPostId(postId)); + } + + /** + * 新增帖子(包含问答和经验分享) + */ + @PreAuthorize("@ss.hasPermi('system:posts:add')") + @Log(title = "帖子(包含问答和经验分享)", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody Posts posts) + { + return toAjax(postsService.insertPosts(posts)); + } + + /** + * 修改帖子(包含问答和经验分享) + */ + @PreAuthorize("@ss.hasPermi('system:posts:edit')") + @Log(title = "帖子(包含问答和经验分享)", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody Posts posts) + { + return toAjax(postsService.updatePosts(posts)); + } + + /** + * 删除帖子(包含问答和经验分享) + */ + @PreAuthorize("@ss.hasPermi('system:posts:remove')") + @Log(title = "帖子(包含问答和经验分享)", businessType = BusinessType.DELETE) + @DeleteMapping("/{postIds}") + public AjaxResult remove(@PathVariable Long[] postIds) + { + return toAjax(postsService.deletePostsByPostIds(postIds)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SensitiveWordsLibraryController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SensitiveWordsLibraryController.java new file mode 100644 index 0000000..c4f2915 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/SensitiveWordsLibraryController.java @@ -0,0 +1,98 @@ +package com.chenhai.web.controller.system; + +import com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.core.page.TableDataInfo; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.system.domain.SensitiveWordsLibrary; +import com.chenhai.system.service.vet.ISensitiveWordsLibraryService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 敏感词库Controller + * + * @author ruoyi + * @date 2025-12-26 + */ +@RestController +@RequestMapping("/system/library") +public class SensitiveWordsLibraryController extends BaseController +{ + @Autowired + private ISensitiveWordsLibraryService sensitiveWordsLibraryService; + + /** + * 查询敏感词库列表 + */ + @PreAuthorize("@ss.hasPermi('system:library:list')") + @GetMapping("/list") + public TableDataInfo list(SensitiveWordsLibrary sensitiveWordsLibrary) + { + startPage(); + List list = sensitiveWordsLibraryService.selectSensitiveWordsLibraryList(sensitiveWordsLibrary); + return getDataTable(list); + } + + /** + * 导出敏感词库列表 + */ + @PreAuthorize("@ss.hasPermi('system:library:export')") + @Log(title = "敏感词库", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SensitiveWordsLibrary sensitiveWordsLibrary) + { + List list = sensitiveWordsLibraryService.selectSensitiveWordsLibraryList(sensitiveWordsLibrary); + ExcelUtil util = new ExcelUtil(SensitiveWordsLibrary.class); + util.exportExcel(response, list, "敏感词库数据"); + } + + /** + * 获取敏感词库详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:library:query')") + @GetMapping(value = "/{wordId}") + public AjaxResult getInfo(@PathVariable("wordId") Long wordId) + { + return success(sensitiveWordsLibraryService.selectSensitiveWordsLibraryByWordId(wordId)); + } + + /** + * 新增敏感词库 + */ + @PreAuthorize("@ss.hasPermi('system:library:add')") + @Log(title = "敏感词库", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SensitiveWordsLibrary sensitiveWordsLibrary) + { + return toAjax(sensitiveWordsLibraryService.insertSensitiveWordsLibrary(sensitiveWordsLibrary)); + } + + /** + * 修改敏感词库 + */ + @PreAuthorize("@ss.hasPermi('system:library:edit')") + @Log(title = "敏感词库", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SensitiveWordsLibrary sensitiveWordsLibrary) + { + return toAjax(sensitiveWordsLibraryService.updateSensitiveWordsLibrary(sensitiveWordsLibrary)); + } + + /** + * 删除敏感词库 + */ + @PreAuthorize("@ss.hasPermi('system:library:remove')") + @Log(title = "敏感词库", businessType = BusinessType.DELETE) + @DeleteMapping("/{wordIds}") + public AjaxResult remove(@PathVariable Long[] wordIds) + { + return toAjax(sensitiveWordsLibraryService.deleteSensitiveWordsLibraryByWordIds(wordIds)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetOnlineStatusController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetOnlineStatusController.java new file mode 100644 index 0000000..3eeb438 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetOnlineStatusController.java @@ -0,0 +1,98 @@ +package com.chenhai.web.controller.system; + +import com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.core.page.TableDataInfo; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.system.domain.VetOnlineStatus; +import com.chenhai.system.service.vet.IVetOnlineStatusService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 专家在线状态Controller + * + * @author ruoyi + * @date 2025-12-26 + */ +@RestController +@RequestMapping("/system/status") +public class VetOnlineStatusController extends BaseController +{ + @Autowired + private IVetOnlineStatusService vetOnlineStatusService; + + /** + * 查询专家在线状态列表 + */ + @PreAuthorize("@ss.hasPermi('system:status:list')") + @GetMapping("/list") + public TableDataInfo list(VetOnlineStatus vetOnlineStatus) + { + startPage(); + List list = vetOnlineStatusService.selectVetOnlineStatusList(vetOnlineStatus); + return getDataTable(list); + } + + /** + * 导出专家在线状态列表 + */ + @PreAuthorize("@ss.hasPermi('system:status:export')") + @Log(title = "专家在线状态", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, VetOnlineStatus vetOnlineStatus) + { + List list = vetOnlineStatusService.selectVetOnlineStatusList(vetOnlineStatus); + ExcelUtil util = new ExcelUtil(VetOnlineStatus.class); + util.exportExcel(response, list, "专家在线状态数据"); + } + + /** + * 获取专家在线状态详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:status:query')") + @GetMapping(value = "/{statusId}") + public AjaxResult getInfo(@PathVariable("statusId") Long statusId) + { + return success(vetOnlineStatusService.selectVetOnlineStatusByStatusId(statusId)); + } + + /** + * 新增专家在线状态 + */ + @PreAuthorize("@ss.hasPermi('system:status:add')") + @Log(title = "专家在线状态", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody VetOnlineStatus vetOnlineStatus) + { + return toAjax(vetOnlineStatusService.insertVetOnlineStatus(vetOnlineStatus)); + } + + /** + * 修改专家在线状态 + */ + @PreAuthorize("@ss.hasPermi('system:status:edit')") + @Log(title = "专家在线状态", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody VetOnlineStatus vetOnlineStatus) + { + return toAjax(vetOnlineStatusService.updateVetOnlineStatus(vetOnlineStatus)); + } + + /** + * 删除专家在线状态 + */ + @PreAuthorize("@ss.hasPermi('system:status:remove')") + @Log(title = "专家在线状态", businessType = BusinessType.DELETE) + @DeleteMapping("/{statusIds}") + public AjaxResult remove(@PathVariable Long[] statusIds) + { + return toAjax(vetOnlineStatusService.deleteVetOnlineStatusByStatusIds(statusIds)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetQualificationController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetQualificationController.java new file mode 100644 index 0000000..559294f --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetQualificationController.java @@ -0,0 +1,98 @@ +package com.chenhai.web.controller.system; + +import com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.core.page.TableDataInfo; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.system.domain.VetQualification; +import com.chenhai.system.service.vet.IVetQualificationService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 兽医资质Controller + * + * @author ruoyi + * @date 2025-12-26 + */ +@RestController +@RequestMapping("/system/qualification") +public class VetQualificationController extends BaseController +{ + @Autowired + private IVetQualificationService vetQualificationService; + + /** + * 查询兽医资质列表 + */ + @PreAuthorize("@ss.hasPermi('system:qualification:list')") + @GetMapping("/list") + public TableDataInfo list(VetQualification vetQualification) + { + startPage(); + List list = vetQualificationService.selectVetQualificationList(vetQualification); + return getDataTable(list); + } + + /** + * 导出兽医资质列表 + */ + @PreAuthorize("@ss.hasPermi('system:qualification:export')") + @Log(title = "兽医资质", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, VetQualification vetQualification) + { + List list = vetQualificationService.selectVetQualificationList(vetQualification); + ExcelUtil util = new ExcelUtil(VetQualification.class); + util.exportExcel(response, list, "兽医资质数据"); + } + + /** + * 获取兽医资质详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:qualification:query')") + @GetMapping(value = "/{qualificationId}") + public AjaxResult getInfo(@PathVariable("qualificationId") Long qualificationId) + { + return success(vetQualificationService.selectVetQualificationByQualificationId(qualificationId)); + } + + /** + * 新增兽医资质 + */ + @PreAuthorize("@ss.hasPermi('system:qualification:add')") + @Log(title = "兽医资质", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody VetQualification vetQualification) + { + return toAjax(vetQualificationService.insertVetQualification(vetQualification)); + } + + /** + * 修改兽医资质 + */ + @PreAuthorize("@ss.hasPermi('system:qualification:edit')") + @Log(title = "兽医资质", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody VetQualification vetQualification) + { + return toAjax(vetQualificationService.updateVetQualification(vetQualification)); + } + + /** + * 删除兽医资质 + */ + @PreAuthorize("@ss.hasPermi('system:qualification:remove')") + @Log(title = "兽医资质", businessType = BusinessType.DELETE) + @DeleteMapping("/{qualificationIds}") + public AjaxResult remove(@PathVariable Long[] qualificationIds) + { + return toAjax(vetQualificationService.deleteVetQualificationByQualificationIds(qualificationIds)); + } +} diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetRepliesController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetRepliesController.java new file mode 100644 index 0000000..a190b6a --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetRepliesController.java @@ -0,0 +1,98 @@ +package com.chenhai.web.controller.system; + +import com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.core.page.TableDataInfo; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.system.domain.VetReplies; +import com.chenhai.system.service.vet.IVetRepliesService; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 兽医回复Controller + * + * @author ruoyi + * @date 2025-12-26 + */ +@RestController +@RequestMapping("/system/replies") +public class VetRepliesController extends BaseController +{ + @Autowired + private IVetRepliesService vetRepliesService; + + /** + * 查询兽医回复列表 + */ + @PreAuthorize("@ss.hasPermi('system:replies:list')") + @GetMapping("/list") + public TableDataInfo list(VetReplies vetReplies) + { + startPage(); + List list = vetRepliesService.selectVetRepliesList(vetReplies); + return getDataTable(list); + } + + /** + * 导出兽医回复列表 + */ + @PreAuthorize("@ss.hasPermi('system:replies:export')") + @Log(title = "兽医回复", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, VetReplies vetReplies) + { + List list = vetRepliesService.selectVetRepliesList(vetReplies); + ExcelUtil util = new ExcelUtil(VetReplies.class); + util.exportExcel(response, list, "兽医回复数据"); + } + + /** + * 获取兽医回复详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:replies:query')") + @GetMapping(value = "/{replyId}") + public AjaxResult getInfo(@PathVariable("replyId") Long replyId) + { + return success(vetRepliesService.selectVetRepliesByReplyId(replyId)); + } + + /** + * 新增兽医回复 + */ + @PreAuthorize("@ss.hasPermi('system:replies:add')") + @Log(title = "兽医回复", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody VetReplies vetReplies) + { + return toAjax(vetRepliesService.insertVetReplies(vetReplies)); + } + + /** + * 修改兽医回复 + */ + @PreAuthorize("@ss.hasPermi('system:replies:edit')") + @Log(title = "兽医回复", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody VetReplies vetReplies) + { + return toAjax(vetRepliesService.updateVetReplies(vetReplies)); + } + + /** + * 删除兽医回复 + */ + @PreAuthorize("@ss.hasPermi('system:replies:remove')") + @Log(title = "兽医回复", businessType = BusinessType.DELETE) + @DeleteMapping("/{replyIds}") + public AjaxResult remove(@PathVariable Long[] replyIds) + { + return toAjax(vetRepliesService.deleteVetRepliesByReplyIds(replyIds)); + } +} diff --git a/chenhai-admin/src/main/resources/application-druid.yml b/chenhai-admin/src/main/resources/application-druid.yml index af68834..f579e61 100644 --- a/chenhai-admin/src/main/resources/application-druid.yml +++ b/chenhai-admin/src/main/resources/application-druid.yml @@ -6,7 +6,7 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/ymtx?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://192.168.101.109:3306/ymtx?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root password: 123456 # 从库数据源 diff --git a/chenhai-admin/src/main/resources/application.yml b/chenhai-admin/src/main/resources/application.yml index de54888..1563c3b 100644 --- a/chenhai-admin/src/main/resources/application.yml +++ b/chenhai-admin/src/main/resources/application.yml @@ -16,7 +16,7 @@ chenhai: # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 8080 + port: 8081 servlet: # 应用的访问路径 context-path: / diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/Comments.java b/chenhai-system/src/main/java/com/chenhai/system/domain/Comments.java new file mode 100644 index 0000000..48e1527 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/Comments.java @@ -0,0 +1,191 @@ +package com.chenhai.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 评论(仅问答帖子可用)对象 comments + * + * @author ruoyi + * @date 2025-12-26 + */ +public class Comments extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 评论ID */ + private Long commentId; + + /** 帖子ID */ + @Excel(name = "帖子ID") + private Long postId; + + /** 评论者ID */ + @Excel(name = "评论者ID") + private Long authorId; + + /** 父评论ID(0表示对帖子的回复) */ + @Excel(name = "父评论ID", readConverterExp = "0=表示对帖子的回复") + private Long parentId; + + /** 评论内容 */ + @Excel(name = "评论内容") + private String content; + + /** 评论图片 */ + @Excel(name = "评论图片") + private String images; + + /** 评论状态 */ + @Excel(name = "评论状态") + private String status; + + /** 是否含敏感词 */ + @Excel(name = "是否含敏感词") + private Integer isSensitive; + + /** 敏感词列表 */ + @Excel(name = "敏感词列表") + private String sensitiveWords; + + /** 评论时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdAt; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date updatedAt; + + public void setCommentId(Long commentId) + { + this.commentId = commentId; + } + + public Long getCommentId() + { + return commentId; + } + + public void setPostId(Long postId) + { + this.postId = postId; + } + + public Long getPostId() + { + return postId; + } + + public void setAuthorId(Long authorId) + { + this.authorId = authorId; + } + + public Long getAuthorId() + { + return authorId; + } + + public void setParentId(Long parentId) + { + this.parentId = parentId; + } + + public Long getParentId() + { + return parentId; + } + + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + + public void setImages(String images) + { + this.images = images; + } + + public String getImages() + { + return images; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + public void setIsSensitive(Integer isSensitive) + { + this.isSensitive = isSensitive; + } + + public Integer getIsSensitive() + { + return isSensitive; + } + + public void setSensitiveWords(String sensitiveWords) + { + this.sensitiveWords = sensitiveWords; + } + + public String getSensitiveWords() + { + return sensitiveWords; + } + + public void setCreatedAt(Date createdAt) + { + this.createdAt = createdAt; + } + + public Date getCreatedAt() + { + return createdAt; + } + + public void setUpdatedAt(Date updatedAt) + { + this.updatedAt = updatedAt; + } + + public Date getUpdatedAt() + { + return updatedAt; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("commentId", getCommentId()) + .append("postId", getPostId()) + .append("authorId", getAuthorId()) + .append("parentId", getParentId()) + .append("content", getContent()) + .append("images", getImages()) + .append("status", getStatus()) + .append("isSensitive", getIsSensitive()) + .append("sensitiveWords", getSensitiveWords()) + .append("createdAt", getCreatedAt()) + .append("updatedAt", getUpdatedAt()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/ConsultationForms.java b/chenhai-system/src/main/java/com/chenhai/system/domain/ConsultationForms.java new file mode 100644 index 0000000..77c764d --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/ConsultationForms.java @@ -0,0 +1,187 @@ +package com.chenhai.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 问诊单对象 consultation_forms + * + * @author ruoyi + * @date 2025-12-26 + */ +public class ConsultationForms extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long formId; + + /** 发布者ID */ + @Excel(name = "发布者ID") + private Long farmerId; + + /** 问诊标题 */ + @Excel(name = "问诊标题") + private String title; + + /** 病情描述 */ + @Excel(name = "病情描述") + private String description; + + /** 牲畜种类 */ + @Excel(name = "牲畜种类") + private String animalType; + + /** 症状照片或视频 */ + @Excel(name = "症状照片或视频") + private String images; + + /** 回复状态 */ + @Excel(name = "回复状态") + private String status; + + /** 是否含敏感词 */ + @Excel(name = "是否含敏感词") + private Integer isSensitive; + + /** 检测到的敏感词列表 */ + @Excel(name = "检测到的敏感词列表") + private String sensitiveWords; + + /** 查看次数 */ + @Excel(name = "查看次数") + private Long viewCount; + + /** 回复数量 */ + @Excel(name = "回复数量") + private Long replyCount; + + public void setFormId(Long formId) + { + this.formId = formId; + } + + public Long getFormId() + { + return formId; + } + + public void setFarmerId(Long farmerId) + { + this.farmerId = farmerId; + } + + public Long getFarmerId() + { + return farmerId; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + + public void setDescription(String description) + { + this.description = description; + } + + public String getDescription() + { + return description; + } + + public void setAnimalType(String animalType) + { + this.animalType = animalType; + } + + public String getAnimalType() + { + return animalType; + } + + public void setImages(String images) + { + this.images = images; + } + + public String getImages() + { + return images; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + public void setIsSensitive(Integer isSensitive) + { + this.isSensitive = isSensitive; + } + + public Integer getIsSensitive() + { + return isSensitive; + } + + public void setSensitiveWords(String sensitiveWords) + { + this.sensitiveWords = sensitiveWords; + } + + public String getSensitiveWords() + { + return sensitiveWords; + } + + public void setViewCount(Long viewCount) + { + this.viewCount = viewCount; + } + + public Long getViewCount() + { + return viewCount; + } + + public void setReplyCount(Long replyCount) + { + this.replyCount = replyCount; + } + + public Long getReplyCount() + { + return replyCount; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("formId", getFormId()) + .append("farmerId", getFarmerId()) + .append("title", getTitle()) + .append("description", getDescription()) + .append("animalType", getAnimalType()) + .append("images", getImages()) + .append("status", getStatus()) + .append("isSensitive", getIsSensitive()) + .append("sensitiveWords", getSensitiveWords()) + .append("viewCount", getViewCount()) + .append("replyCount", getReplyCount()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/ExpertMessages.java b/chenhai-system/src/main/java/com/chenhai/system/domain/ExpertMessages.java new file mode 100644 index 0000000..cbf9c99 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/ExpertMessages.java @@ -0,0 +1,176 @@ +package com.chenhai.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 专家一对一聊天消息对象 expert_messages + * + * @author ruoyi + * @date 2025-12-26 + */ +public class ExpertMessages extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 消息ID */ + private Long messageId; + + /** 聊天会话ID,格式:farmer_vet_时间戳 */ + @Excel(name = "聊天会话ID,格式:farmer_vet_时间戳") + private String chatId; + + /** 发送者用户ID */ + @Excel(name = "发送者用户ID") + private Long senderId; + + /** 接收者用户ID */ + @Excel(name = "接收者用户ID") + private Long receiverId; + + /** 消息内容(文本或描述) */ + @Excel(name = "消息内容", readConverterExp = "文=本或描述") + private String content; + + /** 是否已读 */ + @Excel(name = "是否已读") + private Integer isRead; + + /** 阅读时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "阅读时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date readTime; + + /** 是否含敏感词 */ + @Excel(name = "是否含敏感词") + private Integer isSensitive; + + /** 敏感词列表,逗号分隔 */ + @Excel(name = "敏感词列表,逗号分隔") + private String sensitiveWords; + + /** 发送时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdAt; + + public void setMessageId(Long messageId) + { + this.messageId = messageId; + } + + public Long getMessageId() + { + return messageId; + } + + public void setChatId(String chatId) + { + this.chatId = chatId; + } + + public String getChatId() + { + return chatId; + } + + public void setSenderId(Long senderId) + { + this.senderId = senderId; + } + + public Long getSenderId() + { + return senderId; + } + + public void setReceiverId(Long receiverId) + { + this.receiverId = receiverId; + } + + public Long getReceiverId() + { + return receiverId; + } + + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + + public void setIsRead(Integer isRead) + { + this.isRead = isRead; + } + + public Integer getIsRead() + { + return isRead; + } + + public void setReadTime(Date readTime) + { + this.readTime = readTime; + } + + public Date getReadTime() + { + return readTime; + } + + public void setIsSensitive(Integer isSensitive) + { + this.isSensitive = isSensitive; + } + + public Integer getIsSensitive() + { + return isSensitive; + } + + public void setSensitiveWords(String sensitiveWords) + { + this.sensitiveWords = sensitiveWords; + } + + public String getSensitiveWords() + { + return sensitiveWords; + } + + public void setCreatedAt(Date createdAt) + { + this.createdAt = createdAt; + } + + public Date getCreatedAt() + { + return createdAt; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("messageId", getMessageId()) + .append("chatId", getChatId()) + .append("senderId", getSenderId()) + .append("receiverId", getReceiverId()) + .append("content", getContent()) + .append("isRead", getIsRead()) + .append("readTime", getReadTime()) + .append("isSensitive", getIsSensitive()) + .append("sensitiveWords", getSensitiveWords()) + .append("createdAt", getCreatedAt()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/Posts.java b/chenhai-system/src/main/java/com/chenhai/system/domain/Posts.java new file mode 100644 index 0000000..cc55045 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/Posts.java @@ -0,0 +1,283 @@ +package com.chenhai.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 帖子(包含问答和经验分享)对象 posts + * + * @author ruoyi + * @date 2025-12-26 + */ +public class Posts extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 帖子ID */ + private Long postId; + + /** 作者用户ID */ + @Excel(name = "作者用户ID") + private Long authorId; + + /** 帖子类型:问答,经验分享 */ + @Excel(name = "帖子类型:问答,经验分享") + private String postType; + + /** 帖子标题 */ + @Excel(name = "帖子标题") + private String title; + + /** 帖子内容 */ + @Excel(name = "帖子内容") + private String content; + + /** 分类标签(如:羊病防治、饲料配方) */ + @Excel(name = "分类标签", readConverterExp = "如=:羊病防治、饲料配方") + private String category; + + /** 图片URL数组 */ + @Excel(name = "图片URL数组") + private String images; + + /** 视频URL */ + @Excel(name = "视频URL") + private String videoUrl; + + /** 帖子状态 */ + @Excel(name = "帖子状态") + private String status; + + /** 是否含敏感词 */ + @Excel(name = "是否含敏感词") + private Integer isSensitive; + + /** 敏感词列表 */ + @Excel(name = "敏感词列表") + private String sensitiveWords; + + /** 审核备注 */ + @Excel(name = "审核备注") + private String auditRemark; + + /** 查看次数 */ + @Excel(name = "查看次数") + private Long viewCount; + + /** 发布时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date publishedAt; + + /** 最后回复时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后回复时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastReplyAt; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdAt; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date updatedAt; + + public void setPostId(Long postId) + { + this.postId = postId; + } + + public Long getPostId() + { + return postId; + } + + public void setAuthorId(Long authorId) + { + this.authorId = authorId; + } + + public Long getAuthorId() + { + return authorId; + } + + public void setPostType(String postType) + { + this.postType = postType; + } + + public String getPostType() + { + return postType; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + + public void setCategory(String category) + { + this.category = category; + } + + public String getCategory() + { + return category; + } + + public void setImages(String images) + { + this.images = images; + } + + public String getImages() + { + return images; + } + + public void setVideoUrl(String videoUrl) + { + this.videoUrl = videoUrl; + } + + public String getVideoUrl() + { + return videoUrl; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + public void setIsSensitive(Integer isSensitive) + { + this.isSensitive = isSensitive; + } + + public Integer getIsSensitive() + { + return isSensitive; + } + + public void setSensitiveWords(String sensitiveWords) + { + this.sensitiveWords = sensitiveWords; + } + + public String getSensitiveWords() + { + return sensitiveWords; + } + + public void setAuditRemark(String auditRemark) + { + this.auditRemark = auditRemark; + } + + public String getAuditRemark() + { + return auditRemark; + } + + public void setViewCount(Long viewCount) + { + this.viewCount = viewCount; + } + + public Long getViewCount() + { + return viewCount; + } + + public void setPublishedAt(Date publishedAt) + { + this.publishedAt = publishedAt; + } + + public Date getPublishedAt() + { + return publishedAt; + } + + public void setLastReplyAt(Date lastReplyAt) + { + this.lastReplyAt = lastReplyAt; + } + + public Date getLastReplyAt() + { + return lastReplyAt; + } + + public void setCreatedAt(Date createdAt) + { + this.createdAt = createdAt; + } + + public Date getCreatedAt() + { + return createdAt; + } + + public void setUpdatedAt(Date updatedAt) + { + this.updatedAt = updatedAt; + } + + public Date getUpdatedAt() + { + return updatedAt; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("postId", getPostId()) + .append("authorId", getAuthorId()) + .append("postType", getPostType()) + .append("title", getTitle()) + .append("content", getContent()) + .append("category", getCategory()) + .append("images", getImages()) + .append("videoUrl", getVideoUrl()) + .append("status", getStatus()) + .append("isSensitive", getIsSensitive()) + .append("sensitiveWords", getSensitiveWords()) + .append("auditRemark", getAuditRemark()) + .append("viewCount", getViewCount()) + .append("publishedAt", getPublishedAt()) + .append("lastReplyAt", getLastReplyAt()) + .append("createdAt", getCreatedAt()) + .append("updatedAt", getUpdatedAt()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/SensitiveWordsLibrary.java b/chenhai-system/src/main/java/com/chenhai/system/domain/SensitiveWordsLibrary.java new file mode 100644 index 0000000..64694ff --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/SensitiveWordsLibrary.java @@ -0,0 +1,131 @@ +package com.chenhai.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 敏感词库对象 sensitive_words_library + * + * @author ruoyi + * @date 2025-12-26 + */ +public class SensitiveWordsLibrary extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 敏感词ID */ + private Long wordId; + + /** 敏感词内容 */ + @Excel(name = "敏感词内容") + private String word; + + /** 敏感词类型 */ + @Excel(name = "敏感词类型") + private String wordType; + + /** 敏感级别 */ + @Excel(name = "敏感级别") + private String level; + + /** 替换词(如:***) */ + @Excel(name = "替换词", readConverterExp = "如=:***") + private String replaceWord; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdAt; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date updatedAt; + + public void setWordId(Long wordId) + { + this.wordId = wordId; + } + + public Long getWordId() + { + return wordId; + } + + public void setWord(String word) + { + this.word = word; + } + + public String getWord() + { + return word; + } + + public void setWordType(String wordType) + { + this.wordType = wordType; + } + + public String getWordType() + { + return wordType; + } + + public void setLevel(String level) + { + this.level = level; + } + + public String getLevel() + { + return level; + } + + public void setReplaceWord(String replaceWord) + { + this.replaceWord = replaceWord; + } + + public String getReplaceWord() + { + return replaceWord; + } + + public void setCreatedAt(Date createdAt) + { + this.createdAt = createdAt; + } + + public Date getCreatedAt() + { + return createdAt; + } + + public void setUpdatedAt(Date updatedAt) + { + this.updatedAt = updatedAt; + } + + public Date getUpdatedAt() + { + return updatedAt; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("wordId", getWordId()) + .append("word", getWord()) + .append("wordType", getWordType()) + .append("level", getLevel()) + .append("replaceWord", getReplaceWord()) + .append("createdAt", getCreatedAt()) + .append("updatedAt", getUpdatedAt()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/VetOnlineStatus.java b/chenhai-system/src/main/java/com/chenhai/system/domain/VetOnlineStatus.java new file mode 100644 index 0000000..fe7d8be --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/VetOnlineStatus.java @@ -0,0 +1,146 @@ +package com.chenhai.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 专家在线状态对象 vet_online_status + * + * @author ruoyi + * @date 2025-12-26 + */ +public class VetOnlineStatus extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 状态ID */ + private Long statusId; + + /** 兽医ID */ + @Excel(name = "兽医ID") + private Long vetId; + + /** 是否在线 */ + @Excel(name = "是否在线") + private Integer isOnline; + + /** 在线状态 */ + @Excel(name = "在线状态") + private String onlineStatus; + + /** 最后在线时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后在线时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastOnlineTime; + + /** 最后活动时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "最后活动时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date lastActiveTime; + + /** 当前咨询会话ID */ + @Excel(name = "当前咨询会话ID") + private Long currentSessionId; + + /** IP地址 */ + @Excel(name = "IP地址") + private String ipAddress; + + public void setStatusId(Long statusId) + { + this.statusId = statusId; + } + + public Long getStatusId() + { + return statusId; + } + + public void setVetId(Long vetId) + { + this.vetId = vetId; + } + + public Long getVetId() + { + return vetId; + } + + public void setIsOnline(Integer isOnline) + { + this.isOnline = isOnline; + } + + public Integer getIsOnline() + { + return isOnline; + } + + public void setOnlineStatus(String onlineStatus) + { + this.onlineStatus = onlineStatus; + } + + public String getOnlineStatus() + { + return onlineStatus; + } + + public void setLastOnlineTime(Date lastOnlineTime) + { + this.lastOnlineTime = lastOnlineTime; + } + + public Date getLastOnlineTime() + { + return lastOnlineTime; + } + + public void setLastActiveTime(Date lastActiveTime) + { + this.lastActiveTime = lastActiveTime; + } + + public Date getLastActiveTime() + { + return lastActiveTime; + } + + public void setCurrentSessionId(Long currentSessionId) + { + this.currentSessionId = currentSessionId; + } + + public Long getCurrentSessionId() + { + return currentSessionId; + } + + public void setIpAddress(String ipAddress) + { + this.ipAddress = ipAddress; + } + + public String getIpAddress() + { + return ipAddress; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("statusId", getStatusId()) + .append("vetId", getVetId()) + .append("isOnline", getIsOnline()) + .append("onlineStatus", getOnlineStatus()) + .append("lastOnlineTime", getLastOnlineTime()) + .append("lastActiveTime", getLastActiveTime()) + .append("currentSessionId", getCurrentSessionId()) + .append("ipAddress", getIpAddress()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/VetQualification.java b/chenhai-system/src/main/java/com/chenhai/system/domain/VetQualification.java new file mode 100644 index 0000000..ac3e6fc --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/VetQualification.java @@ -0,0 +1,211 @@ +package com.chenhai.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 兽医资质对象 vet_qualification + * + * @author ruoyi + * @date 2025-12-26 + */ +public class VetQualification extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 资质ID */ + private Long qualificationId; + + /** 兽医ID */ + @Excel(name = "兽医ID") + private Long vetId; + + /** 真实姓名 */ + @Excel(name = "真实姓名") + private String realName; + + /** 身份证号 */ + @Excel(name = "身份证号") + private String idCard; + + /** 资质类型(veterinarian兽医资格证/pharmacist兽药师资格证) */ + @Excel(name = "资质类型", readConverterExp = "v=eterinarian兽医资格证/pharmacist兽药师资格证") + private String qualificationType; + + /** 证书编号 */ + @Excel(name = "证书编号") + private String certificateNo; + + /** 证书文件(JSON数组) */ + @Excel(name = "证书文件", readConverterExp = "J=SON数组") + private String certificateFiles; + + /** 申请时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date applyTime; + + /** 审核时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date auditTime; + + /** 审核状态(0待审核 1通过 2拒绝) */ + @Excel(name = "审核状态", readConverterExp = "0=待审核,1=通过,2=拒绝") + private String auditStatus; + + /** 审核意见 */ + @Excel(name = "审核意见") + private String auditOpinion; + + /** 审核人ID */ + @Excel(name = "审核人ID") + private Long auditorId; + + public void setQualificationId(Long qualificationId) + { + this.qualificationId = qualificationId; + } + + public Long getQualificationId() + { + return qualificationId; + } + + public void setVetId(Long vetId) + { + this.vetId = vetId; + } + + public Long getVetId() + { + return vetId; + } + + public void setRealName(String realName) + { + this.realName = realName; + } + + public String getRealName() + { + return realName; + } + + public void setIdCard(String idCard) + { + this.idCard = idCard; + } + + public String getIdCard() + { + return idCard; + } + + public void setQualificationType(String qualificationType) + { + this.qualificationType = qualificationType; + } + + public String getQualificationType() + { + return qualificationType; + } + + public void setCertificateNo(String certificateNo) + { + this.certificateNo = certificateNo; + } + + public String getCertificateNo() + { + return certificateNo; + } + + public void setCertificateFiles(String certificateFiles) + { + this.certificateFiles = certificateFiles; + } + + public String getCertificateFiles() + { + return certificateFiles; + } + + public void setApplyTime(Date applyTime) + { + this.applyTime = applyTime; + } + + public Date getApplyTime() + { + return applyTime; + } + + public void setAuditTime(Date auditTime) + { + this.auditTime = auditTime; + } + + public Date getAuditTime() + { + return auditTime; + } + + public void setAuditStatus(String auditStatus) + { + this.auditStatus = auditStatus; + } + + public String getAuditStatus() + { + return auditStatus; + } + + public void setAuditOpinion(String auditOpinion) + { + this.auditOpinion = auditOpinion; + } + + public String getAuditOpinion() + { + return auditOpinion; + } + + public void setAuditorId(Long auditorId) + { + this.auditorId = auditorId; + } + + public Long getAuditorId() + { + return auditorId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("qualificationId", getQualificationId()) + .append("vetId", getVetId()) + .append("realName", getRealName()) + .append("idCard", getIdCard()) + .append("qualificationType", getQualificationType()) + .append("certificateNo", getCertificateNo()) + .append("certificateFiles", getCertificateFiles()) + .append("applyTime", getApplyTime()) + .append("auditTime", getAuditTime()) + .append("auditStatus", getAuditStatus()) + .append("auditOpinion", getAuditOpinion()) + .append("auditorId", getAuditorId()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/domain/VetReplies.java b/chenhai-system/src/main/java/com/chenhai/system/domain/VetReplies.java new file mode 100644 index 0000000..dddf3a5 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/domain/VetReplies.java @@ -0,0 +1,131 @@ +package com.chenhai.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; + +/** + * 兽医回复对象 vet_replies + * + * @author ruoyi + * @date 2025-12-26 + */ +public class VetReplies extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 回复ID */ + private Long replyId; + + /** 问诊单ID */ + @Excel(name = "问诊单ID") + private Long formId; + + /** 兽医ID */ + @Excel(name = "兽医ID") + private Long vetId; + + /** 诊断回复 */ + @Excel(name = "诊断回复") + private String diagnosis; + + /** 是否含敏感词 */ + @Excel(name = "是否含敏感词") + private Integer isSensitive; + + /** 创建时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date createdAt; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date updatedAt; + + public void setReplyId(Long replyId) + { + this.replyId = replyId; + } + + public Long getReplyId() + { + return replyId; + } + + public void setFormId(Long formId) + { + this.formId = formId; + } + + public Long getFormId() + { + return formId; + } + + public void setVetId(Long vetId) + { + this.vetId = vetId; + } + + public Long getVetId() + { + return vetId; + } + + public void setDiagnosis(String diagnosis) + { + this.diagnosis = diagnosis; + } + + public String getDiagnosis() + { + return diagnosis; + } + + public void setIsSensitive(Integer isSensitive) + { + this.isSensitive = isSensitive; + } + + public Integer getIsSensitive() + { + return isSensitive; + } + + public void setCreatedAt(Date createdAt) + { + this.createdAt = createdAt; + } + + public Date getCreatedAt() + { + return createdAt; + } + + public void setUpdatedAt(Date updatedAt) + { + this.updatedAt = updatedAt; + } + + public Date getUpdatedAt() + { + return updatedAt; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("replyId", getReplyId()) + .append("formId", getFormId()) + .append("vetId", getVetId()) + .append("diagnosis", getDiagnosis()) + .append("isSensitive", getIsSensitive()) + .append("createdAt", getCreatedAt()) + .append("updatedAt", getUpdatedAt()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/CommentsMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/CommentsMapper.java new file mode 100644 index 0000000..ff5ac4e --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/CommentsMapper.java @@ -0,0 +1,63 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.Comments; +import org.apache.ibatis.annotations.Mapper; + +/** + * 评论(仅问答帖子可用)Mapper接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Mapper +public interface CommentsMapper +{ + /** + * 查询评论(仅问答帖子可用) + * + * @param commentId 评论(仅问答帖子可用)主键 + * @return 评论(仅问答帖子可用) + */ + public Comments selectCommentsByCommentId(Long commentId); + + /** + * 查询评论(仅问答帖子可用)列表 + * + * @param comments 评论(仅问答帖子可用) + * @return 评论(仅问答帖子可用)集合 + */ + public List selectCommentsList(Comments comments); + + /** + * 新增评论(仅问答帖子可用) + * + * @param comments 评论(仅问答帖子可用) + * @return 结果 + */ + public int insertComments(Comments comments); + + /** + * 修改评论(仅问答帖子可用) + * + * @param comments 评论(仅问答帖子可用) + * @return 结果 + */ + public int updateComments(Comments comments); + + /** + * 删除评论(仅问答帖子可用) + * + * @param commentId 评论(仅问答帖子可用)主键 + * @return 结果 + */ + public int deleteCommentsByCommentId(Long commentId); + + /** + * 批量删除评论(仅问答帖子可用) + * + * @param commentIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCommentsByCommentIds(Long[] commentIds); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/ConsultationFormsMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/ConsultationFormsMapper.java new file mode 100644 index 0000000..b97570c --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/ConsultationFormsMapper.java @@ -0,0 +1,63 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.ConsultationForms; +import org.apache.ibatis.annotations.Mapper; + +/** + * 问诊单Mapper接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Mapper +public interface ConsultationFormsMapper +{ + /** + * 查询问诊单 + * + * @param formId 问诊单主键 + * @return 问诊单 + */ + public ConsultationForms selectConsultationFormsByFormId(Long formId); + + /** + * 查询问诊单列表 + * + * @param consultationForms 问诊单 + * @return 问诊单集合 + */ + public List selectConsultationFormsList(ConsultationForms consultationForms); + + /** + * 新增问诊单 + * + * @param consultationForms 问诊单 + * @return 结果 + */ + public int insertConsultationForms(ConsultationForms consultationForms); + + /** + * 修改问诊单 + * + * @param consultationForms 问诊单 + * @return 结果 + */ + public int updateConsultationForms(ConsultationForms consultationForms); + + /** + * 删除问诊单 + * + * @param formId 问诊单主键 + * @return 结果 + */ + public int deleteConsultationFormsByFormId(Long formId); + + /** + * 批量删除问诊单 + * + * @param formIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteConsultationFormsByFormIds(Long[] formIds); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/ExpertMessagesMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/ExpertMessagesMapper.java new file mode 100644 index 0000000..8e99728 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/ExpertMessagesMapper.java @@ -0,0 +1,63 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.ExpertMessages; +import org.apache.ibatis.annotations.Mapper; + +/** + * 专家一对一聊天消息Mapper接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Mapper +public interface ExpertMessagesMapper +{ + /** + * 查询专家一对一聊天消息 + * + * @param messageId 专家一对一聊天消息主键 + * @return 专家一对一聊天消息 + */ + public ExpertMessages selectExpertMessagesByMessageId(Long messageId); + + /** + * 查询专家一对一聊天消息列表 + * + * @param expertMessages 专家一对一聊天消息 + * @return 专家一对一聊天消息集合 + */ + public List selectExpertMessagesList(ExpertMessages expertMessages); + + /** + * 新增专家一对一聊天消息 + * + * @param expertMessages 专家一对一聊天消息 + * @return 结果 + */ + public int insertExpertMessages(ExpertMessages expertMessages); + + /** + * 修改专家一对一聊天消息 + * + * @param expertMessages 专家一对一聊天消息 + * @return 结果 + */ + public int updateExpertMessages(ExpertMessages expertMessages); + + /** + * 删除专家一对一聊天消息 + * + * @param messageId 专家一对一聊天消息主键 + * @return 结果 + */ + public int deleteExpertMessagesByMessageId(Long messageId); + + /** + * 批量删除专家一对一聊天消息 + * + * @param messageIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteExpertMessagesByMessageIds(Long[] messageIds); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/PostsMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/PostsMapper.java new file mode 100644 index 0000000..72c1a92 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/PostsMapper.java @@ -0,0 +1,63 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.Posts; +import org.apache.ibatis.annotations.Mapper; + +/** + * 帖子(包含问答和经验分享)Mapper接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Mapper +public interface PostsMapper +{ + /** + * 查询帖子(包含问答和经验分享) + * + * @param postId 帖子(包含问答和经验分享)主键 + * @return 帖子(包含问答和经验分享) + */ + public Posts selectPostsByPostId(Long postId); + + /** + * 查询帖子(包含问答和经验分享)列表 + * + * @param posts 帖子(包含问答和经验分享) + * @return 帖子(包含问答和经验分享)集合 + */ + public List selectPostsList(Posts posts); + + /** + * 新增帖子(包含问答和经验分享) + * + * @param posts 帖子(包含问答和经验分享) + * @return 结果 + */ + public int insertPosts(Posts posts); + + /** + * 修改帖子(包含问答和经验分享) + * + * @param posts 帖子(包含问答和经验分享) + * @return 结果 + */ + public int updatePosts(Posts posts); + + /** + * 删除帖子(包含问答和经验分享) + * + * @param postId 帖子(包含问答和经验分享)主键 + * @return 结果 + */ + public int deletePostsByPostId(Long postId); + + /** + * 批量删除帖子(包含问答和经验分享) + * + * @param postIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deletePostsByPostIds(Long[] postIds); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/SensitiveWordsLibraryMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/SensitiveWordsLibraryMapper.java new file mode 100644 index 0000000..a7f1489 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/SensitiveWordsLibraryMapper.java @@ -0,0 +1,63 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.SensitiveWordsLibrary; +import org.apache.ibatis.annotations.Mapper; + +/** + * 敏感词库Mapper接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Mapper +public interface SensitiveWordsLibraryMapper +{ + /** + * 查询敏感词库 + * + * @param wordId 敏感词库主键 + * @return 敏感词库 + */ + public SensitiveWordsLibrary selectSensitiveWordsLibraryByWordId(Long wordId); + + /** + * 查询敏感词库列表 + * + * @param sensitiveWordsLibrary 敏感词库 + * @return 敏感词库集合 + */ + public List selectSensitiveWordsLibraryList(SensitiveWordsLibrary sensitiveWordsLibrary); + + /** + * 新增敏感词库 + * + * @param sensitiveWordsLibrary 敏感词库 + * @return 结果 + */ + public int insertSensitiveWordsLibrary(SensitiveWordsLibrary sensitiveWordsLibrary); + + /** + * 修改敏感词库 + * + * @param sensitiveWordsLibrary 敏感词库 + * @return 结果 + */ + public int updateSensitiveWordsLibrary(SensitiveWordsLibrary sensitiveWordsLibrary); + + /** + * 删除敏感词库 + * + * @param wordId 敏感词库主键 + * @return 结果 + */ + public int deleteSensitiveWordsLibraryByWordId(Long wordId); + + /** + * 批量删除敏感词库 + * + * @param wordIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSensitiveWordsLibraryByWordIds(Long[] wordIds); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/VetOnlineStatusMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/VetOnlineStatusMapper.java new file mode 100644 index 0000000..5853852 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/VetOnlineStatusMapper.java @@ -0,0 +1,63 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.VetOnlineStatus; +import org.apache.ibatis.annotations.Mapper; + +/** + * 专家在线状态Mapper接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Mapper +public interface VetOnlineStatusMapper +{ + /** + * 查询专家在线状态 + * + * @param statusId 专家在线状态主键 + * @return 专家在线状态 + */ + public VetOnlineStatus selectVetOnlineStatusByStatusId(Long statusId); + + /** + * 查询专家在线状态列表 + * + * @param vetOnlineStatus 专家在线状态 + * @return 专家在线状态集合 + */ + public List selectVetOnlineStatusList(VetOnlineStatus vetOnlineStatus); + + /** + * 新增专家在线状态 + * + * @param vetOnlineStatus 专家在线状态 + * @return 结果 + */ + public int insertVetOnlineStatus(VetOnlineStatus vetOnlineStatus); + + /** + * 修改专家在线状态 + * + * @param vetOnlineStatus 专家在线状态 + * @return 结果 + */ + public int updateVetOnlineStatus(VetOnlineStatus vetOnlineStatus); + + /** + * 删除专家在线状态 + * + * @param statusId 专家在线状态主键 + * @return 结果 + */ + public int deleteVetOnlineStatusByStatusId(Long statusId); + + /** + * 批量删除专家在线状态 + * + * @param statusIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteVetOnlineStatusByStatusIds(Long[] statusIds); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/VetQualificationMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/VetQualificationMapper.java new file mode 100644 index 0000000..8bbf5aa --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/VetQualificationMapper.java @@ -0,0 +1,63 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.VetQualification; +import org.apache.ibatis.annotations.Mapper; + +/** + * 兽医资质Mapper接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Mapper +public interface VetQualificationMapper +{ + /** + * 查询兽医资质 + * + * @param qualificationId 兽医资质主键 + * @return 兽医资质 + */ + public VetQualification selectVetQualificationByQualificationId(Long qualificationId); + + /** + * 查询兽医资质列表 + * + * @param vetQualification 兽医资质 + * @return 兽医资质集合 + */ + public List selectVetQualificationList(VetQualification vetQualification); + + /** + * 新增兽医资质 + * + * @param vetQualification 兽医资质 + * @return 结果 + */ + public int insertVetQualification(VetQualification vetQualification); + + /** + * 修改兽医资质 + * + * @param vetQualification 兽医资质 + * @return 结果 + */ + public int updateVetQualification(VetQualification vetQualification); + + /** + * 删除兽医资质 + * + * @param qualificationId 兽医资质主键 + * @return 结果 + */ + public int deleteVetQualificationByQualificationId(Long qualificationId); + + /** + * 批量删除兽医资质 + * + * @param qualificationIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteVetQualificationByQualificationIds(Long[] qualificationIds); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/mapper/VetRepliesMapper.java b/chenhai-system/src/main/java/com/chenhai/system/mapper/VetRepliesMapper.java new file mode 100644 index 0000000..d6b6b8d --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/mapper/VetRepliesMapper.java @@ -0,0 +1,63 @@ +package com.chenhai.system.mapper; + +import java.util.List; +import com.chenhai.system.domain.VetReplies; +import org.apache.ibatis.annotations.Mapper; + +/** + * 兽医回复Mapper接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Mapper +public interface VetRepliesMapper +{ + /** + * 查询兽医回复 + * + * @param replyId 兽医回复主键 + * @return 兽医回复 + */ + public VetReplies selectVetRepliesByReplyId(Long replyId); + + /** + * 查询兽医回复列表 + * + * @param vetReplies 兽医回复 + * @return 兽医回复集合 + */ + public List selectVetRepliesList(VetReplies vetReplies); + + /** + * 新增兽医回复 + * + * @param vetReplies 兽医回复 + * @return 结果 + */ + public int insertVetReplies(VetReplies vetReplies); + + /** + * 修改兽医回复 + * + * @param vetReplies 兽医回复 + * @return 结果 + */ + public int updateVetReplies(VetReplies vetReplies); + + /** + * 删除兽医回复 + * + * @param replyId 兽医回复主键 + * @return 结果 + */ + public int deleteVetRepliesByReplyId(Long replyId); + + /** + * 批量删除兽医回复 + * + * @param replyIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteVetRepliesByReplyIds(Long[] replyIds); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/ICommentsService.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/ICommentsService.java new file mode 100644 index 0000000..9ecddf9 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/ICommentsService.java @@ -0,0 +1,62 @@ +package com.chenhai.system.service.vet; + +import com.chenhai.system.domain.Comments; + +import java.util.List; + +/** + * 评论(仅问答帖子可用)Service接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +public interface ICommentsService +{ + /** + * 查询评论(仅问答帖子可用) + * + * @param commentId 评论(仅问答帖子可用)主键 + * @return 评论(仅问答帖子可用) + */ + public Comments selectCommentsByCommentId(Long commentId); + + /** + * 查询评论(仅问答帖子可用)列表 + * + * @param comments 评论(仅问答帖子可用) + * @return 评论(仅问答帖子可用)集合 + */ + public List selectCommentsList(Comments comments); + + /** + * 新增评论(仅问答帖子可用) + * + * @param comments 评论(仅问答帖子可用) + * @return 结果 + */ + public int insertComments(Comments comments); + + /** + * 修改评论(仅问答帖子可用) + * + * @param comments 评论(仅问答帖子可用) + * @return 结果 + */ + public int updateComments(Comments comments); + + /** + * 批量删除评论(仅问答帖子可用) + * + * @param commentIds 需要删除的评论(仅问答帖子可用)主键集合 + * @return 结果 + */ + public int deleteCommentsByCommentIds(Long[] commentIds); + + /** + * 删除评论(仅问答帖子可用)信息 + * + * @param commentId 评论(仅问答帖子可用)主键 + * @return 结果 + */ + public int deleteCommentsByCommentId(Long commentId); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/IConsultationFormsService.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IConsultationFormsService.java new file mode 100644 index 0000000..217d292 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IConsultationFormsService.java @@ -0,0 +1,62 @@ +package com.chenhai.system.service.vet; + +import com.chenhai.system.domain.ConsultationForms; + +import java.util.List; + +/** + * 问诊单Service接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +public interface IConsultationFormsService +{ + /** + * 查询问诊单 + * + * @param formId 问诊单主键 + * @return 问诊单 + */ + public ConsultationForms selectConsultationFormsByFormId(Long formId); + + /** + * 查询问诊单列表 + * + * @param consultationForms 问诊单 + * @return 问诊单集合 + */ + public List selectConsultationFormsList(ConsultationForms consultationForms); + + /** + * 新增问诊单 + * + * @param consultationForms 问诊单 + * @return 结果 + */ + public int insertConsultationForms(ConsultationForms consultationForms); + + /** + * 修改问诊单 + * + * @param consultationForms 问诊单 + * @return 结果 + */ + public int updateConsultationForms(ConsultationForms consultationForms); + + /** + * 批量删除问诊单 + * + * @param formIds 需要删除的问诊单主键集合 + * @return 结果 + */ + public int deleteConsultationFormsByFormIds(Long[] formIds); + + /** + * 删除问诊单信息 + * + * @param formId 问诊单主键 + * @return 结果 + */ + public int deleteConsultationFormsByFormId(Long formId); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/IExpertMessagesService.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IExpertMessagesService.java new file mode 100644 index 0000000..86e2df9 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IExpertMessagesService.java @@ -0,0 +1,62 @@ +package com.chenhai.system.service.vet; + +import com.chenhai.system.domain.ExpertMessages; + +import java.util.List; + +/** + * 专家一对一聊天消息Service接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +public interface IExpertMessagesService +{ + /** + * 查询专家一对一聊天消息 + * + * @param messageId 专家一对一聊天消息主键 + * @return 专家一对一聊天消息 + */ + public ExpertMessages selectExpertMessagesByMessageId(Long messageId); + + /** + * 查询专家一对一聊天消息列表 + * + * @param expertMessages 专家一对一聊天消息 + * @return 专家一对一聊天消息集合 + */ + public List selectExpertMessagesList(ExpertMessages expertMessages); + + /** + * 新增专家一对一聊天消息 + * + * @param expertMessages 专家一对一聊天消息 + * @return 结果 + */ + public int insertExpertMessages(ExpertMessages expertMessages); + + /** + * 修改专家一对一聊天消息 + * + * @param expertMessages 专家一对一聊天消息 + * @return 结果 + */ + public int updateExpertMessages(ExpertMessages expertMessages); + + /** + * 批量删除专家一对一聊天消息 + * + * @param messageIds 需要删除的专家一对一聊天消息主键集合 + * @return 结果 + */ + public int deleteExpertMessagesByMessageIds(Long[] messageIds); + + /** + * 删除专家一对一聊天消息信息 + * + * @param messageId 专家一对一聊天消息主键 + * @return 结果 + */ + public int deleteExpertMessagesByMessageId(Long messageId); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/IPostsService.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IPostsService.java new file mode 100644 index 0000000..e4a5066 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IPostsService.java @@ -0,0 +1,62 @@ +package com.chenhai.system.service.vet; + +import com.chenhai.system.domain.Posts; + +import java.util.List; + +/** + * 帖子(包含问答和经验分享)Service接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +public interface IPostsService +{ + /** + * 查询帖子(包含问答和经验分享) + * + * @param postId 帖子(包含问答和经验分享)主键 + * @return 帖子(包含问答和经验分享) + */ + public Posts selectPostsByPostId(Long postId); + + /** + * 查询帖子(包含问答和经验分享)列表 + * + * @param posts 帖子(包含问答和经验分享) + * @return 帖子(包含问答和经验分享)集合 + */ + public List selectPostsList(Posts posts); + + /** + * 新增帖子(包含问答和经验分享) + * + * @param posts 帖子(包含问答和经验分享) + * @return 结果 + */ + public int insertPosts(Posts posts); + + /** + * 修改帖子(包含问答和经验分享) + * + * @param posts 帖子(包含问答和经验分享) + * @return 结果 + */ + public int updatePosts(Posts posts); + + /** + * 批量删除帖子(包含问答和经验分享) + * + * @param postIds 需要删除的帖子(包含问答和经验分享)主键集合 + * @return 结果 + */ + public int deletePostsByPostIds(Long[] postIds); + + /** + * 删除帖子(包含问答和经验分享)信息 + * + * @param postId 帖子(包含问答和经验分享)主键 + * @return 结果 + */ + public int deletePostsByPostId(Long postId); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/ISensitiveWordsLibraryService.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/ISensitiveWordsLibraryService.java new file mode 100644 index 0000000..206c6a3 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/ISensitiveWordsLibraryService.java @@ -0,0 +1,62 @@ +package com.chenhai.system.service.vet; + +import com.chenhai.system.domain.SensitiveWordsLibrary; + +import java.util.List; + +/** + * 敏感词库Service接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +public interface ISensitiveWordsLibraryService +{ + /** + * 查询敏感词库 + * + * @param wordId 敏感词库主键 + * @return 敏感词库 + */ + public SensitiveWordsLibrary selectSensitiveWordsLibraryByWordId(Long wordId); + + /** + * 查询敏感词库列表 + * + * @param sensitiveWordsLibrary 敏感词库 + * @return 敏感词库集合 + */ + public List selectSensitiveWordsLibraryList(SensitiveWordsLibrary sensitiveWordsLibrary); + + /** + * 新增敏感词库 + * + * @param sensitiveWordsLibrary 敏感词库 + * @return 结果 + */ + public int insertSensitiveWordsLibrary(SensitiveWordsLibrary sensitiveWordsLibrary); + + /** + * 修改敏感词库 + * + * @param sensitiveWordsLibrary 敏感词库 + * @return 结果 + */ + public int updateSensitiveWordsLibrary(SensitiveWordsLibrary sensitiveWordsLibrary); + + /** + * 批量删除敏感词库 + * + * @param wordIds 需要删除的敏感词库主键集合 + * @return 结果 + */ + public int deleteSensitiveWordsLibraryByWordIds(Long[] wordIds); + + /** + * 删除敏感词库信息 + * + * @param wordId 敏感词库主键 + * @return 结果 + */ + public int deleteSensitiveWordsLibraryByWordId(Long wordId); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetOnlineStatusService.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetOnlineStatusService.java new file mode 100644 index 0000000..c192937 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetOnlineStatusService.java @@ -0,0 +1,62 @@ +package com.chenhai.system.service.vet; + +import com.chenhai.system.domain.VetOnlineStatus; + +import java.util.List; + +/** + * 专家在线状态Service接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +public interface IVetOnlineStatusService +{ + /** + * 查询专家在线状态 + * + * @param statusId 专家在线状态主键 + * @return 专家在线状态 + */ + public VetOnlineStatus selectVetOnlineStatusByStatusId(Long statusId); + + /** + * 查询专家在线状态列表 + * + * @param vetOnlineStatus 专家在线状态 + * @return 专家在线状态集合 + */ + public List selectVetOnlineStatusList(VetOnlineStatus vetOnlineStatus); + + /** + * 新增专家在线状态 + * + * @param vetOnlineStatus 专家在线状态 + * @return 结果 + */ + public int insertVetOnlineStatus(VetOnlineStatus vetOnlineStatus); + + /** + * 修改专家在线状态 + * + * @param vetOnlineStatus 专家在线状态 + * @return 结果 + */ + public int updateVetOnlineStatus(VetOnlineStatus vetOnlineStatus); + + /** + * 批量删除专家在线状态 + * + * @param statusIds 需要删除的专家在线状态主键集合 + * @return 结果 + */ + public int deleteVetOnlineStatusByStatusIds(Long[] statusIds); + + /** + * 删除专家在线状态信息 + * + * @param statusId 专家在线状态主键 + * @return 结果 + */ + public int deleteVetOnlineStatusByStatusId(Long statusId); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetQualificationService.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetQualificationService.java new file mode 100644 index 0000000..ec47ad7 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetQualificationService.java @@ -0,0 +1,62 @@ +package com.chenhai.system.service.vet; + +import com.chenhai.system.domain.VetQualification; + +import java.util.List; + +/** + * 兽医资质Service接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +public interface IVetQualificationService +{ + /** + * 查询兽医资质 + * + * @param qualificationId 兽医资质主键 + * @return 兽医资质 + */ + public VetQualification selectVetQualificationByQualificationId(Long qualificationId); + + /** + * 查询兽医资质列表 + * + * @param vetQualification 兽医资质 + * @return 兽医资质集合 + */ + public List selectVetQualificationList(VetQualification vetQualification); + + /** + * 新增兽医资质 + * + * @param vetQualification 兽医资质 + * @return 结果 + */ + public int insertVetQualification(VetQualification vetQualification); + + /** + * 修改兽医资质 + * + * @param vetQualification 兽医资质 + * @return 结果 + */ + public int updateVetQualification(VetQualification vetQualification); + + /** + * 批量删除兽医资质 + * + * @param qualificationIds 需要删除的兽医资质主键集合 + * @return 结果 + */ + public int deleteVetQualificationByQualificationIds(Long[] qualificationIds); + + /** + * 删除兽医资质信息 + * + * @param qualificationId 兽医资质主键 + * @return 结果 + */ + public int deleteVetQualificationByQualificationId(Long qualificationId); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetRepliesService.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetRepliesService.java new file mode 100644 index 0000000..14fbb40 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetRepliesService.java @@ -0,0 +1,62 @@ +package com.chenhai.system.service.vet; + +import com.chenhai.system.domain.VetReplies; + +import java.util.List; + +/** + * 兽医回复Service接口 + * + * @author ruoyi + * @date 2025-12-26 + */ +public interface IVetRepliesService +{ + /** + * 查询兽医回复 + * + * @param replyId 兽医回复主键 + * @return 兽医回复 + */ + public VetReplies selectVetRepliesByReplyId(Long replyId); + + /** + * 查询兽医回复列表 + * + * @param vetReplies 兽医回复 + * @return 兽医回复集合 + */ + public List selectVetRepliesList(VetReplies vetReplies); + + /** + * 新增兽医回复 + * + * @param vetReplies 兽医回复 + * @return 结果 + */ + public int insertVetReplies(VetReplies vetReplies); + + /** + * 修改兽医回复 + * + * @param vetReplies 兽医回复 + * @return 结果 + */ + public int updateVetReplies(VetReplies vetReplies); + + /** + * 批量删除兽医回复 + * + * @param replyIds 需要删除的兽医回复主键集合 + * @return 结果 + */ + public int deleteVetRepliesByReplyIds(Long[] replyIds); + + /** + * 删除兽医回复信息 + * + * @param replyId 兽医回复主键 + * @return 结果 + */ + public int deleteVetRepliesByReplyId(Long replyId); +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/CommentsServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/CommentsServiceImpl.java new file mode 100644 index 0000000..99d7cbf --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/CommentsServiceImpl.java @@ -0,0 +1,94 @@ +package com.chenhai.system.service.vet.impl; + +import com.chenhai.system.domain.Comments; +import com.chenhai.system.mapper.CommentsMapper; +import com.chenhai.system.service.vet.ICommentsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 评论(仅问答帖子可用)Service业务层处理 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Service +public class CommentsServiceImpl implements ICommentsService +{ + @Autowired + private CommentsMapper commentsMapper; + + /** + * 查询评论(仅问答帖子可用) + * + * @param commentId 评论(仅问答帖子可用)主键 + * @return 评论(仅问答帖子可用) + */ + @Override + public Comments selectCommentsByCommentId(Long commentId) + { + return commentsMapper.selectCommentsByCommentId(commentId); + } + + /** + * 查询评论(仅问答帖子可用)列表 + * + * @param comments 评论(仅问答帖子可用) + * @return 评论(仅问答帖子可用) + */ + @Override + public List selectCommentsList(Comments comments) + { + return commentsMapper.selectCommentsList(comments); + } + + /** + * 新增评论(仅问答帖子可用) + * + * @param comments 评论(仅问答帖子可用) + * @return 结果 + */ + @Override + public int insertComments(Comments comments) + { + return commentsMapper.insertComments(comments); + } + + /** + * 修改评论(仅问答帖子可用) + * + * @param comments 评论(仅问答帖子可用) + * @return 结果 + */ + @Override + public int updateComments(Comments comments) + { + return commentsMapper.updateComments(comments); + } + + /** + * 批量删除评论(仅问答帖子可用) + * + * @param commentIds 需要删除的评论(仅问答帖子可用)主键 + * @return 结果 + */ + @Override + public int deleteCommentsByCommentIds(Long[] commentIds) + { + return commentsMapper.deleteCommentsByCommentIds(commentIds); + } + + /** + * 删除评论(仅问答帖子可用)信息 + * + * @param commentId 评论(仅问答帖子可用)主键 + * @return 结果 + */ + @Override + public int deleteCommentsByCommentId(Long commentId) + { + return commentsMapper.deleteCommentsByCommentId(commentId); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/ConsultationFormsServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/ConsultationFormsServiceImpl.java new file mode 100644 index 0000000..90b8837 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/ConsultationFormsServiceImpl.java @@ -0,0 +1,94 @@ +package com.chenhai.system.service.vet.impl; + +import com.chenhai.system.domain.ConsultationForms; +import com.chenhai.system.mapper.ConsultationFormsMapper; +import com.chenhai.system.service.vet.IConsultationFormsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 问诊单Service业务层处理 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Service +public class ConsultationFormsServiceImpl implements IConsultationFormsService +{ + @Autowired + private ConsultationFormsMapper consultationFormsMapper; + + /** + * 查询问诊单 + * + * @param formId 问诊单主键 + * @return 问诊单 + */ + @Override + public ConsultationForms selectConsultationFormsByFormId(Long formId) + { + return consultationFormsMapper.selectConsultationFormsByFormId(formId); + } + + /** + * 查询问诊单列表 + * + * @param consultationForms 问诊单 + * @return 问诊单 + */ + @Override + public List selectConsultationFormsList(ConsultationForms consultationForms) + { + return consultationFormsMapper.selectConsultationFormsList(consultationForms); + } + + /** + * 新增问诊单 + * + * @param consultationForms 问诊单 + * @return 结果 + */ + @Override + public int insertConsultationForms(ConsultationForms consultationForms) + { + return consultationFormsMapper.insertConsultationForms(consultationForms); + } + + /** + * 修改问诊单 + * + * @param consultationForms 问诊单 + * @return 结果 + */ + @Override + public int updateConsultationForms(ConsultationForms consultationForms) + { + return consultationFormsMapper.updateConsultationForms(consultationForms); + } + + /** + * 批量删除问诊单 + * + * @param formIds 需要删除的问诊单主键 + * @return 结果 + */ + @Override + public int deleteConsultationFormsByFormIds(Long[] formIds) + { + return consultationFormsMapper.deleteConsultationFormsByFormIds(formIds); + } + + /** + * 删除问诊单信息 + * + * @param formId 问诊单主键 + * @return 结果 + */ + @Override + public int deleteConsultationFormsByFormId(Long formId) + { + return consultationFormsMapper.deleteConsultationFormsByFormId(formId); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/ExpertMessagesServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/ExpertMessagesServiceImpl.java new file mode 100644 index 0000000..6533ae2 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/ExpertMessagesServiceImpl.java @@ -0,0 +1,94 @@ +package com.chenhai.system.service.vet.impl; + +import com.chenhai.system.domain.ExpertMessages; +import com.chenhai.system.mapper.ExpertMessagesMapper; +import com.chenhai.system.service.vet.IExpertMessagesService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 专家一对一聊天消息Service业务层处理 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Service +public class ExpertMessagesServiceImpl implements IExpertMessagesService +{ + @Autowired + private ExpertMessagesMapper expertMessagesMapper; + + /** + * 查询专家一对一聊天消息 + * + * @param messageId 专家一对一聊天消息主键 + * @return 专家一对一聊天消息 + */ + @Override + public ExpertMessages selectExpertMessagesByMessageId(Long messageId) + { + return expertMessagesMapper.selectExpertMessagesByMessageId(messageId); + } + + /** + * 查询专家一对一聊天消息列表 + * + * @param expertMessages 专家一对一聊天消息 + * @return 专家一对一聊天消息 + */ + @Override + public List selectExpertMessagesList(ExpertMessages expertMessages) + { + return expertMessagesMapper.selectExpertMessagesList(expertMessages); + } + + /** + * 新增专家一对一聊天消息 + * + * @param expertMessages 专家一对一聊天消息 + * @return 结果 + */ + @Override + public int insertExpertMessages(ExpertMessages expertMessages) + { + return expertMessagesMapper.insertExpertMessages(expertMessages); + } + + /** + * 修改专家一对一聊天消息 + * + * @param expertMessages 专家一对一聊天消息 + * @return 结果 + */ + @Override + public int updateExpertMessages(ExpertMessages expertMessages) + { + return expertMessagesMapper.updateExpertMessages(expertMessages); + } + + /** + * 批量删除专家一对一聊天消息 + * + * @param messageIds 需要删除的专家一对一聊天消息主键 + * @return 结果 + */ + @Override + public int deleteExpertMessagesByMessageIds(Long[] messageIds) + { + return expertMessagesMapper.deleteExpertMessagesByMessageIds(messageIds); + } + + /** + * 删除专家一对一聊天消息信息 + * + * @param messageId 专家一对一聊天消息主键 + * @return 结果 + */ + @Override + public int deleteExpertMessagesByMessageId(Long messageId) + { + return expertMessagesMapper.deleteExpertMessagesByMessageId(messageId); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/PostsServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/PostsServiceImpl.java new file mode 100644 index 0000000..12bcfec --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/PostsServiceImpl.java @@ -0,0 +1,94 @@ +package com.chenhai.system.service.vet.impl; + +import com.chenhai.system.domain.Posts; +import com.chenhai.system.mapper.PostsMapper; +import com.chenhai.system.service.vet.IPostsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 帖子(包含问答和经验分享)Service业务层处理 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Service +public class PostsServiceImpl implements IPostsService +{ + @Autowired + private PostsMapper postsMapper; + + /** + * 查询帖子(包含问答和经验分享) + * + * @param postId 帖子(包含问答和经验分享)主键 + * @return 帖子(包含问答和经验分享) + */ + @Override + public Posts selectPostsByPostId(Long postId) + { + return postsMapper.selectPostsByPostId(postId); + } + + /** + * 查询帖子(包含问答和经验分享)列表 + * + * @param posts 帖子(包含问答和经验分享) + * @return 帖子(包含问答和经验分享) + */ + @Override + public List selectPostsList(Posts posts) + { + return postsMapper.selectPostsList(posts); + } + + /** + * 新增帖子(包含问答和经验分享) + * + * @param posts 帖子(包含问答和经验分享) + * @return 结果 + */ + @Override + public int insertPosts(Posts posts) + { + return postsMapper.insertPosts(posts); + } + + /** + * 修改帖子(包含问答和经验分享) + * + * @param posts 帖子(包含问答和经验分享) + * @return 结果 + */ + @Override + public int updatePosts(Posts posts) + { + return postsMapper.updatePosts(posts); + } + + /** + * 批量删除帖子(包含问答和经验分享) + * + * @param postIds 需要删除的帖子(包含问答和经验分享)主键 + * @return 结果 + */ + @Override + public int deletePostsByPostIds(Long[] postIds) + { + return postsMapper.deletePostsByPostIds(postIds); + } + + /** + * 删除帖子(包含问答和经验分享)信息 + * + * @param postId 帖子(包含问答和经验分享)主键 + * @return 结果 + */ + @Override + public int deletePostsByPostId(Long postId) + { + return postsMapper.deletePostsByPostId(postId); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/SensitiveWordsLibraryServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/SensitiveWordsLibraryServiceImpl.java new file mode 100644 index 0000000..30128a6 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/SensitiveWordsLibraryServiceImpl.java @@ -0,0 +1,94 @@ +package com.chenhai.system.service.vet.impl; + +import com.chenhai.system.domain.SensitiveWordsLibrary; +import com.chenhai.system.mapper.SensitiveWordsLibraryMapper; +import com.chenhai.system.service.vet.ISensitiveWordsLibraryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 敏感词库Service业务层处理 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Service +public class SensitiveWordsLibraryServiceImpl implements ISensitiveWordsLibraryService +{ + @Autowired + private SensitiveWordsLibraryMapper sensitiveWordsLibraryMapper; + + /** + * 查询敏感词库 + * + * @param wordId 敏感词库主键 + * @return 敏感词库 + */ + @Override + public SensitiveWordsLibrary selectSensitiveWordsLibraryByWordId(Long wordId) + { + return sensitiveWordsLibraryMapper.selectSensitiveWordsLibraryByWordId(wordId); + } + + /** + * 查询敏感词库列表 + * + * @param sensitiveWordsLibrary 敏感词库 + * @return 敏感词库 + */ + @Override + public List selectSensitiveWordsLibraryList(SensitiveWordsLibrary sensitiveWordsLibrary) + { + return sensitiveWordsLibraryMapper.selectSensitiveWordsLibraryList(sensitiveWordsLibrary); + } + + /** + * 新增敏感词库 + * + * @param sensitiveWordsLibrary 敏感词库 + * @return 结果 + */ + @Override + public int insertSensitiveWordsLibrary(SensitiveWordsLibrary sensitiveWordsLibrary) + { + return sensitiveWordsLibraryMapper.insertSensitiveWordsLibrary(sensitiveWordsLibrary); + } + + /** + * 修改敏感词库 + * + * @param sensitiveWordsLibrary 敏感词库 + * @return 结果 + */ + @Override + public int updateSensitiveWordsLibrary(SensitiveWordsLibrary sensitiveWordsLibrary) + { + return sensitiveWordsLibraryMapper.updateSensitiveWordsLibrary(sensitiveWordsLibrary); + } + + /** + * 批量删除敏感词库 + * + * @param wordIds 需要删除的敏感词库主键 + * @return 结果 + */ + @Override + public int deleteSensitiveWordsLibraryByWordIds(Long[] wordIds) + { + return sensitiveWordsLibraryMapper.deleteSensitiveWordsLibraryByWordIds(wordIds); + } + + /** + * 删除敏感词库信息 + * + * @param wordId 敏感词库主键 + * @return 结果 + */ + @Override + public int deleteSensitiveWordsLibraryByWordId(Long wordId) + { + return sensitiveWordsLibraryMapper.deleteSensitiveWordsLibraryByWordId(wordId); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetOnlineStatusServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetOnlineStatusServiceImpl.java new file mode 100644 index 0000000..cd22c2a --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetOnlineStatusServiceImpl.java @@ -0,0 +1,94 @@ +package com.chenhai.system.service.vet.impl; + +import com.chenhai.system.domain.VetOnlineStatus; +import com.chenhai.system.mapper.VetOnlineStatusMapper; +import com.chenhai.system.service.vet.IVetOnlineStatusService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 专家在线状态Service业务层处理 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Service +public class VetOnlineStatusServiceImpl implements IVetOnlineStatusService +{ + @Autowired + private VetOnlineStatusMapper vetOnlineStatusMapper; + + /** + * 查询专家在线状态 + * + * @param statusId 专家在线状态主键 + * @return 专家在线状态 + */ + @Override + public VetOnlineStatus selectVetOnlineStatusByStatusId(Long statusId) + { + return vetOnlineStatusMapper.selectVetOnlineStatusByStatusId(statusId); + } + + /** + * 查询专家在线状态列表 + * + * @param vetOnlineStatus 专家在线状态 + * @return 专家在线状态 + */ + @Override + public List selectVetOnlineStatusList(VetOnlineStatus vetOnlineStatus) + { + return vetOnlineStatusMapper.selectVetOnlineStatusList(vetOnlineStatus); + } + + /** + * 新增专家在线状态 + * + * @param vetOnlineStatus 专家在线状态 + * @return 结果 + */ + @Override + public int insertVetOnlineStatus(VetOnlineStatus vetOnlineStatus) + { + return vetOnlineStatusMapper.insertVetOnlineStatus(vetOnlineStatus); + } + + /** + * 修改专家在线状态 + * + * @param vetOnlineStatus 专家在线状态 + * @return 结果 + */ + @Override + public int updateVetOnlineStatus(VetOnlineStatus vetOnlineStatus) + { + return vetOnlineStatusMapper.updateVetOnlineStatus(vetOnlineStatus); + } + + /** + * 批量删除专家在线状态 + * + * @param statusIds 需要删除的专家在线状态主键 + * @return 结果 + */ + @Override + public int deleteVetOnlineStatusByStatusIds(Long[] statusIds) + { + return vetOnlineStatusMapper.deleteVetOnlineStatusByStatusIds(statusIds); + } + + /** + * 删除专家在线状态信息 + * + * @param statusId 专家在线状态主键 + * @return 结果 + */ + @Override + public int deleteVetOnlineStatusByStatusId(Long statusId) + { + return vetOnlineStatusMapper.deleteVetOnlineStatusByStatusId(statusId); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetQualificationServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetQualificationServiceImpl.java new file mode 100644 index 0000000..071ce28 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetQualificationServiceImpl.java @@ -0,0 +1,97 @@ +package com.chenhai.system.service.vet.impl; + +import com.chenhai.common.utils.DateUtils; +import com.chenhai.system.domain.VetQualification; +import com.chenhai.system.mapper.VetQualificationMapper; +import com.chenhai.system.service.vet.IVetQualificationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 兽医资质Service业务层处理 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Service +public class VetQualificationServiceImpl implements IVetQualificationService +{ + @Autowired + private VetQualificationMapper vetQualificationMapper; + + /** + * 查询兽医资质 + * + * @param qualificationId 兽医资质主键 + * @return 兽医资质 + */ + @Override + public VetQualification selectVetQualificationByQualificationId(Long qualificationId) + { + return vetQualificationMapper.selectVetQualificationByQualificationId(qualificationId); + } + + /** + * 查询兽医资质列表 + * + * @param vetQualification 兽医资质 + * @return 兽医资质 + */ + @Override + public List selectVetQualificationList(VetQualification vetQualification) + { + return vetQualificationMapper.selectVetQualificationList(vetQualification); + } + + /** + * 新增兽医资质 + * + * @param vetQualification 兽医资质 + * @return 结果 + */ + @Override + public int insertVetQualification(VetQualification vetQualification) + { + vetQualification.setCreateTime(DateUtils.getNowDate()); + return vetQualificationMapper.insertVetQualification(vetQualification); + } + + /** + * 修改兽医资质 + * + * @param vetQualification 兽医资质 + * @return 结果 + */ + @Override + public int updateVetQualification(VetQualification vetQualification) + { + vetQualification.setUpdateTime(DateUtils.getNowDate()); + return vetQualificationMapper.updateVetQualification(vetQualification); + } + + /** + * 批量删除兽医资质 + * + * @param qualificationIds 需要删除的兽医资质主键 + * @return 结果 + */ + @Override + public int deleteVetQualificationByQualificationIds(Long[] qualificationIds) + { + return vetQualificationMapper.deleteVetQualificationByQualificationIds(qualificationIds); + } + + /** + * 删除兽医资质信息 + * + * @param qualificationId 兽医资质主键 + * @return 结果 + */ + @Override + public int deleteVetQualificationByQualificationId(Long qualificationId) + { + return vetQualificationMapper.deleteVetQualificationByQualificationId(qualificationId); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetRepliesServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetRepliesServiceImpl.java new file mode 100644 index 0000000..5bd02e1 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetRepliesServiceImpl.java @@ -0,0 +1,94 @@ +package com.chenhai.system.service.vet.impl; + +import com.chenhai.system.domain.VetReplies; +import com.chenhai.system.mapper.VetRepliesMapper; +import com.chenhai.system.service.vet.IVetRepliesService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 兽医回复Service业务层处理 + * + * @author ruoyi + * @date 2025-12-26 + */ +@Service +public class VetRepliesServiceImpl implements IVetRepliesService +{ + @Autowired + private VetRepliesMapper vetRepliesMapper; + + /** + * 查询兽医回复 + * + * @param replyId 兽医回复主键 + * @return 兽医回复 + */ + @Override + public VetReplies selectVetRepliesByReplyId(Long replyId) + { + return vetRepliesMapper.selectVetRepliesByReplyId(replyId); + } + + /** + * 查询兽医回复列表 + * + * @param vetReplies 兽医回复 + * @return 兽医回复 + */ + @Override + public List selectVetRepliesList(VetReplies vetReplies) + { + return vetRepliesMapper.selectVetRepliesList(vetReplies); + } + + /** + * 新增兽医回复 + * + * @param vetReplies 兽医回复 + * @return 结果 + */ + @Override + public int insertVetReplies(VetReplies vetReplies) + { + return vetRepliesMapper.insertVetReplies(vetReplies); + } + + /** + * 修改兽医回复 + * + * @param vetReplies 兽医回复 + * @return 结果 + */ + @Override + public int updateVetReplies(VetReplies vetReplies) + { + return vetRepliesMapper.updateVetReplies(vetReplies); + } + + /** + * 批量删除兽医回复 + * + * @param replyIds 需要删除的兽医回复主键 + * @return 结果 + */ + @Override + public int deleteVetRepliesByReplyIds(Long[] replyIds) + { + return vetRepliesMapper.deleteVetRepliesByReplyIds(replyIds); + } + + /** + * 删除兽医回复信息 + * + * @param replyId 兽医回复主键 + * @return 结果 + */ + @Override + public int deleteVetRepliesByReplyId(Long replyId) + { + return vetRepliesMapper.deleteVetRepliesByReplyId(replyId); + } +} diff --git a/chenhai-system/src/main/resources/mapper/system/SysConfigMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysConfigMapper.xml deleted file mode 100644 index 21cdae2..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysConfigMapper.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark - from sys_config - - - - - - - and config_id = #{configId} - - - and config_key = #{configKey} - - - - - - - - - - - - - - insert into sys_config ( - config_name, - config_key, - config_value, - config_type, - create_by, - remark, - create_time - )values( - #{configName}, - #{configKey}, - #{configValue}, - #{configType}, - #{createBy}, - #{remark}, - sysdate() - ) - - - - update sys_config - - config_name = #{configName}, - config_key = #{configKey}, - config_value = #{configValue}, - config_type = #{configType}, - update_by = #{updateBy}, - remark = #{remark}, - update_time = sysdate() - - where config_id = #{configId} - - - - delete from sys_config where config_id = #{configId} - - - - delete from sys_config where config_id in - - #{configId} - - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysDeptMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysDeptMapper.xml deleted file mode 100644 index 7b1223b..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time - from sys_dept d - - - - - - - - - - - - - - - - - - - - insert into sys_dept( - dept_id, - parent_id, - dept_name, - ancestors, - order_num, - leader, - phone, - email, - status, - create_by, - create_time - )values( - #{deptId}, - #{parentId}, - #{deptName}, - #{ancestors}, - #{orderNum}, - #{leader}, - #{phone}, - #{email}, - #{status}, - #{createBy}, - sysdate() - ) - - - - update sys_dept - - parent_id = #{parentId}, - dept_name = #{deptName}, - ancestors = #{ancestors}, - order_num = #{orderNum}, - leader = #{leader}, - phone = #{phone}, - email = #{email}, - status = #{status}, - update_by = #{updateBy}, - update_time = sysdate() - - where dept_id = #{deptId} - - - - update sys_dept set ancestors = - - when #{item.deptId} then #{item.ancestors} - - where dept_id in - - #{item.deptId} - - - - - update sys_dept set status = '0' where dept_id in - - #{deptId} - - - - - update sys_dept set del_flag = '2' where dept_id = #{deptId} - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysDictDataMapper.xml deleted file mode 100644 index f471c45..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysDictDataMapper.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark - from sys_dict_data - - - - - - - - - - - - - - delete from sys_dict_data where dict_code = #{dictCode} - - - - delete from sys_dict_data where dict_code in - - #{dictCode} - - - - - update sys_dict_data - - dict_sort = #{dictSort}, - dict_label = #{dictLabel}, - dict_value = #{dictValue}, - dict_type = #{dictType}, - css_class = #{cssClass}, - list_class = #{listClass}, - is_default = #{isDefault}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where dict_code = #{dictCode} - - - - update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} - - - - insert into sys_dict_data( - dict_sort, - dict_label, - dict_value, - dict_type, - css_class, - list_class, - is_default, - status, - remark, - create_by, - create_time - )values( - #{dictSort}, - #{dictLabel}, - #{dictValue}, - #{dictType}, - #{cssClass}, - #{listClass}, - #{isDefault}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysDictTypeMapper.xml deleted file mode 100644 index 8f5fd51..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysDictTypeMapper.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - select dict_id, dict_name, dict_type, status, create_by, create_time, remark - from sys_dict_type - - - - - - - - - - - - - - delete from sys_dict_type where dict_id = #{dictId} - - - - delete from sys_dict_type where dict_id in - - #{dictId} - - - - - update sys_dict_type - - dict_name = #{dictName}, - dict_type = #{dictType}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where dict_id = #{dictId} - - - - insert into sys_dict_type( - dict_name, - dict_type, - status, - remark, - create_by, - create_time - )values( - #{dictName}, - #{dictType}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysLogininforMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysLogininforMapper.xml deleted file mode 100644 index 7e51ae7..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysLogininforMapper.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) - values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate()) - - - - - - delete from sys_logininfor where info_id in - - #{infoId} - - - - - truncate table sys_logininfor - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysMenuMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysMenuMapper.xml deleted file mode 100644 index 6b5ae9f..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select menu_id, menu_name, parent_id, order_num, path, component, `query`, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time - from sys_menu - - - - - - - - - - - - - - - - - - - - - - - - - - update sys_menu - - menu_name = #{menuName}, - parent_id = #{parentId}, - order_num = #{orderNum}, - path = #{path}, - component = #{component}, - `query` = #{query}, - route_name = #{routeName}, - is_frame = #{isFrame}, - is_cache = #{isCache}, - menu_type = #{menuType}, - visible = #{visible}, - status = #{status}, - perms = #{perms}, - icon = #{icon}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where menu_id = #{menuId} - - - - insert into sys_menu( - menu_id, - parent_id, - menu_name, - order_num, - path, - component, - `query`, - route_name, - is_frame, - is_cache, - menu_type, - visible, - status, - perms, - icon, - remark, - create_by, - create_time - )values( - #{menuId}, - #{parentId}, - #{menuName}, - #{orderNum}, - #{path}, - #{component}, - #{query}, - #{routeName}, - #{isFrame}, - #{isCache}, - #{menuType}, - #{visible}, - #{status}, - #{perms}, - #{icon}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - delete from sys_menu where menu_id = #{menuId} - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysNoticeMapper.xml deleted file mode 100644 index 24ba493..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysNoticeMapper.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark - from sys_notice - - - - - - - - insert into sys_notice ( - notice_title, - notice_type, - notice_content, - status, - remark, - create_by, - create_time - )values( - #{noticeTitle}, - #{noticeType}, - #{noticeContent}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - update sys_notice - - notice_title = #{noticeTitle}, - notice_type = #{noticeType}, - notice_content = #{noticeContent}, - status = #{status}, - update_by = #{updateBy}, - update_time = sysdate() - - where notice_id = #{noticeId} - - - - delete from sys_notice where notice_id = #{noticeId} - - - - delete from sys_notice where notice_id in - - #{noticeId} - - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysOperLogMapper.xml deleted file mode 100644 index 39c5916..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysOperLogMapper.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time - from sys_oper_log - - - - insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time) - values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate()) - - - - - - delete from sys_oper_log where oper_id in - - #{operId} - - - - - - - truncate table sys_oper_log - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysPostMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysPostMapper.xml deleted file mode 100644 index be1ef43..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysPostMapper.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark - from sys_post - - - - - - - - - - - - - - - - - - update sys_post - - post_code = #{postCode}, - post_name = #{postName}, - post_sort = #{postSort}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where post_id = #{postId} - - - - insert into sys_post( - post_id, - post_code, - post_name, - post_sort, - status, - remark, - create_by, - create_time - )values( - #{postId}, - #{postCode}, - #{postName}, - #{postSort}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - delete from sys_post where post_id = #{postId} - - - - delete from sys_post where post_id in - - #{postId} - - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml deleted file mode 100644 index 9441cca..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - delete from sys_role_dept where role_id=#{roleId} - - - - - - delete from sys_role_dept where role_id in - - #{roleId} - - - - - insert into sys_role_dept(role_id, dept_id) values - - (#{item.roleId},#{item.deptId}) - - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysRoleMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysRoleMapper.xml deleted file mode 100644 index 158382c..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, - r.status, r.del_flag, r.create_time, r.remark - from sys_role r - left join sys_user_role ur on ur.role_id = r.role_id - left join sys_user u on u.user_id = ur.user_id - left join sys_dept d on u.dept_id = d.dept_id - - - - - - - - - - - - - - - - - - - - insert into sys_role( - role_id, - role_name, - role_key, - role_sort, - data_scope, - menu_check_strictly, - dept_check_strictly, - status, - remark, - create_by, - create_time - )values( - #{roleId}, - #{roleName}, - #{roleKey}, - #{roleSort}, - #{dataScope}, - #{menuCheckStrictly}, - #{deptCheckStrictly}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - update sys_role - - role_name = #{roleName}, - role_key = #{roleKey}, - role_sort = #{roleSort}, - data_scope = #{dataScope}, - menu_check_strictly = #{menuCheckStrictly}, - dept_check_strictly = #{deptCheckStrictly}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where role_id = #{roleId} - - - - update sys_role set del_flag = '2' where role_id = #{roleId} - - - - update sys_role set del_flag = '2' where role_id in - - #{roleId} - - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml deleted file mode 100644 index 104fd6e..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - delete from sys_role_menu where role_id=#{roleId} - - - - delete from sys_role_menu where role_id in - - #{roleId} - - - - - insert into sys_role_menu(role_id, menu_id) values - - (#{item.roleId},#{item.menuId}) - - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml deleted file mode 100644 index 69e29c1..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_by, u.create_time, u.remark, - d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, - r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status - from sys_user u - left join sys_dept d on u.dept_id = d.dept_id - left join sys_user_role ur on u.user_id = ur.user_id - left join sys_role r on r.role_id = ur.role_id - - - - - - - - - - - - - - - - - - - - insert into sys_user( - user_id, - dept_id, - user_name, - nick_name, - email, - avatar, - phonenumber, - sex, - password, - status, - pwd_update_date, - create_by, - remark, - create_time - )values( - #{userId}, - #{deptId}, - #{userName}, - #{nickName}, - #{email}, - #{avatar}, - #{phonenumber}, - #{sex}, - #{password}, - #{status}, - #{pwdUpdateDate}, - #{createBy}, - #{remark}, - sysdate() - ) - - - - update sys_user - - dept_id = #{deptId}, - nick_name = #{nickName}, - email = #{email}, - phonenumber = #{phonenumber}, - sex = #{sex}, - avatar = #{avatar}, - password = #{password}, - status = #{status}, - login_ip = #{loginIp}, - login_date = #{loginDate}, - update_by = #{updateBy}, - remark = #{remark}, - update_time = sysdate() - - where user_id = #{userId} - - - - update sys_user set status = #{status}, update_time = sysdate() where user_id = #{userId} - - - - update sys_user set avatar = #{avatar}, update_time = sysdate() where user_id = #{userId} - - - - update sys_user set login_ip = #{loginIp}, login_date = #{loginDate} where user_id = #{userId} - - - - update sys_user set pwd_update_date = sysdate(), password = #{password}, update_time = sysdate() where user_id = #{userId} - - - - update sys_user set del_flag = '2' where user_id = #{userId} - - - - update sys_user set del_flag = '2' where user_id in - - #{userId} - - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysUserPostMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysUserPostMapper.xml deleted file mode 100644 index fedf57d..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysUserPostMapper.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - delete from sys_user_post where user_id=#{userId} - - - - - - delete from sys_user_post where user_id in - - #{userId} - - - - - insert into sys_user_post(user_id, post_id) values - - (#{item.userId},#{item.postId}) - - - - \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/system/SysUserRoleMapper.xml b/chenhai-system/src/main/resources/mapper/system/SysUserRoleMapper.xml deleted file mode 100644 index 88bc49d..0000000 --- a/chenhai-system/src/main/resources/mapper/system/SysUserRoleMapper.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - delete from sys_user_role where user_id=#{userId} - - - - - - delete from sys_user_role where user_id in - - #{userId} - - - - - insert into sys_user_role(user_id, role_id) values - - (#{item.userId},#{item.roleId}) - - - - - delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} - - - - delete from sys_user_role where role_id=#{roleId} and user_id in - - #{userId} - - - \ No newline at end of file diff --git a/chenhai-ui/src/api/system/comments.js b/chenhai-ui/src/api/system/comments.js new file mode 100644 index 0000000..34b9882 --- /dev/null +++ b/chenhai-ui/src/api/system/comments.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询评论(仅问答帖子可用)列表 +export function listComments(query) { + return request({ + url: '/system/comments/list', + method: 'get', + params: query + }) +} + +// 查询评论(仅问答帖子可用)详细 +export function getComments(commentId) { + return request({ + url: '/system/comments/' + commentId, + method: 'get' + }) +} + +// 新增评论(仅问答帖子可用) +export function addComments(data) { + return request({ + url: '/system/comments', + method: 'post', + data: data + }) +} + +// 修改评论(仅问答帖子可用) +export function updateComments(data) { + return request({ + url: '/system/comments', + method: 'put', + data: data + }) +} + +// 删除评论(仅问答帖子可用) +export function delComments(commentId) { + return request({ + url: '/system/comments/' + commentId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/system/forms.js b/chenhai-ui/src/api/system/forms.js new file mode 100644 index 0000000..ea64994 --- /dev/null +++ b/chenhai-ui/src/api/system/forms.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询问诊单列表 +export function listForms(query) { + return request({ + url: '/system/forms/list', + method: 'get', + params: query + }) +} + +// 查询问诊单详细 +export function getForms(formId) { + return request({ + url: '/system/forms/' + formId, + method: 'get' + }) +} + +// 新增问诊单 +export function addForms(data) { + return request({ + url: '/system/forms', + method: 'post', + data: data + }) +} + +// 修改问诊单 +export function updateForms(data) { + return request({ + url: '/system/forms', + method: 'put', + data: data + }) +} + +// 删除问诊单 +export function delForms(formId) { + return request({ + url: '/system/forms/' + formId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/system/library.js b/chenhai-ui/src/api/system/library.js new file mode 100644 index 0000000..39be6d5 --- /dev/null +++ b/chenhai-ui/src/api/system/library.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询敏感词库列表 +export function listLibrary(query) { + return request({ + url: '/system/library/list', + method: 'get', + params: query + }) +} + +// 查询敏感词库详细 +export function getLibrary(wordId) { + return request({ + url: '/system/library/' + wordId, + method: 'get' + }) +} + +// 新增敏感词库 +export function addLibrary(data) { + return request({ + url: '/system/library', + method: 'post', + data: data + }) +} + +// 修改敏感词库 +export function updateLibrary(data) { + return request({ + url: '/system/library', + method: 'put', + data: data + }) +} + +// 删除敏感词库 +export function delLibrary(wordId) { + return request({ + url: '/system/library/' + wordId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/system/messages.js b/chenhai-ui/src/api/system/messages.js new file mode 100644 index 0000000..c4a55b9 --- /dev/null +++ b/chenhai-ui/src/api/system/messages.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询专家一对一聊天消息列表 +export function listMessages(query) { + return request({ + url: '/system/messages/list', + method: 'get', + params: query + }) +} + +// 查询专家一对一聊天消息详细 +export function getMessages(messageId) { + return request({ + url: '/system/messages/' + messageId, + method: 'get' + }) +} + +// 新增专家一对一聊天消息 +export function addMessages(data) { + return request({ + url: '/system/messages', + method: 'post', + data: data + }) +} + +// 修改专家一对一聊天消息 +export function updateMessages(data) { + return request({ + url: '/system/messages', + method: 'put', + data: data + }) +} + +// 删除专家一对一聊天消息 +export function delMessages(messageId) { + return request({ + url: '/system/messages/' + messageId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/system/posts.js b/chenhai-ui/src/api/system/posts.js new file mode 100644 index 0000000..482feb1 --- /dev/null +++ b/chenhai-ui/src/api/system/posts.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询帖子(包含问答和经验分享)列表 +export function listPosts(query) { + return request({ + url: '/system/posts/list', + method: 'get', + params: query + }) +} + +// 查询帖子(包含问答和经验分享)详细 +export function getPosts(postId) { + return request({ + url: '/system/posts/' + postId, + method: 'get' + }) +} + +// 新增帖子(包含问答和经验分享) +export function addPosts(data) { + return request({ + url: '/system/posts', + method: 'post', + data: data + }) +} + +// 修改帖子(包含问答和经验分享) +export function updatePosts(data) { + return request({ + url: '/system/posts', + method: 'put', + data: data + }) +} + +// 删除帖子(包含问答和经验分享) +export function delPosts(postId) { + return request({ + url: '/system/posts/' + postId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/system/qualification.js b/chenhai-ui/src/api/system/qualification.js new file mode 100644 index 0000000..6f0eda5 --- /dev/null +++ b/chenhai-ui/src/api/system/qualification.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询兽医资质列表 +export function listQualification(query) { + return request({ + url: '/system/qualification/list', + method: 'get', + params: query + }) +} + +// 查询兽医资质详细 +export function getQualification(qualificationId) { + return request({ + url: '/system/qualification/' + qualificationId, + method: 'get' + }) +} + +// 新增兽医资质 +export function addQualification(data) { + return request({ + url: '/system/qualification', + method: 'post', + data: data + }) +} + +// 修改兽医资质 +export function updateQualification(data) { + return request({ + url: '/system/qualification', + method: 'put', + data: data + }) +} + +// 删除兽医资质 +export function delQualification(qualificationId) { + return request({ + url: '/system/qualification/' + qualificationId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/system/replies.js b/chenhai-ui/src/api/system/replies.js new file mode 100644 index 0000000..baddf54 --- /dev/null +++ b/chenhai-ui/src/api/system/replies.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询兽医回复列表 +export function listReplies(query) { + return request({ + url: '/system/replies/list', + method: 'get', + params: query + }) +} + +// 查询兽医回复详细 +export function getReplies(replyId) { + return request({ + url: '/system/replies/' + replyId, + method: 'get' + }) +} + +// 新增兽医回复 +export function addReplies(data) { + return request({ + url: '/system/replies', + method: 'post', + data: data + }) +} + +// 修改兽医回复 +export function updateReplies(data) { + return request({ + url: '/system/replies', + method: 'put', + data: data + }) +} + +// 删除兽医回复 +export function delReplies(replyId) { + return request({ + url: '/system/replies/' + replyId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/system/status.js b/chenhai-ui/src/api/system/status.js new file mode 100644 index 0000000..703ddf0 --- /dev/null +++ b/chenhai-ui/src/api/system/status.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询专家在线状态列表 +export function listStatus(query) { + return request({ + url: '/system/status/list', + method: 'get', + params: query + }) +} + +// 查询专家在线状态详细 +export function getStatus(statusId) { + return request({ + url: '/system/status/' + statusId, + method: 'get' + }) +} + +// 新增专家在线状态 +export function addStatus(data) { + return request({ + url: '/system/status', + method: 'post', + data: data + }) +} + +// 修改专家在线状态 +export function updateStatus(data) { + return request({ + url: '/system/status', + method: 'put', + data: data + }) +} + +// 删除专家在线状态 +export function delStatus(statusId) { + return request({ + url: '/system/status/' + statusId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/views/system/comments/index.vue b/chenhai-ui/src/views/system/comments/index.vue new file mode 100644 index 0000000..7d888bb --- /dev/null +++ b/chenhai-ui/src/views/system/comments/index.vue @@ -0,0 +1,357 @@ + + + diff --git a/chenhai-ui/src/views/system/forms/index.vue b/chenhai-ui/src/views/system/forms/index.vue new file mode 100644 index 0000000..c1bbdc2 --- /dev/null +++ b/chenhai-ui/src/views/system/forms/index.vue @@ -0,0 +1,331 @@ + + + diff --git a/chenhai-ui/src/views/system/library/index.vue b/chenhai-ui/src/views/system/library/index.vue new file mode 100644 index 0000000..fbdff33 --- /dev/null +++ b/chenhai-ui/src/views/system/library/index.vue @@ -0,0 +1,314 @@ + + + diff --git a/chenhai-ui/src/views/system/messages/index.vue b/chenhai-ui/src/views/system/messages/index.vue new file mode 100644 index 0000000..d036f56 --- /dev/null +++ b/chenhai-ui/src/views/system/messages/index.vue @@ -0,0 +1,368 @@ + + + diff --git a/chenhai-ui/src/views/system/posts/index.vue b/chenhai-ui/src/views/system/posts/index.vue new file mode 100644 index 0000000..d3147a4 --- /dev/null +++ b/chenhai-ui/src/views/system/posts/index.vue @@ -0,0 +1,435 @@ + + + diff --git a/chenhai-ui/src/views/system/qualification/index.vue b/chenhai-ui/src/views/system/qualification/index.vue new file mode 100644 index 0000000..ba550d2 --- /dev/null +++ b/chenhai-ui/src/views/system/qualification/index.vue @@ -0,0 +1,392 @@ + + + diff --git a/chenhai-ui/src/views/system/replies/index.vue b/chenhai-ui/src/views/system/replies/index.vue new file mode 100644 index 0000000..8732eb4 --- /dev/null +++ b/chenhai-ui/src/views/system/replies/index.vue @@ -0,0 +1,334 @@ + + + diff --git a/chenhai-ui/src/views/system/status/index.vue b/chenhai-ui/src/views/system/status/index.vue new file mode 100644 index 0000000..48e394f --- /dev/null +++ b/chenhai-ui/src/views/system/status/index.vue @@ -0,0 +1,339 @@ + + + diff --git a/chenhai-ui/vue.config.js b/chenhai-ui/vue.config.js index 7dda922..d1e3da0 100644 --- a/chenhai-ui/vue.config.js +++ b/chenhai-ui/vue.config.js @@ -9,8 +9,7 @@ const CompressionPlugin = require('compression-webpack-plugin') const name = process.env.VUE_APP_TITLE || '"与牧同行"' // 网页标题 -const baseUrl = 'http://localhost:8080' // 后端接口 - +const baseUrl = 'http://localhost:8081' // 后端接 const port = process.env.port || process.env.npm_config_port || 80 // 端口 // vue.config.js 配置说明 @@ -98,39 +97,39 @@ module.exports = { .end() config.when(process.env.NODE_ENV !== 'development', config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) - .end() + config + .plugin('ScriptExtHtmlWebpackPlugin') + .after('html') + .use('script-ext-html-webpack-plugin', [{ + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/ + }]) + .end() - config.optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm - priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }) - config.optimization.runtimeChunk('single') + config.optimization.splitChunks({ + chunks: 'all', + cacheGroups: { + libs: { + name: 'chunk-libs', + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: 'initial' // only package third parties that are initially dependent + }, + elementUI: { + name: 'chunk-elementUI', // split elementUI into a single package + test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm + priority: 20 // the weight needs to be larger than libs and app or it will be packaged into libs or app + }, + commons: { + name: 'chunk-commons', + test: resolve('src/components'), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true + } + } + }) + config.optimization.runtimeChunk('single') }) } }