我喜欢的音乐
This commit is contained in:
@@ -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, "请开通会员");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="/home/ruoyi/logs" />
|
||||
<property name="log.path" value="/Users/firefly/ruoyi/logs" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-info.log</file>
|
||||
@@ -34,7 +34,7 @@
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
@@ -56,7 +56,7 @@
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 用户访问日志输出 -->
|
||||
<appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-user.log</file>
|
||||
@@ -70,7 +70,7 @@
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.ruoyi" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
@@ -79,15 +79,15 @@
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
|
||||
|
||||
<!--系统用户操作日志-->
|
||||
<logger name="sys-user" level="info">
|
||||
<appender-ref ref="sys-user"/>
|
||||
</logger>
|
||||
</configuration>
|
||||
</configuration>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.UserLikeMusicMapper">
|
||||
|
||||
|
||||
<resultMap type="UserLikeMusic" id="UserLikeMusicResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="musicId" column="music_id" />
|
||||
@@ -16,12 +16,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectUserLikeMusicList" parameterType="UserLikeMusic" resultMap="UserLikeMusicResult">
|
||||
<include refid="selectUserLikeMusicVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="musicId != null "> and music_id = #{musicId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectUserLikeMusicById" parameterType="String" resultMap="UserLikeMusicResult">
|
||||
<include refid="selectUserLikeMusicVo"/>
|
||||
where id = #{id}
|
||||
@@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserLikeMusicByIds" parameterType="String">
|
||||
delete from user_like_music where id in
|
||||
delete from user_like_music where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
@@ -62,8 +62,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectUserLikeMusicAndUserId" resultType="com.ruoyi.common.core.domain.entity.UserLikeMusic">
|
||||
SELECT user_id as userId,music_id as musicId FROM user_like_music where user_id=#{userId} and music_id=#{musicId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectLikeMusicCountByUserId" resultType="int">
|
||||
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
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -69,23 +69,28 @@
|
||||
v-hasPermi="['system:feedback: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:feedback:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="feedbackList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="唯一标识符" align="center" prop="id" />
|
||||
<el-table-column label="反馈内容" align="center" prop="feedbackContent" />
|
||||
<el-table-column label="反馈内容" align="center" prop="feedbackContent" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip
|
||||
:content="scope.row.feedbackContent"
|
||||
placement="top"
|
||||
:disabled="!scope.row.feedbackContent"
|
||||
:show-after="300"
|
||||
:hide-after="0"
|
||||
effect="dark"
|
||||
:max-width="400">
|
||||
<div class="feedback-content">
|
||||
{{ scope.row.feedbackContent }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用户姓名" align="center" prop="userName" :show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column label="联系方式类型" align="center" prop="contactType" :show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column label="联系方式信息" align="center" prop="contactInfo" :show-overflow-tooltip="true" width="150" />
|
||||
@@ -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;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -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 = "修改通知"
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user