架构初始化
This commit is contained in:
@@ -3,21 +3,38 @@ package com.ruoyi.system.config;
|
||||
import com.aliyun.dysmsapi20170525.Client;
|
||||
import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
|
||||
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
|
||||
import com.aliyun.oss.ClientBuilderConfiguration;
|
||||
import com.aliyun.oss.OSS;
|
||||
import com.aliyun.oss.OSSClientBuilder;
|
||||
import com.aliyun.oss.OSSException;
|
||||
import com.aliyun.oss.common.auth.CredentialsProviderFactory;
|
||||
import com.aliyun.oss.common.auth.EnvironmentVariableCredentialsProvider;
|
||||
import com.aliyun.oss.common.comm.SignVersion;
|
||||
import com.aliyun.oss.model.OSSObject;
|
||||
import com.aliyun.teaopenapi.models.Config;
|
||||
import com.aliyuncs.exceptions.ClientException;
|
||||
import com.ruoyi.common.constant.AliKeyConfig;
|
||||
import com.ruoyi.common.core.domain.entity.ShopUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
import static com.alibaba.fastjson2.JSONObject.toJSONString;
|
||||
|
||||
public class AliConfig {
|
||||
|
||||
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(AliConfig.class);
|
||||
public static Client createClient() {
|
||||
Config config = new Config()
|
||||
// 配置 AccessKey ID,请确保代码运行环境配置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_ID。
|
||||
.setAccessKeyId(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID"))
|
||||
.setAccessKeyId(AliKeyConfig.ACCESS_KEY_ID)
|
||||
// 配置 AccessKey Secret,请确保代码运行环境配置了环境变量 ALIBABA_CLOUD_ACCESS_KEY_SECRET。
|
||||
.setAccessKeySecret(System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET"));
|
||||
.setAccessKeySecret(AliKeyConfig.ACCESS_KEY_SECRET);
|
||||
// System.getenv()方法表示获取系统环境变量,不要直接在getenv()中填入AccessKey信息。
|
||||
|
||||
// 配置 Endpoint。中国站请使用dysmsapi.aliyuncs.com
|
||||
@@ -30,6 +47,12 @@ public class AliConfig {
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
ShopUser shopUser = new ShopUser();
|
||||
shopUser.setPhone("13943965645");
|
||||
shopUser.setCode("123456");
|
||||
sendMsg(shopUser);
|
||||
}
|
||||
|
||||
public static String sendMsg(ShopUser shopUser) {
|
||||
// 初始化请求客户端
|
||||
@@ -38,13 +61,15 @@ public class AliConfig {
|
||||
// 1. 生成6位验证码
|
||||
String code = String.valueOf((int)((Math.random()*9+1)*100000));
|
||||
|
||||
String templateParam = "{\"name\":\"" + shopUser.getUsername() + "\",\"number\":\""+ shopUser.getPhone() +"\"}";
|
||||
//String templateParam = "{\"name\":\"" + shopUser.getUsername() + "\",\"number\":\""+ shopUser.getPhone() +"\"}";
|
||||
|
||||
String templateParam = "您的验证码为:"+ shopUser.getCode() +",请勿泄露于他人!";
|
||||
|
||||
// 构造API请求对象,请替换请求参数值
|
||||
SendSmsRequest sendSmsRequest = new SendSmsRequest()
|
||||
.setPhoneNumbers(shopUser.getPhone())
|
||||
.setSignName("music")
|
||||
.setTemplateCode(code)
|
||||
.setSignName("阿里云短信测试")
|
||||
.setTemplateCode("SMS_323405385")
|
||||
.setTemplateParam(templateParam); // TemplateParam为序列化后的JSON字符串。
|
||||
|
||||
// 获取响应对象
|
||||
@@ -63,4 +88,74 @@ public class AliConfig {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static String ossUp(String objectName, InputStream inputStream){
|
||||
// 配置参数
|
||||
String endpoint = "https://oss-cn-beijing.aliyuncs.com";
|
||||
String accessKeyId = AliKeyConfig.ACCESS_KEY_ID;
|
||||
String accessKeySecret = AliKeyConfig.ACCESS_KEY_SECRET;
|
||||
String bucketName = "wenzhuangmusic";
|
||||
|
||||
// 创建OSSClient实例
|
||||
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
|
||||
try {
|
||||
// 上传字符串内容作为文件
|
||||
ossClient.putObject(bucketName, objectName, inputStream);
|
||||
System.out.println("文件上传成功:" + objectName);
|
||||
return "/file/download/"+objectName;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
// 关闭OSSClient
|
||||
if (ossClient != null) {
|
||||
ossClient.shutdown();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static byte[] ossDown(String objectName) {
|
||||
// 配置参数
|
||||
String endpoint = "https://oss-cn-beijing.aliyuncs.com";
|
||||
String accessKeyId = AliKeyConfig.ACCESS_KEY_ID;
|
||||
String accessKeySecret = AliKeyConfig.ACCESS_KEY_SECRET;
|
||||
String bucketName = "wenzhuangmusic";
|
||||
|
||||
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
try {
|
||||
// ossObject包含文件所在的存储空间名称、文件名称、文件元数据以及一个输入流。
|
||||
OSSObject ossObject = ossClient.getObject(bucketName, objectName);
|
||||
InputStream inputStream = ossObject.getObjectContent();
|
||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
// 读取文件内容到字节数组。
|
||||
byte[] readBuffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = inputStream.read(readBuffer)) != -1) {
|
||||
byteArrayOutputStream.write(readBuffer, 0, bytesRead);
|
||||
}
|
||||
// 获取最终的字节数组。
|
||||
byte[] fileBytes = byteArrayOutputStream.toByteArray();
|
||||
// 数据读取完成后,获取的流必须关闭,否则会造成连接泄漏,导致请求无连接可用,程序无法正常工作。
|
||||
inputStream.close();
|
||||
byteArrayOutputStream.close();
|
||||
// ossObject对象使用完毕后必须关闭,否则会造成连接泄漏,导致请求无连接可用,程序无法正常工作。
|
||||
ossObject.close();
|
||||
return fileBytes;
|
||||
} catch (OSSException oe) {
|
||||
oe.printStackTrace();
|
||||
} catch (Throwable ce) {
|
||||
System.out.println("Caught an ClientException, which means the client encountered "
|
||||
+ "a serious internal problem while trying to communicate with OSS, "
|
||||
+ "such as not being able to access the network.");
|
||||
System.out.println("Error Message:" + ce.getMessage());
|
||||
} finally {
|
||||
if (ossClient != null) {
|
||||
ossClient.shutdown();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.BannerInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BannerInfoMapper {
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public BannerInfo selectBannerInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param bannerInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<BannerInfo> selectBannerInfoList(BannerInfo bannerInfo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param bannerInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBannerInfo(BannerInfo bannerInfo);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param bannerInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBannerInfo(BannerInfo bannerInfo);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBannerInfoById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBannerInfoByIds(String[] ids);
|
||||
|
||||
List<BannerInfo> selectEnableBanner();
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.CategoryInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface CategoryInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public CategoryInfo selectCategoryInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<CategoryInfo> selectCategoryInfoList(CategoryInfo categoryInfo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCategoryInfo(CategoryInfo categoryInfo);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCategoryInfo(CategoryInfo categoryInfo);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryInfoById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryInfoByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.LabelInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface LabelInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public LabelInfo selectLabelInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param labelInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<LabelInfo> selectLabelInfoList(LabelInfo labelInfo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param labelInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLabelInfo(LabelInfo labelInfo);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param labelInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLabelInfo(LabelInfo labelInfo);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLabelInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLabelInfoByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 音乐信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface MusicInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询音乐信息
|
||||
*
|
||||
* @param id 音乐信息主键
|
||||
* @return 音乐信息
|
||||
*/
|
||||
public MusicInfo selectMusicInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询音乐信息列表
|
||||
*
|
||||
* @param musicInfo 音乐信息
|
||||
* @return 音乐信息集合
|
||||
*/
|
||||
public List<MusicInfo> selectMusicInfoList(MusicInfo musicInfo);
|
||||
|
||||
/**
|
||||
* 新增音乐信息
|
||||
*
|
||||
* @param musicInfo 音乐信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMusicInfo(MusicInfo musicInfo);
|
||||
|
||||
/**
|
||||
* 修改音乐信息
|
||||
*
|
||||
* @param musicInfo 音乐信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMusicInfo(MusicInfo musicInfo);
|
||||
|
||||
/**
|
||||
* 删除音乐信息
|
||||
*
|
||||
* @param id 音乐信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicInfoById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除音乐信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicInfoByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicRecommend;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface MusicRecommendMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public MusicRecommend selectMusicRecommendById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param musicRecommend 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<MusicRecommend> selectMusicRecommendList(MusicRecommend musicRecommend);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param musicRecommend 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMusicRecommend(MusicRecommend musicRecommend);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param musicRecommend 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMusicRecommend(MusicRecommend musicRecommend);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicRecommendById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicRecommendByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicScene;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface MusicSceneMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public MusicScene selectMusicSceneById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param musicScene 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<MusicScene> selectMusicSceneList(MusicScene musicScene);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param musicScene 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMusicScene(MusicScene musicScene);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param musicScene 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMusicScene(MusicScene musicScene);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicSceneById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicSceneByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicSceneRelate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface MusicSceneRelateMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public MusicSceneRelate selectMusicSceneRelateById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param musicSceneRelate 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<MusicSceneRelate> selectMusicSceneRelateList(MusicSceneRelate musicSceneRelate);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param musicSceneRelate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMusicSceneRelate(MusicSceneRelate musicSceneRelate);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param musicSceneRelate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMusicSceneRelate(MusicSceneRelate musicSceneRelate);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicSceneRelateById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicSceneRelateByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.RecommendInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 推荐Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface RecommendInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询推荐
|
||||
*
|
||||
* @param id 推荐主键
|
||||
* @return 推荐
|
||||
*/
|
||||
public RecommendInfo selectRecommendInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询推荐列表
|
||||
*
|
||||
* @param recommendInfo 推荐
|
||||
* @return 推荐集合
|
||||
*/
|
||||
public List<RecommendInfo> selectRecommendInfoList(RecommendInfo recommendInfo);
|
||||
|
||||
/**
|
||||
* 新增推荐
|
||||
*
|
||||
* @param recommendInfo 推荐
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecommendInfo(RecommendInfo recommendInfo);
|
||||
|
||||
/**
|
||||
* 修改推荐
|
||||
*
|
||||
* @param recommendInfo 推荐
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecommendInfo(RecommendInfo recommendInfo);
|
||||
|
||||
/**
|
||||
* 删除推荐
|
||||
*
|
||||
* @param id 推荐主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecommendInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除推荐
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecommendInfoByIds(Long[] ids);
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface ShopUserMapper {
|
||||
@@ -18,4 +20,52 @@ public interface ShopUserMapper {
|
||||
|
||||
int insert(ShopUser shopUser);
|
||||
|
||||
/**
|
||||
* 查询用户管理
|
||||
*
|
||||
* @param id 用户管理主键
|
||||
* @return 用户管理
|
||||
*/
|
||||
public ShopUser selectShopUserById(String id);
|
||||
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*
|
||||
* @param shopUser 用户管理
|
||||
* @return 用户管理集合
|
||||
*/
|
||||
public List<ShopUser> selectShopUserList(ShopUser shopUser);
|
||||
|
||||
/**
|
||||
* 新增用户管理
|
||||
*
|
||||
* @param shopUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertShopUser(ShopUser shopUser);
|
||||
|
||||
/**
|
||||
* 修改用户管理
|
||||
*
|
||||
* @param shopUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateShopUser(ShopUser shopUser);
|
||||
|
||||
/**
|
||||
* 删除用户管理
|
||||
*
|
||||
* @param id 用户管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteShopUserById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除用户管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteShopUserByIds(String[] ids);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.UserCollect;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户收藏音乐Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface UserCollectMapper
|
||||
{
|
||||
/**
|
||||
* 查询用户收藏音乐
|
||||
*
|
||||
* @param id 用户收藏音乐主键
|
||||
* @return 用户收藏音乐
|
||||
*/
|
||||
public UserCollect selectUserCollectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户收藏音乐列表
|
||||
*
|
||||
* @param userCollect 用户收藏音乐
|
||||
* @return 用户收藏音乐集合
|
||||
*/
|
||||
public List<UserCollect> selectUserCollectList(UserCollect userCollect);
|
||||
|
||||
/**
|
||||
* 新增用户收藏音乐
|
||||
*
|
||||
* @param userCollect 用户收藏音乐
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserCollect(UserCollect userCollect);
|
||||
|
||||
/**
|
||||
* 修改用户收藏音乐
|
||||
*
|
||||
* @param userCollect 用户收藏音乐
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserCollect(UserCollect userCollect);
|
||||
|
||||
/**
|
||||
* 删除用户收藏音乐
|
||||
*
|
||||
* @param id 用户收藏音乐主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserCollectById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除用户收藏音乐
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserCollectByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.UserHistory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户播放历史Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface UserHistoryMapper
|
||||
{
|
||||
/**
|
||||
* 查询用户播放历史
|
||||
*
|
||||
* @param id 用户播放历史主键
|
||||
* @return 用户播放历史
|
||||
*/
|
||||
public UserHistory selectUserHistoryById(String id);
|
||||
|
||||
/**
|
||||
* 查询用户播放历史列表
|
||||
*
|
||||
* @param userHistory 用户播放历史
|
||||
* @return 用户播放历史集合
|
||||
*/
|
||||
public List<UserHistory> selectUserHistoryList(UserHistory userHistory);
|
||||
|
||||
/**
|
||||
* 新增用户播放历史
|
||||
*
|
||||
* @param userHistory 用户播放历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserHistory(UserHistory userHistory);
|
||||
|
||||
/**
|
||||
* 修改用户播放历史
|
||||
*
|
||||
* @param userHistory 用户播放历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserHistory(UserHistory userHistory);
|
||||
|
||||
/**
|
||||
* 删除用户播放历史
|
||||
*
|
||||
* @param id 用户播放历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserHistoryById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除用户播放历史
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserHistoryByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.UserLikeMusic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface UserLikeMusicMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public UserLikeMusic selectUserLikeMusicById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param userLikeMusic 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<UserLikeMusic> selectUserLikeMusicList(UserLikeMusic userLikeMusic);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param userLikeMusic 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserLikeMusic(UserLikeMusic userLikeMusic);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param userLikeMusic 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserLikeMusic(UserLikeMusic userLikeMusic);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserLikeMusicById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserLikeMusicByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.BannerInfo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IBannerInfoService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public BannerInfo selectBannerInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param bannerInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<BannerInfo> selectBannerInfoList(BannerInfo bannerInfo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param bannerInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBannerInfo(BannerInfo bannerInfo, MultipartFile file);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param bannerInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBannerInfo(BannerInfo bannerInfo);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBannerInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBannerInfoById(String id);
|
||||
|
||||
List<BannerInfo> getEnableBanner();
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.CategoryInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface ICategoryInfoService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public CategoryInfo selectCategoryInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<CategoryInfo> selectCategoryInfoList(CategoryInfo categoryInfo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCategoryInfo(CategoryInfo categoryInfo);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCategoryInfo(CategoryInfo categoryInfo);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.LabelInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface ILabelInfoService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public LabelInfo selectLabelInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param labelInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<LabelInfo> selectLabelInfoList(LabelInfo labelInfo);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param labelInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLabelInfo(LabelInfo labelInfo);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param labelInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLabelInfo(LabelInfo labelInfo);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLabelInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLabelInfoById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 音乐信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IMusicInfoService
|
||||
{
|
||||
/**
|
||||
* 查询音乐信息
|
||||
*
|
||||
* @param id 音乐信息主键
|
||||
* @return 音乐信息
|
||||
*/
|
||||
public MusicInfo selectMusicInfoById(String id);
|
||||
|
||||
/**
|
||||
* 查询音乐信息列表
|
||||
*
|
||||
* @param musicInfo 音乐信息
|
||||
* @return 音乐信息集合
|
||||
*/
|
||||
public List<MusicInfo> selectMusicInfoList(MusicInfo musicInfo);
|
||||
|
||||
/**
|
||||
* 新增音乐信息
|
||||
*
|
||||
* @param musicInfo 音乐信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMusicInfo(MusicInfo musicInfo);
|
||||
|
||||
/**
|
||||
* 修改音乐信息
|
||||
*
|
||||
* @param musicInfo 音乐信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMusicInfo(MusicInfo musicInfo);
|
||||
|
||||
/**
|
||||
* 批量删除音乐信息
|
||||
*
|
||||
* @param ids 需要删除的音乐信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicInfoByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除音乐信息信息
|
||||
*
|
||||
* @param id 音乐信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicInfoById(String id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicRecommend;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IMusicRecommendService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public MusicRecommend selectMusicRecommendById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param musicRecommend 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<MusicRecommend> selectMusicRecommendList(MusicRecommend musicRecommend);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param musicRecommend 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMusicRecommend(MusicRecommend musicRecommend);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param musicRecommend 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMusicRecommend(MusicRecommend musicRecommend);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicRecommendByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicRecommendById(String id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicSceneRelate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IMusicSceneRelateService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public MusicSceneRelate selectMusicSceneRelateById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param musicSceneRelate 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<MusicSceneRelate> selectMusicSceneRelateList(MusicSceneRelate musicSceneRelate);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param musicSceneRelate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMusicSceneRelate(MusicSceneRelate musicSceneRelate);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param musicSceneRelate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMusicSceneRelate(MusicSceneRelate musicSceneRelate);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicSceneRelateByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicSceneRelateById(String id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicScene;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IMusicSceneService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public MusicScene selectMusicSceneById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param musicScene 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<MusicScene> selectMusicSceneList(MusicScene musicScene);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param musicScene 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMusicScene(MusicScene musicScene);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param musicScene 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMusicScene(MusicScene musicScene);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicSceneByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMusicSceneById(String id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.RecommendInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 推荐Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IRecommendInfoService
|
||||
{
|
||||
/**
|
||||
* 查询推荐
|
||||
*
|
||||
* @param id 推荐主键
|
||||
* @return 推荐
|
||||
*/
|
||||
public RecommendInfo selectRecommendInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询推荐列表
|
||||
*
|
||||
* @param recommendInfo 推荐
|
||||
* @return 推荐集合
|
||||
*/
|
||||
public List<RecommendInfo> selectRecommendInfoList(RecommendInfo recommendInfo);
|
||||
|
||||
/**
|
||||
* 新增推荐
|
||||
*
|
||||
* @param recommendInfo 推荐
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRecommendInfo(RecommendInfo recommendInfo);
|
||||
|
||||
/**
|
||||
* 修改推荐
|
||||
*
|
||||
* @param recommendInfo 推荐
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRecommendInfo(RecommendInfo recommendInfo);
|
||||
|
||||
/**
|
||||
* 批量删除推荐
|
||||
*
|
||||
* @param ids 需要删除的推荐主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecommendInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除推荐信息
|
||||
*
|
||||
* @param id 推荐主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRecommendInfoById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.ShopUser;
|
||||
import com.ruoyi.common.core.domain.entity.ShopUserResq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IShopUserService
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询用户管理
|
||||
*
|
||||
* @param id 用户管理主键
|
||||
* @return 用户管理
|
||||
*/
|
||||
public ShopUser selectShopUserById(String id);
|
||||
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*
|
||||
* @param shopUser 用户管理
|
||||
* @return 用户管理集合
|
||||
*/
|
||||
public List<ShopUser> selectShopUserList(ShopUser shopUser);
|
||||
|
||||
/**
|
||||
* 新增用户管理
|
||||
*
|
||||
* @param shopUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertShopUser(ShopUser shopUser);
|
||||
|
||||
/**
|
||||
* 修改用户管理
|
||||
*
|
||||
* @param shopUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateShopUser(ShopUser shopUser);
|
||||
|
||||
/**
|
||||
* 批量删除用户管理
|
||||
*
|
||||
* @param ids 需要删除的用户管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteShopUserByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除用户管理信息
|
||||
*
|
||||
* @param id 用户管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteShopUserById(String id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.UserCollect;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户收藏音乐Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IUserCollectService
|
||||
{
|
||||
/**
|
||||
* 查询用户收藏音乐
|
||||
*
|
||||
* @param id 用户收藏音乐主键
|
||||
* @return 用户收藏音乐
|
||||
*/
|
||||
public UserCollect selectUserCollectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户收藏音乐列表
|
||||
*
|
||||
* @param userCollect 用户收藏音乐
|
||||
* @return 用户收藏音乐集合
|
||||
*/
|
||||
public List<UserCollect> selectUserCollectList(UserCollect userCollect);
|
||||
|
||||
/**
|
||||
* 新增用户收藏音乐
|
||||
*
|
||||
* @param userCollect 用户收藏音乐
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserCollect(UserCollect userCollect);
|
||||
|
||||
/**
|
||||
* 修改用户收藏音乐
|
||||
*
|
||||
* @param userCollect 用户收藏音乐
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserCollect(UserCollect userCollect);
|
||||
|
||||
/**
|
||||
* 批量删除用户收藏音乐
|
||||
*
|
||||
* @param ids 需要删除的用户收藏音乐主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserCollectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除用户收藏音乐信息
|
||||
*
|
||||
* @param id 用户收藏音乐主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserCollectById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.UserHistory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户播放历史Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IUserHistoryService
|
||||
{
|
||||
/**
|
||||
* 查询用户播放历史
|
||||
*
|
||||
* @param id 用户播放历史主键
|
||||
* @return 用户播放历史
|
||||
*/
|
||||
public UserHistory selectUserHistoryById(String id);
|
||||
|
||||
/**
|
||||
* 查询用户播放历史列表
|
||||
*
|
||||
* @param userHistory 用户播放历史
|
||||
* @return 用户播放历史集合
|
||||
*/
|
||||
public List<UserHistory> selectUserHistoryList(UserHistory userHistory);
|
||||
|
||||
/**
|
||||
* 新增用户播放历史
|
||||
*
|
||||
* @param userHistory 用户播放历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserHistory(UserHistory userHistory);
|
||||
|
||||
/**
|
||||
* 修改用户播放历史
|
||||
*
|
||||
* @param userHistory 用户播放历史
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserHistory(UserHistory userHistory);
|
||||
|
||||
/**
|
||||
* 批量删除用户播放历史
|
||||
*
|
||||
* @param ids 需要删除的用户播放历史主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserHistoryByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除用户播放历史信息
|
||||
*
|
||||
* @param id 用户播放历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserHistoryById(String id);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.UserLikeMusic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IUserLikeMusicService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public UserLikeMusic selectUserLikeMusicById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param userLikeMusic 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<UserLikeMusic> selectUserLikeMusicList(UserLikeMusic userLikeMusic);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param userLikeMusic 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertUserLikeMusic(UserLikeMusic userLikeMusic);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param userLikeMusic 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateUserLikeMusic(UserLikeMusic userLikeMusic);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserLikeMusicByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteUserLikeMusicById(String id);
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.BannerInfo;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.config.AliConfig;
|
||||
import com.ruoyi.system.mapper.BannerInfoMapper;
|
||||
import com.ruoyi.system.service.IBannerInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class BannerInfoServiceImpl implements IBannerInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BannerInfoMapper bannerInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public BannerInfo selectBannerInfoById(String id)
|
||||
{
|
||||
return bannerInfoMapper.selectBannerInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param bannerInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<BannerInfo> selectBannerInfoList(BannerInfo bannerInfo)
|
||||
{
|
||||
return bannerInfoMapper.selectBannerInfoList(bannerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param bannerInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBannerInfo(BannerInfo bannerInfo, MultipartFile file){
|
||||
bannerInfo.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
String addr = AliConfig.ossUp("config/" + file.getOriginalFilename(), file.getInputStream());
|
||||
bannerInfo.setBannerAddr(addr);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
//上传文件
|
||||
return bannerInfoMapper.insertBannerInfo(bannerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param bannerInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBannerInfo(BannerInfo bannerInfo)
|
||||
{
|
||||
bannerInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return bannerInfoMapper.updateBannerInfo(bannerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBannerInfoByIds(String[] ids)
|
||||
{
|
||||
return bannerInfoMapper.deleteBannerInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBannerInfoById(String id)
|
||||
{
|
||||
return bannerInfoMapper.deleteBannerInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BannerInfo> getEnableBanner() {
|
||||
return bannerInfoMapper.selectEnableBanner();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.ruoyi.common.core.domain.entity.ShopUser;
|
||||
import com.ruoyi.common.core.domain.entity.ShopUserResq;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.config.UmengConfig;
|
||||
import com.ruoyi.system.mapper.ShopUserMapper;
|
||||
import com.ruoyi.system.service.ShopUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Transactional
|
||||
@Service
|
||||
public class CShopUserServiceImpl implements ShopUserService {
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private UmengConfig umengConfig;
|
||||
@Autowired
|
||||
private ShopUserMapper shopUserMapper;
|
||||
|
||||
@Override
|
||||
public ShopUser login(ShopUserResq shopUser) {
|
||||
switch (shopUser.getMethod()){
|
||||
case "1":
|
||||
// 账号密码
|
||||
// 生成令牌
|
||||
ShopUser member = shopUserMapper.selectShopUserByUsernameAndPass(shopUser.getUsername(),shopUser.getPassword());
|
||||
if (member == null){
|
||||
ShopUser msg = new ShopUser();
|
||||
msg.setMsg("用户名或密码错误");
|
||||
return msg;
|
||||
}else {
|
||||
return member;
|
||||
}
|
||||
case "2":
|
||||
// 验证码
|
||||
String code = redisCache.getCacheObject(shopUser.getPhone());
|
||||
String reqCode = shopUser.getCode();
|
||||
if (code.equals(reqCode)){
|
||||
// 登录
|
||||
return loginAndRegis(shopUser);
|
||||
}else {
|
||||
ShopUser msg = new ShopUser();
|
||||
msg.setMsg("验证码错误");
|
||||
return msg;
|
||||
}
|
||||
case "3":
|
||||
// 一键 todo: 完善功能
|
||||
String uMtoken = shopUser.getUMtoken();
|
||||
umengConfig.send(uMtoken);
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public ShopUser loginAndRegis(ShopUserResq shopUser) {
|
||||
ShopUser member = shopUserMapper.selectShopUserByPhone(shopUser.getUsername());
|
||||
if (StringUtils.isNull(member)) {
|
||||
// 走注册在登录
|
||||
member = new ShopUser();
|
||||
member.setUserId(IdUtil.getSnowflakeNextId());
|
||||
member.setUsername(shopUser.getPhone());
|
||||
member.setPhone(shopUser.getPhone());
|
||||
member.setPassword(IdUtil.fastUUID());
|
||||
member.setUsername(shopUser.getUsername());
|
||||
int insertCount = shopUserMapper.insert(member);
|
||||
if (insertCount > 0){
|
||||
return member;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return member;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.CategoryInfo;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.mapper.CategoryInfoMapper;
|
||||
import com.ruoyi.system.service.ICategoryInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
{
|
||||
@Autowired
|
||||
private CategoryInfoMapper categoryInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public CategoryInfo selectCategoryInfoById(String id)
|
||||
{
|
||||
return categoryInfoMapper.selectCategoryInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<CategoryInfo> selectCategoryInfoList(CategoryInfo categoryInfo)
|
||||
{
|
||||
return categoryInfoMapper.selectCategoryInfoList(categoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCategoryInfo(CategoryInfo categoryInfo)
|
||||
{
|
||||
categoryInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return categoryInfoMapper.insertCategoryInfo(categoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCategoryInfo(CategoryInfo categoryInfo)
|
||||
{
|
||||
categoryInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return categoryInfoMapper.updateCategoryInfo(categoryInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCategoryInfoByIds(String[] ids)
|
||||
{
|
||||
return categoryInfoMapper.deleteCategoryInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCategoryInfoById(String id)
|
||||
{
|
||||
return categoryInfoMapper.deleteCategoryInfoById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.LabelInfo;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.mapper.LabelInfoMapper;
|
||||
import com.ruoyi.system.service.ILabelInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class LabelInfoServiceImpl implements ILabelInfoService
|
||||
{
|
||||
@Autowired
|
||||
private LabelInfoMapper labelInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public LabelInfo selectLabelInfoById(Long id)
|
||||
{
|
||||
return labelInfoMapper.selectLabelInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param labelInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<LabelInfo> selectLabelInfoList(LabelInfo labelInfo)
|
||||
{
|
||||
return labelInfoMapper.selectLabelInfoList(labelInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param labelInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertLabelInfo(LabelInfo labelInfo)
|
||||
{
|
||||
labelInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return labelInfoMapper.insertLabelInfo(labelInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param labelInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateLabelInfo(LabelInfo labelInfo)
|
||||
{
|
||||
labelInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return labelInfoMapper.updateLabelInfo(labelInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLabelInfoByIds(Long[] ids)
|
||||
{
|
||||
return labelInfoMapper.deleteLabelInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLabelInfoById(Long id)
|
||||
{
|
||||
return labelInfoMapper.deleteLabelInfoById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicInfo;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.mapper.MusicInfoMapper;
|
||||
import com.ruoyi.system.service.IMusicInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 音乐信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class MusicInfoServiceImpl implements IMusicInfoService
|
||||
{
|
||||
@Autowired
|
||||
private MusicInfoMapper musicInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询音乐信息
|
||||
*
|
||||
* @param id 音乐信息主键
|
||||
* @return 音乐信息
|
||||
*/
|
||||
@Override
|
||||
public MusicInfo selectMusicInfoById(String id)
|
||||
{
|
||||
return musicInfoMapper.selectMusicInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询音乐信息列表
|
||||
*
|
||||
* @param musicInfo 音乐信息
|
||||
* @return 音乐信息
|
||||
*/
|
||||
@Override
|
||||
public List<MusicInfo> selectMusicInfoList(MusicInfo musicInfo)
|
||||
{
|
||||
return musicInfoMapper.selectMusicInfoList(musicInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增音乐信息
|
||||
*
|
||||
* @param musicInfo 音乐信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMusicInfo(MusicInfo musicInfo)
|
||||
{
|
||||
musicInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return musicInfoMapper.insertMusicInfo(musicInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改音乐信息
|
||||
*
|
||||
* @param musicInfo 音乐信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMusicInfo(MusicInfo musicInfo)
|
||||
{
|
||||
musicInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return musicInfoMapper.updateMusicInfo(musicInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除音乐信息
|
||||
*
|
||||
* @param ids 需要删除的音乐信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMusicInfoByIds(String[] ids)
|
||||
{
|
||||
return musicInfoMapper.deleteMusicInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除音乐信息信息
|
||||
*
|
||||
* @param id 音乐信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMusicInfoById(String id)
|
||||
{
|
||||
return musicInfoMapper.deleteMusicInfoById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicRecommend;
|
||||
import com.ruoyi.system.mapper.MusicRecommendMapper;
|
||||
import com.ruoyi.system.service.IMusicRecommendService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class MusicRecommendServiceImpl implements IMusicRecommendService
|
||||
{
|
||||
@Autowired
|
||||
private MusicRecommendMapper musicRecommendMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public MusicRecommend selectMusicRecommendById(String id)
|
||||
{
|
||||
return musicRecommendMapper.selectMusicRecommendById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param musicRecommend 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<MusicRecommend> selectMusicRecommendList(MusicRecommend musicRecommend)
|
||||
{
|
||||
return musicRecommendMapper.selectMusicRecommendList(musicRecommend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param musicRecommend 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMusicRecommend(MusicRecommend musicRecommend)
|
||||
{
|
||||
return musicRecommendMapper.insertMusicRecommend(musicRecommend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param musicRecommend 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMusicRecommend(MusicRecommend musicRecommend)
|
||||
{
|
||||
return musicRecommendMapper.updateMusicRecommend(musicRecommend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMusicRecommendByIds(String[] ids)
|
||||
{
|
||||
return musicRecommendMapper.deleteMusicRecommendByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMusicRecommendById(String id)
|
||||
{
|
||||
return musicRecommendMapper.deleteMusicRecommendById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicSceneRelate;
|
||||
import com.ruoyi.system.mapper.MusicSceneRelateMapper;
|
||||
import com.ruoyi.system.service.IMusicSceneRelateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class MusicSceneRelateServiceImpl implements IMusicSceneRelateService
|
||||
{
|
||||
@Autowired
|
||||
private MusicSceneRelateMapper musicSceneRelateMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public MusicSceneRelate selectMusicSceneRelateById(String id)
|
||||
{
|
||||
return musicSceneRelateMapper.selectMusicSceneRelateById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param musicSceneRelate 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<MusicSceneRelate> selectMusicSceneRelateList(MusicSceneRelate musicSceneRelate)
|
||||
{
|
||||
return musicSceneRelateMapper.selectMusicSceneRelateList(musicSceneRelate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param musicSceneRelate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMusicSceneRelate(MusicSceneRelate musicSceneRelate)
|
||||
{
|
||||
return musicSceneRelateMapper.insertMusicSceneRelate(musicSceneRelate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param musicSceneRelate 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMusicSceneRelate(MusicSceneRelate musicSceneRelate)
|
||||
{
|
||||
return musicSceneRelateMapper.updateMusicSceneRelate(musicSceneRelate);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMusicSceneRelateByIds(String[] ids)
|
||||
{
|
||||
return musicSceneRelateMapper.deleteMusicSceneRelateByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMusicSceneRelateById(String id)
|
||||
{
|
||||
return musicSceneRelateMapper.deleteMusicSceneRelateById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.MusicScene;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.mapper.MusicSceneMapper;
|
||||
import com.ruoyi.system.service.IMusicSceneService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class MusicSceneServiceImpl implements IMusicSceneService
|
||||
{
|
||||
@Autowired
|
||||
private MusicSceneMapper musicSceneMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public MusicScene selectMusicSceneById(String id)
|
||||
{
|
||||
return musicSceneMapper.selectMusicSceneById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param musicScene 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<MusicScene> selectMusicSceneList(MusicScene musicScene)
|
||||
{
|
||||
return musicSceneMapper.selectMusicSceneList(musicScene);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param musicScene 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMusicScene(MusicScene musicScene)
|
||||
{
|
||||
musicScene.setCreateTime(DateUtils.getNowDate());
|
||||
return musicSceneMapper.insertMusicScene(musicScene);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param musicScene 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMusicScene(MusicScene musicScene)
|
||||
{
|
||||
musicScene.setUpdateTime(DateUtils.getNowDate());
|
||||
return musicSceneMapper.updateMusicScene(musicScene);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMusicSceneByIds(String[] ids)
|
||||
{
|
||||
return musicSceneMapper.deleteMusicSceneByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMusicSceneById(String id)
|
||||
{
|
||||
return musicSceneMapper.deleteMusicSceneById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.RecommendInfo;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.mapper.RecommendInfoMapper;
|
||||
import com.ruoyi.system.service.IRecommendInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 推荐Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class RecommendInfoServiceImpl implements IRecommendInfoService
|
||||
{
|
||||
@Autowired
|
||||
private RecommendInfoMapper recommendInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询推荐
|
||||
*
|
||||
* @param id 推荐主键
|
||||
* @return 推荐
|
||||
*/
|
||||
@Override
|
||||
public RecommendInfo selectRecommendInfoById(Long id)
|
||||
{
|
||||
return recommendInfoMapper.selectRecommendInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询推荐列表
|
||||
*
|
||||
* @param recommendInfo 推荐
|
||||
* @return 推荐
|
||||
*/
|
||||
@Override
|
||||
public List<RecommendInfo> selectRecommendInfoList(RecommendInfo recommendInfo)
|
||||
{
|
||||
return recommendInfoMapper.selectRecommendInfoList(recommendInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增推荐
|
||||
*
|
||||
* @param recommendInfo 推荐
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRecommendInfo(RecommendInfo recommendInfo)
|
||||
{
|
||||
recommendInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return recommendInfoMapper.insertRecommendInfo(recommendInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改推荐
|
||||
*
|
||||
* @param recommendInfo 推荐
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRecommendInfo(RecommendInfo recommendInfo)
|
||||
{
|
||||
recommendInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return recommendInfoMapper.updateRecommendInfo(recommendInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除推荐
|
||||
*
|
||||
* @param ids 需要删除的推荐主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecommendInfoByIds(Long[] ids)
|
||||
{
|
||||
return recommendInfoMapper.deleteRecommendInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除推荐信息
|
||||
*
|
||||
* @param id 推荐主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRecommendInfoById(Long id)
|
||||
{
|
||||
return recommendInfoMapper.deleteRecommendInfoById(id);
|
||||
}
|
||||
}
|
||||
@@ -1,82 +1,97 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.entity.ShopUser;
|
||||
import com.ruoyi.common.core.domain.entity.ShopUserResq;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.config.UmengConfig;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.mapper.ShopUserMapper;
|
||||
import com.ruoyi.system.service.ShopUserService;
|
||||
import com.ruoyi.system.service.IShopUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Transactional
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class ShopUserServiceImpl implements ShopUserService {
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private UmengConfig umengConfig;
|
||||
public class ShopUserServiceImpl implements IShopUserService
|
||||
{
|
||||
@Autowired
|
||||
private ShopUserMapper shopUserMapper;
|
||||
|
||||
/**
|
||||
* 查询用户管理
|
||||
*
|
||||
* @param id 用户管理主键
|
||||
* @return 用户管理
|
||||
*/
|
||||
@Override
|
||||
public ShopUser login(ShopUserResq shopUser) {
|
||||
switch (shopUser.getMethod()){
|
||||
case "1":
|
||||
// 账号密码
|
||||
// 生成令牌
|
||||
ShopUser member = shopUserMapper.selectShopUserByUsernameAndPass(shopUser.getUsername(),shopUser.getPassword());
|
||||
if (member == null){
|
||||
ShopUser msg = new ShopUser();
|
||||
msg.setMsg("用户名或密码错误");
|
||||
return msg;
|
||||
}else {
|
||||
return member;
|
||||
}
|
||||
case "2":
|
||||
// 验证码
|
||||
String code = redisCache.getCacheObject(shopUser.getPhone());
|
||||
String reqCode = shopUser.getCode();
|
||||
if (code.equals(reqCode)){
|
||||
// 登录
|
||||
return loginAndRegis(shopUser);
|
||||
}else {
|
||||
ShopUser msg = new ShopUser();
|
||||
msg.setMsg("验证码错误");
|
||||
return msg;
|
||||
}
|
||||
case "3":
|
||||
// 一键 todo: 完善功能
|
||||
String uMtoken = shopUser.getUMtoken();
|
||||
umengConfig.send(uMtoken);
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
public ShopUser selectShopUserById(String id)
|
||||
{
|
||||
return shopUserMapper.selectShopUserById(id);
|
||||
}
|
||||
|
||||
public ShopUser loginAndRegis(ShopUserResq shopUser) {
|
||||
ShopUser member = shopUserMapper.selectShopUserByPhone(shopUser.getUsername());
|
||||
if (StringUtils.isNull(member)) {
|
||||
// 走注册在登录
|
||||
member = new ShopUser();
|
||||
member.setUserId(IdUtil.getSnowflakeNextId());
|
||||
member.setUsername(shopUser.getPhone());
|
||||
member.setPhone(shopUser.getPhone());
|
||||
member.setPassword(IdUtil.fastUUID());
|
||||
member.setUsername(shopUser.getUsername());
|
||||
int insertCount = shopUserMapper.insert(member);
|
||||
if (insertCount > 0){
|
||||
return member;
|
||||
}else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return member;
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*
|
||||
* @param shopUser 用户管理
|
||||
* @return 用户管理
|
||||
*/
|
||||
@Override
|
||||
public List<ShopUser> selectShopUserList(ShopUser shopUser)
|
||||
{
|
||||
return shopUserMapper.selectShopUserList(shopUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户管理
|
||||
*
|
||||
* @param shopUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertShopUser(ShopUser shopUser)
|
||||
{
|
||||
shopUser.setCreateTime(DateUtils.getNowDate());
|
||||
return shopUserMapper.insertShopUser(shopUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户管理
|
||||
*
|
||||
* @param shopUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateShopUser(ShopUser shopUser)
|
||||
{
|
||||
shopUser.setUpdateTime(DateUtils.getNowDate());
|
||||
return shopUserMapper.updateShopUser(shopUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户管理
|
||||
*
|
||||
* @param ids 需要删除的用户管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteShopUserByIds(String[] ids)
|
||||
{
|
||||
return shopUserMapper.deleteShopUserByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户管理信息
|
||||
*
|
||||
* @param id 用户管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteShopUserById(String id)
|
||||
{
|
||||
return shopUserMapper.deleteShopUserById(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.UserCollect;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.mapper.UserCollectMapper;
|
||||
import com.ruoyi.system.service.IUserCollectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户收藏音乐Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class UserCollectServiceImpl implements IUserCollectService
|
||||
{
|
||||
@Autowired
|
||||
private UserCollectMapper userCollectMapper;
|
||||
|
||||
/**
|
||||
* 查询用户收藏音乐
|
||||
*
|
||||
* @param id 用户收藏音乐主键
|
||||
* @return 用户收藏音乐
|
||||
*/
|
||||
@Override
|
||||
public UserCollect selectUserCollectById(Long id)
|
||||
{
|
||||
return userCollectMapper.selectUserCollectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户收藏音乐列表
|
||||
*
|
||||
* @param userCollect 用户收藏音乐
|
||||
* @return 用户收藏音乐
|
||||
*/
|
||||
@Override
|
||||
public List<UserCollect> selectUserCollectList(UserCollect userCollect)
|
||||
{
|
||||
return userCollectMapper.selectUserCollectList(userCollect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户收藏音乐
|
||||
*
|
||||
* @param userCollect 用户收藏音乐
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUserCollect(UserCollect userCollect)
|
||||
{
|
||||
userCollect.setCreateTime(DateUtils.getNowDate());
|
||||
return userCollectMapper.insertUserCollect(userCollect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户收藏音乐
|
||||
*
|
||||
* @param userCollect 用户收藏音乐
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUserCollect(UserCollect userCollect)
|
||||
{
|
||||
userCollect.setUpdateTime(DateUtils.getNowDate());
|
||||
return userCollectMapper.updateUserCollect(userCollect);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户收藏音乐
|
||||
*
|
||||
* @param ids 需要删除的用户收藏音乐主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserCollectByIds(Long[] ids)
|
||||
{
|
||||
return userCollectMapper.deleteUserCollectByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户收藏音乐信息
|
||||
*
|
||||
* @param id 用户收藏音乐主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserCollectById(Long id)
|
||||
{
|
||||
return userCollectMapper.deleteUserCollectById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.UserHistory;
|
||||
import com.ruoyi.system.mapper.UserHistoryMapper;
|
||||
import com.ruoyi.system.service.IUserHistoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户播放历史Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class UserHistoryServiceImpl implements IUserHistoryService
|
||||
{
|
||||
@Autowired
|
||||
private UserHistoryMapper userHistoryMapper;
|
||||
|
||||
/**
|
||||
* 查询用户播放历史
|
||||
*
|
||||
* @param id 用户播放历史主键
|
||||
* @return 用户播放历史
|
||||
*/
|
||||
@Override
|
||||
public UserHistory selectUserHistoryById(String id)
|
||||
{
|
||||
return userHistoryMapper.selectUserHistoryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户播放历史列表
|
||||
*
|
||||
* @param userHistory 用户播放历史
|
||||
* @return 用户播放历史
|
||||
*/
|
||||
@Override
|
||||
public List<UserHistory> selectUserHistoryList(UserHistory userHistory)
|
||||
{
|
||||
return userHistoryMapper.selectUserHistoryList(userHistory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户播放历史
|
||||
*
|
||||
* @param userHistory 用户播放历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUserHistory(UserHistory userHistory)
|
||||
{
|
||||
return userHistoryMapper.insertUserHistory(userHistory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户播放历史
|
||||
*
|
||||
* @param userHistory 用户播放历史
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUserHistory(UserHistory userHistory)
|
||||
{
|
||||
return userHistoryMapper.updateUserHistory(userHistory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户播放历史
|
||||
*
|
||||
* @param ids 需要删除的用户播放历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserHistoryByIds(String[] ids)
|
||||
{
|
||||
return userHistoryMapper.deleteUserHistoryByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户播放历史信息
|
||||
*
|
||||
* @param id 用户播放历史主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserHistoryById(String id)
|
||||
{
|
||||
return userHistoryMapper.deleteUserHistoryById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.UserLikeMusic;
|
||||
import com.ruoyi.system.mapper.UserLikeMusicMapper;
|
||||
import com.ruoyi.system.service.IUserLikeMusicService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class UserLikeMusicServiceImpl implements IUserLikeMusicService
|
||||
{
|
||||
@Autowired
|
||||
private UserLikeMusicMapper userLikeMusicMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public UserLikeMusic selectUserLikeMusicById(String id)
|
||||
{
|
||||
return userLikeMusicMapper.selectUserLikeMusicById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param userLikeMusic 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<UserLikeMusic> selectUserLikeMusicList(UserLikeMusic userLikeMusic)
|
||||
{
|
||||
return userLikeMusicMapper.selectUserLikeMusicList(userLikeMusic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param userLikeMusic 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertUserLikeMusic(UserLikeMusic userLikeMusic)
|
||||
{
|
||||
return userLikeMusicMapper.insertUserLikeMusic(userLikeMusic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param userLikeMusic 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateUserLikeMusic(UserLikeMusic userLikeMusic)
|
||||
{
|
||||
return userLikeMusicMapper.updateUserLikeMusic(userLikeMusic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserLikeMusicByIds(String[] ids)
|
||||
{
|
||||
return userLikeMusicMapper.deleteUserLikeMusicByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteUserLikeMusicById(String id)
|
||||
{
|
||||
return userLikeMusicMapper.deleteUserLikeMusicById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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.ruoyi.system.mapper.BannerInfoMapper">
|
||||
<resultMap type="BannerInfo" id="BannerInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="bannerAddr" column="banner_addr" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="jumpUrl" column="jump_url" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBannerInfoVo">
|
||||
select id, name, banner_addr, sort, jump_url, create_time, update_time from banner_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBannerInfoList" parameterType="BannerInfo" resultMap="BannerInfoResult">
|
||||
<include refid="selectBannerInfoVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="bannerAddr != null and bannerAddr != ''"> and banner_addr = #{bannerAddr}</if>
|
||||
<if test="sort != null "> and sort = #{sort}</if>
|
||||
<if test="jumpUrl != null and jumpUrl != ''"> and jump_url = #{jumpUrl}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBannerInfoById" parameterType="String" resultMap="BannerInfoResult">
|
||||
<include refid="selectBannerInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBannerInfo" parameterType="BannerInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into banner_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="bannerAddr != null">banner_addr,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
<if test="jumpUrl != null">jump_url,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="bannerAddr != null">#{bannerAddr},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="jumpUrl != null">#{jumpUrl},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBannerInfo" parameterType="BannerInfo">
|
||||
update banner_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="bannerAddr != null">banner_addr = #{bannerAddr},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
<if test="jumpUrl != null">jump_url = #{jumpUrl},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBannerInfoById" parameterType="String">
|
||||
delete from banner_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBannerInfoByIds" parameterType="String">
|
||||
delete from banner_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectEnableBanner" resultMap="BannerInfoResult">
|
||||
<include refid="selectBannerInfoVo"/> where enable=1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?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.ruoyi.system.mapper.CategoryInfoMapper">
|
||||
|
||||
<resultMap type="CategoryInfo" id="CategoryInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="modify" column="modify" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCategoryInfoVo">
|
||||
select id, category_id, name, is_del, create_time, update_time, creator, modify from category_info
|
||||
</sql>
|
||||
|
||||
<select id="selectCategoryInfoList" parameterType="CategoryInfo" resultMap="CategoryInfoResult">
|
||||
<include refid="selectCategoryInfoVo"/>
|
||||
<where>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
|
||||
<if test="modify != null and modify != ''"> and modify = #{modify}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCategoryInfoById" parameterType="String" resultMap="CategoryInfoResult">
|
||||
<include refid="selectCategoryInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCategoryInfo" parameterType="CategoryInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into category_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="categoryId != null">category_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="creator != null">creator,</if>
|
||||
<if test="modify != null">modify,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="categoryId != null">#{categoryId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="creator != null">#{creator},</if>
|
||||
<if test="modify != null">#{modify},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCategoryInfo" parameterType="CategoryInfo">
|
||||
update category_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="categoryId != null">category_id = #{categoryId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="creator != null">creator = #{creator},</if>
|
||||
<if test="modify != null">modify = #{modify},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCategoryInfoById" parameterType="String">
|
||||
delete from category_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCategoryInfoByIds" parameterType="String">
|
||||
delete from category_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,76 @@
|
||||
<?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.ruoyi.system.mapper.LabelInfoMapper">
|
||||
|
||||
<resultMap type="LabelInfo" id="LabelInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="labelName" column="label_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="modify" column="modify" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectLabelInfoVo">
|
||||
select id, label_name, create_time, update_time, creator, modify from label_info
|
||||
</sql>
|
||||
|
||||
<select id="selectLabelInfoList" parameterType="LabelInfo" resultMap="LabelInfoResult">
|
||||
<include refid="selectLabelInfoVo"/>
|
||||
<where>
|
||||
<if test="labelName != null and labelName != ''"> and label_name like concat('%', #{labelName}, '%')</if>
|
||||
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
|
||||
<if test="modify != null and modify != ''"> and modify = #{modify}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectLabelInfoById" parameterType="Long" resultMap="LabelInfoResult">
|
||||
<include refid="selectLabelInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertLabelInfo" parameterType="LabelInfo">
|
||||
insert into label_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="labelName != null">label_name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="creator != null">creator,</if>
|
||||
<if test="modify != null">modify,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="labelName != null">#{labelName},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="creator != null">#{creator},</if>
|
||||
<if test="modify != null">#{modify},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateLabelInfo" parameterType="LabelInfo">
|
||||
update label_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="labelName != null">label_name = #{labelName},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="creator != null">creator = #{creator},</if>
|
||||
<if test="modify != null">modify = #{modify},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteLabelInfoById" parameterType="Long">
|
||||
delete from label_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteLabelInfoByIds" parameterType="String">
|
||||
delete from label_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,119 @@
|
||||
<?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.ruoyi.system.mapper.MusicInfoMapper">
|
||||
|
||||
<resultMap type="MusicInfo" id="MusicInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="musicId" column="music_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="author" column="author" />
|
||||
<result property="vip" column="vip" />
|
||||
<result property="shelf" column="shelf" />
|
||||
<result property="imgAddr" column="img_addr" />
|
||||
<result property="musicAddr" column="music_addr" />
|
||||
<result property="musicType" column="music_type" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="modify" column="modify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="label" column="label" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMusicInfoVo">
|
||||
select id, music_id, name, author, vip, shelf, img_addr, music_addr, music_type, creator, modify, create_time, update_time, is_del, label from music_info
|
||||
</sql>
|
||||
|
||||
<select id="selectMusicInfoList" parameterType="MusicInfo" resultMap="MusicInfoResult">
|
||||
<include refid="selectMusicInfoVo"/>
|
||||
<where>
|
||||
<if test="musicId != null "> and music_id = #{musicId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="author != null and author != ''"> and author = #{author}</if>
|
||||
<if test="vip != null "> and vip = #{vip}</if>
|
||||
<if test="shelf != null "> and shelf = #{shelf}</if>
|
||||
<if test="imgAddr != null and imgAddr != ''"> and img_addr = #{imgAddr}</if>
|
||||
<if test="musicAddr != null and musicAddr != ''"> and music_addr = #{musicAddr}</if>
|
||||
<if test="musicType != null and musicType != ''"> and music_type = #{musicType}</if>
|
||||
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
|
||||
<if test="modify != null and modify != ''"> and modify = #{modify}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="label != null and label != ''"> and label = #{label}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMusicInfoById" parameterType="String" resultMap="MusicInfoResult">
|
||||
<include refid="selectMusicInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMusicInfo" parameterType="MusicInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into music_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="musicId != null">music_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="author != null">author,</if>
|
||||
<if test="vip != null">vip,</if>
|
||||
<if test="shelf != null">shelf,</if>
|
||||
<if test="imgAddr != null">img_addr,</if>
|
||||
<if test="musicAddr != null">music_addr,</if>
|
||||
<if test="musicType != null">music_type,</if>
|
||||
<if test="creator != null">creator,</if>
|
||||
<if test="modify != null">modify,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="label != null">label,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="musicId != null">#{musicId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="author != null">#{author},</if>
|
||||
<if test="vip != null">#{vip},</if>
|
||||
<if test="shelf != null">#{shelf},</if>
|
||||
<if test="imgAddr != null">#{imgAddr},</if>
|
||||
<if test="musicAddr != null">#{musicAddr},</if>
|
||||
<if test="musicType != null">#{musicType},</if>
|
||||
<if test="creator != null">#{creator},</if>
|
||||
<if test="modify != null">#{modify},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="label != null">#{label},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMusicInfo" parameterType="MusicInfo">
|
||||
update music_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="musicId != null">music_id = #{musicId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="author != null">author = #{author},</if>
|
||||
<if test="vip != null">vip = #{vip},</if>
|
||||
<if test="shelf != null">shelf = #{shelf},</if>
|
||||
<if test="imgAddr != null">img_addr = #{imgAddr},</if>
|
||||
<if test="musicAddr != null">music_addr = #{musicAddr},</if>
|
||||
<if test="musicType != null">music_type = #{musicType},</if>
|
||||
<if test="creator != null">creator = #{creator},</if>
|
||||
<if test="modify != null">modify = #{modify},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="label != null">label = #{label},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMusicInfoById" parameterType="String">
|
||||
delete from music_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMusicInfoByIds" parameterType="String">
|
||||
delete from music_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?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.ruoyi.system.mapper.MusicRecommendMapper">
|
||||
|
||||
<resultMap type="MusicRecommend" id="MusicRecommendResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="recommendId" column="recommend_id" />
|
||||
<result property="musicId" column="music_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMusicRecommendVo">
|
||||
select id, recommend_id, music_id from music_recommend
|
||||
</sql>
|
||||
|
||||
<select id="selectMusicRecommendList" parameterType="MusicRecommend" resultMap="MusicRecommendResult">
|
||||
<include refid="selectMusicRecommendVo"/>
|
||||
<where>
|
||||
<if test="recommendId != null "> and recommend_id = #{recommendId}</if>
|
||||
<if test="musicId != null "> and music_id = #{musicId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMusicRecommendById" parameterType="String" resultMap="MusicRecommendResult">
|
||||
<include refid="selectMusicRecommendVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMusicRecommend" parameterType="MusicRecommend" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into music_recommend
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recommendId != null">recommend_id,</if>
|
||||
<if test="musicId != null">music_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recommendId != null">#{recommendId},</if>
|
||||
<if test="musicId != null">#{musicId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMusicRecommend" parameterType="MusicRecommend">
|
||||
update music_recommend
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="recommendId != null">recommend_id = #{recommendId},</if>
|
||||
<if test="musicId != null">music_id = #{musicId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMusicRecommendById" parameterType="String">
|
||||
delete from music_recommend where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMusicRecommendByIds" parameterType="String">
|
||||
delete from music_recommend where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?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.ruoyi.system.mapper.MusicSceneMapper">
|
||||
|
||||
<resultMap type="MusicScene" id="MusicSceneResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sceneId" column="scene_id" />
|
||||
<result property="scene" column="scene" />
|
||||
<result property="musicAddr" column="music_addr" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="modify" column="modify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="isDel" column="is_del" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMusicSceneVo">
|
||||
select id, scene_id, scene, music_addr, creator, modify, create_time, update_time, is_del from music_scene
|
||||
</sql>
|
||||
|
||||
<select id="selectMusicSceneList" parameterType="MusicScene" resultMap="MusicSceneResult">
|
||||
<include refid="selectMusicSceneVo"/>
|
||||
<where>
|
||||
<if test="sceneId != null "> and scene_id = #{sceneId}</if>
|
||||
<if test="scene != null and scene != ''"> and scene = #{scene}</if>
|
||||
<if test="musicAddr != null and musicAddr != ''"> and music_addr = #{musicAddr}</if>
|
||||
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
|
||||
<if test="modify != null and modify != ''"> and modify = #{modify}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMusicSceneById" parameterType="String" resultMap="MusicSceneResult">
|
||||
<include refid="selectMusicSceneVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMusicScene" parameterType="MusicScene" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into music_scene
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sceneId != null">scene_id,</if>
|
||||
<if test="scene != null">scene,</if>
|
||||
<if test="musicAddr != null">music_addr,</if>
|
||||
<if test="creator != null">creator,</if>
|
||||
<if test="modify != null">modify,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sceneId != null">#{sceneId},</if>
|
||||
<if test="scene != null">#{scene},</if>
|
||||
<if test="musicAddr != null">#{musicAddr},</if>
|
||||
<if test="creator != null">#{creator},</if>
|
||||
<if test="modify != null">#{modify},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMusicScene" parameterType="MusicScene">
|
||||
update music_scene
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sceneId != null">scene_id = #{sceneId},</if>
|
||||
<if test="scene != null">scene = #{scene},</if>
|
||||
<if test="musicAddr != null">music_addr = #{musicAddr},</if>
|
||||
<if test="creator != null">creator = #{creator},</if>
|
||||
<if test="modify != null">modify = #{modify},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMusicSceneById" parameterType="String">
|
||||
delete from music_scene where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMusicSceneByIds" parameterType="String">
|
||||
delete from music_scene where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?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.ruoyi.system.mapper.MusicSceneRelateMapper">
|
||||
|
||||
<resultMap type="MusicSceneRelate" id="MusicSceneRelateResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="musicId" column="music_id" />
|
||||
<result property="sceneId" column="scene_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMusicSceneRelateVo">
|
||||
select id, music_id, scene_id from music_scene_relate
|
||||
</sql>
|
||||
|
||||
<select id="selectMusicSceneRelateList" parameterType="MusicSceneRelate" resultMap="MusicSceneRelateResult">
|
||||
<include refid="selectMusicSceneRelateVo"/>
|
||||
<where>
|
||||
<if test="musicId != null "> and music_id = #{musicId}</if>
|
||||
<if test="sceneId != null "> and scene_id = #{sceneId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMusicSceneRelateById" parameterType="String" resultMap="MusicSceneRelateResult">
|
||||
<include refid="selectMusicSceneRelateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMusicSceneRelate" parameterType="MusicSceneRelate" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into music_scene_relate
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="musicId != null">music_id,</if>
|
||||
<if test="sceneId != null">scene_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="musicId != null">#{musicId},</if>
|
||||
<if test="sceneId != null">#{sceneId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMusicSceneRelate" parameterType="MusicSceneRelate">
|
||||
update music_scene_relate
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="musicId != null">music_id = #{musicId},</if>
|
||||
<if test="sceneId != null">scene_id = #{sceneId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMusicSceneRelateById" parameterType="String">
|
||||
delete from music_scene_relate where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMusicSceneRelateByIds" parameterType="String">
|
||||
delete from music_scene_relate where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?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.ruoyi.system.mapper.RecommendInfoMapper">
|
||||
|
||||
<resultMap type="RecommendInfo" id="RecommendInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="creator" column="creator" />
|
||||
<result property="modify" column="modify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="desc" column="desc" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRecommendInfoVo">
|
||||
select id, name, creator, modify, create_time, update_time, is_del, desc from recommend_info
|
||||
</sql>
|
||||
|
||||
<select id="selectRecommendInfoList" parameterType="RecommendInfo" resultMap="RecommendInfoResult">
|
||||
<include refid="selectRecommendInfoVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
|
||||
<if test="modify != null and modify != ''"> and modify = #{modify}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="desc != null and desc != ''"> and desc = #{desc}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRecommendInfoById" parameterType="Long" resultMap="RecommendInfoResult">
|
||||
<include refid="selectRecommendInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRecommendInfo" parameterType="RecommendInfo">
|
||||
insert into recommend_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="creator != null">creator,</if>
|
||||
<if test="modify != null">modify,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="desc != null">desc,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="creator != null">#{creator},</if>
|
||||
<if test="modify != null">#{modify},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="desc != null">#{desc},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRecommendInfo" parameterType="RecommendInfo">
|
||||
update recommend_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="creator != null">creator = #{creator},</if>
|
||||
<if test="modify != null">modify = #{modify},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="desc != null">desc = #{desc},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRecommendInfoById" parameterType="Long">
|
||||
delete from recommend_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRecommendInfoByIds" parameterType="String">
|
||||
delete from recommend_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -47,5 +47,122 @@
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<resultMap type="ShopUser" id="ShopUserResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="username" column="username" />
|
||||
<result property="password" column="password" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="nickname" column="nickname" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="birthday" column="birthday" />
|
||||
<result property="addr" column="addr" />
|
||||
<result property="registerTime" column="register_time" />
|
||||
<result property="status" column="status" />
|
||||
<result property="vip" column="vip" />
|
||||
<result property="online" column="online" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="isDel" column="is_del" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectShopUserVo">
|
||||
select id, user_id, username, password, phone, nickname, sex, birthday, addr, register_time, status, vip, online, create_time, update_time, is_del from shop_user
|
||||
</sql>
|
||||
|
||||
<select id="selectShopUserList" parameterType="ShopUser" resultMap="ShopUserResult">
|
||||
<include refid="selectShopUserVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
|
||||
<if test="password != null and password != ''"> and password = #{password}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="nickname != null and nickname != ''"> and nickname like concat('%', #{nickname}, '%')</if>
|
||||
<if test="sex != null "> and sex = #{sex}</if>
|
||||
<if test="birthday != null "> and birthday = #{birthday}</if>
|
||||
<if test="addr != null and addr != ''"> and addr = #{addr}</if>
|
||||
<if test="registerTime != null "> and register_time = #{registerTime}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="vip != null "> and vip = #{vip}</if>
|
||||
<if test="online != null and online != ''"> and online = #{online}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectShopUserById" parameterType="String" resultMap="ShopUserResult">
|
||||
<include refid="selectShopUserVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertShopUser" parameterType="ShopUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into shop_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="username != null">username,</if>
|
||||
<if test="password != null">password,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="nickname != null">nickname,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
<if test="birthday != null">birthday,</if>
|
||||
<if test="addr != null">addr,</if>
|
||||
<if test="registerTime != null">register_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="vip != null">vip,</if>
|
||||
<if test="online != null">online,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="username != null">#{username},</if>
|
||||
<if test="password != null">#{password},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="nickname != null">#{nickname},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
<if test="birthday != null">#{birthday},</if>
|
||||
<if test="addr != null">#{addr},</if>
|
||||
<if test="registerTime != null">#{registerTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="vip != null">#{vip},</if>
|
||||
<if test="online != null">#{online},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateShopUser" parameterType="ShopUser">
|
||||
update shop_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="username != null">username = #{username},</if>
|
||||
<if test="password != null">password = #{password},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="nickname != null">nickname = #{nickname},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="addr != null">addr = #{addr},</if>
|
||||
<if test="registerTime != null">register_time = #{registerTime},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="vip != null">vip = #{vip},</if>
|
||||
<if test="online != null">online = #{online},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteShopUserById" parameterType="String">
|
||||
delete from shop_user where id = #{id}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteShopUserByIds" parameterType="String">
|
||||
delete from shop_user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?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.ruoyi.system.mapper.UserCollectMapper">
|
||||
|
||||
<resultMap type="UserCollect" id="UserCollectResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="musicId" column="music_id" />
|
||||
<result property="collectName" column="collect_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="collectType" column="collect_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserCollectVo">
|
||||
select id, user_id, music_id, collect_name, create_time, update_time, collect_type from user_collect
|
||||
</sql>
|
||||
|
||||
<select id="selectUserCollectList" parameterType="UserCollect" resultMap="UserCollectResult">
|
||||
<include refid="selectUserCollectVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="musicId != null "> and music_id = #{musicId}</if>
|
||||
<if test="collectName != null and collectName != ''"> and collect_name like concat('%', #{collectName}, '%')</if>
|
||||
<if test="collectType != null and collectType != ''"> and collect_type = #{collectType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUserCollectById" parameterType="Long" resultMap="UserCollectResult">
|
||||
<include refid="selectUserCollectVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUserCollect" parameterType="UserCollect">
|
||||
insert into user_collect
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="musicId != null">music_id,</if>
|
||||
<if test="collectName != null">collect_name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="collectType != null">collect_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="musicId != null">#{musicId},</if>
|
||||
<if test="collectName != null">#{collectName},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="collectType != null">#{collectType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUserCollect" parameterType="UserCollect">
|
||||
update user_collect
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="musicId != null">music_id = #{musicId},</if>
|
||||
<if test="collectName != null">collect_name = #{collectName},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="collectType != null">collect_type = #{collectType},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserCollectById" parameterType="Long">
|
||||
delete from user_collect where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserCollectByIds" parameterType="String">
|
||||
delete from user_collect where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?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.ruoyi.system.mapper.UserHistoryMapper">
|
||||
|
||||
<resultMap type="UserHistory" id="UserHistoryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="musicId" column="music_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserHistoryVo">
|
||||
select id, user_id, music_id from user_history
|
||||
</sql>
|
||||
|
||||
<select id="selectUserHistoryList" parameterType="UserHistory" resultMap="UserHistoryResult">
|
||||
<include refid="selectUserHistoryVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="musicId != null "> and music_id = #{musicId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectUserHistoryById" parameterType="String" resultMap="UserHistoryResult">
|
||||
<include refid="selectUserHistoryVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertUserHistory" parameterType="UserHistory" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into user_history
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="musicId != null">music_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="musicId != null">#{musicId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUserHistory" parameterType="UserHistory">
|
||||
update user_history
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="musicId != null">music_id = #{musicId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserHistoryById" parameterType="String">
|
||||
delete from user_history where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserHistoryByIds" parameterType="String">
|
||||
delete from user_history where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?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.ruoyi.system.mapper.UserLikeMusicMapper">
|
||||
|
||||
<resultMap type="UserLikeMusic" id="UserLikeMusicResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="musicId" column="music_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserLikeMusicVo">
|
||||
select id, music_id, user_id from user_like_music
|
||||
</sql>
|
||||
|
||||
<select id="selectUserLikeMusicList" parameterType="UserLikeMusic" resultMap="UserLikeMusicResult">
|
||||
<include refid="selectUserLikeMusicVo"/>
|
||||
<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}
|
||||
</select>
|
||||
|
||||
<insert id="insertUserLikeMusic" parameterType="UserLikeMusic" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into user_like_music
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="musicId != null">music_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="musicId != null">#{musicId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateUserLikeMusic" parameterType="UserLikeMusic">
|
||||
update user_like_music
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="musicId != null">music_id = #{musicId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserLikeMusicById" parameterType="String">
|
||||
delete from user_like_music where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserLikeMusicByIds" parameterType="String">
|
||||
delete from user_like_music where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user