diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/MusicController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/MusicController.java index a3768e5..1455646 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/MusicController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/MusicController.java @@ -119,6 +119,8 @@ public class MusicController extends BaseController { } MusicInfo musicInfo = musicService.getMusicInfo(userId, musicId); if (musicInfo != null){ + // 增加历史 + musicService.addHistoryMusic(musicId); return AjaxResult.success(musicInfo); }else { return new AjaxResult(HttpStatus.USER_VIP_EXPIRE, "请开通会员"); diff --git a/ruoyi-admin/src/main/resources/logback.xml b/ruoyi-admin/src/main/resources/logback.xml index a360583..b961d04 100644 --- a/ruoyi-admin/src/main/resources/logback.xml +++ b/ruoyi-admin/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - + @@ -11,7 +11,7 @@ ${log.pattern} - + ${log.path}/sys-info.log @@ -34,7 +34,7 @@ DENY - + ${log.path}/sys-error.log @@ -56,7 +56,7 @@ DENY - + ${log.path}/sys-user.log @@ -70,7 +70,7 @@ ${log.pattern} - + @@ -79,15 +79,15 @@ - + - + - \ No newline at end of file + diff --git a/ruoyi-system/src/main/resources/mapper/system/UserLikeMusicMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UserLikeMusicMapper.xml index d82136d..3c75141 100644 --- a/ruoyi-system/src/main/resources/mapper/system/UserLikeMusicMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/UserLikeMusicMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -16,12 +16,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + and music_id = #{musicId} and user_id = #{userId} - + where id = #{id} @@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from user_like_music where id in + delete from user_like_music where id in #{id} @@ -62,8 +62,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT user_id as userId,music_id as musicId FROM user_like_music where user_id=#{userId} and music_id=#{musicId} - + - SELECT count(1) FROM user_like_music WHERE user_id = #{userId} + SELECT count(mi.id) FROM user_like_music ul left join music_info mi on ul.music_id=mi.music_id + WHERE user_id = #{userId} and mi.is_del=0 - \ No newline at end of file + diff --git a/ruoyi-ui/src/views/feedback/index.vue b/ruoyi-ui/src/views/feedback/index.vue index 56b3fd5..6ae80f2 100644 --- a/ruoyi-ui/src/views/feedback/index.vue +++ b/ruoyi-ui/src/views/feedback/index.vue @@ -69,23 +69,28 @@ v-hasPermi="['system:feedback:remove']" >删除 - - 导出 - - + + + + + {{ scope.row.feedbackContent }} + + + + @@ -227,19 +232,41 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids - this.$modal.confirm('是否确认删除用户反馈编号为"' + ids + '"的数据项?').then(function() { + let confirmMessage = '' + + if (row && row.feedbackContent) { + // 单个删除,显示反馈内容 + const content = row.feedbackContent.length > 50 + ? row.feedbackContent.substring(0, 50) + '...' + : row.feedbackContent + confirmMessage = `是否确认删除以下反馈内容?\n"${content}"` + } else { + // 批量删除,显示选中的反馈内容 + const selectedFeedbacks = this.feedbackList.filter(item => this.ids.includes(item.id)) + if (selectedFeedbacks.length === 1) { + const content = selectedFeedbacks[0].feedbackContent + const displayContent = content && content.length > 50 + ? content.substring(0, 50) + '...' + : content + confirmMessage = `是否确认删除以下反馈内容?\n"${displayContent}"` + } else { + const contents = selectedFeedbacks.map(item => { + const content = item.feedbackContent + return content && content.length > 30 + ? content.substring(0, 30) + '...' + : content + }).join('\n') + confirmMessage = `是否确认删除以下${selectedFeedbacks.length}条反馈内容?\n${contents}` + } + } + + this.$modal.confirm(confirmMessage).then(function() { return delFeedback(ids) }).then(() => { this.getList() this.$modal.msgSuccess("删除成功") }).catch(() => {}) }, - /** 导出按钮操作 */ - handleExport() { - this.download('system/feedback/export', { - ...this.queryParams - }, `feedback_${new Date().getTime()}.xlsx`) - }, /** 获取状态标签 */ getStatusLabel(status) { const statusMap = { @@ -299,4 +326,29 @@ export default { .el-dropdown-menu__item i { margin-right: 5px; } + +/* 反馈内容样式 */ +.feedback-content { + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + cursor: pointer; + line-height: 1.4; + padding: 4px 0; + display: block; + word-break: break-all; +} + +.feedback-content:hover { + color: #409EFF; +} + +/* 自定义tooltip样式 */ +:deep(.el-tooltip__popper) { + max-width: 400px !important; + word-wrap: break-word; + white-space: pre-wrap; + line-height: 1.5; +} diff --git a/ruoyi-ui/src/views/notifications/index.vue b/ruoyi-ui/src/views/notifications/index.vue index fe9107f..3682c98 100644 --- a/ruoyi-ui/src/views/notifications/index.vue +++ b/ruoyi-ui/src/views/notifications/index.vue @@ -162,7 +162,8 @@ type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" - placeholder="请选择计划发送时间"> + placeholder="请选择计划发送时间" + :picker-options="pickerOptions"> @@ -328,6 +329,13 @@ export default { sendTime: [ { required: true, message: "计划发送时间不能为空", trigger: "blur" } ] + }, + // 日期选择器配置 + pickerOptions: { + disabledDate(time) { + // 禁用今天之前的日期 + return time.getTime() < Date.now() - 8.64e7; // 减去一天的毫秒数,确保今天可选 + } } } }, @@ -402,6 +410,8 @@ export default { const id = row.id || this.ids getNotifications(id).then(response => { this.form = response.data + // 编辑时清空计划发送时间,让用户重新选择 + this.form.sendTime = null this.open = true this.title = "修改通知" })