74 changed files with 7252 additions and 1627 deletions
-
98chenhai-admin/src/main/java/com/chenhai/web/controller/system/CommentsController.java
-
98chenhai-admin/src/main/java/com/chenhai/web/controller/system/ConsultationFormsController.java
-
98chenhai-admin/src/main/java/com/chenhai/web/controller/system/ExpertMessagesController.java
-
98chenhai-admin/src/main/java/com/chenhai/web/controller/system/PostsController.java
-
98chenhai-admin/src/main/java/com/chenhai/web/controller/system/SensitiveWordsLibraryController.java
-
98chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetOnlineStatusController.java
-
98chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetQualificationController.java
-
98chenhai-admin/src/main/java/com/chenhai/web/controller/system/VetRepliesController.java
-
2chenhai-admin/src/main/resources/application-druid.yml
-
2chenhai-admin/src/main/resources/application.yml
-
191chenhai-system/src/main/java/com/chenhai/system/domain/Comments.java
-
187chenhai-system/src/main/java/com/chenhai/system/domain/ConsultationForms.java
-
176chenhai-system/src/main/java/com/chenhai/system/domain/ExpertMessages.java
-
283chenhai-system/src/main/java/com/chenhai/system/domain/Posts.java
-
131chenhai-system/src/main/java/com/chenhai/system/domain/SensitiveWordsLibrary.java
-
146chenhai-system/src/main/java/com/chenhai/system/domain/VetOnlineStatus.java
-
211chenhai-system/src/main/java/com/chenhai/system/domain/VetQualification.java
-
131chenhai-system/src/main/java/com/chenhai/system/domain/VetReplies.java
-
63chenhai-system/src/main/java/com/chenhai/system/mapper/CommentsMapper.java
-
63chenhai-system/src/main/java/com/chenhai/system/mapper/ConsultationFormsMapper.java
-
63chenhai-system/src/main/java/com/chenhai/system/mapper/ExpertMessagesMapper.java
-
63chenhai-system/src/main/java/com/chenhai/system/mapper/PostsMapper.java
-
63chenhai-system/src/main/java/com/chenhai/system/mapper/SensitiveWordsLibraryMapper.java
-
63chenhai-system/src/main/java/com/chenhai/system/mapper/VetOnlineStatusMapper.java
-
63chenhai-system/src/main/java/com/chenhai/system/mapper/VetQualificationMapper.java
-
63chenhai-system/src/main/java/com/chenhai/system/mapper/VetRepliesMapper.java
-
62chenhai-system/src/main/java/com/chenhai/system/service/vet/ICommentsService.java
-
62chenhai-system/src/main/java/com/chenhai/system/service/vet/IConsultationFormsService.java
-
62chenhai-system/src/main/java/com/chenhai/system/service/vet/IExpertMessagesService.java
-
62chenhai-system/src/main/java/com/chenhai/system/service/vet/IPostsService.java
-
62chenhai-system/src/main/java/com/chenhai/system/service/vet/ISensitiveWordsLibraryService.java
-
62chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetOnlineStatusService.java
-
62chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetQualificationService.java
-
62chenhai-system/src/main/java/com/chenhai/system/service/vet/IVetRepliesService.java
-
94chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/CommentsServiceImpl.java
-
94chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/ConsultationFormsServiceImpl.java
-
94chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/ExpertMessagesServiceImpl.java
-
94chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/PostsServiceImpl.java
-
94chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/SensitiveWordsLibraryServiceImpl.java
-
94chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetOnlineStatusServiceImpl.java
-
97chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetQualificationServiceImpl.java
-
94chenhai-system/src/main/java/com/chenhai/system/service/vet/impl/VetRepliesServiceImpl.java
-
117chenhai-system/src/main/resources/mapper/system/SysConfigMapper.xml
-
159chenhai-system/src/main/resources/mapper/system/SysDeptMapper.xml
-
124chenhai-system/src/main/resources/mapper/system/SysDictDataMapper.xml
-
105chenhai-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
-
57chenhai-system/src/main/resources/mapper/system/SysLogininforMapper.xml
-
206chenhai-system/src/main/resources/mapper/system/SysMenuMapper.xml
-
89chenhai-system/src/main/resources/mapper/system/SysNoticeMapper.xml
-
87chenhai-system/src/main/resources/mapper/system/SysOperLogMapper.xml
-
122chenhai-system/src/main/resources/mapper/system/SysPostMapper.xml
-
34chenhai-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml
-
152chenhai-system/src/main/resources/mapper/system/SysRoleMapper.xml
-
34chenhai-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml
-
227chenhai-system/src/main/resources/mapper/system/SysUserMapper.xml
-
34chenhai-system/src/main/resources/mapper/system/SysUserPostMapper.xml
-
44chenhai-system/src/main/resources/mapper/system/SysUserRoleMapper.xml
-
44chenhai-ui/src/api/system/comments.js
-
44chenhai-ui/src/api/system/forms.js
-
44chenhai-ui/src/api/system/library.js
-
44chenhai-ui/src/api/system/messages.js
-
44chenhai-ui/src/api/system/posts.js
-
44chenhai-ui/src/api/system/qualification.js
-
44chenhai-ui/src/api/system/replies.js
-
44chenhai-ui/src/api/system/status.js
-
357chenhai-ui/src/views/system/comments/index.vue
-
331chenhai-ui/src/views/system/forms/index.vue
-
314chenhai-ui/src/views/system/library/index.vue
-
368chenhai-ui/src/views/system/messages/index.vue
-
435chenhai-ui/src/views/system/posts/index.vue
-
392chenhai-ui/src/views/system/qualification/index.vue
-
334chenhai-ui/src/views/system/replies/index.vue
-
339chenhai-ui/src/views/system/status/index.vue
-
67chenhai-ui/vue.config.js
@ -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<Comments> 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<Comments> list = commentsService.selectCommentsList(comments); |
||||
|
ExcelUtil<Comments> util = new ExcelUtil<Comments>(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)); |
||||
|
} |
||||
|
} |
||||
@ -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<ConsultationForms> 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<ConsultationForms> list = consultationFormsService.selectConsultationFormsList(consultationForms); |
||||
|
ExcelUtil<ConsultationForms> util = new ExcelUtil<ConsultationForms>(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)); |
||||
|
} |
||||
|
} |
||||
@ -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<ExpertMessages> 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<ExpertMessages> list = expertMessagesService.selectExpertMessagesList(expertMessages); |
||||
|
ExcelUtil<ExpertMessages> util = new ExcelUtil<ExpertMessages>(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)); |
||||
|
} |
||||
|
} |
||||
@ -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<Posts> 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<Posts> list = postsService.selectPostsList(posts); |
||||
|
ExcelUtil<Posts> util = new ExcelUtil<Posts>(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)); |
||||
|
} |
||||
|
} |
||||
@ -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<SensitiveWordsLibrary> 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<SensitiveWordsLibrary> list = sensitiveWordsLibraryService.selectSensitiveWordsLibraryList(sensitiveWordsLibrary); |
||||
|
ExcelUtil<SensitiveWordsLibrary> util = new ExcelUtil<SensitiveWordsLibrary>(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)); |
||||
|
} |
||||
|
} |
||||
@ -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<VetOnlineStatus> 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<VetOnlineStatus> list = vetOnlineStatusService.selectVetOnlineStatusList(vetOnlineStatus); |
||||
|
ExcelUtil<VetOnlineStatus> util = new ExcelUtil<VetOnlineStatus>(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)); |
||||
|
} |
||||
|
} |
||||
@ -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<VetQualification> 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<VetQualification> list = vetQualificationService.selectVetQualificationList(vetQualification); |
||||
|
ExcelUtil<VetQualification> util = new ExcelUtil<VetQualification>(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)); |
||||
|
} |
||||
|
} |
||||
@ -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<VetReplies> 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<VetReplies> list = vetRepliesService.selectVetRepliesList(vetReplies); |
||||
|
ExcelUtil<VetReplies> util = new ExcelUtil<VetReplies>(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)); |
||||
|
} |
||||
|
} |
||||
@ -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(); |
||||
|
} |
||||
|
} |
||||
@ -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(); |
||||
|
} |
||||
|
} |
||||
@ -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(); |
||||
|
} |
||||
|
} |
||||
@ -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(); |
||||
|
} |
||||
|
} |
||||
@ -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(); |
||||
|
} |
||||
|
} |
||||
@ -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(); |
||||
|
} |
||||
|
} |
||||
@ -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(); |
||||
|
} |
||||
|
} |
||||
@ -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(); |
||||
|
} |
||||
|
} |
||||
@ -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<Comments> 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); |
||||
|
} |
||||
@ -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<ConsultationForms> 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); |
||||
|
} |
||||
@ -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<ExpertMessages> 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); |
||||
|
} |
||||
@ -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<Posts> 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); |
||||
|
} |
||||
@ -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<SensitiveWordsLibrary> 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); |
||||
|
} |
||||
@ -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<VetOnlineStatus> 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); |
||||
|
} |
||||
@ -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<VetQualification> 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); |
||||
|
} |
||||
@ -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<VetReplies> 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); |
||||
|
} |
||||
@ -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<Comments> 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); |
||||
|
} |
||||
@ -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<ConsultationForms> 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); |
||||
|
} |
||||
@ -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<ExpertMessages> 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); |
||||
|
} |
||||
@ -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<Posts> 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); |
||||
|
} |
||||
@ -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<SensitiveWordsLibrary> 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); |
||||
|
} |
||||
@ -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<VetOnlineStatus> 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); |
||||
|
} |
||||
@ -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<VetQualification> 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); |
||||
|
} |
||||
@ -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<VetReplies> 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); |
||||
|
} |
||||
@ -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<Comments> 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); |
||||
|
} |
||||
|
} |
||||
@ -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<ConsultationForms> 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); |
||||
|
} |
||||
|
} |
||||
@ -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<ExpertMessages> 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); |
||||
|
} |
||||
|
} |
||||
@ -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<Posts> 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); |
||||
|
} |
||||
|
} |
||||
@ -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<SensitiveWordsLibrary> 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); |
||||
|
} |
||||
|
} |
||||
@ -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<VetOnlineStatus> 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); |
||||
|
} |
||||
|
} |
||||
@ -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<VetQualification> 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); |
||||
|
} |
||||
|
} |
||||
@ -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<VetReplies> 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); |
||||
|
} |
||||
|
} |
||||
@ -1,117 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysConfigMapper"> |
|
||||
|
|
||||
<resultMap type="SysConfig" id="SysConfigResult"> |
|
||||
<id property="configId" column="config_id" /> |
|
||||
<result property="configName" column="config_name" /> |
|
||||
<result property="configKey" column="config_key" /> |
|
||||
<result property="configValue" column="config_value" /> |
|
||||
<result property="configType" column="config_type" /> |
|
||||
<result property="createBy" column="create_by" /> |
|
||||
<result property="createTime" column="create_time" /> |
|
||||
<result property="updateBy" column="update_by" /> |
|
||||
<result property="updateTime" column="update_time" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectConfigVo"> |
|
||||
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark |
|
||||
from sys_config |
|
||||
</sql> |
|
||||
|
|
||||
<!-- 查询条件 --> |
|
||||
<sql id="sqlwhereSearch"> |
|
||||
<where> |
|
||||
<if test="configId !=null"> |
|
||||
and config_id = #{configId} |
|
||||
</if> |
|
||||
<if test="configKey !=null and configKey != ''"> |
|
||||
and config_key = #{configKey} |
|
||||
</if> |
|
||||
</where> |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult"> |
|
||||
<include refid="selectConfigVo"/> |
|
||||
<include refid="sqlwhereSearch"/> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult"> |
|
||||
<include refid="selectConfigVo"/> |
|
||||
<where> |
|
||||
<if test="configName != null and configName != ''"> |
|
||||
AND config_name like concat('%', #{configName}, '%') |
|
||||
</if> |
|
||||
<if test="configType != null and configType != ''"> |
|
||||
AND config_type = #{configType} |
|
||||
</if> |
|
||||
<if test="configKey != null and configKey != ''"> |
|
||||
AND config_key like concat('%', #{configKey}, '%') |
|
||||
</if> |
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
|
||||
and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') |
|
||||
</if> |
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
|
||||
and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
|
||||
</if> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult"> |
|
||||
<include refid="selectConfigVo"/> |
|
||||
where config_id = #{configId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult"> |
|
||||
<include refid="selectConfigVo"/> |
|
||||
where config_key = #{configKey} limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<insert id="insertConfig" parameterType="SysConfig"> |
|
||||
insert into sys_config ( |
|
||||
<if test="configName != null and configName != '' ">config_name,</if> |
|
||||
<if test="configKey != null and configKey != '' ">config_key,</if> |
|
||||
<if test="configValue != null and configValue != '' ">config_value,</if> |
|
||||
<if test="configType != null and configType != '' ">config_type,</if> |
|
||||
<if test="createBy != null and createBy != ''">create_by,</if> |
|
||||
<if test="remark != null and remark != ''">remark,</if> |
|
||||
create_time |
|
||||
)values( |
|
||||
<if test="configName != null and configName != ''">#{configName},</if> |
|
||||
<if test="configKey != null and configKey != ''">#{configKey},</if> |
|
||||
<if test="configValue != null and configValue != ''">#{configValue},</if> |
|
||||
<if test="configType != null and configType != ''">#{configType},</if> |
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
||||
<if test="remark != null and remark != ''">#{remark},</if> |
|
||||
sysdate() |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<update id="updateConfig" parameterType="SysConfig"> |
|
||||
update sys_config |
|
||||
<set> |
|
||||
<if test="configName != null and configName != ''">config_name = #{configName},</if> |
|
||||
<if test="configKey != null and configKey != ''">config_key = #{configKey},</if> |
|
||||
<if test="configValue != null and configValue != ''">config_value = #{configValue},</if> |
|
||||
<if test="configType != null and configType != ''">config_type = #{configType},</if> |
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
||||
<if test="remark != null">remark = #{remark},</if> |
|
||||
update_time = sysdate() |
|
||||
</set> |
|
||||
where config_id = #{configId} |
|
||||
</update> |
|
||||
|
|
||||
<delete id="deleteConfigById" parameterType="Long"> |
|
||||
delete from sys_config where config_id = #{configId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteConfigByIds" parameterType="Long"> |
|
||||
delete from sys_config where config_id in |
|
||||
<foreach item="configId" collection="array" open="(" separator="," close=")"> |
|
||||
#{configId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,159 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysDeptMapper"> |
|
||||
|
|
||||
<resultMap type="SysDept" id="SysDeptResult"> |
|
||||
<id property="deptId" column="dept_id" /> |
|
||||
<result property="parentId" column="parent_id" /> |
|
||||
<result property="ancestors" column="ancestors" /> |
|
||||
<result property="deptName" column="dept_name" /> |
|
||||
<result property="orderNum" column="order_num" /> |
|
||||
<result property="leader" column="leader" /> |
|
||||
<result property="phone" column="phone" /> |
|
||||
<result property="email" column="email" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="delFlag" column="del_flag" /> |
|
||||
<result property="parentName" column="parent_name" /> |
|
||||
<result property="createBy" column="create_by" /> |
|
||||
<result property="createTime" column="create_time" /> |
|
||||
<result property="updateBy" column="update_by" /> |
|
||||
<result property="updateTime" column="update_time" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectDeptVo"> |
|
||||
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 |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult"> |
|
||||
<include refid="selectDeptVo"/> |
|
||||
where d.del_flag = '0' |
|
||||
<if test="deptId != null and deptId != 0"> |
|
||||
AND dept_id = #{deptId} |
|
||||
</if> |
|
||||
<if test="parentId != null and parentId != 0"> |
|
||||
AND parent_id = #{parentId} |
|
||||
</if> |
|
||||
<if test="deptName != null and deptName != ''"> |
|
||||
AND dept_name like concat('%', #{deptName}, '%') |
|
||||
</if> |
|
||||
<if test="status != null and status != ''"> |
|
||||
AND status = #{status} |
|
||||
</if> |
|
||||
<!-- 数据范围过滤 --> |
|
||||
${params.dataScope} |
|
||||
order by d.parent_id, d.order_num |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectDeptListByRoleId" resultType="Long"> |
|
||||
select d.dept_id |
|
||||
from sys_dept d |
|
||||
left join sys_role_dept rd on d.dept_id = rd.dept_id |
|
||||
where rd.role_id = #{roleId} |
|
||||
<if test="deptCheckStrictly"> |
|
||||
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId}) |
|
||||
</if> |
|
||||
order by d.parent_id, d.order_num |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> |
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, |
|
||||
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name |
|
||||
from sys_dept d |
|
||||
where d.dept_id = #{deptId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkDeptExistUser" parameterType="Long" resultType="int"> |
|
||||
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0' |
|
||||
</select> |
|
||||
|
|
||||
<select id="hasChildByDeptId" parameterType="Long" resultType="int"> |
|
||||
select count(1) from sys_dept |
|
||||
where del_flag = '0' and parent_id = #{deptId} limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult"> |
|
||||
select * from sys_dept where find_in_set(#{deptId}, ancestors) |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int"> |
|
||||
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors) |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkDeptNameUnique" resultMap="SysDeptResult"> |
|
||||
<include refid="selectDeptVo"/> |
|
||||
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<insert id="insertDept" parameterType="SysDept"> |
|
||||
insert into sys_dept( |
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if> |
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if> |
|
||||
<if test="deptName != null and deptName != ''">dept_name,</if> |
|
||||
<if test="ancestors != null and ancestors != ''">ancestors,</if> |
|
||||
<if test="orderNum != null">order_num,</if> |
|
||||
<if test="leader != null and leader != ''">leader,</if> |
|
||||
<if test="phone != null and phone != ''">phone,</if> |
|
||||
<if test="email != null and email != ''">email,</if> |
|
||||
<if test="status != null">status,</if> |
|
||||
<if test="createBy != null and createBy != ''">create_by,</if> |
|
||||
create_time |
|
||||
)values( |
|
||||
<if test="deptId != null and deptId != 0">#{deptId},</if> |
|
||||
<if test="parentId != null and parentId != 0">#{parentId},</if> |
|
||||
<if test="deptName != null and deptName != ''">#{deptName},</if> |
|
||||
<if test="ancestors != null and ancestors != ''">#{ancestors},</if> |
|
||||
<if test="orderNum != null">#{orderNum},</if> |
|
||||
<if test="leader != null and leader != ''">#{leader},</if> |
|
||||
<if test="phone != null and phone != ''">#{phone},</if> |
|
||||
<if test="email != null and email != ''">#{email},</if> |
|
||||
<if test="status != null">#{status},</if> |
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
||||
sysdate() |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<update id="updateDept" parameterType="SysDept"> |
|
||||
update sys_dept |
|
||||
<set> |
|
||||
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if> |
|
||||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if> |
|
||||
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if> |
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if> |
|
||||
<if test="leader != null">leader = #{leader},</if> |
|
||||
<if test="phone != null">phone = #{phone},</if> |
|
||||
<if test="email != null">email = #{email},</if> |
|
||||
<if test="status != null and status != ''">status = #{status},</if> |
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
||||
update_time = sysdate() |
|
||||
</set> |
|
||||
where dept_id = #{deptId} |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateDeptChildren" parameterType="java.util.List"> |
|
||||
update sys_dept set ancestors = |
|
||||
<foreach collection="depts" item="item" index="index" |
|
||||
separator=" " open="case dept_id" close="end"> |
|
||||
when #{item.deptId} then #{item.ancestors} |
|
||||
</foreach> |
|
||||
where dept_id in |
|
||||
<foreach collection="depts" item="item" index="index" |
|
||||
separator="," open="(" close=")"> |
|
||||
#{item.deptId} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateDeptStatusNormal" parameterType="Long"> |
|
||||
update sys_dept set status = '0' where dept_id in |
|
||||
<foreach collection="array" item="deptId" open="(" separator="," close=")"> |
|
||||
#{deptId} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
|
|
||||
<delete id="deleteDeptById" parameterType="Long"> |
|
||||
update sys_dept set del_flag = '2' where dept_id = #{deptId} |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,124 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysDictDataMapper"> |
|
||||
|
|
||||
<resultMap type="SysDictData" id="SysDictDataResult"> |
|
||||
<id property="dictCode" column="dict_code" /> |
|
||||
<result property="dictSort" column="dict_sort" /> |
|
||||
<result property="dictLabel" column="dict_label" /> |
|
||||
<result property="dictValue" column="dict_value" /> |
|
||||
<result property="dictType" column="dict_type" /> |
|
||||
<result property="cssClass" column="css_class" /> |
|
||||
<result property="listClass" column="list_class" /> |
|
||||
<result property="isDefault" column="is_default" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="createBy" column="create_by" /> |
|
||||
<result property="createTime" column="create_time" /> |
|
||||
<result property="updateBy" column="update_by" /> |
|
||||
<result property="updateTime" column="update_time" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectDictDataVo"> |
|
||||
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 |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult"> |
|
||||
<include refid="selectDictDataVo"/> |
|
||||
<where> |
|
||||
<if test="dictType != null and dictType != ''"> |
|
||||
AND dict_type = #{dictType} |
|
||||
</if> |
|
||||
<if test="dictLabel != null and dictLabel != ''"> |
|
||||
AND dict_label like concat('%', #{dictLabel}, '%') |
|
||||
</if> |
|
||||
<if test="status != null and status != ''"> |
|
||||
AND status = #{status} |
|
||||
</if> |
|
||||
</where> |
|
||||
order by dict_sort asc |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectDictDataByType" parameterType="String" resultMap="SysDictDataResult"> |
|
||||
<include refid="selectDictDataVo"/> |
|
||||
where status = '0' and dict_type = #{dictType} order by dict_sort asc |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectDictLabel" resultType="String"> |
|
||||
select dict_label from sys_dict_data |
|
||||
where dict_type = #{dictType} and dict_value = #{dictValue} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult"> |
|
||||
<include refid="selectDictDataVo"/> |
|
||||
where dict_code = #{dictCode} |
|
||||
</select> |
|
||||
|
|
||||
<select id="countDictDataByType" resultType="Integer"> |
|
||||
select count(1) from sys_dict_data where dict_type=#{dictType} |
|
||||
</select> |
|
||||
|
|
||||
<delete id="deleteDictDataById" parameterType="Long"> |
|
||||
delete from sys_dict_data where dict_code = #{dictCode} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteDictDataByIds" parameterType="Long"> |
|
||||
delete from sys_dict_data where dict_code in |
|
||||
<foreach collection="array" item="dictCode" open="(" separator="," close=")"> |
|
||||
#{dictCode} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<update id="updateDictData" parameterType="SysDictData"> |
|
||||
update sys_dict_data |
|
||||
<set> |
|
||||
<if test="dictSort != null">dict_sort = #{dictSort},</if> |
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if> |
|
||||
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if> |
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> |
|
||||
<if test="cssClass != null">css_class = #{cssClass},</if> |
|
||||
<if test="listClass != null">list_class = #{listClass},</if> |
|
||||
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if> |
|
||||
<if test="status != null">status = #{status},</if> |
|
||||
<if test="remark != null">remark = #{remark},</if> |
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
||||
update_time = sysdate() |
|
||||
</set> |
|
||||
where dict_code = #{dictCode} |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateDictDataType" parameterType="String"> |
|
||||
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} |
|
||||
</update> |
|
||||
|
|
||||
<insert id="insertDictData" parameterType="SysDictData"> |
|
||||
insert into sys_dict_data( |
|
||||
<if test="dictSort != null">dict_sort,</if> |
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if> |
|
||||
<if test="dictValue != null and dictValue != ''">dict_value,</if> |
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if> |
|
||||
<if test="cssClass != null and cssClass != ''">css_class,</if> |
|
||||
<if test="listClass != null and listClass != ''">list_class,</if> |
|
||||
<if test="isDefault != null and isDefault != ''">is_default,</if> |
|
||||
<if test="status != null">status,</if> |
|
||||
<if test="remark != null and remark != ''">remark,</if> |
|
||||
<if test="createBy != null and createBy != ''">create_by,</if> |
|
||||
create_time |
|
||||
)values( |
|
||||
<if test="dictSort != null">#{dictSort},</if> |
|
||||
<if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if> |
|
||||
<if test="dictValue != null and dictValue != ''">#{dictValue},</if> |
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if> |
|
||||
<if test="cssClass != null and cssClass != ''">#{cssClass},</if> |
|
||||
<if test="listClass != null and listClass != ''">#{listClass},</if> |
|
||||
<if test="isDefault != null and isDefault != ''">#{isDefault},</if> |
|
||||
<if test="status != null">#{status},</if> |
|
||||
<if test="remark != null and remark != ''">#{remark},</if> |
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
||||
sysdate() |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,105 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysDictTypeMapper"> |
|
||||
|
|
||||
<resultMap type="SysDictType" id="SysDictTypeResult"> |
|
||||
<id property="dictId" column="dict_id" /> |
|
||||
<result property="dictName" column="dict_name" /> |
|
||||
<result property="dictType" column="dict_type" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="createBy" column="create_by" /> |
|
||||
<result property="createTime" column="create_time" /> |
|
||||
<result property="updateBy" column="update_by" /> |
|
||||
<result property="updateTime" column="update_time" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectDictTypeVo"> |
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark |
|
||||
from sys_dict_type |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult"> |
|
||||
<include refid="selectDictTypeVo"/> |
|
||||
<where> |
|
||||
<if test="dictName != null and dictName != ''"> |
|
||||
AND dict_name like concat('%', #{dictName}, '%') |
|
||||
</if> |
|
||||
<if test="status != null and status != ''"> |
|
||||
AND status = #{status} |
|
||||
</if> |
|
||||
<if test="dictType != null and dictType != ''"> |
|
||||
AND dict_type like concat('%', #{dictType}, '%') |
|
||||
</if> |
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
|
||||
and date_format(create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') |
|
||||
</if> |
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
|
||||
and date_format(create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
|
||||
</if> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectDictTypeAll" resultMap="SysDictTypeResult"> |
|
||||
<include refid="selectDictTypeVo"/> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult"> |
|
||||
<include refid="selectDictTypeVo"/> |
|
||||
where dict_id = #{dictId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult"> |
|
||||
<include refid="selectDictTypeVo"/> |
|
||||
where dict_type = #{dictType} |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult"> |
|
||||
<include refid="selectDictTypeVo"/> |
|
||||
where dict_type = #{dictType} limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<delete id="deleteDictTypeById" parameterType="Long"> |
|
||||
delete from sys_dict_type where dict_id = #{dictId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteDictTypeByIds" parameterType="Long"> |
|
||||
delete from sys_dict_type where dict_id in |
|
||||
<foreach collection="array" item="dictId" open="(" separator="," close=")"> |
|
||||
#{dictId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<update id="updateDictType" parameterType="SysDictType"> |
|
||||
update sys_dict_type |
|
||||
<set> |
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if> |
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> |
|
||||
<if test="status != null">status = #{status},</if> |
|
||||
<if test="remark != null">remark = #{remark},</if> |
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
||||
update_time = sysdate() |
|
||||
</set> |
|
||||
where dict_id = #{dictId} |
|
||||
</update> |
|
||||
|
|
||||
<insert id="insertDictType" parameterType="SysDictType"> |
|
||||
insert into sys_dict_type( |
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if> |
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if> |
|
||||
<if test="status != null">status,</if> |
|
||||
<if test="remark != null and remark != ''">remark,</if> |
|
||||
<if test="createBy != null and createBy != ''">create_by,</if> |
|
||||
create_time |
|
||||
)values( |
|
||||
<if test="dictName != null and dictName != ''">#{dictName},</if> |
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if> |
|
||||
<if test="status != null">#{status},</if> |
|
||||
<if test="remark != null and remark != ''">#{remark},</if> |
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
||||
sysdate() |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,57 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysLogininforMapper"> |
|
||||
|
|
||||
<resultMap type="SysLogininfor" id="SysLogininforResult"> |
|
||||
<id property="infoId" column="info_id" /> |
|
||||
<result property="userName" column="user_name" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="ipaddr" column="ipaddr" /> |
|
||||
<result property="loginLocation" column="login_location" /> |
|
||||
<result property="browser" column="browser" /> |
|
||||
<result property="os" column="os" /> |
|
||||
<result property="msg" column="msg" /> |
|
||||
<result property="loginTime" column="login_time" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<insert id="insertLogininfor" parameterType="SysLogininfor"> |
|
||||
insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) |
|
||||
values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate()) |
|
||||
</insert> |
|
||||
|
|
||||
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult"> |
|
||||
select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor |
|
||||
<where> |
|
||||
<if test="ipaddr != null and ipaddr != ''"> |
|
||||
AND ipaddr like concat('%', #{ipaddr}, '%') |
|
||||
</if> |
|
||||
<if test="status != null and status != ''"> |
|
||||
AND status = #{status} |
|
||||
</if> |
|
||||
<if test="userName != null and userName != ''"> |
|
||||
AND user_name like concat('%', #{userName}, '%') |
|
||||
</if> |
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
|
||||
AND login_time >= #{params.beginTime} |
|
||||
</if> |
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
|
||||
AND login_time <= #{params.endTime} |
|
||||
</if> |
|
||||
</where> |
|
||||
order by info_id desc |
|
||||
</select> |
|
||||
|
|
||||
<delete id="deleteLogininforByIds" parameterType="Long"> |
|
||||
delete from sys_logininfor where info_id in |
|
||||
<foreach collection="array" item="infoId" open="(" separator="," close=")"> |
|
||||
#{infoId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<update id="cleanLogininfor"> |
|
||||
truncate table sys_logininfor |
|
||||
</update> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,206 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysMenuMapper"> |
|
||||
|
|
||||
<resultMap type="SysMenu" id="SysMenuResult"> |
|
||||
<id property="menuId" column="menu_id" /> |
|
||||
<result property="menuName" column="menu_name" /> |
|
||||
<result property="parentName" column="parent_name" /> |
|
||||
<result property="parentId" column="parent_id" /> |
|
||||
<result property="orderNum" column="order_num" /> |
|
||||
<result property="path" column="path" /> |
|
||||
<result property="component" column="component" /> |
|
||||
<result property="query" column="query" /> |
|
||||
<result property="routeName" column="route_name" /> |
|
||||
<result property="isFrame" column="is_frame" /> |
|
||||
<result property="isCache" column="is_cache" /> |
|
||||
<result property="menuType" column="menu_type" /> |
|
||||
<result property="visible" column="visible" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="perms" column="perms" /> |
|
||||
<result property="icon" column="icon" /> |
|
||||
<result property="createBy" column="create_by" /> |
|
||||
<result property="createTime" column="create_time" /> |
|
||||
<result property="updateTime" column="update_time" /> |
|
||||
<result property="updateBy" column="update_by" /> |
|
||||
<result property="remark" column="remark" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectMenuVo"> |
|
||||
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 |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult"> |
|
||||
<include refid="selectMenuVo"/> |
|
||||
<where> |
|
||||
<if test="menuName != null and menuName != ''"> |
|
||||
AND menu_name like concat('%', #{menuName}, '%') |
|
||||
</if> |
|
||||
<if test="visible != null and visible != ''"> |
|
||||
AND visible = #{visible} |
|
||||
</if> |
|
||||
<if test="status != null and status != ''"> |
|
||||
AND status = #{status} |
|
||||
</if> |
|
||||
</where> |
|
||||
order by parent_id, order_num |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectMenuTreeAll" resultMap="SysMenuResult"> |
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
|
||||
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0 |
|
||||
order by m.parent_id, m.order_num |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult"> |
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
|
||||
from sys_menu m |
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id |
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id |
|
||||
left join sys_role ro on ur.role_id = ro.role_id |
|
||||
where ur.user_id = #{params.userId} |
|
||||
<if test="menuName != null and menuName != ''"> |
|
||||
AND m.menu_name like concat('%', #{menuName}, '%') |
|
||||
</if> |
|
||||
<if test="visible != null and visible != ''"> |
|
||||
AND m.visible = #{visible} |
|
||||
</if> |
|
||||
<if test="status != null and status != ''"> |
|
||||
AND m.status = #{status} |
|
||||
</if> |
|
||||
order by m.parent_id, m.order_num |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult"> |
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
|
||||
from sys_menu m |
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id |
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id |
|
||||
left join sys_role ro on ur.role_id = ro.role_id |
|
||||
left join sys_user u on ur.user_id = u.user_id |
|
||||
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0 |
|
||||
order by m.parent_id, m.order_num |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectMenuListByRoleId" resultType="Long"> |
|
||||
select m.menu_id |
|
||||
from sys_menu m |
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id |
|
||||
where rm.role_id = #{roleId} |
|
||||
<if test="menuCheckStrictly"> |
|
||||
and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId}) |
|
||||
</if> |
|
||||
order by m.parent_id, m.order_num |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectMenuPerms" resultType="String"> |
|
||||
select distinct m.perms |
|
||||
from sys_menu m |
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id |
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String"> |
|
||||
select distinct m.perms |
|
||||
from sys_menu m |
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id |
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id |
|
||||
left join sys_role r on r.role_id = ur.role_id |
|
||||
where m.status = '0' and r.status = '0' and ur.user_id = #{userId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String"> |
|
||||
select distinct m.perms |
|
||||
from sys_menu m |
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id |
|
||||
where m.status = '0' and rm.role_id = #{roleId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult"> |
|
||||
<include refid="selectMenuVo"/> |
|
||||
where menu_id = #{menuId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="hasChildByMenuId" resultType="Integer"> |
|
||||
select count(1) from sys_menu where parent_id = #{menuId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult"> |
|
||||
<include refid="selectMenuVo"/> |
|
||||
where menu_name=#{menuName} and parent_id = #{parentId} limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<update id="updateMenu" parameterType="SysMenu"> |
|
||||
update sys_menu |
|
||||
<set> |
|
||||
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if> |
|
||||
<if test="parentId != null">parent_id = #{parentId},</if> |
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if> |
|
||||
<if test="path != null and path != ''">path = #{path},</if> |
|
||||
<if test="component != null">component = #{component},</if> |
|
||||
<if test="query != null">`query` = #{query},</if> |
|
||||
<if test="routeName != null">route_name = #{routeName},</if> |
|
||||
<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if> |
|
||||
<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if> |
|
||||
<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if> |
|
||||
<if test="visible != null">visible = #{visible},</if> |
|
||||
<if test="status != null">status = #{status},</if> |
|
||||
<if test="perms !=null">perms = #{perms},</if> |
|
||||
<if test="icon !=null and icon != ''">icon = #{icon},</if> |
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if> |
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
||||
update_time = sysdate() |
|
||||
</set> |
|
||||
where menu_id = #{menuId} |
|
||||
</update> |
|
||||
|
|
||||
<insert id="insertMenu" parameterType="SysMenu"> |
|
||||
insert into sys_menu( |
|
||||
<if test="menuId != null and menuId != 0">menu_id,</if> |
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if> |
|
||||
<if test="menuName != null and menuName != ''">menu_name,</if> |
|
||||
<if test="orderNum != null">order_num,</if> |
|
||||
<if test="path != null and path != ''">path,</if> |
|
||||
<if test="component != null and component != ''">component,</if> |
|
||||
<if test="query != null and query != ''">`query`,</if> |
|
||||
<if test="routeName != null">route_name,</if> |
|
||||
<if test="isFrame != null and isFrame != ''">is_frame,</if> |
|
||||
<if test="isCache != null and isCache != ''">is_cache,</if> |
|
||||
<if test="menuType != null and menuType != ''">menu_type,</if> |
|
||||
<if test="visible != null">visible,</if> |
|
||||
<if test="status != null">status,</if> |
|
||||
<if test="perms !=null and perms != ''">perms,</if> |
|
||||
<if test="icon != null and icon != ''">icon,</if> |
|
||||
<if test="remark != null and remark != ''">remark,</if> |
|
||||
<if test="createBy != null and createBy != ''">create_by,</if> |
|
||||
create_time |
|
||||
)values( |
|
||||
<if test="menuId != null and menuId != 0">#{menuId},</if> |
|
||||
<if test="parentId != null and parentId != 0">#{parentId},</if> |
|
||||
<if test="menuName != null and menuName != ''">#{menuName},</if> |
|
||||
<if test="orderNum != null">#{orderNum},</if> |
|
||||
<if test="path != null and path != ''">#{path},</if> |
|
||||
<if test="component != null and component != ''">#{component},</if> |
|
||||
<if test="query != null and query != ''">#{query},</if> |
|
||||
<if test="routeName != null">#{routeName},</if> |
|
||||
<if test="isFrame != null and isFrame != ''">#{isFrame},</if> |
|
||||
<if test="isCache != null and isCache != ''">#{isCache},</if> |
|
||||
<if test="menuType != null and menuType != ''">#{menuType},</if> |
|
||||
<if test="visible != null">#{visible},</if> |
|
||||
<if test="status != null">#{status},</if> |
|
||||
<if test="perms !=null and perms != ''">#{perms},</if> |
|
||||
<if test="icon != null and icon != ''">#{icon},</if> |
|
||||
<if test="remark != null and remark != ''">#{remark},</if> |
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
||||
sysdate() |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<delete id="deleteMenuById" parameterType="Long"> |
|
||||
delete from sys_menu where menu_id = #{menuId} |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,89 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysNoticeMapper"> |
|
||||
|
|
||||
<resultMap type="SysNotice" id="SysNoticeResult"> |
|
||||
<result property="noticeId" column="notice_id" /> |
|
||||
<result property="noticeTitle" column="notice_title" /> |
|
||||
<result property="noticeType" column="notice_type" /> |
|
||||
<result property="noticeContent" column="notice_content" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="createBy" column="create_by" /> |
|
||||
<result property="createTime" column="create_time" /> |
|
||||
<result property="updateBy" column="update_by" /> |
|
||||
<result property="updateTime" column="update_time" /> |
|
||||
<result property="remark" column="remark" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectNoticeVo"> |
|
||||
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 |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult"> |
|
||||
<include refid="selectNoticeVo"/> |
|
||||
where notice_id = #{noticeId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult"> |
|
||||
<include refid="selectNoticeVo"/> |
|
||||
<where> |
|
||||
<if test="noticeTitle != null and noticeTitle != ''"> |
|
||||
AND notice_title like concat('%', #{noticeTitle}, '%') |
|
||||
</if> |
|
||||
<if test="noticeType != null and noticeType != ''"> |
|
||||
AND notice_type = #{noticeType} |
|
||||
</if> |
|
||||
<if test="createBy != null and createBy != ''"> |
|
||||
AND create_by like concat('%', #{createBy}, '%') |
|
||||
</if> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<insert id="insertNotice" parameterType="SysNotice"> |
|
||||
insert into sys_notice ( |
|
||||
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if> |
|
||||
<if test="noticeType != null and noticeType != '' ">notice_type, </if> |
|
||||
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if> |
|
||||
<if test="status != null and status != '' ">status, </if> |
|
||||
<if test="remark != null and remark != ''">remark,</if> |
|
||||
<if test="createBy != null and createBy != ''">create_by,</if> |
|
||||
create_time |
|
||||
)values( |
|
||||
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if> |
|
||||
<if test="noticeType != null and noticeType != ''">#{noticeType}, </if> |
|
||||
<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if> |
|
||||
<if test="status != null and status != ''">#{status}, </if> |
|
||||
<if test="remark != null and remark != ''">#{remark},</if> |
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
||||
sysdate() |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<update id="updateNotice" parameterType="SysNotice"> |
|
||||
update sys_notice |
|
||||
<set> |
|
||||
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if> |
|
||||
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if> |
|
||||
<if test="noticeContent != null">notice_content = #{noticeContent}, </if> |
|
||||
<if test="status != null and status != ''">status = #{status}, </if> |
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
||||
update_time = sysdate() |
|
||||
</set> |
|
||||
where notice_id = #{noticeId} |
|
||||
</update> |
|
||||
|
|
||||
<delete id="deleteNoticeById" parameterType="Long"> |
|
||||
delete from sys_notice where notice_id = #{noticeId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteNoticeByIds" parameterType="Long"> |
|
||||
delete from sys_notice where notice_id in |
|
||||
<foreach item="noticeId" collection="array" open="(" separator="," close=")"> |
|
||||
#{noticeId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,87 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysOperLogMapper"> |
|
||||
|
|
||||
<resultMap type="SysOperLog" id="SysOperLogResult"> |
|
||||
<id property="operId" column="oper_id" /> |
|
||||
<result property="title" column="title" /> |
|
||||
<result property="businessType" column="business_type" /> |
|
||||
<result property="method" column="method" /> |
|
||||
<result property="requestMethod" column="request_method" /> |
|
||||
<result property="operatorType" column="operator_type" /> |
|
||||
<result property="operName" column="oper_name" /> |
|
||||
<result property="deptName" column="dept_name" /> |
|
||||
<result property="operUrl" column="oper_url" /> |
|
||||
<result property="operIp" column="oper_ip" /> |
|
||||
<result property="operLocation" column="oper_location" /> |
|
||||
<result property="operParam" column="oper_param" /> |
|
||||
<result property="jsonResult" column="json_result" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="errorMsg" column="error_msg" /> |
|
||||
<result property="operTime" column="oper_time" /> |
|
||||
<result property="costTime" column="cost_time" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectOperLogVo"> |
|
||||
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 |
|
||||
</sql> |
|
||||
|
|
||||
<insert id="insertOperlog" parameterType="SysOperLog"> |
|
||||
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()) |
|
||||
</insert> |
|
||||
|
|
||||
<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult"> |
|
||||
<include refid="selectOperLogVo"/> |
|
||||
<where> |
|
||||
<if test="operIp != null and operIp != ''"> |
|
||||
AND oper_ip like concat('%', #{operIp}, '%') |
|
||||
</if> |
|
||||
<if test="title != null and title != ''"> |
|
||||
AND title like concat('%', #{title}, '%') |
|
||||
</if> |
|
||||
<if test="businessType != null"> |
|
||||
AND business_type = #{businessType} |
|
||||
</if> |
|
||||
<if test="businessTypes != null and businessTypes.length > 0"> |
|
||||
AND business_type in |
|
||||
<foreach collection="businessTypes" item="businessType" open="(" separator="," close=")"> |
|
||||
#{businessType} |
|
||||
</foreach> |
|
||||
</if> |
|
||||
<if test="status != null"> |
|
||||
AND status = #{status} |
|
||||
</if> |
|
||||
<if test="operName != null and operName != ''"> |
|
||||
AND oper_name like concat('%', #{operName}, '%') |
|
||||
</if> |
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
|
||||
AND oper_time >= #{params.beginTime} |
|
||||
</if> |
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
|
||||
AND oper_time <= #{params.endTime} |
|
||||
</if> |
|
||||
</where> |
|
||||
order by oper_id desc |
|
||||
</select> |
|
||||
|
|
||||
<delete id="deleteOperLogByIds" parameterType="Long"> |
|
||||
delete from sys_oper_log where oper_id in |
|
||||
<foreach collection="array" item="operId" open="(" separator="," close=")"> |
|
||||
#{operId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult"> |
|
||||
<include refid="selectOperLogVo"/> |
|
||||
where oper_id = #{operId} |
|
||||
</select> |
|
||||
|
|
||||
<update id="cleanOperLog"> |
|
||||
truncate table sys_oper_log |
|
||||
</update> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,122 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysPostMapper"> |
|
||||
|
|
||||
<resultMap type="SysPost" id="SysPostResult"> |
|
||||
<id property="postId" column="post_id" /> |
|
||||
<result property="postCode" column="post_code" /> |
|
||||
<result property="postName" column="post_name" /> |
|
||||
<result property="postSort" column="post_sort" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="createBy" column="create_by" /> |
|
||||
<result property="createTime" column="create_time" /> |
|
||||
<result property="updateBy" column="update_by" /> |
|
||||
<result property="updateTime" column="update_time" /> |
|
||||
<result property="remark" column="remark" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectPostVo"> |
|
||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark |
|
||||
from sys_post |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult"> |
|
||||
<include refid="selectPostVo"/> |
|
||||
<where> |
|
||||
<if test="postCode != null and postCode != ''"> |
|
||||
AND post_code like concat('%', #{postCode}, '%') |
|
||||
</if> |
|
||||
<if test="status != null and status != ''"> |
|
||||
AND status = #{status} |
|
||||
</if> |
|
||||
<if test="postName != null and postName != ''"> |
|
||||
AND post_name like concat('%', #{postName}, '%') |
|
||||
</if> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectPostAll" resultMap="SysPostResult"> |
|
||||
<include refid="selectPostVo"/> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectPostById" parameterType="Long" resultMap="SysPostResult"> |
|
||||
<include refid="selectPostVo"/> |
|
||||
where post_id = #{postId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectPostListByUserId" parameterType="Long" resultType="Long"> |
|
||||
select p.post_id |
|
||||
from sys_post p |
|
||||
left join sys_user_post up on up.post_id = p.post_id |
|
||||
left join sys_user u on u.user_id = up.user_id |
|
||||
where u.user_id = #{userId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult"> |
|
||||
select p.post_id, p.post_name, p.post_code |
|
||||
from sys_post p |
|
||||
left join sys_user_post up on up.post_id = p.post_id |
|
||||
left join sys_user u on u.user_id = up.user_id |
|
||||
where u.user_name = #{userName} |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult"> |
|
||||
<include refid="selectPostVo"/> |
|
||||
where post_name=#{postName} limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult"> |
|
||||
<include refid="selectPostVo"/> |
|
||||
where post_code=#{postCode} limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<update id="updatePost" parameterType="SysPost"> |
|
||||
update sys_post |
|
||||
<set> |
|
||||
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if> |
|
||||
<if test="postName != null and postName != ''">post_name = #{postName},</if> |
|
||||
<if test="postSort != null">post_sort = #{postSort},</if> |
|
||||
<if test="status != null and status != ''">status = #{status},</if> |
|
||||
<if test="remark != null">remark = #{remark},</if> |
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
||||
update_time = sysdate() |
|
||||
</set> |
|
||||
where post_id = #{postId} |
|
||||
</update> |
|
||||
|
|
||||
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId"> |
|
||||
insert into sys_post( |
|
||||
<if test="postId != null and postId != 0">post_id,</if> |
|
||||
<if test="postCode != null and postCode != ''">post_code,</if> |
|
||||
<if test="postName != null and postName != ''">post_name,</if> |
|
||||
<if test="postSort != null">post_sort,</if> |
|
||||
<if test="status != null and status != ''">status,</if> |
|
||||
<if test="remark != null and remark != ''">remark,</if> |
|
||||
<if test="createBy != null and createBy != ''">create_by,</if> |
|
||||
create_time |
|
||||
)values( |
|
||||
<if test="postId != null and postId != 0">#{postId},</if> |
|
||||
<if test="postCode != null and postCode != ''">#{postCode},</if> |
|
||||
<if test="postName != null and postName != ''">#{postName},</if> |
|
||||
<if test="postSort != null">#{postSort},</if> |
|
||||
<if test="status != null and status != ''">#{status},</if> |
|
||||
<if test="remark != null and remark != ''">#{remark},</if> |
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
||||
sysdate() |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<delete id="deletePostById" parameterType="Long"> |
|
||||
delete from sys_post where post_id = #{postId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deletePostByIds" parameterType="Long"> |
|
||||
delete from sys_post where post_id in |
|
||||
<foreach collection="array" item="postId" open="(" separator="," close=")"> |
|
||||
#{postId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,34 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysRoleDeptMapper"> |
|
||||
|
|
||||
<resultMap type="SysRoleDept" id="SysRoleDeptResult"> |
|
||||
<result property="roleId" column="role_id" /> |
|
||||
<result property="deptId" column="dept_id" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<delete id="deleteRoleDeptByRoleId" parameterType="Long"> |
|
||||
delete from sys_role_dept where role_id=#{roleId} |
|
||||
</delete> |
|
||||
|
|
||||
<select id="selectCountRoleDeptByDeptId" resultType="Integer"> |
|
||||
select count(1) from sys_role_dept where dept_id=#{deptId} |
|
||||
</select> |
|
||||
|
|
||||
<delete id="deleteRoleDept" parameterType="Long"> |
|
||||
delete from sys_role_dept where role_id in |
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")"> |
|
||||
#{roleId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<insert id="batchRoleDept"> |
|
||||
insert into sys_role_dept(role_id, dept_id) values |
|
||||
<foreach item="item" index="index" collection="list" separator=","> |
|
||||
(#{item.roleId},#{item.deptId}) |
|
||||
</foreach> |
|
||||
</insert> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,152 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysRoleMapper"> |
|
||||
|
|
||||
<resultMap type="SysRole" id="SysRoleResult"> |
|
||||
<id property="roleId" column="role_id" /> |
|
||||
<result property="roleName" column="role_name" /> |
|
||||
<result property="roleKey" column="role_key" /> |
|
||||
<result property="roleSort" column="role_sort" /> |
|
||||
<result property="dataScope" column="data_scope" /> |
|
||||
<result property="menuCheckStrictly" column="menu_check_strictly" /> |
|
||||
<result property="deptCheckStrictly" column="dept_check_strictly" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="delFlag" column="del_flag" /> |
|
||||
<result property="createBy" column="create_by" /> |
|
||||
<result property="createTime" column="create_time" /> |
|
||||
<result property="updateBy" column="update_by" /> |
|
||||
<result property="updateTime" column="update_time" /> |
|
||||
<result property="remark" column="remark" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectRoleVo"> |
|
||||
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 |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult"> |
|
||||
<include refid="selectRoleVo"/> |
|
||||
where r.del_flag = '0' |
|
||||
<if test="roleId != null and roleId != 0"> |
|
||||
AND r.role_id = #{roleId} |
|
||||
</if> |
|
||||
<if test="roleName != null and roleName != ''"> |
|
||||
AND r.role_name like concat('%', #{roleName}, '%') |
|
||||
</if> |
|
||||
<if test="status != null and status != ''"> |
|
||||
AND r.status = #{status} |
|
||||
</if> |
|
||||
<if test="roleKey != null and roleKey != ''"> |
|
||||
AND r.role_key like concat('%', #{roleKey}, '%') |
|
||||
</if> |
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
|
||||
and date_format(r.create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') |
|
||||
</if> |
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
|
||||
and date_format(r.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
|
||||
</if> |
|
||||
<!-- 数据范围过滤 --> |
|
||||
${params.dataScope} |
|
||||
order by r.role_sort |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult"> |
|
||||
<include refid="selectRoleVo"/> |
|
||||
WHERE r.del_flag = '0' and ur.user_id = #{userId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectRoleAll" resultMap="SysRoleResult"> |
|
||||
<include refid="selectRoleVo"/> |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectRoleListByUserId" parameterType="Long" resultType="Long"> |
|
||||
select r.role_id |
|
||||
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 |
|
||||
where u.user_id = #{userId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult"> |
|
||||
<include refid="selectRoleVo"/> |
|
||||
where r.role_id = #{roleId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult"> |
|
||||
<include refid="selectRoleVo"/> |
|
||||
WHERE r.del_flag = '0' and u.user_name = #{userName} |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult"> |
|
||||
<include refid="selectRoleVo"/> |
|
||||
where r.role_name=#{roleName} and r.del_flag = '0' limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult"> |
|
||||
<include refid="selectRoleVo"/> |
|
||||
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId"> |
|
||||
insert into sys_role( |
|
||||
<if test="roleId != null and roleId != 0">role_id,</if> |
|
||||
<if test="roleName != null and roleName != ''">role_name,</if> |
|
||||
<if test="roleKey != null and roleKey != ''">role_key,</if> |
|
||||
<if test="roleSort != null">role_sort,</if> |
|
||||
<if test="dataScope != null and dataScope != ''">data_scope,</if> |
|
||||
<if test="menuCheckStrictly != null">menu_check_strictly,</if> |
|
||||
<if test="deptCheckStrictly != null">dept_check_strictly,</if> |
|
||||
<if test="status != null and status != ''">status,</if> |
|
||||
<if test="remark != null and remark != ''">remark,</if> |
|
||||
<if test="createBy != null and createBy != ''">create_by,</if> |
|
||||
create_time |
|
||||
)values( |
|
||||
<if test="roleId != null and roleId != 0">#{roleId},</if> |
|
||||
<if test="roleName != null and roleName != ''">#{roleName},</if> |
|
||||
<if test="roleKey != null and roleKey != ''">#{roleKey},</if> |
|
||||
<if test="roleSort != null">#{roleSort},</if> |
|
||||
<if test="dataScope != null and dataScope != ''">#{dataScope},</if> |
|
||||
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if> |
|
||||
<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if> |
|
||||
<if test="status != null and status != ''">#{status},</if> |
|
||||
<if test="remark != null and remark != ''">#{remark},</if> |
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
||||
sysdate() |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<update id="updateRole" parameterType="SysRole"> |
|
||||
update sys_role |
|
||||
<set> |
|
||||
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if> |
|
||||
<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if> |
|
||||
<if test="roleSort != null">role_sort = #{roleSort},</if> |
|
||||
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if> |
|
||||
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if> |
|
||||
<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if> |
|
||||
<if test="status != null and status != ''">status = #{status},</if> |
|
||||
<if test="remark != null">remark = #{remark},</if> |
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
||||
update_time = sysdate() |
|
||||
</set> |
|
||||
where role_id = #{roleId} |
|
||||
</update> |
|
||||
|
|
||||
<delete id="deleteRoleById" parameterType="Long"> |
|
||||
update sys_role set del_flag = '2' where role_id = #{roleId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteRoleByIds" parameterType="Long"> |
|
||||
update sys_role set del_flag = '2' where role_id in |
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")"> |
|
||||
#{roleId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,34 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysRoleMenuMapper"> |
|
||||
|
|
||||
<resultMap type="SysRoleMenu" id="SysRoleMenuResult"> |
|
||||
<result property="roleId" column="role_id" /> |
|
||||
<result property="menuId" column="menu_id" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<select id="checkMenuExistRole" resultType="Integer"> |
|
||||
select count(1) from sys_role_menu where menu_id = #{menuId} |
|
||||
</select> |
|
||||
|
|
||||
<delete id="deleteRoleMenuByRoleId" parameterType="Long"> |
|
||||
delete from sys_role_menu where role_id=#{roleId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteRoleMenu" parameterType="Long"> |
|
||||
delete from sys_role_menu where role_id in |
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")"> |
|
||||
#{roleId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<insert id="batchRoleMenu"> |
|
||||
insert into sys_role_menu(role_id, menu_id) values |
|
||||
<foreach item="item" index="index" collection="list" separator=","> |
|
||||
(#{item.roleId},#{item.menuId}) |
|
||||
</foreach> |
|
||||
</insert> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,227 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysUserMapper"> |
|
||||
|
|
||||
<resultMap type="SysUser" id="SysUserResult"> |
|
||||
<id property="userId" column="user_id" /> |
|
||||
<result property="deptId" column="dept_id" /> |
|
||||
<result property="userName" column="user_name" /> |
|
||||
<result property="nickName" column="nick_name" /> |
|
||||
<result property="email" column="email" /> |
|
||||
<result property="phonenumber" column="phonenumber" /> |
|
||||
<result property="sex" column="sex" /> |
|
||||
<result property="avatar" column="avatar" /> |
|
||||
<result property="password" column="password" /> |
|
||||
<result property="status" column="status" /> |
|
||||
<result property="delFlag" column="del_flag" /> |
|
||||
<result property="loginIp" column="login_ip" /> |
|
||||
<result property="loginDate" column="login_date" /> |
|
||||
<result property="pwdUpdateDate" column="pwd_update_date" /> |
|
||||
<result property="createBy" column="create_by" /> |
|
||||
<result property="createTime" column="create_time" /> |
|
||||
<result property="updateBy" column="update_by" /> |
|
||||
<result property="updateTime" column="update_time" /> |
|
||||
<result property="remark" column="remark" /> |
|
||||
<association property="dept" javaType="SysDept" resultMap="deptResult" /> |
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<resultMap id="deptResult" type="SysDept"> |
|
||||
<id property="deptId" column="dept_id" /> |
|
||||
<result property="parentId" column="parent_id" /> |
|
||||
<result property="deptName" column="dept_name" /> |
|
||||
<result property="ancestors" column="ancestors" /> |
|
||||
<result property="orderNum" column="order_num" /> |
|
||||
<result property="leader" column="leader" /> |
|
||||
<result property="status" column="dept_status" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<resultMap id="RoleResult" type="SysRole"> |
|
||||
<id property="roleId" column="role_id" /> |
|
||||
<result property="roleName" column="role_name" /> |
|
||||
<result property="roleKey" column="role_key" /> |
|
||||
<result property="roleSort" column="role_sort" /> |
|
||||
<result property="dataScope" column="data_scope" /> |
|
||||
<result property="status" column="role_status" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<sql id="selectUserVo"> |
|
||||
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 |
|
||||
</sql> |
|
||||
|
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> |
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u |
|
||||
left join sys_dept d on u.dept_id = d.dept_id |
|
||||
where u.del_flag = '0' |
|
||||
<if test="userId != null and userId != 0"> |
|
||||
AND u.user_id = #{userId} |
|
||||
</if> |
|
||||
<if test="userName != null and userName != ''"> |
|
||||
AND u.user_name like concat('%', #{userName}, '%') |
|
||||
</if> |
|
||||
<if test="status != null and status != ''"> |
|
||||
AND u.status = #{status} |
|
||||
</if> |
|
||||
<if test="phonenumber != null and phonenumber != ''"> |
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%') |
|
||||
</if> |
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
|
||||
AND date_format(u.create_time,'%Y%m%d') >= date_format(#{params.beginTime},'%Y%m%d') |
|
||||
</if> |
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
|
||||
AND date_format(u.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
|
||||
</if> |
|
||||
<if test="deptId != null and deptId != 0"> |
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) )) |
|
||||
</if> |
|
||||
<!-- 数据范围过滤 --> |
|
||||
${params.dataScope} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> |
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
|
||||
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 |
|
||||
where u.del_flag = '0' and r.role_id = #{roleId} |
|
||||
<if test="userName != null and userName != ''"> |
|
||||
AND u.user_name like concat('%', #{userName}, '%') |
|
||||
</if> |
|
||||
<if test="phonenumber != null and phonenumber != ''"> |
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%') |
|
||||
</if> |
|
||||
<!-- 数据范围过滤 --> |
|
||||
${params.dataScope} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult"> |
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
|
||||
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 |
|
||||
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL) |
|
||||
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId}) |
|
||||
<if test="userName != null and userName != ''"> |
|
||||
AND u.user_name like concat('%', #{userName}, '%') |
|
||||
</if> |
|
||||
<if test="phonenumber != null and phonenumber != ''"> |
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%') |
|
||||
</if> |
|
||||
<!-- 数据范围过滤 --> |
|
||||
${params.dataScope} |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> |
|
||||
<include refid="selectUserVo"/> |
|
||||
where u.user_name = #{userName} and u.del_flag = '0' |
|
||||
</select> |
|
||||
|
|
||||
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> |
|
||||
<include refid="selectUserVo"/> |
|
||||
where u.user_id = #{userId} |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult"> |
|
||||
select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult"> |
|
||||
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult"> |
|
||||
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1 |
|
||||
</select> |
|
||||
|
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> |
|
||||
insert into sys_user( |
|
||||
<if test="userId != null and userId != 0">user_id,</if> |
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if> |
|
||||
<if test="userName != null and userName != ''">user_name,</if> |
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if> |
|
||||
<if test="email != null and email != ''">email,</if> |
|
||||
<if test="avatar != null and avatar != ''">avatar,</if> |
|
||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if> |
|
||||
<if test="sex != null and sex != ''">sex,</if> |
|
||||
<if test="password != null and password != ''">password,</if> |
|
||||
<if test="status != null and status != ''">status,</if> |
|
||||
<if test="pwdUpdateDate != null">pwd_update_date,</if> |
|
||||
<if test="createBy != null and createBy != ''">create_by,</if> |
|
||||
<if test="remark != null and remark != ''">remark,</if> |
|
||||
create_time |
|
||||
)values( |
|
||||
<if test="userId != null and userId != ''">#{userId},</if> |
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if> |
|
||||
<if test="userName != null and userName != ''">#{userName},</if> |
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if> |
|
||||
<if test="email != null and email != ''">#{email},</if> |
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if> |
|
||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if> |
|
||||
<if test="sex != null and sex != ''">#{sex},</if> |
|
||||
<if test="password != null and password != ''">#{password},</if> |
|
||||
<if test="status != null and status != ''">#{status},</if> |
|
||||
<if test="pwdUpdateDate != null">#{pwdUpdateDate},</if> |
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if> |
|
||||
<if test="remark != null and remark != ''">#{remark},</if> |
|
||||
sysdate() |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<update id="updateUser" parameterType="SysUser"> |
|
||||
update sys_user |
|
||||
<set> |
|
||||
<if test="deptId != 0">dept_id = #{deptId},</if> |
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if> |
|
||||
<if test="email != null ">email = #{email},</if> |
|
||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if> |
|
||||
<if test="sex != null and sex != ''">sex = #{sex},</if> |
|
||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if> |
|
||||
<if test="password != null and password != ''">password = #{password},</if> |
|
||||
<if test="status != null and status != ''">status = #{status},</if> |
|
||||
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if> |
|
||||
<if test="loginDate != null">login_date = #{loginDate},</if> |
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> |
|
||||
<if test="remark != null">remark = #{remark},</if> |
|
||||
update_time = sysdate() |
|
||||
</set> |
|
||||
where user_id = #{userId} |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateUserStatus" parameterType="SysUser"> |
|
||||
update sys_user set status = #{status}, update_time = sysdate() where user_id = #{userId} |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateUserAvatar" parameterType="SysUser"> |
|
||||
update sys_user set avatar = #{avatar}, update_time = sysdate() where user_id = #{userId} |
|
||||
</update> |
|
||||
|
|
||||
<update id="updateLoginInfo" parameterType="SysUser"> |
|
||||
update sys_user set login_ip = #{loginIp}, login_date = #{loginDate} where user_id = #{userId} |
|
||||
</update> |
|
||||
|
|
||||
<update id="resetUserPwd" parameterType="SysUser"> |
|
||||
update sys_user set pwd_update_date = sysdate(), password = #{password}, update_time = sysdate() where user_id = #{userId} |
|
||||
</update> |
|
||||
|
|
||||
<delete id="deleteUserById" parameterType="Long"> |
|
||||
update sys_user set del_flag = '2' where user_id = #{userId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteUserByIds" parameterType="Long"> |
|
||||
update sys_user set del_flag = '2' where user_id in |
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")"> |
|
||||
#{userId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,34 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysUserPostMapper"> |
|
||||
|
|
||||
<resultMap type="SysUserPost" id="SysUserPostResult"> |
|
||||
<result property="userId" column="user_id" /> |
|
||||
<result property="postId" column="post_id" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<delete id="deleteUserPostByUserId" parameterType="Long"> |
|
||||
delete from sys_user_post where user_id=#{userId} |
|
||||
</delete> |
|
||||
|
|
||||
<select id="countUserPostById" resultType="Integer"> |
|
||||
select count(1) from sys_user_post where post_id=#{postId} |
|
||||
</select> |
|
||||
|
|
||||
<delete id="deleteUserPost" parameterType="Long"> |
|
||||
delete from sys_user_post where user_id in |
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")"> |
|
||||
#{userId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<insert id="batchUserPost"> |
|
||||
insert into sys_user_post(user_id, post_id) values |
|
||||
<foreach item="item" index="index" collection="list" separator=","> |
|
||||
(#{item.userId},#{item.postId}) |
|
||||
</foreach> |
|
||||
</insert> |
|
||||
|
|
||||
</mapper> |
|
||||
@ -1,44 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE mapper |
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
||||
<mapper namespace="com.chenhai.system.mapper.SysUserRoleMapper"> |
|
||||
|
|
||||
<resultMap type="SysUserRole" id="SysUserRoleResult"> |
|
||||
<result property="userId" column="user_id" /> |
|
||||
<result property="roleId" column="role_id" /> |
|
||||
</resultMap> |
|
||||
|
|
||||
<delete id="deleteUserRoleByUserId" parameterType="Long"> |
|
||||
delete from sys_user_role where user_id=#{userId} |
|
||||
</delete> |
|
||||
|
|
||||
<select id="countUserRoleByRoleId" resultType="Integer"> |
|
||||
select count(1) from sys_user_role where role_id=#{roleId} |
|
||||
</select> |
|
||||
|
|
||||
<delete id="deleteUserRole" parameterType="Long"> |
|
||||
delete from sys_user_role where user_id in |
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")"> |
|
||||
#{userId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
<insert id="batchUserRole"> |
|
||||
insert into sys_user_role(user_id, role_id) values |
|
||||
<foreach item="item" index="index" collection="list" separator=","> |
|
||||
(#{item.userId},#{item.roleId}) |
|
||||
</foreach> |
|
||||
</insert> |
|
||||
|
|
||||
<delete id="deleteUserRoleInfo" parameterType="SysUserRole"> |
|
||||
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} |
|
||||
</delete> |
|
||||
|
|
||||
<delete id="deleteUserRoleInfos"> |
|
||||
delete from sys_user_role where role_id=#{roleId} and user_id in |
|
||||
<foreach collection="userIds" item="userId" open="(" separator="," close=")"> |
|
||||
#{userId} |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
</mapper> |
|
||||
@ -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' |
||||
|
}) |
||||
|
} |
||||
@ -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' |
||||
|
}) |
||||
|
} |
||||
@ -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' |
||||
|
}) |
||||
|
} |
||||
@ -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' |
||||
|
}) |
||||
|
} |
||||
@ -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' |
||||
|
}) |
||||
|
} |
||||
@ -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' |
||||
|
}) |
||||
|
} |
||||
@ -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' |
||||
|
}) |
||||
|
} |
||||
@ -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' |
||||
|
}) |
||||
|
} |
||||
@ -0,0 +1,357 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="帖子ID" prop="postId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.postId" |
||||
|
placeholder="请输入帖子ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="评论者ID" prop="authorId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.authorId" |
||||
|
placeholder="请输入评论者ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="父评论ID" prop="parentId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.parentId" |
||||
|
placeholder="请输入父评论ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input |
||||
|
v-model="queryParams.isSensitive" |
||||
|
placeholder="请输入是否含敏感词" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="评论时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择评论时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.updatedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择更新时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:comments:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:comments:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:comments:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:comments:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="commentsList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="评论ID" align="center" prop="commentId" /> |
||||
|
<el-table-column label="帖子ID" align="center" prop="postId" /> |
||||
|
<el-table-column label="评论者ID" align="center" prop="authorId" /> |
||||
|
<el-table-column label="父评论ID" align="center" prop="parentId" /> |
||||
|
<el-table-column label="评论内容" align="center" prop="content" /> |
||||
|
<el-table-column label="评论图片" align="center" prop="images" /> |
||||
|
<el-table-column label="评论状态" align="center" prop="status" /> |
||||
|
<el-table-column label="是否含敏感词" align="center" prop="isSensitive" /> |
||||
|
<el-table-column label="敏感词列表" align="center" prop="sensitiveWords" /> |
||||
|
<el-table-column label="评论时间" align="center" prop="createdAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="更新时间" align="center" prop="updatedAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.updatedAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:comments:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:comments:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改评论(仅问答帖子可用)对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="帖子ID" prop="postId"> |
||||
|
<el-input v-model="form.postId" placeholder="请输入帖子ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="评论者ID" prop="authorId"> |
||||
|
<el-input v-model="form.authorId" placeholder="请输入评论者ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="父评论ID" prop="parentId"> |
||||
|
<el-input v-model="form.parentId" placeholder="请输入父评论ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="评论内容"> |
||||
|
<editor v-model="form.content" :min-height="192"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input v-model="form.isSensitive" placeholder="请输入是否含敏感词" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="评论时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择评论时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.updatedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择更新时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listComments, getComments, delComments, addComments, updateComments } from "@/api/system/comments" |
||||
|
|
||||
|
export default { |
||||
|
name: "Comments", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 评论(仅问答帖子可用)表格数据 |
||||
|
commentsList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
postId: null, |
||||
|
authorId: null, |
||||
|
parentId: null, |
||||
|
content: null, |
||||
|
images: null, |
||||
|
status: null, |
||||
|
isSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
postId: [ |
||||
|
{ required: true, message: "帖子ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
authorId: [ |
||||
|
{ required: true, message: "评论者ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
content: [ |
||||
|
{ required: true, message: "评论内容不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询评论(仅问答帖子可用)列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listComments(this.queryParams).then(response => { |
||||
|
this.commentsList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
commentId: null, |
||||
|
postId: null, |
||||
|
authorId: null, |
||||
|
parentId: null, |
||||
|
content: null, |
||||
|
images: null, |
||||
|
status: null, |
||||
|
isSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.commentId) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加评论(仅问答帖子可用)" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const commentId = row.commentId || this.ids |
||||
|
getComments(commentId).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改评论(仅问答帖子可用)" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.commentId != null) { |
||||
|
updateComments(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addComments(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const commentIds = row.commentId || this.ids |
||||
|
this.$modal.confirm('是否确认删除评论(仅问答帖子可用)编号为"' + commentIds + '"的数据项?').then(function() { |
||||
|
return delComments(commentIds) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/comments/export', { |
||||
|
...this.queryParams |
||||
|
}, `comments_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,331 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="发布者ID" prop="farmerId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.farmerId" |
||||
|
placeholder="请输入发布者ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="问诊标题" prop="title"> |
||||
|
<el-input |
||||
|
v-model="queryParams.title" |
||||
|
placeholder="请输入问诊标题" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input |
||||
|
v-model="queryParams.isSensitive" |
||||
|
placeholder="请输入是否含敏感词" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="查看次数" prop="viewCount"> |
||||
|
<el-input |
||||
|
v-model="queryParams.viewCount" |
||||
|
placeholder="请输入查看次数" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="回复数量" prop="replyCount"> |
||||
|
<el-input |
||||
|
v-model="queryParams.replyCount" |
||||
|
placeholder="请输入回复数量" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:forms:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:forms:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:forms:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:forms:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="formsList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="${comment}" align="center" prop="formId" /> |
||||
|
<el-table-column label="发布者ID" align="center" prop="farmerId" /> |
||||
|
<el-table-column label="问诊标题" align="center" prop="title" /> |
||||
|
<el-table-column label="病情描述" align="center" prop="description" /> |
||||
|
<el-table-column label="牲畜种类" align="center" prop="animalType" /> |
||||
|
<el-table-column label="症状照片或视频" align="center" prop="images" /> |
||||
|
<el-table-column label="回复状态" align="center" prop="status" /> |
||||
|
<el-table-column label="是否含敏感词" align="center" prop="isSensitive" /> |
||||
|
<el-table-column label="检测到的敏感词列表" align="center" prop="sensitiveWords" /> |
||||
|
<el-table-column label="查看次数" align="center" prop="viewCount" /> |
||||
|
<el-table-column label="回复数量" align="center" prop="replyCount" /> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:forms:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:forms:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改问诊单对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="发布者ID" prop="farmerId"> |
||||
|
<el-input v-model="form.farmerId" placeholder="请输入发布者ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="问诊标题" prop="title"> |
||||
|
<el-input v-model="form.title" placeholder="请输入问诊标题" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="病情描述" prop="description"> |
||||
|
<el-input v-model="form.description" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="症状照片或视频" prop="images"> |
||||
|
<el-input v-model="form.images" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input v-model="form.isSensitive" placeholder="请输入是否含敏感词" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="查看次数" prop="viewCount"> |
||||
|
<el-input v-model="form.viewCount" placeholder="请输入查看次数" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="回复数量" prop="replyCount"> |
||||
|
<el-input v-model="form.replyCount" placeholder="请输入回复数量" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listForms, getForms, delForms, addForms, updateForms } from "@/api/system/forms" |
||||
|
|
||||
|
export default { |
||||
|
name: "Forms", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 问诊单表格数据 |
||||
|
formsList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
farmerId: null, |
||||
|
title: null, |
||||
|
description: null, |
||||
|
animalType: null, |
||||
|
images: null, |
||||
|
status: null, |
||||
|
isSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
viewCount: null, |
||||
|
replyCount: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
farmerId: [ |
||||
|
{ required: true, message: "发布者ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
title: [ |
||||
|
{ required: true, message: "问诊标题不能为空", trigger: "blur" } |
||||
|
], |
||||
|
description: [ |
||||
|
{ required: true, message: "病情描述不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询问诊单列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listForms(this.queryParams).then(response => { |
||||
|
this.formsList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
formId: null, |
||||
|
farmerId: null, |
||||
|
title: null, |
||||
|
description: null, |
||||
|
animalType: null, |
||||
|
images: null, |
||||
|
status: null, |
||||
|
isSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
viewCount: null, |
||||
|
replyCount: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.formId) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加问诊单" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const formId = row.formId || this.ids |
||||
|
getForms(formId).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改问诊单" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.formId != null) { |
||||
|
updateForms(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addForms(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const formIds = row.formId || this.ids |
||||
|
this.$modal.confirm('是否确认删除问诊单编号为"' + formIds + '"的数据项?').then(function() { |
||||
|
return delForms(formIds) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/forms/export', { |
||||
|
...this.queryParams |
||||
|
}, `forms_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,314 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="敏感词内容" prop="word"> |
||||
|
<el-input |
||||
|
v-model="queryParams.word" |
||||
|
placeholder="请输入敏感词内容" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="替换词" prop="replaceWord"> |
||||
|
<el-input |
||||
|
v-model="queryParams.replaceWord" |
||||
|
placeholder="请输入替换词" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择创建时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.updatedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择更新时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:library:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:library:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:library:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:library:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="libraryList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="敏感词ID" align="center" prop="wordId" /> |
||||
|
<el-table-column label="敏感词内容" align="center" prop="word" /> |
||||
|
<el-table-column label="敏感词类型" align="center" prop="wordType" /> |
||||
|
<el-table-column label="敏感级别" align="center" prop="level" /> |
||||
|
<el-table-column label="替换词" align="center" prop="replaceWord" /> |
||||
|
<el-table-column label="创建时间" align="center" prop="createdAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="更新时间" align="center" prop="updatedAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.updatedAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:library:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:library:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改敏感词库对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="敏感词内容" prop="word"> |
||||
|
<el-input v-model="form.word" placeholder="请输入敏感词内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="替换词" prop="replaceWord"> |
||||
|
<el-input v-model="form.replaceWord" placeholder="请输入替换词" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择创建时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.updatedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择更新时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listLibrary, getLibrary, delLibrary, addLibrary, updateLibrary } from "@/api/system/library" |
||||
|
|
||||
|
export default { |
||||
|
name: "Library", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 敏感词库表格数据 |
||||
|
libraryList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
word: null, |
||||
|
wordType: null, |
||||
|
level: null, |
||||
|
replaceWord: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
word: [ |
||||
|
{ required: true, message: "敏感词内容不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询敏感词库列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listLibrary(this.queryParams).then(response => { |
||||
|
this.libraryList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
wordId: null, |
||||
|
word: null, |
||||
|
wordType: null, |
||||
|
level: null, |
||||
|
replaceWord: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.wordId) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加敏感词库" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const wordId = row.wordId || this.ids |
||||
|
getLibrary(wordId).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改敏感词库" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.wordId != null) { |
||||
|
updateLibrary(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addLibrary(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const wordIds = row.wordId || this.ids |
||||
|
this.$modal.confirm('是否确认删除敏感词库编号为"' + wordIds + '"的数据项?').then(function() { |
||||
|
return delLibrary(wordIds) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/library/export', { |
||||
|
...this.queryParams |
||||
|
}, `library_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,368 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="聊天会话ID,格式:farmer_vet_时间戳" prop="chatId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.chatId" |
||||
|
placeholder="请输入聊天会话ID,格式:farmer_vet_时间戳" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发送者用户ID" prop="senderId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.senderId" |
||||
|
placeholder="请输入发送者用户ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="接收者用户ID" prop="receiverId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.receiverId" |
||||
|
placeholder="请输入接收者用户ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否已读" prop="isRead"> |
||||
|
<el-input |
||||
|
v-model="queryParams.isRead" |
||||
|
placeholder="请输入是否已读" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="阅读时间" prop="readTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.readTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择阅读时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input |
||||
|
v-model="queryParams.isSensitive" |
||||
|
placeholder="请输入是否含敏感词" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发送时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择发送时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:messages:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:messages:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:messages:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:messages:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="messagesList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="消息ID" align="center" prop="messageId" /> |
||||
|
<el-table-column label="聊天会话ID,格式:farmer_vet_时间戳" align="center" prop="chatId" /> |
||||
|
<el-table-column label="发送者用户ID" align="center" prop="senderId" /> |
||||
|
<el-table-column label="接收者用户ID" align="center" prop="receiverId" /> |
||||
|
<el-table-column label="消息内容" align="center" prop="content" /> |
||||
|
<el-table-column label="是否已读" align="center" prop="isRead" /> |
||||
|
<el-table-column label="阅读时间" align="center" prop="readTime" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.readTime, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="是否含敏感词" align="center" prop="isSensitive" /> |
||||
|
<el-table-column label="敏感词列表,逗号分隔" align="center" prop="sensitiveWords" /> |
||||
|
<el-table-column label="发送时间" align="center" prop="createdAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:messages:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:messages:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改专家一对一聊天消息对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="聊天会话ID,格式:farmer_vet_时间戳" prop="chatId"> |
||||
|
<el-input v-model="form.chatId" placeholder="请输入聊天会话ID,格式:farmer_vet_时间戳" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发送者用户ID" prop="senderId"> |
||||
|
<el-input v-model="form.senderId" placeholder="请输入发送者用户ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="接收者用户ID" prop="receiverId"> |
||||
|
<el-input v-model="form.receiverId" placeholder="请输入接收者用户ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="消息内容"> |
||||
|
<editor v-model="form.content" :min-height="192"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否已读" prop="isRead"> |
||||
|
<el-input v-model="form.isRead" placeholder="请输入是否已读" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="阅读时间" prop="readTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.readTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择阅读时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input v-model="form.isSensitive" placeholder="请输入是否含敏感词" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="敏感词列表,逗号分隔" prop="sensitiveWords"> |
||||
|
<el-input v-model="form.sensitiveWords" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发送时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择发送时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listMessages, getMessages, delMessages, addMessages, updateMessages } from "@/api/system/messages" |
||||
|
|
||||
|
export default { |
||||
|
name: "Messages", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 专家一对一聊天消息表格数据 |
||||
|
messagesList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
chatId: null, |
||||
|
senderId: null, |
||||
|
receiverId: null, |
||||
|
content: null, |
||||
|
isRead: null, |
||||
|
readTime: null, |
||||
|
isSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
createdAt: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
chatId: [ |
||||
|
{ required: true, message: "聊天会话ID,格式:farmer_vet_时间戳不能为空", trigger: "blur" } |
||||
|
], |
||||
|
senderId: [ |
||||
|
{ required: true, message: "发送者用户ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
receiverId: [ |
||||
|
{ required: true, message: "接收者用户ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询专家一对一聊天消息列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listMessages(this.queryParams).then(response => { |
||||
|
this.messagesList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
messageId: null, |
||||
|
chatId: null, |
||||
|
senderId: null, |
||||
|
receiverId: null, |
||||
|
content: null, |
||||
|
isRead: null, |
||||
|
readTime: null, |
||||
|
isSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
createdAt: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.messageId) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加专家一对一聊天消息" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const messageId = row.messageId || this.ids |
||||
|
getMessages(messageId).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改专家一对一聊天消息" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.messageId != null) { |
||||
|
updateMessages(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addMessages(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const messageIds = row.messageId || this.ids |
||||
|
this.$modal.confirm('是否确认删除专家一对一聊天消息编号为"' + messageIds + '"的数据项?').then(function() { |
||||
|
return delMessages(messageIds) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/messages/export', { |
||||
|
...this.queryParams |
||||
|
}, `messages_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,435 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="作者用户ID" prop="authorId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.authorId" |
||||
|
placeholder="请输入作者用户ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="帖子标题" prop="title"> |
||||
|
<el-input |
||||
|
v-model="queryParams.title" |
||||
|
placeholder="请输入帖子标题" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="分类标签" prop="category"> |
||||
|
<el-input |
||||
|
v-model="queryParams.category" |
||||
|
placeholder="请输入分类标签" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input |
||||
|
v-model="queryParams.isSensitive" |
||||
|
placeholder="请输入是否含敏感词" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="查看次数" prop="viewCount"> |
||||
|
<el-input |
||||
|
v-model="queryParams.viewCount" |
||||
|
placeholder="请输入查看次数" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发布时间" prop="publishedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.publishedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择发布时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="最后回复时间" prop="lastReplyAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.lastReplyAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择最后回复时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择创建时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.updatedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择更新时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:posts:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:posts:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:posts:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:posts:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="postsList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="帖子ID" align="center" prop="postId" /> |
||||
|
<el-table-column label="作者用户ID" align="center" prop="authorId" /> |
||||
|
<el-table-column label="帖子类型:问答,经验分享" align="center" prop="postType" /> |
||||
|
<el-table-column label="帖子标题" align="center" prop="title" /> |
||||
|
<el-table-column label="帖子内容" align="center" prop="content" /> |
||||
|
<el-table-column label="分类标签" align="center" prop="category" /> |
||||
|
<el-table-column label="图片URL数组" align="center" prop="images" /> |
||||
|
<el-table-column label="视频URL" align="center" prop="videoUrl" /> |
||||
|
<el-table-column label="帖子状态" align="center" prop="status" /> |
||||
|
<el-table-column label="是否含敏感词" align="center" prop="isSensitive" /> |
||||
|
<el-table-column label="敏感词列表" align="center" prop="sensitiveWords" /> |
||||
|
<el-table-column label="审核备注" align="center" prop="auditRemark" /> |
||||
|
<el-table-column label="查看次数" align="center" prop="viewCount" /> |
||||
|
<el-table-column label="发布时间" align="center" prop="publishedAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.publishedAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="最后回复时间" align="center" prop="lastReplyAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.lastReplyAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="创建时间" align="center" prop="createdAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="更新时间" align="center" prop="updatedAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.updatedAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:posts:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:posts:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改帖子(包含问答和经验分享)对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="作者用户ID" prop="authorId"> |
||||
|
<el-input v-model="form.authorId" placeholder="请输入作者用户ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="帖子标题" prop="title"> |
||||
|
<el-input v-model="form.title" placeholder="请输入帖子标题" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="帖子内容"> |
||||
|
<editor v-model="form.content" :min-height="192"/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="分类标签" prop="category"> |
||||
|
<el-input v-model="form.category" placeholder="请输入分类标签" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="视频URL" prop="videoUrl"> |
||||
|
<el-input v-model="form.videoUrl" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input v-model="form.isSensitive" placeholder="请输入是否含敏感词" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核备注" prop="auditRemark"> |
||||
|
<el-input v-model="form.auditRemark" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="查看次数" prop="viewCount"> |
||||
|
<el-input v-model="form.viewCount" placeholder="请输入查看次数" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="发布时间" prop="publishedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.publishedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择发布时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="最后回复时间" prop="lastReplyAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.lastReplyAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择最后回复时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择创建时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.updatedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择更新时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listPosts, getPosts, delPosts, addPosts, updatePosts } from "@/api/system/posts" |
||||
|
|
||||
|
export default { |
||||
|
name: "Posts", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 帖子(包含问答和经验分享)表格数据 |
||||
|
postsList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
authorId: null, |
||||
|
postType: null, |
||||
|
title: null, |
||||
|
content: null, |
||||
|
category: null, |
||||
|
images: null, |
||||
|
videoUrl: null, |
||||
|
status: null, |
||||
|
isSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
auditRemark: null, |
||||
|
viewCount: null, |
||||
|
publishedAt: null, |
||||
|
lastReplyAt: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
authorId: [ |
||||
|
{ required: true, message: "作者用户ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
postType: [ |
||||
|
{ required: true, message: "帖子类型:问答,经验分享不能为空", trigger: "change" } |
||||
|
], |
||||
|
title: [ |
||||
|
{ required: true, message: "帖子标题不能为空", trigger: "blur" } |
||||
|
], |
||||
|
content: [ |
||||
|
{ required: true, message: "帖子内容不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询帖子(包含问答和经验分享)列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listPosts(this.queryParams).then(response => { |
||||
|
this.postsList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
postId: null, |
||||
|
authorId: null, |
||||
|
postType: null, |
||||
|
title: null, |
||||
|
content: null, |
||||
|
category: null, |
||||
|
images: null, |
||||
|
videoUrl: null, |
||||
|
status: null, |
||||
|
isSensitive: null, |
||||
|
sensitiveWords: null, |
||||
|
auditRemark: null, |
||||
|
viewCount: null, |
||||
|
publishedAt: null, |
||||
|
lastReplyAt: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.postId) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加帖子(包含问答和经验分享)" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const postId = row.postId || this.ids |
||||
|
getPosts(postId).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改帖子(包含问答和经验分享)" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.postId != null) { |
||||
|
updatePosts(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addPosts(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const postIds = row.postId || this.ids |
||||
|
this.$modal.confirm('是否确认删除帖子(包含问答和经验分享)编号为"' + postIds + '"的数据项?').then(function() { |
||||
|
return delPosts(postIds) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/posts/export', { |
||||
|
...this.queryParams |
||||
|
}, `posts_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,392 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="兽医ID" prop="vetId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.vetId" |
||||
|
placeholder="请输入兽医ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="真实姓名" prop="realName"> |
||||
|
<el-input |
||||
|
v-model="queryParams.realName" |
||||
|
placeholder="请输入真实姓名" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证号" prop="idCard"> |
||||
|
<el-input |
||||
|
v-model="queryParams.idCard" |
||||
|
placeholder="请输入身份证号" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="证书编号" prop="certificateNo"> |
||||
|
<el-input |
||||
|
v-model="queryParams.certificateNo" |
||||
|
placeholder="请输入证书编号" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="申请时间" prop="applyTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.applyTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择申请时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核时间" prop="auditTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.auditTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择审核时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核人ID" prop="auditorId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.auditorId" |
||||
|
placeholder="请输入审核人ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:qualification:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:qualification:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:qualification:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:qualification:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="qualificationList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="资质ID" align="center" prop="qualificationId" /> |
||||
|
<el-table-column label="兽医ID" align="center" prop="vetId" /> |
||||
|
<el-table-column label="真实姓名" align="center" prop="realName" /> |
||||
|
<el-table-column label="身份证号" align="center" prop="idCard" /> |
||||
|
<el-table-column label="资质类型" align="center" prop="qualificationType" /> |
||||
|
<el-table-column label="证书编号" align="center" prop="certificateNo" /> |
||||
|
<el-table-column label="证书文件" align="center" prop="certificateFiles" /> |
||||
|
<el-table-column label="申请时间" align="center" prop="applyTime" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="审核时间" align="center" prop="auditTime" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.auditTime, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="审核状态" align="center" prop="auditStatus" /> |
||||
|
<el-table-column label="审核意见" align="center" prop="auditOpinion" /> |
||||
|
<el-table-column label="审核人ID" align="center" prop="auditorId" /> |
||||
|
<el-table-column label="备注" align="center" prop="remark" /> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:qualification:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:qualification:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改兽医资质对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="兽医ID" prop="vetId"> |
||||
|
<el-input v-model="form.vetId" placeholder="请输入兽医ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="真实姓名" prop="realName"> |
||||
|
<el-input v-model="form.realName" placeholder="请输入真实姓名" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="身份证号" prop="idCard"> |
||||
|
<el-input v-model="form.idCard" placeholder="请输入身份证号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="证书编号" prop="certificateNo"> |
||||
|
<el-input v-model="form.certificateNo" placeholder="请输入证书编号" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="证书文件" prop="certificateFiles"> |
||||
|
<el-input v-model="form.certificateFiles" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="申请时间" prop="applyTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.applyTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择申请时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核时间" prop="auditTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.auditTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择审核时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核意见" prop="auditOpinion"> |
||||
|
<el-input v-model="form.auditOpinion" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="审核人ID" prop="auditorId"> |
||||
|
<el-input v-model="form.auditorId" placeholder="请输入审核人ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="备注" prop="remark"> |
||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listQualification, getQualification, delQualification, addQualification, updateQualification } from "@/api/system/qualification" |
||||
|
|
||||
|
export default { |
||||
|
name: "Qualification", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 兽医资质表格数据 |
||||
|
qualificationList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
vetId: null, |
||||
|
realName: null, |
||||
|
idCard: null, |
||||
|
qualificationType: null, |
||||
|
certificateNo: null, |
||||
|
certificateFiles: null, |
||||
|
applyTime: null, |
||||
|
auditTime: null, |
||||
|
auditStatus: null, |
||||
|
auditOpinion: null, |
||||
|
auditorId: null, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
vetId: [ |
||||
|
{ required: true, message: "兽医ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
realName: [ |
||||
|
{ required: true, message: "真实姓名不能为空", trigger: "blur" } |
||||
|
], |
||||
|
idCard: [ |
||||
|
{ required: true, message: "身份证号不能为空", trigger: "blur" } |
||||
|
], |
||||
|
qualificationType: [ |
||||
|
{ required: true, message: "资质类型不能为空", trigger: "change" } |
||||
|
], |
||||
|
certificateNo: [ |
||||
|
{ required: true, message: "证书编号不能为空", trigger: "blur" } |
||||
|
], |
||||
|
certificateFiles: [ |
||||
|
{ required: true, message: "证书文件不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询兽医资质列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listQualification(this.queryParams).then(response => { |
||||
|
this.qualificationList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
qualificationId: null, |
||||
|
vetId: null, |
||||
|
realName: null, |
||||
|
idCard: null, |
||||
|
qualificationType: null, |
||||
|
certificateNo: null, |
||||
|
certificateFiles: null, |
||||
|
applyTime: null, |
||||
|
auditTime: null, |
||||
|
auditStatus: null, |
||||
|
auditOpinion: null, |
||||
|
auditorId: null, |
||||
|
createBy: null, |
||||
|
createTime: null, |
||||
|
updateBy: null, |
||||
|
updateTime: null, |
||||
|
remark: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.qualificationId) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加兽医资质" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const qualificationId = row.qualificationId || this.ids |
||||
|
getQualification(qualificationId).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改兽医资质" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.qualificationId != null) { |
||||
|
updateQualification(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addQualification(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const qualificationIds = row.qualificationId || this.ids |
||||
|
this.$modal.confirm('是否确认删除兽医资质编号为"' + qualificationIds + '"的数据项?').then(function() { |
||||
|
return delQualification(qualificationIds) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/qualification/export', { |
||||
|
...this.queryParams |
||||
|
}, `qualification_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,334 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="问诊单ID" prop="formId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.formId" |
||||
|
placeholder="请输入问诊单ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="兽医ID" prop="vetId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.vetId" |
||||
|
placeholder="请输入兽医ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input |
||||
|
v-model="queryParams.isSensitive" |
||||
|
placeholder="请输入是否含敏感词" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择创建时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.updatedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择更新时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:replies:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:replies:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:replies:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:replies:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="repliesList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="回复ID" align="center" prop="replyId" /> |
||||
|
<el-table-column label="问诊单ID" align="center" prop="formId" /> |
||||
|
<el-table-column label="兽医ID" align="center" prop="vetId" /> |
||||
|
<el-table-column label="诊断回复" align="center" prop="diagnosis" /> |
||||
|
<el-table-column label="是否含敏感词" align="center" prop="isSensitive" /> |
||||
|
<el-table-column label="创建时间" align="center" prop="createdAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="更新时间" align="center" prop="updatedAt" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.updatedAt, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:replies:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:replies:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改兽医回复对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="问诊单ID" prop="formId"> |
||||
|
<el-input v-model="form.formId" placeholder="请输入问诊单ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="兽医ID" prop="vetId"> |
||||
|
<el-input v-model="form.vetId" placeholder="请输入兽医ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="诊断回复" prop="diagnosis"> |
||||
|
<el-input v-model="form.diagnosis" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否含敏感词" prop="isSensitive"> |
||||
|
<el-input v-model="form.isSensitive" placeholder="请输入是否含敏感词" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="创建时间" prop="createdAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.createdAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择创建时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="更新时间" prop="updatedAt"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.updatedAt" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择更新时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listReplies, getReplies, delReplies, addReplies, updateReplies } from "@/api/system/replies" |
||||
|
|
||||
|
export default { |
||||
|
name: "Replies", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 兽医回复表格数据 |
||||
|
repliesList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
formId: null, |
||||
|
vetId: null, |
||||
|
diagnosis: null, |
||||
|
isSensitive: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
formId: [ |
||||
|
{ required: true, message: "问诊单ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
vetId: [ |
||||
|
{ required: true, message: "兽医ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
diagnosis: [ |
||||
|
{ required: true, message: "诊断回复不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询兽医回复列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listReplies(this.queryParams).then(response => { |
||||
|
this.repliesList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
replyId: null, |
||||
|
formId: null, |
||||
|
vetId: null, |
||||
|
diagnosis: null, |
||||
|
isSensitive: null, |
||||
|
createdAt: null, |
||||
|
updatedAt: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.replyId) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加兽医回复" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const replyId = row.replyId || this.ids |
||||
|
getReplies(replyId).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改兽医回复" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.replyId != null) { |
||||
|
updateReplies(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addReplies(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const replyIds = row.replyId || this.ids |
||||
|
this.$modal.confirm('是否确认删除兽医回复编号为"' + replyIds + '"的数据项?').then(function() { |
||||
|
return delReplies(replyIds) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/replies/export', { |
||||
|
...this.queryParams |
||||
|
}, `replies_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
@ -0,0 +1,339 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
<el-form-item label="兽医ID" prop="vetId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.vetId" |
||||
|
placeholder="请输入兽医ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否在线" prop="isOnline"> |
||||
|
<el-input |
||||
|
v-model="queryParams.isOnline" |
||||
|
placeholder="请输入是否在线" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="最后在线时间" prop="lastOnlineTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.lastOnlineTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择最后在线时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="最后活动时间" prop="lastActiveTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.lastActiveTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择最后活动时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="当前咨询会话ID" prop="currentSessionId"> |
||||
|
<el-input |
||||
|
v-model="queryParams.currentSessionId" |
||||
|
placeholder="请输入当前咨询会话ID" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="IP地址" prop="ipAddress"> |
||||
|
<el-input |
||||
|
v-model="queryParams.ipAddress" |
||||
|
placeholder="请输入IP地址" |
||||
|
clearable |
||||
|
@keyup.enter.native="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
|
||||
|
<el-row :gutter="10" class="mb8"> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="primary" |
||||
|
plain |
||||
|
icon="el-icon-plus" |
||||
|
size="mini" |
||||
|
@click="handleAdd" |
||||
|
v-hasPermi="['system:status:add']" |
||||
|
>新增</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="success" |
||||
|
plain |
||||
|
icon="el-icon-edit" |
||||
|
size="mini" |
||||
|
:disabled="single" |
||||
|
@click="handleUpdate" |
||||
|
v-hasPermi="['system:status:edit']" |
||||
|
>修改</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="danger" |
||||
|
plain |
||||
|
icon="el-icon-delete" |
||||
|
size="mini" |
||||
|
:disabled="multiple" |
||||
|
@click="handleDelete" |
||||
|
v-hasPermi="['system:status:remove']" |
||||
|
>删除</el-button> |
||||
|
</el-col> |
||||
|
<el-col :span="1.5"> |
||||
|
<el-button |
||||
|
type="warning" |
||||
|
plain |
||||
|
icon="el-icon-download" |
||||
|
size="mini" |
||||
|
@click="handleExport" |
||||
|
v-hasPermi="['system:status:export']" |
||||
|
>导出</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table v-loading="loading" :data="statusList" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
<el-table-column label="状态ID" align="center" prop="statusId" /> |
||||
|
<el-table-column label="兽医ID" align="center" prop="vetId" /> |
||||
|
<el-table-column label="是否在线" align="center" prop="isOnline" /> |
||||
|
<el-table-column label="在线状态" align="center" prop="onlineStatus" /> |
||||
|
<el-table-column label="最后在线时间" align="center" prop="lastOnlineTime" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.lastOnlineTime, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="最后活动时间" align="center" prop="lastActiveTime" width="180"> |
||||
|
<template slot-scope="scope"> |
||||
|
<span>{{ parseTime(scope.row.lastActiveTime, '{y}-{m}-{d}') }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="当前咨询会话ID" align="center" prop="currentSessionId" /> |
||||
|
<el-table-column label="IP地址" align="center" prop="ipAddress" /> |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
v-hasPermi="['system:status:edit']" |
||||
|
>修改</el-button> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
v-hasPermi="['system:status:remove']" |
||||
|
>删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="total>0" |
||||
|
:total="total" |
||||
|
:page.sync="queryParams.pageNum" |
||||
|
:limit.sync="queryParams.pageSize" |
||||
|
@pagination="getList" |
||||
|
/> |
||||
|
|
||||
|
<!-- 添加或修改专家在线状态对话框 --> |
||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
||||
|
<el-form-item label="兽医ID" prop="vetId"> |
||||
|
<el-input v-model="form.vetId" placeholder="请输入兽医ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否在线" prop="isOnline"> |
||||
|
<el-input v-model="form.isOnline" placeholder="请输入是否在线" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="最后在线时间" prop="lastOnlineTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.lastOnlineTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择最后在线时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="最后活动时间" prop="lastActiveTime"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="form.lastActiveTime" |
||||
|
type="date" |
||||
|
value-format="yyyy-MM-dd" |
||||
|
placeholder="请选择最后活动时间"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="当前咨询会话ID" prop="currentSessionId"> |
||||
|
<el-input v-model="form.currentSessionId" placeholder="请输入当前咨询会话ID" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="IP地址" prop="ipAddress"> |
||||
|
<el-input v-model="form.ipAddress" placeholder="请输入IP地址" /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div slot="footer" class="dialog-footer"> |
||||
|
<el-button type="primary" @click="submitForm">确 定</el-button> |
||||
|
<el-button @click="cancel">取 消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { listStatus, getStatus, delStatus, addStatus, updateStatus } from "@/api/system/status" |
||||
|
|
||||
|
export default { |
||||
|
name: "Status", |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 专家在线状态表格数据 |
||||
|
statusList: [], |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
vetId: null, |
||||
|
isOnline: null, |
||||
|
onlineStatus: null, |
||||
|
lastOnlineTime: null, |
||||
|
lastActiveTime: null, |
||||
|
currentSessionId: null, |
||||
|
ipAddress: null |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: { |
||||
|
vetId: [ |
||||
|
{ required: true, message: "兽医ID不能为空", trigger: "blur" } |
||||
|
], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList() |
||||
|
}, |
||||
|
methods: { |
||||
|
/** 查询专家在线状态列表 */ |
||||
|
getList() { |
||||
|
this.loading = true |
||||
|
listStatus(this.queryParams).then(response => { |
||||
|
this.statusList = response.rows |
||||
|
this.total = response.total |
||||
|
this.loading = false |
||||
|
}) |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false |
||||
|
this.reset() |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
statusId: null, |
||||
|
vetId: null, |
||||
|
isOnline: null, |
||||
|
onlineStatus: null, |
||||
|
lastOnlineTime: null, |
||||
|
lastActiveTime: null, |
||||
|
currentSessionId: null, |
||||
|
ipAddress: null |
||||
|
} |
||||
|
this.resetForm("form") |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetForm("queryForm") |
||||
|
this.handleQuery() |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map(item => item.statusId) |
||||
|
this.single = selection.length!==1 |
||||
|
this.multiple = !selection.length |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd() { |
||||
|
this.reset() |
||||
|
this.open = true |
||||
|
this.title = "添加专家在线状态" |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset() |
||||
|
const statusId = row.statusId || this.ids |
||||
|
getStatus(statusId).then(response => { |
||||
|
this.form = response.data |
||||
|
this.open = true |
||||
|
this.title = "修改专家在线状态" |
||||
|
}) |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.form.statusId != null) { |
||||
|
updateStatus(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("修改成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} else { |
||||
|
addStatus(this.form).then(response => { |
||||
|
this.$modal.msgSuccess("新增成功") |
||||
|
this.open = false |
||||
|
this.getList() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
/** 删除按钮操作 */ |
||||
|
handleDelete(row) { |
||||
|
const statusIds = row.statusId || this.ids |
||||
|
this.$modal.confirm('是否确认删除专家在线状态编号为"' + statusIds + '"的数据项?').then(function() { |
||||
|
return delStatus(statusIds) |
||||
|
}).then(() => { |
||||
|
this.getList() |
||||
|
this.$modal.msgSuccess("删除成功") |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
/** 导出按钮操作 */ |
||||
|
handleExport() { |
||||
|
this.download('system/status/export', { |
||||
|
...this.queryParams |
||||
|
}, `status_${new Date().getTime()}.xlsx`) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue