diff --git a/pom.xml b/pom.xml index c3c07ea..7209437 100644 --- a/pom.xml +++ b/pom.xml @@ -272,6 +272,29 @@ 5.8.36 + + com.aliyun.oss + aliyun-sdk-oss + 3.17.4 + + + + javax.xml.bind + jaxb-api + 2.3.1 + + + javax.activation + activation + 1.1.1 + + + + org.glassfish.jaxb + jaxb-runtime + 2.3.3 + + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/BackIndexController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/BackIndexController.java new file mode 100644 index 0000000..37e73a3 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/BackIndexController.java @@ -0,0 +1,112 @@ +package com.ruoyi.web.controller.back; + + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.BannerInfo; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.config.AliConfig; +import com.ruoyi.system.service.IBannerInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +@RequestMapping("/back/banner") +@RestController +public class BackIndexController extends BaseController { + + @Autowired + private IBannerInfoService bannerInfoService; + + /** + * 查询【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:list')") + @GetMapping("/list") + public TableDataInfo list(BannerInfo bannerInfo) + { + startPage(); + List list = bannerInfoService.selectBannerInfoList(bannerInfo); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:export')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BannerInfo bannerInfo) + { + List list = bannerInfoService.selectBannerInfoList(bannerInfo); + ExcelUtil util = new ExcelUtil(BannerInfo.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:info:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(bannerInfoService.selectBannerInfoById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + //@PreAuthorize("@ss.hasPermi('system:info:add')") + //@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add( + @RequestParam("name") String name, + @RequestParam("sort") int sort, + @RequestParam("jumpUrl") String jumpUrl, + @RequestParam("file") MultipartFile file + ) { + // 1. 处理文件上传 + if (file != null && !file.isEmpty()) { + // 保存文件逻辑 + // String url = fileService.save(file); + // bannerInfo.setImageUrl(url); + } + // 2. 保存bannerInfo + BannerInfo bannerInfo = new BannerInfo(); + bannerInfo.setSort(sort); + bannerInfo.setJumpUrl(jumpUrl); + bannerInfo.setName(name); + return toAjax(bannerInfoService.insertBannerInfo(bannerInfo,file)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:info:edit')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BannerInfo bannerInfo) + { + return toAjax(bannerInfoService.updateBannerInfo(bannerInfo)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:info:remove')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(bannerInfoService.deleteBannerInfoByIds(ids)); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/CategoryInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/CategoryInfoController.java new file mode 100644 index 0000000..99cfe9f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/CategoryInfoController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.CategoryInfo; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.ICategoryInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/category") +public class CategoryInfoController extends BaseController +{ + @Autowired + private ICategoryInfoService categoryInfoService; + + /** + * 查询【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:list')") + @GetMapping("/list") + public TableDataInfo list(CategoryInfo categoryInfo) + { + startPage(); + List list = categoryInfoService.selectCategoryInfoList(categoryInfo); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:export')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CategoryInfo categoryInfo) + { + List list = categoryInfoService.selectCategoryInfoList(categoryInfo); + ExcelUtil util = new ExcelUtil(CategoryInfo.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:info:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(categoryInfoService.selectCategoryInfoById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:info:add')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody CategoryInfo categoryInfo) + { + return toAjax(categoryInfoService.insertCategoryInfo(categoryInfo)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:info:edit')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody CategoryInfo categoryInfo) + { + return toAjax(categoryInfoService.updateCategoryInfo(categoryInfo)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:info:remove')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(categoryInfoService.deleteCategoryInfoByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/FileController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/FileController.java new file mode 100644 index 0000000..40ac0e5 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/FileController.java @@ -0,0 +1,38 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.system.config.AliConfig; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletResponse; + +@RequestMapping("/file") +@RestController +public class FileController { + + /** + * 下载OSS文件 + */ + @GetMapping("/download/{objectName}/{fileName}") + public void downloadOssFile(@PathVariable String objectName,@PathVariable String fileName, HttpServletResponse response) { + try { + String[] file = objectName.split("file/download"); + // 获取文件字节 + byte[] data = AliConfig.ossDown(objectName+"/"+fileName); + // 设置响应头,支持中文文件名 + response.setContentType("application/octet-stream"); + response.setHeader("Content-Disposition", "attachment; filename=" + java.net.URLEncoder.encode(fileName, "UTF-8")); + assert data != null; + response.getOutputStream().write(data); + response.getOutputStream().flush(); + } catch (Exception e) { + try { + response.setContentType("application/json;charset=UTF-8"); + response.getWriter().write("{\"msg\":\"下载失败: " + e.getMessage() + "\"}"); + } catch (Exception ignored) {} + } + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/LabelInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/LabelInfoController.java new file mode 100644 index 0000000..39efbea --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/LabelInfoController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.LabelInfo; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.ILabelInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/labelInfo") +public class LabelInfoController extends BaseController +{ + @Autowired + private ILabelInfoService labelInfoService; + + /** + * 查询【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:list')") + @GetMapping("/list") + public TableDataInfo list(LabelInfo labelInfo) + { + startPage(); + List list = labelInfoService.selectLabelInfoList(labelInfo); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:export')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, LabelInfo labelInfo) + { + List list = labelInfoService.selectLabelInfoList(labelInfo); + ExcelUtil util = new ExcelUtil(LabelInfo.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:info:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(labelInfoService.selectLabelInfoById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:info:add')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody LabelInfo labelInfo) + { + return toAjax(labelInfoService.insertLabelInfo(labelInfo)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:info:edit')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody LabelInfo labelInfo) + { + return toAjax(labelInfoService.updateLabelInfo(labelInfo)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:info:remove')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(labelInfoService.deleteLabelInfoByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicInfoController.java new file mode 100644 index 0000000..c912f36 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicInfoController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.MusicInfo; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.IMusicInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 音乐信息Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/music") +public class MusicInfoController extends BaseController +{ + @Autowired + private IMusicInfoService musicInfoService; + + /** + * 查询音乐信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:list')") + @GetMapping("/list") + public TableDataInfo list(MusicInfo musicInfo) + { + startPage(); + List list = musicInfoService.selectMusicInfoList(musicInfo); + return getDataTable(list); + } + + /** + * 导出音乐信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:export')") + @Log(title = "音乐信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MusicInfo musicInfo) + { + List list = musicInfoService.selectMusicInfoList(musicInfo); + ExcelUtil util = new ExcelUtil(MusicInfo.class); + util.exportExcel(response, list, "音乐信息数据"); + } + + /** + * 获取音乐信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:info:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(musicInfoService.selectMusicInfoById(id)); + } + + /** + * 新增音乐信息 + */ + @PreAuthorize("@ss.hasPermi('system:info:add')") + @Log(title = "音乐信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MusicInfo musicInfo) + { + return toAjax(musicInfoService.insertMusicInfo(musicInfo)); + } + + /** + * 修改音乐信息 + */ + @PreAuthorize("@ss.hasPermi('system:info:edit')") + @Log(title = "音乐信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MusicInfo musicInfo) + { + return toAjax(musicInfoService.updateMusicInfo(musicInfo)); + } + + /** + * 删除音乐信息 + */ + @PreAuthorize("@ss.hasPermi('system:info:remove')") + @Log(title = "音乐信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(musicInfoService.deleteMusicInfoByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicRecommendController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicRecommendController.java new file mode 100644 index 0000000..b1eaf65 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicRecommendController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.MusicRecommend; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.IMusicRecommendService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/musicRe") +public class MusicRecommendController extends BaseController +{ + @Autowired + private IMusicRecommendService musicRecommendService; + + /** + * 查询【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:recommend:list')") + @GetMapping("/list") + public TableDataInfo list(MusicRecommend musicRecommend) + { + startPage(); + List list = musicRecommendService.selectMusicRecommendList(musicRecommend); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:recommend:export')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MusicRecommend musicRecommend) + { + List list = musicRecommendService.selectMusicRecommendList(musicRecommend); + ExcelUtil util = new ExcelUtil(MusicRecommend.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:recommend:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(musicRecommendService.selectMusicRecommendById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:recommend:add')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MusicRecommend musicRecommend) + { + return toAjax(musicRecommendService.insertMusicRecommend(musicRecommend)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:recommend:edit')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MusicRecommend musicRecommend) + { + return toAjax(musicRecommendService.updateMusicRecommend(musicRecommend)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:recommend:remove')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(musicRecommendService.deleteMusicRecommendByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicSceneController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicSceneController.java new file mode 100644 index 0000000..963052c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicSceneController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.MusicScene; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.IMusicSceneService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/scene") +public class MusicSceneController extends BaseController +{ + @Autowired + private IMusicSceneService musicSceneService; + + /** + * 查询【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:scene:list')") + @GetMapping("/list") + public TableDataInfo list(MusicScene musicScene) + { + startPage(); + List list = musicSceneService.selectMusicSceneList(musicScene); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:scene:export')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MusicScene musicScene) + { + List list = musicSceneService.selectMusicSceneList(musicScene); + ExcelUtil util = new ExcelUtil(MusicScene.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:scene:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(musicSceneService.selectMusicSceneById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:scene:add')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MusicScene musicScene) + { + return toAjax(musicSceneService.insertMusicScene(musicScene)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:scene:edit')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MusicScene musicScene) + { + return toAjax(musicSceneService.updateMusicScene(musicScene)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:scene:remove')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(musicSceneService.deleteMusicSceneByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicSceneRelateController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicSceneRelateController.java new file mode 100644 index 0000000..88f78a3 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/MusicSceneRelateController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.MusicSceneRelate; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.IMusicSceneRelateService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/relate") +public class MusicSceneRelateController extends BaseController +{ + @Autowired + private IMusicSceneRelateService musicSceneRelateService; + + /** + * 查询【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:relate:list')") + @GetMapping("/list") + public TableDataInfo list(MusicSceneRelate musicSceneRelate) + { + startPage(); + List list = musicSceneRelateService.selectMusicSceneRelateList(musicSceneRelate); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:relate:export')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MusicSceneRelate musicSceneRelate) + { + List list = musicSceneRelateService.selectMusicSceneRelateList(musicSceneRelate); + ExcelUtil util = new ExcelUtil(MusicSceneRelate.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:relate:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(musicSceneRelateService.selectMusicSceneRelateById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:relate:add')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MusicSceneRelate musicSceneRelate) + { + return toAjax(musicSceneRelateService.insertMusicSceneRelate(musicSceneRelate)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:relate:edit')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MusicSceneRelate musicSceneRelate) + { + return toAjax(musicSceneRelateService.updateMusicSceneRelate(musicSceneRelate)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:relate:remove')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(musicSceneRelateService.deleteMusicSceneRelateByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/RecommendInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/RecommendInfoController.java new file mode 100644 index 0000000..34a3d2a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/RecommendInfoController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.RecommendInfo; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.IRecommendInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 推荐Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/re") +public class RecommendInfoController extends BaseController +{ + @Autowired + private IRecommendInfoService recommendInfoService; + + /** + * 查询推荐列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:list')") + @GetMapping("/list") + public TableDataInfo list(RecommendInfo recommendInfo) + { + startPage(); + List list = recommendInfoService.selectRecommendInfoList(recommendInfo); + return getDataTable(list); + } + + /** + * 导出推荐列表 + */ + @PreAuthorize("@ss.hasPermi('system:info:export')") + @Log(title = "推荐", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, RecommendInfo recommendInfo) + { + List list = recommendInfoService.selectRecommendInfoList(recommendInfo); + ExcelUtil util = new ExcelUtil(RecommendInfo.class); + util.exportExcel(response, list, "推荐数据"); + } + + /** + * 获取推荐详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:info:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(recommendInfoService.selectRecommendInfoById(id)); + } + + /** + * 新增推荐 + */ + @PreAuthorize("@ss.hasPermi('system:info:add')") + @Log(title = "推荐", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody RecommendInfo recommendInfo) + { + return toAjax(recommendInfoService.insertRecommendInfo(recommendInfo)); + } + + /** + * 修改推荐 + */ + @PreAuthorize("@ss.hasPermi('system:info:edit')") + @Log(title = "推荐", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody RecommendInfo recommendInfo) + { + return toAjax(recommendInfoService.updateRecommendInfo(recommendInfo)); + } + + /** + * 删除推荐 + */ + @PreAuthorize("@ss.hasPermi('system:info:remove')") + @Log(title = "推荐", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(recommendInfoService.deleteRecommendInfoByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/ShopUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/ShopUserController.java new file mode 100644 index 0000000..fbf7b1d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/ShopUserController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.ShopUser; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.IShopUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 用户管理Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/user") +public class ShopUserController extends BaseController +{ + @Autowired + private IShopUserService shopUserService; + + /** + * 查询用户管理列表 + */ + @PreAuthorize("@ss.hasPermi('system:user:list')") + @GetMapping("/list") + public TableDataInfo list(ShopUser shopUser) + { + startPage(); + List list = shopUserService.selectShopUserList(shopUser); + return getDataTable(list); + } + + /** + * 导出用户管理列表 + */ + @PreAuthorize("@ss.hasPermi('system:user:export')") + @Log(title = "用户管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ShopUser shopUser) + { + List list = shopUserService.selectShopUserList(shopUser); + ExcelUtil util = new ExcelUtil(ShopUser.class); + util.exportExcel(response, list, "用户管理数据"); + } + + /** + * 获取用户管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:user:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(shopUserService.selectShopUserById(id)); + } + + /** + * 新增用户管理 + */ + @PreAuthorize("@ss.hasPermi('system:user:add')") + @Log(title = "用户管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ShopUser shopUser) + { + return toAjax(shopUserService.insertShopUser(shopUser)); + } + + /** + * 修改用户管理 + */ + @PreAuthorize("@ss.hasPermi('system:user:edit')") + @Log(title = "用户管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ShopUser shopUser) + { + return toAjax(shopUserService.updateShopUser(shopUser)); + } + + /** + * 删除用户管理 + */ + @PreAuthorize("@ss.hasPermi('system:user:remove')") + @Log(title = "用户管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(shopUserService.deleteShopUserByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/UserCollectController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/UserCollectController.java new file mode 100644 index 0000000..2b1e73a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/UserCollectController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.UserCollect; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.IUserCollectService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 用户收藏音乐Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/collect") +public class UserCollectController extends BaseController +{ + @Autowired + private IUserCollectService userCollectService; + + /** + * 查询用户收藏音乐列表 + */ + @PreAuthorize("@ss.hasPermi('system:collect:list')") + @GetMapping("/list") + public TableDataInfo list(UserCollect userCollect) + { + startPage(); + List list = userCollectService.selectUserCollectList(userCollect); + return getDataTable(list); + } + + /** + * 导出用户收藏音乐列表 + */ + @PreAuthorize("@ss.hasPermi('system:collect:export')") + @Log(title = "用户收藏音乐", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, UserCollect userCollect) + { + List list = userCollectService.selectUserCollectList(userCollect); + ExcelUtil util = new ExcelUtil(UserCollect.class); + util.exportExcel(response, list, "用户收藏音乐数据"); + } + + /** + * 获取用户收藏音乐详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:collect:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(userCollectService.selectUserCollectById(id)); + } + + /** + * 新增用户收藏音乐 + */ + @PreAuthorize("@ss.hasPermi('system:collect:add')") + @Log(title = "用户收藏音乐", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody UserCollect userCollect) + { + return toAjax(userCollectService.insertUserCollect(userCollect)); + } + + /** + * 修改用户收藏音乐 + */ + @PreAuthorize("@ss.hasPermi('system:collect:edit')") + @Log(title = "用户收藏音乐", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody UserCollect userCollect) + { + return toAjax(userCollectService.updateUserCollect(userCollect)); + } + + /** + * 删除用户收藏音乐 + */ + @PreAuthorize("@ss.hasPermi('system:collect:remove')") + @Log(title = "用户收藏音乐", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(userCollectService.deleteUserCollectByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/UserHistoryController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/UserHistoryController.java new file mode 100644 index 0000000..42eb995 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/UserHistoryController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.UserHistory; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.IUserHistoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 用户播放历史Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/history") +public class UserHistoryController extends BaseController +{ + @Autowired + private IUserHistoryService userHistoryService; + + /** + * 查询用户播放历史列表 + */ + @PreAuthorize("@ss.hasPermi('system:history:list')") + @GetMapping("/list") + public TableDataInfo list(UserHistory userHistory) + { + startPage(); + List list = userHistoryService.selectUserHistoryList(userHistory); + return getDataTable(list); + } + + /** + * 导出用户播放历史列表 + */ + @PreAuthorize("@ss.hasPermi('system:history:export')") + @Log(title = "用户播放历史", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, UserHistory userHistory) + { + List list = userHistoryService.selectUserHistoryList(userHistory); + ExcelUtil util = new ExcelUtil(UserHistory.class); + util.exportExcel(response, list, "用户播放历史数据"); + } + + /** + * 获取用户播放历史详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:history:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(userHistoryService.selectUserHistoryById(id)); + } + + /** + * 新增用户播放历史 + */ + @PreAuthorize("@ss.hasPermi('system:history:add')") + @Log(title = "用户播放历史", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody UserHistory userHistory) + { + return toAjax(userHistoryService.insertUserHistory(userHistory)); + } + + /** + * 修改用户播放历史 + */ + @PreAuthorize("@ss.hasPermi('system:history:edit')") + @Log(title = "用户播放历史", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody UserHistory userHistory) + { + return toAjax(userHistoryService.updateUserHistory(userHistory)); + } + + /** + * 删除用户播放历史 + */ + @PreAuthorize("@ss.hasPermi('system:history:remove')") + @Log(title = "用户播放历史", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(userHistoryService.deleteUserHistoryByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/UserLikeMusicController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/UserLikeMusicController.java new file mode 100644 index 0000000..626437f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/UserLikeMusicController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.back; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.domain.entity.UserLikeMusic; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.service.IUserLikeMusicService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2025-07-15 + */ +@RestController +@RequestMapping("/back/user-like") +public class UserLikeMusicController extends BaseController +{ + @Autowired + private IUserLikeMusicService userLikeMusicService; + + /** + * 查询【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:music:list')") + @GetMapping("/list") + public TableDataInfo list(UserLikeMusic userLikeMusic) + { + startPage(); + List list = userLikeMusicService.selectUserLikeMusicList(userLikeMusic); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @PreAuthorize("@ss.hasPermi('system:music:export')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, UserLikeMusic userLikeMusic) + { + List list = userLikeMusicService.selectUserLikeMusicList(userLikeMusic); + ExcelUtil util = new ExcelUtil(UserLikeMusic.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:music:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(userLikeMusicService.selectUserLikeMusicById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:music:add')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody UserLikeMusic userLikeMusic) + { + return toAjax(userLikeMusicService.insertUserLikeMusic(userLikeMusic)); + } + + /** + * 修改【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:music:edit')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody UserLikeMusic userLikeMusic) + { + return toAjax(userLikeMusicService.updateUserLikeMusic(userLikeMusic)); + } + + /** + * 删除【请填写功能名称】 + */ + @PreAuthorize("@ss.hasPermi('system:music:remove')") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(userLikeMusicService.deleteUserLikeMusicByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ShopUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ClientShopUserController.java similarity index 89% rename from ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ShopUserController.java rename to ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ClientShopUserController.java index a6ae296..07f54ba 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ShopUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ClientShopUserController.java @@ -4,12 +4,9 @@ import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.AjaxResult; 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.framework.web.service.SysLoginService; import com.ruoyi.system.service.AliConfigService; import com.ruoyi.system.service.ShopUserService; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.SwaggerDefinition; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -18,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("/client") @RestController -public class ShopUserController { +public class ClientShopUserController { @Autowired private SysLoginService loginService; @@ -56,10 +53,13 @@ public class ShopUserController { }else { // 生成令牌 String token = loginService.shopUserLogin(shopUser.getUsername(), shopUser.getPassword()); - ajax.put("userinfo", shopUser); + ajax.put("data", shopUser); ajax.put(Constants.TOKEN, token); return ajax; } } + + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/IndexController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/IndexController.java new file mode 100644 index 0000000..60bcdce --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/IndexController.java @@ -0,0 +1,23 @@ +package com.ruoyi.web.controller.client; + + +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.system.service.IBannerInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RequestMapping("/client/index") +@RestController +public class IndexController { + + @Autowired + private IBannerInfoService bannerInfoService; + + @RequestMapping("/getBanner") + public AjaxResult getBanner(){ + return AjaxResult.success(bannerInfoService.getEnableBanner()); + } + + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/MusicController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/MusicController.java new file mode 100644 index 0000000..fb95c8d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/MusicController.java @@ -0,0 +1,11 @@ +package com.ruoyi.web.controller.client; + + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RequestMapping("/client/music") +@RestController +public class MusicController { + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ShopUserCollectController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ShopUserCollectController.java new file mode 100644 index 0000000..c661850 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ShopUserCollectController.java @@ -0,0 +1,12 @@ +package com.ruoyi.web.controller.client; + + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RequestMapping("/client/collect") +@RestController +public class ShopUserCollectController { + + +} diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 09a7a09..2ea4c90 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -105,6 +105,9 @@ mybatis: mapperLocations: classpath*:mapper/**/*Mapper.xml # 加载全局的配置文件 configLocation: classpath:mybatis/mybatis-config.xml + configuration: + auto-mapping-behavior: partial + map-underscore-to-camel-case: true # PageHelper分页插件 pagehelper: @@ -127,3 +130,7 @@ xss: excludes: /system/notice # 匹配链接 urlPatterns: /system/*,/monitor/*,/tool/* + +ali: + accessKeyId: LTAI5tDWWzwqxumUXTFnkQFd + accessKeySecret: KOD3y6OxbHJ23wxAf68NFpUQXCQEPX \ No newline at end of file diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 9bbc596..c2644fa 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -167,6 +167,25 @@ hutool-all + + com.aliyun.oss + aliyun-sdk-oss + + + + javax.xml.bind + jaxb-api + + + javax.activation + activation + + + + org.glassfish.jaxb + jaxb-runtime + + \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/AliKeyConfig.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/AliKeyConfig.java new file mode 100644 index 0000000..7646e1b --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/AliKeyConfig.java @@ -0,0 +1,35 @@ +package com.ruoyi.common.constant; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; +@Data +@AllArgsConstructor +@NoArgsConstructor +@Configuration +@Component +public class AliKeyConfig implements InitializingBean { + + @Value("${ali.accessKeyId}") + public String accessKeyId; + + @Value("${ali.accessKeySecret}") + public String accessKeySecret; + + // 终端ID + public static String ACCESS_KEY_ID; + + public static String ACCESS_KEY_SECRET; + + @Override + public void afterPropertiesSet() { + ACCESS_KEY_ID = this.accessKeyId; + ACCESS_KEY_SECRET = this.accessKeySecret; + } + + +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/BannerInfo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/BannerInfo.java new file mode 100644 index 0000000..7e1357a --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/BannerInfo.java @@ -0,0 +1,51 @@ +package com.ruoyi.common.core.domain.entity; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class BannerInfo { + /** + * id + */ + private Long id; + + /** + * 名称 + */ + private String name; + + /** + * 地址 + */ + private String bannerAddr; + + /** + * 排序 + */ + private Integer sort; + + /** + * 跳转链接 + */ + private String jumpUrl; + + /** + * 创建时间 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** + * 更新时间 + */ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + +} \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/CategoryInfo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/CategoryInfo.java new file mode 100644 index 0000000..b231a5b --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/CategoryInfo.java @@ -0,0 +1,114 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 category_info + * + * @author ruoyi + * @date 2025-07-15 + */ +public class CategoryInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String id; + + /** 类别id */ + @Excel(name = "类别id") + private Long categoryId; + + /** 类别名称 */ + @Excel(name = "类别名称") + private String name; + + /** 1 删除 */ + @Excel(name = "1 删除") + private Long isDel; + + /** 创建人 */ + @Excel(name = "创建人") + private String creator; + + /** 修改人 */ + @Excel(name = "修改人") + private String modify; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setCategoryId(Long categoryId) + { + this.categoryId = categoryId; + } + + public Long getCategoryId() + { + return categoryId; + } + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public void setIsDel(Long isDel) + { + this.isDel = isDel; + } + + public Long getIsDel() + { + return isDel; + } + + public void setCreator(String creator) + { + this.creator = creator; + } + + public String getCreator() + { + return creator; + } + + public void setModify(String modify) + { + this.modify = modify; + } + + public String getModify() + { + return modify; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("categoryId", getCategoryId()) + .append("name", getName()) + .append("isDel", getIsDel()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("creator", getCreator()) + .append("modify", getModify()) + .toString(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/LabelInfo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/LabelInfo.java new file mode 100644 index 0000000..3ade590 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/LabelInfo.java @@ -0,0 +1,84 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 label_info + * + * @author ruoyi + * @date 2025-07-15 + */ +public class LabelInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private Long id; + + /** 标签名字 */ + @Excel(name = "标签名字") + private String labelName; + + /** 创建人 */ + @Excel(name = "创建人") + private String creator; + + /** 修改人 */ + @Excel(name = "修改人") + private String modify; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setLabelName(String labelName) + { + this.labelName = labelName; + } + + public String getLabelName() + { + return labelName; + } + + public void setCreator(String creator) + { + this.creator = creator; + } + + public String getCreator() + { + return creator; + } + + public void setModify(String modify) + { + this.modify = modify; + } + + public String getModify() + { + return modify; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("labelName", getLabelName()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("creator", getCreator()) + .append("modify", getModify()) + .toString(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicInfo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicInfo.java new file mode 100644 index 0000000..0277898 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicInfo.java @@ -0,0 +1,219 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 音乐信息对象 music_info + * + * @author ruoyi + * @date 2025-07-15 + */ +public class MusicInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String id; + + /** 音乐id */ + @Excel(name = "音乐id") + private Long musicId; + + /** 名字 */ + @Excel(name = "名字") + private String name; + + /** 作者 */ + @Excel(name = "作者") + private String author; + + /** 1 vip 2 不 */ + @Excel(name = "1 vip 2 不") + private Long vip; + + /** 1 商家 2 下架 */ + @Excel(name = "1 商家 2 下架") + private Long shelf; + + /** 封面 */ + @Excel(name = "封面") + private String imgAddr; + + /** 音乐地址 */ + @Excel(name = "音乐地址") + private String musicAddr; + + /** 音乐类型 ordinary 混音mixing */ + @Excel(name = "音乐类型 ordinary 混音mixing") + private String musicType; + + /** 创建人 */ + @Excel(name = "创建人") + private String creator; + + /** 修改人 */ + @Excel(name = "修改人") + private String modify; + + /** 1 删除 */ + @Excel(name = "1 删除") + private Long isDel; + + /** 标签 */ + @Excel(name = "标签") + private String label; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setMusicId(Long musicId) + { + this.musicId = musicId; + } + + public Long getMusicId() + { + return musicId; + } + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public void setAuthor(String author) + { + this.author = author; + } + + public String getAuthor() + { + return author; + } + + public void setVip(Long vip) + { + this.vip = vip; + } + + public Long getVip() + { + return vip; + } + + public void setShelf(Long shelf) + { + this.shelf = shelf; + } + + public Long getShelf() + { + return shelf; + } + + public void setImgAddr(String imgAddr) + { + this.imgAddr = imgAddr; + } + + public String getImgAddr() + { + return imgAddr; + } + + public void setMusicAddr(String musicAddr) + { + this.musicAddr = musicAddr; + } + + public String getMusicAddr() + { + return musicAddr; + } + + public void setMusicType(String musicType) + { + this.musicType = musicType; + } + + public String getMusicType() + { + return musicType; + } + + public void setCreator(String creator) + { + this.creator = creator; + } + + public String getCreator() + { + return creator; + } + + public void setModify(String modify) + { + this.modify = modify; + } + + public String getModify() + { + return modify; + } + + public void setIsDel(Long isDel) + { + this.isDel = isDel; + } + + public Long getIsDel() + { + return isDel; + } + + public void setLabel(String label) + { + this.label = label; + } + + public String getLabel() + { + return label; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("musicId", getMusicId()) + .append("name", getName()) + .append("author", getAuthor()) + .append("vip", getVip()) + .append("shelf", getShelf()) + .append("imgAddr", getImgAddr()) + .append("musicAddr", getMusicAddr()) + .append("musicType", getMusicType()) + .append("creator", getCreator()) + .append("modify", getModify()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("isDel", getIsDel()) + .append("label", getLabel()) + .toString(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicRecommend.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicRecommend.java new file mode 100644 index 0000000..7474ab6 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicRecommend.java @@ -0,0 +1,67 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 music_recommend + * + * @author ruoyi + * @date 2025-07-15 + */ +public class MusicRecommend extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String id; + + /** 推荐id */ + @Excel(name = "推荐id") + private Long recommendId; + + /** 音乐id */ + @Excel(name = "音乐id") + private Long musicId; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setRecommendId(Long recommendId) + { + this.recommendId = recommendId; + } + + public Long getRecommendId() + { + return recommendId; + } + + public void setMusicId(Long musicId) + { + this.musicId = musicId; + } + + public Long getMusicId() + { + return musicId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("recommendId", getRecommendId()) + .append("musicId", getMusicId()) + .toString(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicScene.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicScene.java new file mode 100644 index 0000000..b9b299f --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicScene.java @@ -0,0 +1,129 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 music_scene + * + * @author ruoyi + * @date 2025-07-15 + */ +public class MusicScene extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String id; + + /** 场景id */ + @Excel(name = "场景id") + private Long sceneId; + + /** 场景 */ + @Excel(name = "场景") + private String scene; + + /** 音乐地址 */ + @Excel(name = "音乐地址") + private String musicAddr; + + /** 创建人 */ + @Excel(name = "创建人") + private String creator; + + /** 修改人 */ + @Excel(name = "修改人") + private String modify; + + /** 1删除 */ + @Excel(name = "1删除") + private Long isDel; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setSceneId(Long sceneId) + { + this.sceneId = sceneId; + } + + public Long getSceneId() + { + return sceneId; + } + + public void setScene(String scene) + { + this.scene = scene; + } + + public String getScene() + { + return scene; + } + + public void setMusicAddr(String musicAddr) + { + this.musicAddr = musicAddr; + } + + public String getMusicAddr() + { + return musicAddr; + } + + public void setCreator(String creator) + { + this.creator = creator; + } + + public String getCreator() + { + return creator; + } + + public void setModify(String modify) + { + this.modify = modify; + } + + public String getModify() + { + return modify; + } + + public void setIsDel(Long isDel) + { + this.isDel = isDel; + } + + public Long getIsDel() + { + return isDel; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("sceneId", getSceneId()) + .append("scene", getScene()) + .append("musicAddr", getMusicAddr()) + .append("creator", getCreator()) + .append("modify", getModify()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("isDel", getIsDel()) + .toString(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicSceneRelate.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicSceneRelate.java new file mode 100644 index 0000000..de4d99d --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/MusicSceneRelate.java @@ -0,0 +1,67 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 music_scene_relate + * + * @author ruoyi + * @date 2025-07-15 + */ +public class MusicSceneRelate extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String id; + + /** 音乐id */ + @Excel(name = "音乐id") + private Long musicId; + + /** 场景id */ + @Excel(name = "场景id") + private Long sceneId; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setMusicId(Long musicId) + { + this.musicId = musicId; + } + + public Long getMusicId() + { + return musicId; + } + + public void setSceneId(Long sceneId) + { + this.sceneId = sceneId; + } + + public Long getSceneId() + { + return sceneId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("musicId", getMusicId()) + .append("sceneId", getSceneId()) + .toString(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/RecommendInfo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/RecommendInfo.java new file mode 100644 index 0000000..9d2bac7 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/RecommendInfo.java @@ -0,0 +1,114 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 推荐对象 recommend_info + * + * @author ruoyi + * @date 2025-07-15 + */ +public class RecommendInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private Long id; + + /** 推荐名称 */ + @Excel(name = "推荐名称") + private String name; + + /** 创建人 */ + @Excel(name = "创建人") + private String creator; + + /** 修改人 */ + @Excel(name = "修改人") + private String modify; + + /** 1 删除 */ + @Excel(name = "1 删除") + private Long isDel; + + /** 描述 */ + @Excel(name = "描述") + private String desc; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + + public void setCreator(String creator) + { + this.creator = creator; + } + + public String getCreator() + { + return creator; + } + + public void setModify(String modify) + { + this.modify = modify; + } + + public String getModify() + { + return modify; + } + + public void setIsDel(Long isDel) + { + this.isDel = isDel; + } + + public Long getIsDel() + { + return isDel; + } + + public void setDesc(String desc) + { + this.desc = desc; + } + + public String getDesc() + { + return desc; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("creator", getCreator()) + .append("modify", getModify()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("isDel", getIsDel()) + .append("desc", getDesc()) + .toString(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ShopUser.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ShopUser.java index 82bea00..f0e873e 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ShopUser.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ShopUser.java @@ -1,9 +1,13 @@ package com.ruoyi.common.core.domain.entity; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; import lombok.Data; import lombok.Getter; +import java.util.Date; + @Data public class ShopUser { /** @@ -15,13 +19,64 @@ public class ShopUser { private String password; - private String phone; - - private Long userId; - private String uMtoken; private String code; private String msg; + + private Date createTime; + + + private Date updateTime; + + /** 主键 */ + private String id; + + /** 用户id */ + @Excel(name = "用户id") + private Long userId; + + + /** 手机号 */ + @Excel(name = "手机号") + private String phone; + + /** 昵称 */ + @Excel(name = "昵称") + private String nickname; + + /** 1 男 2 女 */ + @Excel(name = "1 男 2 女") + private Long sex; + + /** 生日 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd") + private Date birthday; + + /** 城市 */ + @Excel(name = "城市") + private String addr; + + /** 注册时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date registerTime; + + /** 状态 1 正常 2 黑名单 */ + @Excel(name = "状态 1 正常 2 黑名单") + private Long status; + + /** 1 vip 2 非vip */ + @Excel(name = "1 vip 2 非vip") + private Long vip; + + /** 在线时长 小时 */ + @Excel(name = "在线时长 小时") + private String online; + + /** 1 删除 */ + @Excel(name = "1 删除") + private Long isDel; } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/UserCollect.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/UserCollect.java new file mode 100644 index 0000000..f2e5c80 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/UserCollect.java @@ -0,0 +1,99 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 用户收藏音乐对象 user_collect + * + * @author ruoyi + * @date 2025-07-15 + */ +public class UserCollect extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private Long id; + + /** 用户id */ + @Excel(name = "用户id") + private Long userId; + + /** 音乐id */ + @Excel(name = "音乐id") + private Long musicId; + + /** 收藏名称 */ + @Excel(name = "收藏名称") + private String collectName; + + /** 歌单类型 音乐类型 ordinary 混音mixing */ + @Excel(name = "歌单类型 音乐类型 ordinary 混音mixing") + private String collectType; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + + public void setMusicId(Long musicId) + { + this.musicId = musicId; + } + + public Long getMusicId() + { + return musicId; + } + + public void setCollectName(String collectName) + { + this.collectName = collectName; + } + + public String getCollectName() + { + return collectName; + } + + public void setCollectType(String collectType) + { + this.collectType = collectType; + } + + public String getCollectType() + { + return collectType; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("userId", getUserId()) + .append("musicId", getMusicId()) + .append("collectName", getCollectName()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("collectType", getCollectType()) + .toString(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/UserHistory.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/UserHistory.java new file mode 100644 index 0000000..689c1d3 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/UserHistory.java @@ -0,0 +1,67 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 用户播放历史对象 user_history + * + * @author ruoyi + * @date 2025-07-15 + */ +public class UserHistory extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String id; + + /** 用户id */ + @Excel(name = "用户id") + private Long userId; + + /** 音乐id */ + @Excel(name = "音乐id") + private Long musicId; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + + public void setMusicId(Long musicId) + { + this.musicId = musicId; + } + + public Long getMusicId() + { + return musicId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("userId", getUserId()) + .append("musicId", getMusicId()) + .toString(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/UserLikeMusic.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/UserLikeMusic.java new file mode 100644 index 0000000..5d958e2 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/UserLikeMusic.java @@ -0,0 +1,67 @@ +package com.ruoyi.common.core.domain.entity; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 【请填写功能名称】对象 user_like_music + * + * @author ruoyi + * @date 2025-07-15 + */ +public class UserLikeMusic extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** id */ + private String id; + + /** 音乐 */ + @Excel(name = "音乐") + private Long musicId; + + /** 用户id */ + @Excel(name = "用户id") + private Long userId; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + + public void setMusicId(Long musicId) + { + this.musicId = musicId; + } + + public Long getMusicId() + { + return musicId; + } + + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("musicId", getMusicId()) + .append("userId", getUserId()) + .toString(); + } +} diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 8f2c85a..6f3d6f2 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -130,7 +130,7 @@ public class SecurityConfig .authorizeHttpRequests((requests) -> { permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll()); // 对于登录login 注册register 验证码captchaImage 允许匿名访问 - requests.antMatchers("/login", "/register","/client/shopLogin", "/captchaImage","/client/getCode").permitAll() + requests.antMatchers("/login", "/register","/client/shopLogin","/file/download/**", "/captchaImage","/client/getCode","/client/**","/back/**").permitAll() // 静态资源,可匿名访问 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/config/AliConfig.java b/ruoyi-system/src/main/java/com/ruoyi/system/config/AliConfig.java index 645089c..33b8cc0 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/config/AliConfig.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/config/AliConfig.java @@ -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; + } + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BannerInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BannerInfoMapper.java new file mode 100644 index 0000000..1149b4e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BannerInfoMapper.java @@ -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 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 selectEnableBanner(); +} \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CategoryInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CategoryInfoMapper.java new file mode 100644 index 0000000..97ba724 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CategoryInfoMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/LabelInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/LabelInfoMapper.java new file mode 100644 index 0000000..360705e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/LabelInfoMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicInfoMapper.java new file mode 100644 index 0000000..299d670 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicInfoMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicRecommendMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicRecommendMapper.java new file mode 100644 index 0000000..0bdab72 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicRecommendMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneMapper.java new file mode 100644 index 0000000..a53ca32 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneRelateMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneRelateMapper.java new file mode 100644 index 0000000..0ace0e4 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneRelateMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecommendInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecommendInfoMapper.java new file mode 100644 index 0000000..42a9739 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecommendInfoMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShopUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShopUserMapper.java index 399fe5b..127e5b7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShopUserMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShopUserMapper.java @@ -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 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); + } \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserCollectMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserCollectMapper.java new file mode 100644 index 0000000..86c1cf8 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserCollectMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserHistoryMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserHistoryMapper.java new file mode 100644 index 0000000..6d9de59 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserHistoryMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserLikeMusicMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserLikeMusicMapper.java new file mode 100644 index 0000000..26524b5 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserLikeMusicMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IBannerInfoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBannerInfoService.java new file mode 100644 index 0000000..114aeeb --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IBannerInfoService.java @@ -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 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 getEnableBanner(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ICategoryInfoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ICategoryInfoService.java new file mode 100644 index 0000000..8b0ada7 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ICategoryInfoService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ILabelInfoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ILabelInfoService.java new file mode 100644 index 0000000..12bd215 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ILabelInfoService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicInfoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicInfoService.java new file mode 100644 index 0000000..f422423 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicInfoService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicRecommendService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicRecommendService.java new file mode 100644 index 0000000..5f627df --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicRecommendService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicSceneRelateService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicSceneRelateService.java new file mode 100644 index 0000000..f06f437 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicSceneRelateService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicSceneService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicSceneService.java new file mode 100644 index 0000000..396da07 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IMusicSceneService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IRecommendInfoService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IRecommendInfoService.java new file mode 100644 index 0000000..7c4b6ee --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IRecommendInfoService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IShopUserService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IShopUserService.java new file mode 100644 index 0000000..552083d --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IShopUserService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserCollectService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserCollectService.java new file mode 100644 index 0000000..bd2e42d --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserCollectService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserHistoryService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserHistoryService.java new file mode 100644 index 0000000..213f8ef --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserHistoryService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserLikeMusicService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserLikeMusicService.java new file mode 100644 index 0000000..9cbf725 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IUserLikeMusicService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BannerInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BannerInfoServiceImpl.java new file mode 100644 index 0000000..99af3ab --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BannerInfoServiceImpl.java @@ -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 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 getEnableBanner() { + return bannerInfoMapper.selectEnableBanner(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CShopUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CShopUserServiceImpl.java new file mode 100644 index 0000000..c2bd6b8 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CShopUserServiceImpl.java @@ -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; + } + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CategoryInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CategoryInfoServiceImpl.java new file mode 100644 index 0000000..14f9346 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CategoryInfoServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/LabelInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/LabelInfoServiceImpl.java new file mode 100644 index 0000000..e44da0f --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/LabelInfoServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicInfoServiceImpl.java new file mode 100644 index 0000000..0914251 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicInfoServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicRecommendServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicRecommendServiceImpl.java new file mode 100644 index 0000000..b62ca8e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicRecommendServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicSceneRelateServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicSceneRelateServiceImpl.java new file mode 100644 index 0000000..06fa9b3 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicSceneRelateServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicSceneServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicSceneServiceImpl.java new file mode 100644 index 0000000..a39f3f7 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/MusicSceneServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecommendInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecommendInfoServiceImpl.java new file mode 100644 index 0000000..cbfa0da --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecommendInfoServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShopUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShopUserServiceImpl.java index a4ea03c..53eb22f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShopUserServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ShopUserServiceImpl.java @@ -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 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); + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserCollectServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserCollectServiceImpl.java new file mode 100644 index 0000000..b49e895 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserCollectServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserHistoryServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserHistoryServiceImpl.java new file mode 100644 index 0000000..3acd768 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserHistoryServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserLikeMusicServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserLikeMusicServiceImpl.java new file mode 100644 index 0000000..5c14edc --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserLikeMusicServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/BannerInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BannerInfoMapper.xml new file mode 100644 index 0000000..7d16ca9 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/BannerInfoMapper.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + select id, name, banner_addr, sort, jump_url, create_time, update_time from banner_info + + + + + + + + insert into banner_info + + name, + banner_addr, + sort, + jump_url, + create_time, + update_time, + + + #{name}, + #{bannerAddr}, + #{sort}, + #{jumpUrl}, + #{createTime}, + #{updateTime}, + + + + + update banner_info + + name = #{name}, + banner_addr = #{bannerAddr}, + sort = #{sort}, + jump_url = #{jumpUrl}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from banner_info where id = #{id} + + + + delete from banner_info where id in + + #{id} + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/CategoryInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/CategoryInfoMapper.xml new file mode 100644 index 0000000..96d43b7 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/CategoryInfoMapper.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + select id, category_id, name, is_del, create_time, update_time, creator, modify from category_info + + + + + + + + insert into category_info + + category_id, + name, + is_del, + create_time, + update_time, + creator, + modify, + + + #{categoryId}, + #{name}, + #{isDel}, + #{createTime}, + #{updateTime}, + #{creator}, + #{modify}, + + + + + update category_info + + category_id = #{categoryId}, + name = #{name}, + is_del = #{isDel}, + create_time = #{createTime}, + update_time = #{updateTime}, + creator = #{creator}, + modify = #{modify}, + + where id = #{id} + + + + delete from category_info where id = #{id} + + + + delete from category_info where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/LabelInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/LabelInfoMapper.xml new file mode 100644 index 0000000..b4eba73 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/LabelInfoMapper.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + select id, label_name, create_time, update_time, creator, modify from label_info + + + + + + + + insert into label_info + + id, + label_name, + create_time, + update_time, + creator, + modify, + + + #{id}, + #{labelName}, + #{createTime}, + #{updateTime}, + #{creator}, + #{modify}, + + + + + update label_info + + label_name = #{labelName}, + create_time = #{createTime}, + update_time = #{updateTime}, + creator = #{creator}, + modify = #{modify}, + + where id = #{id} + + + + delete from label_info where id = #{id} + + + + delete from label_info where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/MusicInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/MusicInfoMapper.xml new file mode 100644 index 0000000..d22a485 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/MusicInfoMapper.xml @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into music_info + + music_id, + name, + author, + vip, + shelf, + img_addr, + music_addr, + music_type, + creator, + modify, + create_time, + update_time, + is_del, + label, + + + #{musicId}, + #{name}, + #{author}, + #{vip}, + #{shelf}, + #{imgAddr}, + #{musicAddr}, + #{musicType}, + #{creator}, + #{modify}, + #{createTime}, + #{updateTime}, + #{isDel}, + #{label}, + + + + + update music_info + + music_id = #{musicId}, + name = #{name}, + author = #{author}, + vip = #{vip}, + shelf = #{shelf}, + img_addr = #{imgAddr}, + music_addr = #{musicAddr}, + music_type = #{musicType}, + creator = #{creator}, + modify = #{modify}, + create_time = #{createTime}, + update_time = #{updateTime}, + is_del = #{isDel}, + label = #{label}, + + where id = #{id} + + + + delete from music_info where id = #{id} + + + + delete from music_info where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/MusicRecommendMapper.xml b/ruoyi-system/src/main/resources/mapper/system/MusicRecommendMapper.xml new file mode 100644 index 0000000..b801476 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/MusicRecommendMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + select id, recommend_id, music_id from music_recommend + + + + + + + + insert into music_recommend + + recommend_id, + music_id, + + + #{recommendId}, + #{musicId}, + + + + + update music_recommend + + recommend_id = #{recommendId}, + music_id = #{musicId}, + + where id = #{id} + + + + delete from music_recommend where id = #{id} + + + + delete from music_recommend where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/MusicSceneMapper.xml b/ruoyi-system/src/main/resources/mapper/system/MusicSceneMapper.xml new file mode 100644 index 0000000..d10c397 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/MusicSceneMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + select id, scene_id, scene, music_addr, creator, modify, create_time, update_time, is_del from music_scene + + + + + + + + insert into music_scene + + scene_id, + scene, + music_addr, + creator, + modify, + create_time, + update_time, + is_del, + + + #{sceneId}, + #{scene}, + #{musicAddr}, + #{creator}, + #{modify}, + #{createTime}, + #{updateTime}, + #{isDel}, + + + + + update music_scene + + scene_id = #{sceneId}, + scene = #{scene}, + music_addr = #{musicAddr}, + creator = #{creator}, + modify = #{modify}, + create_time = #{createTime}, + update_time = #{updateTime}, + is_del = #{isDel}, + + where id = #{id} + + + + delete from music_scene where id = #{id} + + + + delete from music_scene where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/MusicSceneRelateMapper.xml b/ruoyi-system/src/main/resources/mapper/system/MusicSceneRelateMapper.xml new file mode 100644 index 0000000..703cf8b --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/MusicSceneRelateMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + select id, music_id, scene_id from music_scene_relate + + + + + + + + insert into music_scene_relate + + music_id, + scene_id, + + + #{musicId}, + #{sceneId}, + + + + + update music_scene_relate + + music_id = #{musicId}, + scene_id = #{sceneId}, + + where id = #{id} + + + + delete from music_scene_relate where id = #{id} + + + + delete from music_scene_relate where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/RecommendInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RecommendInfoMapper.xml new file mode 100644 index 0000000..1bb799a --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/RecommendInfoMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + select id, name, creator, modify, create_time, update_time, is_del, desc from recommend_info + + + + + + + + insert into recommend_info + + id, + name, + creator, + modify, + create_time, + update_time, + is_del, + desc, + + + #{id}, + #{name}, + #{creator}, + #{modify}, + #{createTime}, + #{updateTime}, + #{isDel}, + #{desc}, + + + + + update recommend_info + + name = #{name}, + creator = #{creator}, + modify = #{modify}, + create_time = #{createTime}, + update_time = #{updateTime}, + is_del = #{isDel}, + desc = #{desc}, + + where id = #{id} + + + + delete from recommend_info where id = #{id} + + + + delete from recommend_info where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/ShopUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ShopUserMapper.xml index 21c6ca4..fbcbd3e 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ShopUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ShopUserMapper.xml @@ -47,5 +47,122 @@ + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into shop_user + + user_id, + username, + password, + phone, + nickname, + sex, + birthday, + addr, + register_time, + status, + vip, + online, + create_time, + update_time, + is_del, + + + #{userId}, + #{username}, + #{password}, + #{phone}, + #{nickname}, + #{sex}, + #{birthday}, + #{addr}, + #{registerTime}, + #{status}, + #{vip}, + #{online}, + #{createTime}, + #{updateTime}, + #{isDel}, + + + + + update shop_user + + user_id = #{userId}, + username = #{username}, + password = #{password}, + phone = #{phone}, + nickname = #{nickname}, + sex = #{sex}, + birthday = #{birthday}, + addr = #{addr}, + register_time = #{registerTime}, + status = #{status}, + vip = #{vip}, + online = #{online}, + create_time = #{createTime}, + update_time = #{updateTime}, + is_del = #{isDel}, + + where id = #{id} + + + + delete from shop_user where id = #{id} + + + + + delete from shop_user where id in + + #{id} + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/UserCollectMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UserCollectMapper.xml new file mode 100644 index 0000000..0a17102 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/UserCollectMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + select id, user_id, music_id, collect_name, create_time, update_time, collect_type from user_collect + + + + + + + + insert into user_collect + + id, + user_id, + music_id, + collect_name, + create_time, + update_time, + collect_type, + + + #{id}, + #{userId}, + #{musicId}, + #{collectName}, + #{createTime}, + #{updateTime}, + #{collectType}, + + + + + update user_collect + + user_id = #{userId}, + music_id = #{musicId}, + collect_name = #{collectName}, + create_time = #{createTime}, + update_time = #{updateTime}, + collect_type = #{collectType}, + + where id = #{id} + + + + delete from user_collect where id = #{id} + + + + delete from user_collect where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/UserHistoryMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UserHistoryMapper.xml new file mode 100644 index 0000000..575ecb0 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/UserHistoryMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + select id, user_id, music_id from user_history + + + + + + + + insert into user_history + + user_id, + music_id, + + + #{userId}, + #{musicId}, + + + + + update user_history + + user_id = #{userId}, + music_id = #{musicId}, + + where id = #{id} + + + + delete from user_history where id = #{id} + + + + delete from user_history where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/UserLikeMusicMapper.xml b/ruoyi-system/src/main/resources/mapper/system/UserLikeMusicMapper.xml new file mode 100644 index 0000000..3f33f1d --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/UserLikeMusicMapper.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + select id, music_id, user_id from user_like_music + + + + + + + + insert into user_like_music + + music_id, + user_id, + + + #{musicId}, + #{userId}, + + + + + update user_like_music + + music_id = #{musicId}, + user_id = #{userId}, + + where id = #{id} + + + + delete from user_like_music where id = #{id} + + + + delete from user_like_music where id in + + #{id} + + + \ No newline at end of file