This commit is contained in:
lu7213 committed 2026-04-29 11:11:30 -04:00
1 parent da952a1103
commit d294ec17e0
11 files changed
+1191 -1

No files matched your search

@@ -0,0 +1,129 @@
package com.ruoyi.system.controller;
import com.ruoyi.common.select.Ids;
import com.ruoyi.common.select.SelectItem;
import java.util.List;
import com.ruoyi.system.domain.DmOperateVo;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.DmPlayerent;
import com.ruoyi.system.domain.DmPlayerentPlus;
import com.ruoyi.system.service.IDmPlayerentService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 大漠代理Controller
*
* @author luqj
* @date 2026-04-29
*/
@RestController
@RequestMapping("/system/playerent")
public class DmPlayerentController extends BaseController
{
@Autowired
private IDmPlayerentService dmPlayerentService;
@PreAuthorize("@ss.hasPermi('system:playerent:getByIds')")
@PostMapping("/getByIds")
public AjaxResult getByIds(@RequestBody Ids ids)
{
List<DmPlayerentPlus> list = dmPlayerentService.getByIds(ids.getLongIds(),DmPlayerentPlus::getName,DmPlayerentPlus::getId);
return AjaxResult.success(list);
}
@PreAuthorize("@ss.hasPermi('system:playerent:select')")
@GetMapping("/select")
public AjaxResult select(String keyword)
{
List<SelectItem> list = dmPlayerentService.select(keyword);
return AjaxResult.success(list);
}
/**
* 查询大漠代理列表
*/
@PreAuthorize("@ss.hasPermi('system:playerent:list')")
@GetMapping("/list")
public TableDataInfo list(DmPlayerent dmPlayerent)
{
startPage();
List<DmPlayerent> list = dmPlayerentService.selectDmPlayerentList(dmPlayerent);
return getDataTable(list);
}
/**
* 导出大漠代理列表
*/
@PreAuthorize("@ss.hasPermi('system:playerent:export')")
@Log(title = "大漠代理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(DmPlayerent dmPlayerent)
{
List<DmPlayerent> list = dmPlayerentService.selectDmPlayerentList(dmPlayerent);
ExcelUtil<DmPlayerent> util = new ExcelUtil<DmPlayerent>(DmPlayerent.class);
return util.exportExcel(list, "playerent");
}
/**
* 获取大漠代理详细信息
*/
@PreAuthorize("@ss.hasPermi('system:playerent:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(dmPlayerentService.selectDmPlayerentById(id));
}
/**
* 新增大漠代理
*/
@PreAuthorize("@ss.hasPermi('system:playerent:add')")
@Log(title = "大漠代理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DmPlayerent dmPlayerent)
{
return toAjax(dmPlayerentService.insertDmPlayerent(dmPlayerent));
}
/**
* 修改大漠代理
*/
@PreAuthorize("@ss.hasPermi('system:playerent:edit')")
@Log(title = "大漠代理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DmPlayerent dmPlayerent)
{
return toAjax(dmPlayerentService.updateDmPlayerent(dmPlayerent));
}
/**
* 删除大漠代理
*/
@PreAuthorize("@ss.hasPermi('system:playerent:remove')")
@Log(title = "大漠代理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dmPlayerentService.deleteDmPlayerentByIds(ids));
}
@PreAuthorize("@ss.hasPermi('system:playerent:operate')")
@Log(title = "操作", businessType = BusinessType.INSERT)
@PostMapping("/operate")
public AjaxResult operate(@RequestBody DmOperateVo vo)
{
return toAjax(dmPlayerentService.operate(vo));
}
}