diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/CertificateTestController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/CertificateTestController.java deleted file mode 100644 index 26c6566..0000000 --- a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/CertificateTestController.java +++ /dev/null @@ -1,90 +0,0 @@ -/* -package com.chenhai.vet.controller; - -import com.chenhai.common.core.controller.BaseController; -import com.chenhai.common.core.domain.AjaxResult; -import com.chenhai.vet.domain.VetCertificate; -import com.chenhai.vet.service.IVetCertificateService; -import com.chenhai.vet.service.VetNotificationService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -*/ -/** - * 证书提醒测试控制器 - *//* - -@RestController -@RequestMapping("/test/certificate") -public class CertificateTestController extends BaseController { - - @Autowired - private IVetCertificateService vetCertificateService; - - @Autowired - private VetNotificationService vetNotificationService; - - */ -/** - * 测试单个证书提醒 - *//* - - @GetMapping("/test-notify/{certId}") - public AjaxResult testNotify(@PathVariable Long certId) { - try { - logger.info("🎯 测试证书提醒,证书ID: {}", certId); - - // 1. 获取证书 - VetCertificate cert = vetCertificateService.selectVetCertificateById(certId); - if (cert == null) { - return error("证书不存在: " + certId); - } - - // 2. 直接调用通知服务 - logger.info("📨 调用通知服务,证书: {}", cert.getCertName()); - vetNotificationService.sendCertificateExpireRemind(cert); - logger.info("✅ 通知服务调用完成"); - - // 3. 返回结果 - return success("测试完成,证书ID: " + certId + - ",证书名称: " + cert.getCertName() + - ",请检查数据库通知表"); - - } catch (Exception e) { - logger.error("测试失败", e); - return error("测试失败: " + e.getMessage()); - } - } - - */ -/** - * 手动触发定时任务 - *//* - - @GetMapping("/trigger-task") - public AjaxResult triggerTask() { - try { - logger.info("🚀 手动触发证书检查任务"); - vetCertificateService.checkAndSendCertificateReminders(); - return success("定时任务已手动触发,请查看控制台日志"); - } catch (Exception e) { - logger.error("触发定时任务失败", e); - return error("触发失败: " + e.getMessage()); - } - } - - */ -/** - * 检查通知表数据 - *//* - - @GetMapping("/check-notifications") - public AjaxResult checkNotifications() { - try { - // 这里需要查询通知表,暂时返回简单信息 - return success("请通过SQL查询通知表: SELECT * FROM vet_notification ORDER BY create_time DESC LIMIT 10"); - } catch (Exception e) { - return error("检查失败: " + e.getMessage()); - } - } -}*/ diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetExperienceArticleController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetExperienceArticleController.java new file mode 100644 index 0000000..7e7fe3a --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetExperienceArticleController.java @@ -0,0 +1,317 @@ +package com.chenhai.web.controller.vet; + +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.SecurityUtils; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.vet.domain.VetExperienceArticle; +import com.chenhai.vet.service.IVetExperienceArticleService; +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.*; + +/** + * 兽医经验文章Controller + */ +@RestController +@RequestMapping("/vet/article") +public class VetExperienceArticleController extends BaseController { + + @Autowired + private IVetExperienceArticleService vetExperienceArticleService; + + + /** + * 查询兽医经验文章列表 + */ + @GetMapping("/list") + public TableDataInfo list(VetExperienceArticle vetExperienceArticle) { + startPage(); + List list = vetExperienceArticleService.selectVetExperienceArticleList(vetExperienceArticle); + return getDataTable(list); + } + + /** + * 获取文章详细信息 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(vetExperienceArticleService.selectVetExperienceArticleById(id)); + } + + /** + * 修改兽医经验文章 + */ + @PreAuthorize("@ss.hasPermi('vet:article:edit')") + @Log(title = "兽医经验文章", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody VetExperienceArticle vetExperienceArticle) { + return toAjax(vetExperienceArticleService.updateVetExperienceArticle(vetExperienceArticle)); + } + + /** + * 删除兽医经验文章 + */ + @PreAuthorize("@ss.hasPermi('vet:article:remove')") + @Log(title = "兽医经验文章", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(vetExperienceArticleService.deleteVetExperienceArticleByIds(ids)); + } + + + + /** + * 获取所有兽医已发布的文章 + */ + @GetMapping("/forum/home") + public AjaxResult getForumHome() { + Map forumData = new HashMap<>(); + + // 1. 推荐文章(精选+置顶) + List featuredArticles = vetExperienceArticleService.selectFeaturedArticles(8); + forumData.put("featuredArticles", featuredArticles); + + // 2. 最新文章 + List latestArticles = vetExperienceArticleService.selectLatestArticles(10); + forumData.put("latestArticles", latestArticles); + + // 3. 热门文章(按浏览数) + List hotArticles = vetExperienceArticleService.selectHotArticles(10); + forumData.put("hotArticles", hotArticles); + + // 4. 文章统计 + Map statistics = vetExperienceArticleService.selectForumStatistics(); + forumData.put("statistics", statistics); + + return success(forumData); + } + + /** + * 浏览文章详情(论坛模式) + * 增加浏览数,可以查看所有兽医的文章 + */ + @GetMapping("/forum/detail/{id}") + public AjaxResult getForumArticleDetail(@PathVariable Long id) { + // 1. 获取文章详情 + VetExperienceArticle article = vetExperienceArticleService.selectVetExperienceArticleById(id); + + if (article == null || !"1".equals(article.getStatus())) { + return error("文章不存在或未发布"); + } + + // 2. 增加浏览数 + vetExperienceArticleService.incrementViewCount(id); + + // 3. 判断是否是当前用户发布的文章 + Long currentUserId = getUserId(); + boolean isOwner = currentUserId != null && currentUserId.equals(article.getVetId()); + + // 4. 获取相关文章 + List relatedArticles = vetExperienceArticleService.selectRelatedArticles(id, article.getCategoryId(), 4); + + // 5. 获取作者的其他文章 + List authorArticles = vetExperienceArticleService.selectArticlesByVetId(article.getVetId(), 5); + + Map result = new HashMap<>(); + result.put("article", article); + result.put("isOwner", isOwner); + result.put("relatedArticles", relatedArticles); + result.put("authorArticles", authorArticles); + + return success(result); + } + + /** + * 发布新文章(论坛发布接口) + */ + @PreAuthorize("@ss.hasPermi('vet:article:add')") + @Log(title = "发布经验文章", businessType = BusinessType.INSERT) + @PostMapping("/forum/publish") + public AjaxResult publishForumArticle(@RequestBody VetExperienceArticle article) { + Long currentUserId = getUserId(); + String currentUsername = SecurityUtils.getUsername(); + + // 设置作者信息 + article.setVetId(currentUserId); + article.setVetName(currentUsername); // 暂时用用户名,可以根据需要从用户表获取真实姓名 + + // 设置文章状态为已发布 + article.setStatus("1"); + article.setPublishTime(new Date()); + + // 敏感词检查 + Map sensitiveCheck = checkSensitiveWords(article); + if ((Boolean) sensitiveCheck.get("hasSensitive")) { + // 包含敏感词,标记但不阻止发布 + article.setIsSensitive("1"); + article.setSensitiveWords((String) sensitiveCheck.get("sensitiveWords")); + + int result = vetExperienceArticleService.insertVetExperienceArticle(article); + if (result > 0) { + return success("文章发布成功,但包含敏感词,请注意修改。") + .put("articleId", article.getId()) + .put("hasSensitive", true) + .put("sensitiveWords", sensitiveCheck.get("sensitiveWords")); + } + } else { + article.setIsSensitive("0"); + article.setSensitiveWords(null); + + int result = vetExperienceArticleService.insertVetExperienceArticle(article); + return toAjax(result).put("articleId", article.getId()); + } + + return error("发布失败"); + } + + /** + * 获取当前用户的文章 + */ + @PreAuthorize("@ss.hasPermi('vet:article:my')") + @GetMapping("/forum/myArticles") + public TableDataInfo getMyForumArticles( + @RequestParam(value = "status", required = false) String status) { + + Long currentUserId = getUserId(); + + VetExperienceArticle query = new VetExperienceArticle(); + query.setVetId(currentUserId); + + if (status != null && !status.isEmpty()) { + query.setStatus(status); + } + + startPage(); + List list = vetExperienceArticleService.selectVetExperienceArticleList(query); + return getDataTable(list); + } + + /** + * 点赞文章 + */ + @PostMapping("/forum/{id}/like") + public AjaxResult likeArticle(@PathVariable Long id) { + int result = vetExperienceArticleService.incrementLikeCount(id); + return toAjax(result); + } + + /** + * 收藏文章 + */ + @PostMapping("/forum/{id}/collect") + public AjaxResult collectArticle(@PathVariable Long id) { + int result = vetExperienceArticleService.incrementCollectCount(id); + return toAjax(result); + } + + /** + * 搜索文章 + */ + @GetMapping("/forum/search") + public TableDataInfo searchForumArticles( + @RequestParam(value = "keyword", required = false) String keyword, + @RequestParam(value = "categoryId", required = false) Long categoryId, + @RequestParam(value = "tag", required = false) String tag) { + + VetExperienceArticle query = new VetExperienceArticle(); + query.setStatus("1"); // 只搜索已发布的文章 + + if (keyword != null && !keyword.trim().isEmpty()) { + query.setTitle(keyword.trim()); + } + + if (categoryId != null) { + query.setCategoryId(categoryId); + } + + startPage(); + List list = vetExperienceArticleService.selectVetExperienceArticleList(query); + /*List list = vetExperienceArticleService.searchArticles(keyword);*/ + return getDataTable(list); + } + /*@GetMapping("/forum/search") + public TableDataInfo searchForumArticles( + @RequestParam(value = "keyword", required = false) String keyword, + @RequestParam(value = "categoryId", required = false) Long categoryId, + @RequestParam(value = "tag", required = false) String tag) { + + startPage(); + List list = new ArrayList<>(); + + if (keyword != null && !keyword.trim().isEmpty()) { + list = vetExperienceArticleService.searchArticles(keyword); + } else { + VetExperienceArticle query = new VetExperienceArticle(); + query.setStatus("1"); + if (categoryId != null) { + query.setCategoryId(categoryId); + } + if (tag != null && !tag.trim().isEmpty()) { + query.setTags(tag.trim()); // 注意:需确保MyBatis支持tags的模糊匹配 + } + list = vetExperienceArticleService.selectVetExperienceArticleList(query); + } + + return getDataTable(list); + }*/ + + /** + * 获取热门标签 + */ + @GetMapping("/forum/hotTags") + public AjaxResult getHotTags(@RequestParam(value = "limit", defaultValue = "15") Integer limit) { + List> hotTags = vetExperienceArticleService.selectHotTags(limit); + return success(hotTags); + } + + /** + * 新增文章 - 调整为论坛发布模式 + */ + @PreAuthorize("@ss.hasPermi('vet:article:add')") + @Log(title = "兽医经验文章", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody VetExperienceArticle vetExperienceArticle) { + // 调用论坛发布接口 + return publishForumArticle(vetExperienceArticle); + } + + /** + * 敏感词检查方法 + */ + private Map checkSensitiveWords(VetExperienceArticle article) { + Map result = new HashMap<>(); + result.put("hasSensitive", false); + result.put("sensitiveWords", ""); + + // TODO: 实现敏感词检查逻辑 + // 可以调用专门的敏感词服务 + // List sensitiveWords = sensitiveWordService.detect(article.getTitle() + " " + article.getContent()); + + // 示例逻辑 + if (article.getTitle() != null && article.getTitle().contains("敏感词示例")) { + result.put("hasSensitive", true); + result.put("sensitiveWords", "敏感词示例"); + } + + return result; + } + + /** + * 导出兽医经验文章列表 + */ + @PreAuthorize("@ss.hasPermi('vet:article:export')") + @Log(title = "兽医经验文章", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, VetExperienceArticle vetExperienceArticle) { + List list = vetExperienceArticleService.selectVetExperienceArticleList(vetExperienceArticle); + ExcelUtil util = new ExcelUtil<>(VetExperienceArticle.class); + util.exportExcel(response, list, "兽医经验文章数据"); + } +} \ No newline at end of file diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetNotificationController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetNotificationController.java index 2d57159..1ad48f7 100644 --- a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetNotificationController.java +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetNotificationController.java @@ -1,5 +1,6 @@ package com.chenhai.web.controller.vet; +import java.util.ArrayList; import java.util.List; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; @@ -100,4 +101,83 @@ public class VetNotificationController extends BaseController { return toAjax(vetNotificationService.deleteVetNotificationByIds(ids)); } -} + + /** + * 根据当前用户ID获取通知列表 + */ + @PreAuthorize("@ss.hasPermi('vet:notification:list')") + @GetMapping("/user/list") + public TableDataInfo getUserNotifications() + { + // 使用父类的 getUserId() 方法 + Long currentUserId = getUserId(); + + if (currentUserId == null) { + logger.warn("无法获取当前用户ID,用户可能未登录"); + return getDataTable(new ArrayList<>()); + } + + startPage(); + List list = vetNotificationService.getNotificationsByUserId(currentUserId); + return getDataTable(list); + } + + /** + * 获取当前用户的未读通知数量 + */ + @PreAuthorize("@ss.hasPermi('vet:notification:query')") + @GetMapping("/user/unread/count") + public AjaxResult getUnreadCount() + { + Long currentUserId = getUserId(); + if (currentUserId == null) { + return success(0); + } + + int unreadCount = vetNotificationService.getUnreadCount(currentUserId); + return success(unreadCount); + } + + /** + * 标记单个通知为已读 + */ + @PreAuthorize("@ss.hasPermi('vet:notification:edit')") + @Log(title = "标记通知已读", businessType = BusinessType.UPDATE) + @PutMapping("/{id}/read") + public AjaxResult markAsRead(@PathVariable Long id) + { + boolean result = vetNotificationService.markAsRead(id); + return toAjax(result ? 1 : 0); + } + + /** + * 标记所有通知为已读 + */ + @PreAuthorize("@ss.hasPermi('vet:notification:edit')") + @Log(title = "标记所有通知已读", businessType = BusinessType.UPDATE) + @PutMapping("/user/mark-all-read") + public AjaxResult markAllAsRead() + { + Long currentUserId = getUserId(); + if (currentUserId == null) { + return error("用户未登录"); + } + + boolean result = vetNotificationService.markAllAsRead(currentUserId); + return toAjax(result ? 1 : 0); + } + + /** + * 根据指定用户ID查询通知列表(管理员功能) + */ + @PreAuthorize("@ss.hasPermi('vet:notification:list')") + @GetMapping("/list/user/{userId}") + public TableDataInfo listByUserId(@PathVariable Long userId) + { + startPage(); + VetNotification query = new VetNotification(); + query.setUserId(userId); + List list = vetNotificationService.selectVetNotificationList(query); + return getDataTable(list); + } +} \ No newline at end of file diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetQualificationController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetQualificationController.java index 919807d..39f8643 100644 --- a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetQualificationController.java +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetQualificationController.java @@ -22,7 +22,7 @@ import java.util.List; * @date 2025-12-26 */ @RestController -@RequestMapping("/system/qualification") +@RequestMapping("/vet/qualification") public class VetQualificationController extends BaseController { @Autowired @@ -31,7 +31,7 @@ public class VetQualificationController extends BaseController /** * 查询兽医资质列表 */ - @PreAuthorize("@ss.hasPermi('system:qualification:list')") + @PreAuthorize("@ss.hasPermi('vet:qualification:list')") @GetMapping("/list") public TableDataInfo list(VetQualification vetQualification) { @@ -43,7 +43,7 @@ public class VetQualificationController extends BaseController /** * 导出兽医资质列表 */ - @PreAuthorize("@ss.hasPermi('system:qualification:export')") + @PreAuthorize("@ss.hasPermi('vet:qualification:export')") @Log(title = "兽医资质", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, VetQualification vetQualification) @@ -56,7 +56,7 @@ public class VetQualificationController extends BaseController /** * 获取兽医资质详细信息 */ - @PreAuthorize("@ss.hasPermi('system:qualification:query')") + @PreAuthorize("@ss.hasPermi('vet:qualification:query')") @GetMapping(value = "/{qualificationId}") public AjaxResult getInfo(@PathVariable("qualificationId") Long qualificationId) { @@ -66,7 +66,7 @@ public class VetQualificationController extends BaseController /** * 新增兽医资质 */ - @PreAuthorize("@ss.hasPermi('system:qualification:add')") + @PreAuthorize("@ss.hasPermi('vet:qualification:add')") @Log(title = "兽医资质", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody VetQualification vetQualification) @@ -77,7 +77,7 @@ public class VetQualificationController extends BaseController /** * 修改兽医资质 */ - @PreAuthorize("@ss.hasPermi('system:qualification:edit')") + @PreAuthorize("@ss.hasPermi('vet:qualification:edit')") @Log(title = "兽医资质", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody VetQualification vetQualification) @@ -88,7 +88,7 @@ public class VetQualificationController extends BaseController /** * 删除兽医资质 */ - @PreAuthorize("@ss.hasPermi('system:qualification:remove')") + @PreAuthorize("@ss.hasPermi('vet:qualification:remove')") @Log(title = "兽医资质", businessType = BusinessType.DELETE) @DeleteMapping("/{qualificationIds}") public AjaxResult remove(@PathVariable Long[] qualificationIds) diff --git a/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetServiceReviewController.java b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetServiceReviewController.java new file mode 100644 index 0000000..09d2c03 --- /dev/null +++ b/chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetServiceReviewController.java @@ -0,0 +1,104 @@ +package com.chenhai.web.controller.vet; + +import java.util.List; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.chenhai.common.annotation.Log; +import com.chenhai.common.core.controller.BaseController; +import com.chenhai.common.core.domain.AjaxResult; +import com.chenhai.common.enums.BusinessType; +import com.chenhai.vet.domain.VetServiceReview; +import com.chenhai.vet.service.IVetServiceReviewService; +import com.chenhai.common.utils.poi.ExcelUtil; +import com.chenhai.common.core.page.TableDataInfo; + +/** + * 兽医服务评价Controller + * + * @author ruoyi + * @date 2026-01-06 + */ +@RestController +@RequestMapping("/vet/review") +public class VetServiceReviewController extends BaseController +{ + @Autowired + private IVetServiceReviewService vetServiceReviewService; + + /** + * 查询兽医服务评价列表 + */ + @PreAuthorize("@ss.hasPermi('vet:review:list')") + @GetMapping("/list") + public TableDataInfo list(VetServiceReview vetServiceReview) + { + startPage(); + List list = vetServiceReviewService.selectVetServiceReviewList(vetServiceReview); + return getDataTable(list); + } + + /** + * 导出兽医服务评价列表 + */ + @PreAuthorize("@ss.hasPermi('vet:review:export')") + @Log(title = "兽医服务评价", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, VetServiceReview vetServiceReview) + { + List list = vetServiceReviewService.selectVetServiceReviewList(vetServiceReview); + ExcelUtil util = new ExcelUtil(VetServiceReview.class); + util.exportExcel(response, list, "兽医服务评价数据"); + } + + /** + * 获取兽医服务评价详细信息 + */ + @PreAuthorize("@ss.hasPermi('vet:review:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(vetServiceReviewService.selectVetServiceReviewById(id)); + } + + /** + * 新增兽医服务评价 + */ + @PreAuthorize("@ss.hasPermi('vet:review:add')") + @Log(title = "兽医服务评价", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody VetServiceReview vetServiceReview) + { + return toAjax(vetServiceReviewService.insertVetServiceReview(vetServiceReview)); + } + + /** + * 修改兽医服务评价 + */ + @PreAuthorize("@ss.hasPermi('vet:review:edit')") + @Log(title = "兽医服务评价", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody VetServiceReview vetServiceReview) + { + return toAjax(vetServiceReviewService.updateVetServiceReview(vetServiceReview)); + } + + /** + * 删除兽医服务评价 + */ + @PreAuthorize("@ss.hasPermi('vet:review:remove')") + @Log(title = "兽医服务评价", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(vetServiceReviewService.deleteVetServiceReviewByIds(ids)); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/CertificateRemindTask.java b/chenhai-system/src/main/java/com/chenhai/vet/CertificateRemindTask.java index 9329e90..c1a9b48 100644 --- a/chenhai-system/src/main/java/com/chenhai/vet/CertificateRemindTask.java +++ b/chenhai-system/src/main/java/com/chenhai/vet/CertificateRemindTask.java @@ -27,10 +27,10 @@ public class CertificateRemindTask { /* @Scheduled(cron = "0 0 2 * * ?")*/ @Scheduled(cron = "0 */1 * * * ?") public void dailyCertificateCheck() { - log.info("开始执行每日证书检查任务..."); + /*log.info("开始执行每日证书检查任务...");*/ try { vetCertificateService.checkAndSendCertificateReminders(); - log.info("每日证书检查任务执行完成"); + /* log.info("每日证书检查任务执行完成");*/ } catch (Exception e) { log.error("每日证书检查任务执行失败", e); } diff --git a/chenhai-system/src/main/java/com/chenhai/vet/domain/VetArticleCategory.java b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetArticleCategory.java new file mode 100644 index 0000000..f3ee642 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetArticleCategory.java @@ -0,0 +1,112 @@ +package com.chenhai.vet.domain; + +import com.chenhai.common.annotation.Excel; +import com.chenhai.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 文章分类对象 vet_article_category + */ +public class VetArticleCategory extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 分类ID */ + private Long id; + + /** 分类名称 */ + @Excel(name = "分类名称") + private String name; + + /** 分类描述 */ + @Excel(name = "分类描述") + private String description; + + /** 分类图标 */ + private String icon; + + /** 排序 */ + @Excel(name = "排序") + private Integer sortOrder; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private String status; + + /** 文章数量(统计字段) */ + private Integer articleCount; + + // getter/setter 方法... + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public Integer getSortOrder() { + return sortOrder; + } + + public void setSortOrder(Integer sortOrder) { + this.sortOrder = sortOrder; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Integer getArticleCount() { + return articleCount; + } + + public void setArticleCount(Integer articleCount) { + this.articleCount = articleCount; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("description", getDescription()) + .append("icon", getIcon()) + .append("sortOrder", getSortOrder()) + .append("status", getStatus()) + .append("articleCount", getArticleCount()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/domain/VetExperienceArticle.java b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetExperienceArticle.java new file mode 100644 index 0000000..3ece9d5 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetExperienceArticle.java @@ -0,0 +1,351 @@ +package com.chenhai.vet.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_experience_article + * + * @author ruoyi + * @date 2026-01-06 + */ +public class VetExperienceArticle extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 文章标题 */ + @Excel(name = "文章标题") + private String title; + + /** 文章内容(富文本) */ + @Excel(name = "文章内容", readConverterExp = "富=文本") + private String content; + + /** 文章摘要 */ + @Excel(name = "文章摘要") + private String summary; + + /** 封面图片 */ + @Excel(name = "封面图片") + private String coverImage; + + /** 文章图片(JSON数组) */ + @Excel(name = "文章图片", readConverterExp = "J=SON数组") + private String images; + + /** 作者(兽医)ID */ + @Excel(name = "作者", readConverterExp = "兽=医") + private Long vetId; + + /** 兽医姓名 */ + @Excel(name = "兽医姓名") + private String vetName; + + /** 兽医头像 */ + @Excel(name = "兽医头像") + private String vetAvatar; + + /** 兽医职称 */ + @Excel(name = "兽医职称") + private String vetTitle; + + /** 分类ID */ + @Excel(name = "分类ID") + private Long categoryId; + + /** 分类名称 */ + @Excel(name = "分类名称") + private String categoryName; + + /** 标签(逗号分隔) */ + @Excel(name = "标签", readConverterExp = "逗=号分隔") + private String tags; + + /** 是否置顶(0否 1是) */ + @Excel(name = "是否置顶", readConverterExp = "0=否,1=是") + private String isTop; + + /** 是否精选(0否 1是) */ + @Excel(name = "是否精选", readConverterExp = "0=否,1=是") + private String isFeatured; + + /** 状态(0草稿 1已发布 2审核中 3已驳回) */ + @Excel(name = "状态", readConverterExp = "0=草稿,1=已发布,2=审核中,3=已驳回") + private String status; + + /** 是否包含敏感词(0否 1是) */ + @Excel(name = "是否包含敏感词", readConverterExp = "0=否,1=是") + private String isSensitive; + + /** 敏感词列表 */ + @Excel(name = "敏感词列表") + private String sensitiveWords; + + /** 发布时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date publishTime; + + /** 浏览次数 */ + @Excel(name = "浏览次数") + private Integer viewCount; + + /** 点赞数 */ + @Excel(name = "点赞数") + private Integer likeCount; + + /** 收藏数 */ + @Excel(name = "收藏数") + private Integer collectCount; + + // 确保有对应的getter和setter + public Integer getViewCount() { + return viewCount; + } + + public void setViewCount(Integer viewCount) { + this.viewCount = viewCount; + } + + public Integer getLikeCount() { + return likeCount; + } + + public void setLikeCount(Integer likeCount) { + this.likeCount = likeCount; + } + + public Integer getCollectCount() { + return collectCount; + } + + public void setCollectCount(Integer collectCount) { + this.collectCount = collectCount; + } + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + 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 setSummary(String summary) + { + this.summary = summary; + } + + public String getSummary() + { + return summary; + } + + public void setCoverImage(String coverImage) + { + this.coverImage = coverImage; + } + + public String getCoverImage() + { + return coverImage; + } + + public void setImages(String images) + { + this.images = images; + } + + public String getImages() + { + return images; + } + + public void setVetId(Long vetId) + { + this.vetId = vetId; + } + + public Long getVetId() + { + return vetId; + } + + public void setVetName(String vetName) + { + this.vetName = vetName; + } + + public String getVetName() + { + return vetName; + } + + public void setVetAvatar(String vetAvatar) + { + this.vetAvatar = vetAvatar; + } + + public String getVetAvatar() + { + return vetAvatar; + } + + public void setVetTitle(String vetTitle) + { + this.vetTitle = vetTitle; + } + + public String getVetTitle() + { + return vetTitle; + } + + public void setCategoryId(Long categoryId) + { + this.categoryId = categoryId; + } + + public Long getCategoryId() + { + return categoryId; + } + + public void setCategoryName(String categoryName) + { + this.categoryName = categoryName; + } + + public String getCategoryName() + { + return categoryName; + } + + public void setTags(String tags) + { + this.tags = tags; + } + + public String getTags() + { + return tags; + } + + public void setIsTop(String isTop) + { + this.isTop = isTop; + } + + public String getIsTop() + { + return isTop; + } + + public void setIsFeatured(String isFeatured) + { + this.isFeatured = isFeatured; + } + + public String getIsFeatured() + { + return isFeatured; + } + + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + public void setIsSensitive(String isSensitive) + { + this.isSensitive = isSensitive; + } + + public String getIsSensitive() + { + return isSensitive; + } + + public void setSensitiveWords(String sensitiveWords) + { + this.sensitiveWords = sensitiveWords; + } + + public String getSensitiveWords() + { + return sensitiveWords; + } + + public void setPublishTime(Date publishTime) + { + this.publishTime = publishTime; + } + + public Date getPublishTime() + { + return publishTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("title", getTitle()) + .append("content", getContent()) + .append("summary", getSummary()) + .append("coverImage", getCoverImage()) + .append("images", getImages()) + .append("vetId", getVetId()) + .append("vetName", getVetName()) + .append("vetAvatar", getVetAvatar()) + .append("vetTitle", getVetTitle()) + .append("categoryId", getCategoryId()) + .append("categoryName", getCategoryName()) + .append("tags", getTags()) + .append("isTop", getIsTop()) + .append("isFeatured", getIsFeatured()) + .append("status", getStatus()) + .append("isSensitive", getIsSensitive()) + .append("sensitiveWords", getSensitiveWords()) + .append("publishTime", getPublishTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/domain/VetNotification.java b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetNotification.java index 9dc8968..92d5577 100644 --- a/chenhai-system/src/main/java/com/chenhai/vet/domain/VetNotification.java +++ b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetNotification.java @@ -41,12 +41,34 @@ public class VetNotification extends BaseEntity private String relatedId; /** 是否已读 0:未读 1:已读 */ - @Excel(name = "是否已读 0:未读 1:已读") + @Excel(name = "是否已读", dictType = "notification_is_read") private Integer isRead; + /** 是否已读标签(用于前端显示) */ + private String isReadLabel; // 添加这个字段 + /** 提醒级别 1:低 2:中 3:高 */ - @Excel(name = "提醒级别 1:低 2:中 3:高") + @Excel(name = "提醒级别", dictType = "notification_remindlevel") private Integer remindLevel; + /** 提醒级别标签(用于前端显示) */ + private String remindLevelLabel; + + public String getIsReadLabel() { + return isReadLabel; + } + + public void setIsReadLabel(String isReadLabel) { + this.isReadLabel = isReadLabel; + } + + public String getRemindLevelLabel() { + return remindLevelLabel; + } + + public void setRemindLevelLabel(String remindLevelLabel) { + this.remindLevelLabel = remindLevelLabel; + } + /** 阅读时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @@ -156,6 +178,8 @@ public class VetNotification extends BaseEntity .append("remindLevel", getRemindLevel()) .append("createTime", getCreateTime()) .append("readTime", getReadTime()) + .append("isReadLabel", getIsReadLabel()) + .append("remindLevelLabel", getRemindLevelLabel()) .toString(); } } diff --git a/chenhai-system/src/main/java/com/chenhai/vet/domain/VetServiceReview.java b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetServiceReview.java new file mode 100644 index 0000000..dac4950 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/domain/VetServiceReview.java @@ -0,0 +1,181 @@ +package com.chenhai.vet.domain; + +import java.math.BigDecimal; +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_service_review + * + * @author ruoyi + * @date 2026-01-06 + */ +public class VetServiceReview extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 兽医用户ID */ + @Excel(name = "兽医用户ID") + private Long vetUserId; + + /** 客户用户ID */ + @Excel(name = "客户用户ID") + private Long customerUserId; + + /** 订单编号 */ + @Excel(name = "订单编号") + private String orderNo; + + /** 评分(1-5分) */ + @Excel(name = "评分", readConverterExp = "1=-5分") + private BigDecimal rating; + + /** 评价内容 */ + @Excel(name = "评价内容") + private String content; + + /** 评价时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "评价时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date reviewTime; + + /** 是否匿名 */ + @Excel(name = "是否匿名") + private String isAnonymous; + + /** 回复内容 */ + @Excel(name = "回复内容") + private String replyContent; + + /** 回复时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "回复时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date replyTime; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setVetUserId(Long vetUserId) + { + this.vetUserId = vetUserId; + } + + public Long getVetUserId() + { + return vetUserId; + } + + public void setCustomerUserId(Long customerUserId) + { + this.customerUserId = customerUserId; + } + + public Long getCustomerUserId() + { + return customerUserId; + } + + public void setOrderNo(String orderNo) + { + this.orderNo = orderNo; + } + + public String getOrderNo() + { + return orderNo; + } + + public void setRating(BigDecimal rating) + { + this.rating = rating; + } + + public BigDecimal getRating() + { + return rating; + } + + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + + public void setReviewTime(Date reviewTime) + { + this.reviewTime = reviewTime; + } + + public Date getReviewTime() + { + return reviewTime; + } + + public void setIsAnonymous(String isAnonymous) + { + this.isAnonymous = isAnonymous; + } + + public String getIsAnonymous() + { + return isAnonymous; + } + + public void setReplyContent(String replyContent) + { + this.replyContent = replyContent; + } + + public String getReplyContent() + { + return replyContent; + } + + public void setReplyTime(Date replyTime) + { + this.replyTime = replyTime; + } + + public Date getReplyTime() + { + return replyTime; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("vetUserId", getVetUserId()) + .append("customerUserId", getCustomerUserId()) + .append("orderNo", getOrderNo()) + .append("rating", getRating()) + .append("content", getContent()) + .append("reviewTime", getReviewTime()) + .append("isAnonymous", getIsAnonymous()) + .append("replyContent", getReplyContent()) + .append("replyTime", getReplyTime()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetArticleCategoryMapper.java b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetArticleCategoryMapper.java new file mode 100644 index 0000000..35abbb8 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetArticleCategoryMapper.java @@ -0,0 +1,47 @@ +package com.chenhai.vet.mapper; + +import com.chenhai.vet.domain.VetArticleCategory; +import org.apache.ibatis.annotations.Mapper; +import java.util.List; + +/** + * 文章分类Mapper接口 + */ +@Mapper +public interface VetArticleCategoryMapper { + + /** + * 查询文章分类 + */ + VetArticleCategory selectVetArticleCategoryById(Long id); + + /** + * 查询文章分类列表 + */ + List selectVetArticleCategoryList(VetArticleCategory vetArticleCategory); + + /** + * 查询启用的分类列表 + */ + List selectEnabledCategories(); + + /** + * 新增文章分类 + */ + int insertVetArticleCategory(VetArticleCategory vetArticleCategory); + + /** + * 修改文章分类 + */ + int updateVetArticleCategory(VetArticleCategory vetArticleCategory); + + /** + * 删除文章分类 + */ + int deleteVetArticleCategoryById(Long id); + + /** + * 批量删除文章分类 + */ + int deleteVetArticleCategoryByIds(Long[] ids); +} \ No newline at end of file diff --git a/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetExperienceArticleMapper.java b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetExperienceArticleMapper.java new file mode 100644 index 0000000..1492df4 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetExperienceArticleMapper.java @@ -0,0 +1,89 @@ +package com.chenhai.vet.mapper; + +import java.util.List; +import java.util.Map; + +import com.chenhai.vet.domain.VetExperienceArticle; +import org.apache.ibatis.annotations.Param; + +/** + * 兽医经验文章Mapper接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface VetExperienceArticleMapper +{ + /** + * 查询兽医经验文章 + * + * @param id 兽医经验文章主键 + * @return 兽医经验文章 + */ + public VetExperienceArticle selectVetExperienceArticleById(Long id); + + /** + * 查询兽医经验文章列表 + * + * @param vetExperienceArticle 兽医经验文章 + * @return 兽医经验文章集合 + */ + public List selectVetExperienceArticleList(VetExperienceArticle vetExperienceArticle); + + /** + * 新增兽医经验文章 + * + * @param vetExperienceArticle 兽医经验文章 + * @return 结果 + */ + public int insertVetExperienceArticle(VetExperienceArticle vetExperienceArticle); + + /** + * 修改兽医经验文章 + * + * @param vetExperienceArticle 兽医经验文章 + * @return 结果 + */ + public int updateVetExperienceArticle(VetExperienceArticle vetExperienceArticle); + + /** + * 删除兽医经验文章 + * + * @param id 兽医经验文章主键 + * @return 结果 + */ + public int deleteVetExperienceArticleById(Long id); + + /** + * 批量删除兽医经验文章 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteVetExperienceArticleByIds(Long[] ids); + + /** + * 根据条件查询文章(支持排序和限制条数) + */ + List selectArticlesByCondition(Map params); + + List searchArticles(@Param("keyword") String keyword, + @Param("status") String status); + + + + /** + * 增加浏览数 + */ + int incrementViewCount(@Param("id") Long id); + + /** + * 增加点赞数 + */ + int incrementLikeCount(@Param("id") Long id); + + /** + * 增加收藏数 + */ + int incrementCollectCount(@Param("id") Long id); +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetNotificationMapper.java b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetNotificationMapper.java index b61a2df..7f8216b 100644 --- a/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetNotificationMapper.java +++ b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetNotificationMapper.java @@ -117,4 +117,6 @@ public interface VetNotificationMapper * @return 清理数量 */ public int cleanExpiredNotifications(@Param("days") Integer days); + + List selectVetNotificationByUserId(Long userId); } \ No newline at end of file diff --git a/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetServiceReviewMapper.java b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetServiceReviewMapper.java new file mode 100644 index 0000000..05fe2a4 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/mapper/VetServiceReviewMapper.java @@ -0,0 +1,65 @@ +package com.chenhai.vet.mapper; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +import com.chenhai.vet.domain.VetServiceReview; + +/** + * 兽医服务评价Mapper接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface VetServiceReviewMapper +{ + /** + * 查询兽医服务评价 + * + * @param id 兽医服务评价主键 + * @return 兽医服务评价 + */ + public VetServiceReview selectVetServiceReviewById(Long id); + + /** + * 查询兽医服务评价列表 + * + * @param vetServiceReview 兽医服务评价 + * @return 兽医服务评价集合 + */ + public List selectVetServiceReviewList(VetServiceReview vetServiceReview); + + /** + * 新增兽医服务评价 + * + * @param vetServiceReview 兽医服务评价 + * @return 结果 + */ + public int insertVetServiceReview(VetServiceReview vetServiceReview); + + /** + * 修改兽医服务评价 + * + * @param vetServiceReview 兽医服务评价 + * @return 结果 + */ + public int updateVetServiceReview(VetServiceReview vetServiceReview); + + /** + * 删除兽医服务评价 + * + * @param id 兽医服务评价主键 + * @return 结果 + */ + public int deleteVetServiceReviewById(Long id); + + /** + * 批量删除兽医服务评价 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteVetServiceReviewByIds(Long[] ids); + +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/service/IVetExperienceArticleService.java b/chenhai-system/src/main/java/com/chenhai/vet/service/IVetExperienceArticleService.java new file mode 100644 index 0000000..e8f2987 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/service/IVetExperienceArticleService.java @@ -0,0 +1,115 @@ +package com.chenhai.vet.service; + +import java.util.List; +import java.util.Map; + +import com.chenhai.vet.domain.VetExperienceArticle; + +/** + * 兽医经验文章Service接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface IVetExperienceArticleService +{ + /** + * 查询兽医经验文章 + * + * @param id 兽医经验文章主键 + * @return 兽医经验文章 + */ + public VetExperienceArticle selectVetExperienceArticleById(Long id); + + /** + * 查询兽医经验文章列表 + * + * @param vetExperienceArticle 兽医经验文章 + * @return 兽医经验文章集合 + */ + public List selectVetExperienceArticleList(VetExperienceArticle vetExperienceArticle); + + /** + * 新增兽医经验文章 + * + * @param vetExperienceArticle 兽医经验文章 + * @return 结果 + */ + public int insertVetExperienceArticle(VetExperienceArticle vetExperienceArticle); + + /** + * 修改兽医经验文章 + * + * @param vetExperienceArticle 兽医经验文章 + * @return 结果 + */ + public int updateVetExperienceArticle(VetExperienceArticle vetExperienceArticle); + + /** + * 批量删除兽医经验文章 + * + * @param ids 需要删除的兽医经验文章主键集合 + * @return 结果 + */ + public int deleteVetExperienceArticleByIds(Long[] ids); + + /** + * 删除兽医经验文章信息 + * + * @param id 兽医经验文章主键 + * @return 结果 + */ + public int deleteVetExperienceArticleById(Long id); + + /** + * 获取推荐文章(精选+置顶) + */ + List selectFeaturedArticles(Integer limit); + + List searchArticles(String keyword); + + /** + * 获取最新文章 + */ + List selectLatestArticles(Integer limit); + + /** + * 获取热门文章(按浏览数排序) + */ + List selectHotArticles(Integer limit); + + /** + * 根据兽医ID获取文章 + */ + List selectArticlesByVetId(Long vetId, Integer limit); + + /** + * 获取相关文章 + */ + List selectRelatedArticles(Long excludeId, Long categoryId, Integer limit); + + /** + * 增加浏览数 + */ + int incrementViewCount(Long id); + + /** + * 增加点赞数 + */ + int incrementLikeCount(Long id); + + /** + * 增加收藏数 + */ + int incrementCollectCount(Long id); + + /** + * 获取论坛统计信息 + */ + Map selectForumStatistics(); + + /** + * 获取热门标签 + */ + List> selectHotTags(Integer limit); +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/service/IVetServiceReviewService.java b/chenhai-system/src/main/java/com/chenhai/vet/service/IVetServiceReviewService.java new file mode 100644 index 0000000..2594078 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/service/IVetServiceReviewService.java @@ -0,0 +1,65 @@ +package com.chenhai.vet.service; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +import com.chenhai.vet.domain.VetServiceReview; + +/** + * 兽医服务评价Service接口 + * + * @author ruoyi + * @date 2026-01-06 + */ +public interface IVetServiceReviewService +{ + /** + * 查询兽医服务评价 + * + * @param id 兽医服务评价主键 + * @return 兽医服务评价 + */ + public VetServiceReview selectVetServiceReviewById(Long id); + + /** + * 查询兽医服务评价列表 + * + * @param vetServiceReview 兽医服务评价 + * @return 兽医服务评价集合 + */ + public List selectVetServiceReviewList(VetServiceReview vetServiceReview); + + /** + * 新增兽医服务评价 + * + * @param vetServiceReview 兽医服务评价 + * @return 结果 + */ + public int insertVetServiceReview(VetServiceReview vetServiceReview); + + /** + * 修改兽医服务评价 + * + * @param vetServiceReview 兽医服务评价 + * @return 结果 + */ + public int updateVetServiceReview(VetServiceReview vetServiceReview); + + /** + * 批量删除兽医服务评价 + * + * @param ids 需要删除的兽医服务评价主键集合 + * @return 结果 + */ + public int deleteVetServiceReviewByIds(Long[] ids); + + /** + * 删除兽医服务评价信息 + * + * @param id 兽医服务评价主键 + * @return 结果 + */ + public int deleteVetServiceReviewById(Long id); + +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/service/VetNotificationService.java b/chenhai-system/src/main/java/com/chenhai/vet/service/VetNotificationService.java index bb6b9ed..3606cb1 100644 --- a/chenhai-system/src/main/java/com/chenhai/vet/service/VetNotificationService.java +++ b/chenhai-system/src/main/java/com/chenhai/vet/service/VetNotificationService.java @@ -61,4 +61,6 @@ public interface VetNotificationService { * 标记所有通知为已读 */ boolean markAllAsRead(Long userId); + + List selectByUserId(Long userId); } diff --git a/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetCertificateServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetCertificateServiceImpl.java index 12b6075..184ae7e 100644 --- a/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetCertificateServiceImpl.java +++ b/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetCertificateServiceImpl.java @@ -138,8 +138,8 @@ public class VetCertificateServiceImpl implements IVetCertificateService successCount++; // 保留原来的日志输出 - System.out.println("发送证书提醒:证书ID=" + certificate.getId() + - ", 证书名称=" + certificate.getCertName()); + /* System.out.println("发送证书提醒:证书ID=" + certificate.getId() + + ", 证书名称=" + certificate.getCertName());*/ } } catch (Exception e) { failCount++; @@ -147,8 +147,8 @@ public class VetCertificateServiceImpl implements IVetCertificateService } } - // 添加统计日志 - System.out.println("证书提醒任务完成:成功 " + successCount + " 条,失败 " + failCount + " 条"); + /*// 添加统计日志 + System.out.println("证书提醒任务完成:成功 " + successCount + " 条,失败 " + failCount + " 条");*/ } /** diff --git a/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetExperienceArticleServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetExperienceArticleServiceImpl.java new file mode 100644 index 0000000..ceec20d --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetExperienceArticleServiceImpl.java @@ -0,0 +1,251 @@ +package com.chenhai.vet.service.impl; + +import java.util.*; + +import com.chenhai.common.utils.DateUtils; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.vet.mapper.VetExperienceArticleMapper; +import com.chenhai.vet.domain.VetExperienceArticle; +import com.chenhai.vet.service.IVetExperienceArticleService; + +/** + * 兽医经验文章Service业务层处理 + * + * @author ruoyi + * @date 2026-01-06 + */ +@Service +public class VetExperienceArticleServiceImpl implements IVetExperienceArticleService +{ + @Autowired + private VetExperienceArticleMapper vetExperienceArticleMapper; + + /** + * 查询兽医经验文章 + * + * @param id 兽医经验文章主键 + * @return 兽医经验文章 + */ + @Override + public VetExperienceArticle selectVetExperienceArticleById(Long id) + { + return vetExperienceArticleMapper.selectVetExperienceArticleById(id); + } + + /** + * 查询兽医经验文章列表 + * + * @param vetExperienceArticle 兽医经验文章 + * @return 兽医经验文章 + */ + @Override + public List selectVetExperienceArticleList(VetExperienceArticle vetExperienceArticle) + { + return vetExperienceArticleMapper.selectVetExperienceArticleList(vetExperienceArticle); + } + + /** + * 新增兽医经验文章 + * + * @param vetExperienceArticle 兽医经验文章 + * @return 结果 + */ + @Override + public int insertVetExperienceArticle(VetExperienceArticle vetExperienceArticle) + { + vetExperienceArticle.setCreateTime(DateUtils.getNowDate()); + return vetExperienceArticleMapper.insertVetExperienceArticle(vetExperienceArticle); + } + + /** + * 修改兽医经验文章 + * + * @param vetExperienceArticle 兽医经验文章 + * @return 结果 + */ + @Override + public int updateVetExperienceArticle(VetExperienceArticle vetExperienceArticle) + { + vetExperienceArticle.setUpdateTime(DateUtils.getNowDate()); + return vetExperienceArticleMapper.updateVetExperienceArticle(vetExperienceArticle); + } + + /** + * 批量删除兽医经验文章 + * + * @param ids 需要删除的兽医经验文章主键 + * @return 结果 + */ + @Override + public int deleteVetExperienceArticleByIds(Long[] ids) + { + return vetExperienceArticleMapper.deleteVetExperienceArticleByIds(ids); + } + + /** + * 删除兽医经验文章信息 + * + * @param id 兽医经验文章主键 + * @return 结果 + */ + @Override + public int deleteVetExperienceArticleById(Long id) + { + return vetExperienceArticleMapper.deleteVetExperienceArticleById(id); + } + + @Override + public List selectFeaturedArticles(Integer limit) { + PageHelper.clearPage(); + Map params = new HashMap<>(); + params.put("status", 1); + params.put("isFeatured", 1); + params.put("limit", limit != null ? limit : 8); + return vetExperienceArticleMapper.selectArticlesByCondition(params); + } + + @Override + public List searchArticles(String keyword) { + + PageHelper.clearPage(); + Map params = new HashMap<>(); + params.put("keyword", keyword); + params.put("status", 1); + + return vetExperienceArticleMapper.selectArticlesByCondition(params); + } + @Override + public List selectLatestArticles(Integer limit) { + PageHelper.clearPage(); + Map params = new HashMap<>(); + params.put("status", 1); + params.put("orderBy", "publish_time"); + params.put("orderType", "desc"); + params.put("limit", limit != null ? limit : 10); + return vetExperienceArticleMapper.selectArticlesByCondition(params); + } + + @Override + public List selectHotArticles(Integer limit) { + PageHelper.clearPage(); + Map params = new HashMap<>(); + params.put("status", 1); + params.put("orderBy", "view_count"); + params.put("orderType", "desc"); + params.put("limit", limit != null ? limit : 10); + return vetExperienceArticleMapper.selectArticlesByCondition(params); + } + + @Override + public List selectArticlesByVetId(Long vetId, Integer limit) { + PageHelper.clearPage(); + Map params = new HashMap<>(); + params.put("vetId", vetId); + params.put("status", 1); + params.put("orderBy", "publish_time"); + params.put("orderType", "desc"); + params.put("limit", limit != null ? limit : 5); + return vetExperienceArticleMapper.selectArticlesByCondition(params); + } + + @Override + public List selectRelatedArticles(Long excludeId, Long categoryId, Integer limit) { + PageHelper.clearPage(); + Map params = new HashMap<>(); + params.put("excludeId", excludeId); + params.put("categoryId", categoryId); + params.put("status", 1); + params.put("orderBy", "publish_time"); + params.put("orderType", "desc"); + params.put("limit", limit != null ? limit : 4); + return vetExperienceArticleMapper.selectArticlesByCondition(params); + } + + + @Override + public int incrementViewCount(Long id) { + return vetExperienceArticleMapper.incrementViewCount(id); + } + + @Override + public int incrementLikeCount(Long id) { + return vetExperienceArticleMapper.incrementLikeCount(id); + } + + @Override + public int incrementCollectCount(Long id) { + return vetExperienceArticleMapper.incrementCollectCount(id); + } + + @Override + public Map selectForumStatistics() { + PageHelper.clearPage(); + Map statistics = new HashMap<>(); + + // 获取文章总数 + VetExperienceArticle countQuery = new VetExperienceArticle(); + countQuery.setStatus("1"); + List allArticles = vetExperienceArticleMapper.selectVetExperienceArticleList(countQuery); + statistics.put("totalArticles", allArticles.size()); + + // 获取兽医总数(去重) + Set vetIds = new HashSet<>(); + for (VetExperienceArticle article : allArticles) { + vetIds.add(article.getVetId()); + } + statistics.put("totalVets", vetIds.size()); + + // 获取总浏览数 + int totalViews = 0; + for (VetExperienceArticle article : allArticles) { + totalViews += article.getViewCount() != null ? article.getViewCount() : 0; + } + statistics.put("totalViews", totalViews); + + // 获取总点赞数 + int totalLikes = 0; + for (VetExperienceArticle article : allArticles) { + totalLikes += article.getLikeCount() != null ? article.getLikeCount() : 0; + } + statistics.put("totalLikes", totalLikes); + + return statistics; + } + + @Override + public List> selectHotTags(Integer limit) { + // 从所有文章中提取标签并统计热度 + VetExperienceArticle query = new VetExperienceArticle(); + query.setStatus("1"); + List allArticles = vetExperienceArticleMapper.selectVetExperienceArticleList(query); + + Map tagCount = new HashMap<>(); + for (VetExperienceArticle article : allArticles) { + if (article.getTags() != null && !article.getTags().trim().isEmpty()) { + String[] tags = article.getTags().split(","); + for (String tag : tags) { + tag = tag.trim(); + if (!tag.isEmpty()) { + tagCount.put(tag, tagCount.getOrDefault(tag, 0) + 1); + } + } + } + } + + // 转换为List并按热度排序 + List> hotTags = new ArrayList<>(); + tagCount.entrySet().stream() + .sorted(Map.Entry.comparingByValue().reversed()) + .limit(limit != null ? limit : 15) + .forEach(entry -> { + Map tagInfo = new HashMap<>(); + tagInfo.put("name", entry.getKey()); + tagInfo.put("count", entry.getValue()); + hotTags.add(tagInfo); + }); + + return hotTags; + } +} diff --git a/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetNotificationServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetNotificationServiceImpl.java index a8f47cf..657286f 100644 --- a/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetNotificationServiceImpl.java +++ b/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetNotificationServiceImpl.java @@ -87,7 +87,7 @@ public class VetNotificationServiceImpl implements VetNotificationService { notification.setCreateTime(now); // 直接使用 Date if (daysBetween <= 0) { - notification.setTitle("🔴 证书已过期"); + notification.setTitle(" ⚠️ 证书已过期"); notification.setContent(String.format("您的《%s》证书已于%s过期!请立即更新证书以继续提供服务。", certificate.getCertName(), formatDate(expireDate))); notification.setRemindLevel(3); @@ -175,4 +175,9 @@ public class VetNotificationServiceImpl implements VetNotificationService { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); return sdf.format(date); } + + @Override + public List selectByUserId(Long userId) { + return vetNotificationMapper.selectVetNotificationByUserId(userId); + } } \ No newline at end of file diff --git a/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetServiceReviewServiceImpl.java b/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetServiceReviewServiceImpl.java new file mode 100644 index 0000000..4942164 --- /dev/null +++ b/chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetServiceReviewServiceImpl.java @@ -0,0 +1,96 @@ +package com.chenhai.vet.service.impl; + +import java.util.List; +import com.chenhai.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.chenhai.vet.mapper.VetServiceReviewMapper; +import com.chenhai.vet.domain.VetServiceReview; +import com.chenhai.vet.service.IVetServiceReviewService; + +/** + * 兽医服务评价Service业务层处理 + * + * @author ruoyi + * @date 2026-01-06 + */ +@Service +public class VetServiceReviewServiceImpl implements IVetServiceReviewService +{ + @Autowired + private VetServiceReviewMapper vetServiceReviewMapper; + + /** + * 查询兽医服务评价 + * + * @param id 兽医服务评价主键 + * @return 兽医服务评价 + */ + @Override + public VetServiceReview selectVetServiceReviewById(Long id) + { + return vetServiceReviewMapper.selectVetServiceReviewById(id); + } + + /** + * 查询兽医服务评价列表 + * + * @param vetServiceReview 兽医服务评价 + * @return 兽医服务评价 + */ + @Override + public List selectVetServiceReviewList(VetServiceReview vetServiceReview) + { + return vetServiceReviewMapper.selectVetServiceReviewList(vetServiceReview); + } + + /** + * 新增兽医服务评价 + * + * @param vetServiceReview 兽医服务评价 + * @return 结果 + */ + @Override + public int insertVetServiceReview(VetServiceReview vetServiceReview) + { + vetServiceReview.setCreateTime(DateUtils.getNowDate()); + return vetServiceReviewMapper.insertVetServiceReview(vetServiceReview); + } + + /** + * 修改兽医服务评价 + * + * @param vetServiceReview 兽医服务评价 + * @return 结果 + */ + @Override + public int updateVetServiceReview(VetServiceReview vetServiceReview) + { + vetServiceReview.setUpdateTime(DateUtils.getNowDate()); + return vetServiceReviewMapper.updateVetServiceReview(vetServiceReview); + } + + /** + * 批量删除兽医服务评价 + * + * @param ids 需要删除的兽医服务评价主键 + * @return 结果 + */ + @Override + public int deleteVetServiceReviewByIds(Long[] ids) + { + return vetServiceReviewMapper.deleteVetServiceReviewByIds(ids); + } + + /** + * 删除兽医服务评价信息 + * + * @param id 兽医服务评价主键 + * @return 结果 + */ + @Override + public int deleteVetServiceReviewById(Long id) + { + return vetServiceReviewMapper.deleteVetServiceReviewById(id); + } +} diff --git a/chenhai-system/src/main/resources/mapper/vet/VetExperienceArticleMapper.xml b/chenhai-system/src/main/resources/mapper/vet/VetExperienceArticleMapper.xml new file mode 100644 index 0000000..c9c1478 --- /dev/null +++ b/chenhai-system/src/main/resources/mapper/vet/VetExperienceArticleMapper.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, title, content, summary, cover_image, images, vet_id, vet_name, vet_avatar, vet_title, category_id, category_name, tags, view_count, like_count, collect_count, is_top, is_featured, status, is_sensitive, sensitive_words, publish_time, create_time, update_time + from vet_experience_article + + + + + + + + + + + + + + + + + + update vet_experience_article + set view_count = view_count + 1, + update_time = sysdate() + where id = #{id} + + + + + update vet_experience_article + set like_count = like_count + 1, + update_time = sysdate() + where id = #{id} + + + + + update vet_experience_article + set collect_count = collect_count + 1, + update_time = sysdate() + where id = #{id} + + + + insert into vet_experience_article + + title, + content, + summary, + cover_image, + images, + vet_id, + vet_name, + vet_avatar, + vet_title, + category_id, + category_name, + tags, + view_count, + like_count, + collect_count, + is_top, + is_featured, + status, + is_sensitive, + sensitive_words, + publish_time, + create_time, + update_time, + + + #{title}, + #{content}, + #{summary}, + #{coverImage}, + #{images}, + #{vetId}, + #{vetName}, + #{vetAvatar}, + #{vetTitle}, + #{categoryId}, + #{categoryName}, + #{tags}, + #{viewCount}, + #{likeCount}, + #{collectCount}, + #{isTop}, + #{isFeatured}, + #{status}, + #{isSensitive}, + #{sensitiveWords}, + #{publishTime}, + #{createTime}, + #{updateTime}, + + + + + update vet_experience_article + + title = #{title}, + content = #{content}, + summary = #{summary}, + cover_image = #{coverImage}, + images = #{images}, + vet_id = #{vetId}, + vet_name = #{vetName}, + vet_avatar = #{vetAvatar}, + vet_title = #{vetTitle}, + category_id = #{categoryId}, + category_name = #{categoryName}, + tags = #{tags}, + view_count = #{viewCount}, + like_count = #{likeCount}, + collect_count = #{collectCount}, + is_top = #{isTop}, + is_featured = #{isFeatured}, + status = #{status}, + is_sensitive = #{isSensitive}, + sensitive_words = #{sensitiveWords}, + publish_time = #{publishTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from vet_experience_article where id = #{id} + + + + delete from vet_experience_article where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-system/src/main/resources/mapper/vet/VetNotificationMapper.xml b/chenhai-system/src/main/resources/mapper/vet/VetNotificationMapper.xml index fc823f4..ccaba6d 100644 --- a/chenhai-system/src/main/resources/mapper/vet/VetNotificationMapper.xml +++ b/chenhai-system/src/main/resources/mapper/vet/VetNotificationMapper.xml @@ -15,11 +15,26 @@ + + - select id, user_id, title, content, type, related_id, is_read, remind_level, create_time, read_time - from vet_notification + select + n.id, + n.user_id, + n.title, + n.content, + n.type, + n.related_id, + n.is_read, + n.remind_level, + n.read_time, + n.create_time, + + (SELECT dict_label FROM sys_dict_data WHERE dict_type = 'notification_is_read' AND dict_value = CAST(n.is_read AS CHAR)) as is_read_label, + (SELECT dict_label FROM sys_dict_data WHERE dict_type = 'sys_notice_status' AND dict_value = CAST(n.remind_level AS CHAR)) as remind_level_label + from vet_notification n + + + + and vet_user_id = #{vetUserId} + and customer_user_id = #{customerUserId} + and order_no = #{orderNo} + and rating = #{rating} + and content = #{content} + and review_time = #{reviewTime} + and is_anonymous = #{isAnonymous} + and reply_content = #{replyContent} + and reply_time = #{replyTime} + + + + + + + insert into vet_service_review + + vet_user_id, + customer_user_id, + order_no, + rating, + content, + review_time, + is_anonymous, + reply_content, + reply_time, + create_by, + create_time, + update_by, + update_time, + + + #{vetUserId}, + #{customerUserId}, + #{orderNo}, + #{rating}, + #{content}, + #{reviewTime}, + #{isAnonymous}, + #{replyContent}, + #{replyTime}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update vet_service_review + + vet_user_id = #{vetUserId}, + customer_user_id = #{customerUserId}, + order_no = #{orderNo}, + rating = #{rating}, + content = #{content}, + review_time = #{reviewTime}, + is_anonymous = #{isAnonymous}, + reply_content = #{replyContent}, + reply_time = #{replyTime}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from vet_service_review where id = #{id} + + + + delete from vet_service_review where id in + + #{id} + + + \ No newline at end of file diff --git a/chenhai-ui/src/api/vet/article.js b/chenhai-ui/src/api/vet/article.js new file mode 100644 index 0000000..38d7158 --- /dev/null +++ b/chenhai-ui/src/api/vet/article.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询兽医经验文章列表 +export function listArticle(query) { + return request({ + url: '/vet/article/list', + method: 'get', + params: query + }) +} + +// 查询兽医经验文章详细 +export function getArticle(id) { + return request({ + url: '/vet/article/' + id, + method: 'get' + }) +} + +// 新增兽医经验文章 +export function addArticle(data) { + return request({ + url: '/vet/article', + method: 'post', + data: data + }) +} + +// 修改兽医经验文章 +export function updateArticle(data) { + return request({ + url: '/vet/article', + method: 'put', + data: data + }) +} + +// 删除兽医经验文章 +export function delArticle(id) { + return request({ + url: '/vet/article/' + id, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/vet/qualification.js b/chenhai-ui/src/api/vet/qualification.js new file mode 100644 index 0000000..0060522 --- /dev/null +++ b/chenhai-ui/src/api/vet/qualification.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询兽医资质列表 +export function listQualification(query) { + return request({ + url: '/vet/qualification/list', + method: 'get', + params: query + }) +} + +// 查询兽医资质详细 +export function getQualification(qualificationId) { + return request({ + url: '/vet/qualification/' + qualificationId, + method: 'get' + }) +} + +// 新增兽医资质 +export function addQualification(data) { + return request({ + url: '/vet/qualification', + method: 'post', + data: data + }) +} + +// 修改兽医资质 +export function updateQualification(data) { + return request({ + url: '/vet/qualification', + method: 'put', + data: data + }) +} + +// 删除兽医资质 +export function delQualification(qualificationId) { + return request({ + url: '/vet/qualification/' + qualificationId, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/api/vet/review.js b/chenhai-ui/src/api/vet/review.js new file mode 100644 index 0000000..34b27cd --- /dev/null +++ b/chenhai-ui/src/api/vet/review.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询兽医服务评价列表 +export function listReview(query) { + return request({ + url: '/vet/review/list', + method: 'get', + params: query + }) +} + +// 查询兽医服务评价详细 +export function getReview(id) { + return request({ + url: '/vet/review/' + id, + method: 'get' + }) +} + +// 新增兽医服务评价 +export function addReview(data) { + return request({ + url: '/vet/review', + method: 'post', + data: data + }) +} + +// 修改兽医服务评价 +export function updateReview(data) { + return request({ + url: '/vet/review', + method: 'put', + data: data + }) +} + +// 删除兽医服务评价 +export function delReview(id) { + return request({ + url: '/vet/review/' + id, + method: 'delete' + }) +} diff --git a/chenhai-ui/src/views/vet/article/index.vue b/chenhai-ui/src/views/vet/article/index.vue new file mode 100644 index 0000000..78bfe0b --- /dev/null +++ b/chenhai-ui/src/views/vet/article/index.vue @@ -0,0 +1,458 @@ + + + diff --git a/chenhai-ui/src/views/vet/certificate/index.vue b/chenhai-ui/src/views/vet/certificate/index.vue index 476622a..b73a9ea 100644 --- a/chenhai-ui/src/views/vet/certificate/index.vue +++ b/chenhai-ui/src/views/vet/certificate/index.vue @@ -79,7 +79,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['system:certificate:add']" + v-hasPermi="['vet:certificate:add']" >新增 @@ -90,7 +90,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['system:certificate:edit']" + v-hasPermi="['vet:certificate:edit']" >修改 @@ -101,7 +101,7 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['system:certificate:remove']" + v-hasPermi="['vet:certificate:remove']" >删除 @@ -111,7 +111,7 @@ icon="el-icon-download" size="mini" @click="handleExport" - v-hasPermi="['system:certificate:export']" + v-hasPermi="['vet:certificate:export']" >导出 @@ -384,7 +384,7 @@ export default { }, /** 导出按钮操作 */ handleExport() { - this.download('system/certificate/export', { + this.download('vet/certificate/export', { ...this.queryParams }, `certificate_${new Date().getTime()}.xlsx`) } diff --git a/chenhai-ui/src/views/vet/info/index.vue b/chenhai-ui/src/views/vet/info/index.vue index f5454c7..95dd407 100644 --- a/chenhai-ui/src/views/vet/info/index.vue +++ b/chenhai-ui/src/views/vet/info/index.vue @@ -79,7 +79,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['system:info:add']" + v-hasPermi="['vet:info:add']" >新增 @@ -90,7 +90,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['system:info:edit']" + v-hasPermi="['vet:info:edit']" >修改 @@ -101,7 +101,7 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['system:info:remove']" + v-hasPermi="['vet:info:remove']" >删除 @@ -111,7 +111,7 @@ icon="el-icon-download" size="mini" @click="handleExport" - v-hasPermi="['system:info:export']" + v-hasPermi="['vet:info:export']" >导出 @@ -141,14 +141,14 @@ type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['system:info:edit']" + v-hasPermi="['vet:info:edit']" >修改 删除 @@ -362,7 +362,7 @@ export default { }, /** 导出按钮操作 */ handleExport() { - this.download('system/info/export', { + this.download('vet/info/export', { ...this.queryParams }, `info_${new Date().getTime()}.xlsx`) } diff --git a/chenhai-ui/src/views/vet/qualification/index.vue b/chenhai-ui/src/views/vet/qualification/index.vue new file mode 100644 index 0000000..f1d967b --- /dev/null +++ b/chenhai-ui/src/views/vet/qualification/index.vue @@ -0,0 +1,392 @@ + + + diff --git a/chenhai-ui/src/views/vet/review/index.vue b/chenhai-ui/src/views/vet/review/index.vue new file mode 100644 index 0000000..3e24065 --- /dev/null +++ b/chenhai-ui/src/views/vet/review/index.vue @@ -0,0 +1,369 @@ + + +