架构初始化
This commit is contained in:
@@ -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<BannerInfo> 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<BannerInfo> list = bannerInfoService.selectBannerInfoList(bannerInfo);
|
||||
ExcelUtil<BannerInfo> util = new ExcelUtil<BannerInfo>(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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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<CategoryInfo> 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<CategoryInfo> list = categoryInfoService.selectCategoryInfoList(categoryInfo);
|
||||
ExcelUtil<CategoryInfo> util = new ExcelUtil<CategoryInfo>(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));
|
||||
}
|
||||
}
|
||||
@@ -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) {}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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<LabelInfo> 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<LabelInfo> list = labelInfoService.selectLabelInfoList(labelInfo);
|
||||
ExcelUtil<LabelInfo> util = new ExcelUtil<LabelInfo>(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));
|
||||
}
|
||||
}
|
||||
@@ -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<MusicInfo> 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<MusicInfo> list = musicInfoService.selectMusicInfoList(musicInfo);
|
||||
ExcelUtil<MusicInfo> util = new ExcelUtil<MusicInfo>(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));
|
||||
}
|
||||
}
|
||||
@@ -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<MusicRecommend> 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<MusicRecommend> list = musicRecommendService.selectMusicRecommendList(musicRecommend);
|
||||
ExcelUtil<MusicRecommend> util = new ExcelUtil<MusicRecommend>(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));
|
||||
}
|
||||
}
|
||||
@@ -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<MusicScene> 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<MusicScene> list = musicSceneService.selectMusicSceneList(musicScene);
|
||||
ExcelUtil<MusicScene> util = new ExcelUtil<MusicScene>(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));
|
||||
}
|
||||
}
|
||||
@@ -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<MusicSceneRelate> 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<MusicSceneRelate> list = musicSceneRelateService.selectMusicSceneRelateList(musicSceneRelate);
|
||||
ExcelUtil<MusicSceneRelate> util = new ExcelUtil<MusicSceneRelate>(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));
|
||||
}
|
||||
}
|
||||
@@ -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<RecommendInfo> 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<RecommendInfo> list = recommendInfoService.selectRecommendInfoList(recommendInfo);
|
||||
ExcelUtil<RecommendInfo> util = new ExcelUtil<RecommendInfo>(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));
|
||||
}
|
||||
}
|
||||
@@ -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<ShopUser> 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<ShopUser> list = shopUserService.selectShopUserList(shopUser);
|
||||
ExcelUtil<ShopUser> util = new ExcelUtil<ShopUser>(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));
|
||||
}
|
||||
}
|
||||
@@ -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<UserCollect> 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<UserCollect> list = userCollectService.selectUserCollectList(userCollect);
|
||||
ExcelUtil<UserCollect> util = new ExcelUtil<UserCollect>(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));
|
||||
}
|
||||
}
|
||||
@@ -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<UserHistory> 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<UserHistory> list = userHistoryService.selectUserHistoryList(userHistory);
|
||||
ExcelUtil<UserHistory> util = new ExcelUtil<UserHistory>(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));
|
||||
}
|
||||
}
|
||||
@@ -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<UserLikeMusic> 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<UserLikeMusic> list = userLikeMusicService.selectUserLikeMusicList(userLikeMusic);
|
||||
ExcelUtil<UserLikeMusic> util = new ExcelUtil<UserLikeMusic>(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));
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user