119 lines
4.4 KiB
Java
119 lines
4.4 KiB
Java
package com.ruoyi.system.controller;
|
|
import com.ruoyi.common.select.Ids;
|
|
import com.ruoyi.common.select.SelectItem;
|
|
import java.util.List;
|
|
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.DmPlayerTaskGroup;
|
|
import com.ruoyi.system.domain.DmPlayerTaskGroupPlus;
|
|
import com.ruoyi.system.service.IDmPlayerTaskGroupService;
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
/**
|
|
* 大漠任务组Controller
|
|
*
|
|
* @author luqj
|
|
* @date 2026-05-14
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/system/dmtaskgroup")
|
|
public class DmPlayerTaskGroupController extends BaseController
|
|
{
|
|
@Autowired
|
|
private IDmPlayerTaskGroupService dmPlayerTaskGroupService;
|
|
@PreAuthorize("@ss.hasPermi('system:dmtaskgroup:getByIds')")
|
|
@PostMapping("/getByIds")
|
|
public AjaxResult getByIds(@RequestBody Ids ids)
|
|
{
|
|
List<DmPlayerTaskGroupPlus> list = dmPlayerTaskGroupService.getByIds(ids.getLongIds(),DmPlayerTaskGroupPlus::getGroupName,DmPlayerTaskGroupPlus::getId);
|
|
return AjaxResult.success(list);
|
|
}
|
|
@PreAuthorize("@ss.hasPermi('system:dmtaskgroup:select')")
|
|
@GetMapping("/select")
|
|
public AjaxResult select(String keyword)
|
|
{
|
|
List<SelectItem> list = dmPlayerTaskGroupService.select(keyword);
|
|
return AjaxResult.success(list);
|
|
}
|
|
/**
|
|
* 查询大漠任务组列表
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:dmtaskgroup:list')")
|
|
@GetMapping("/list")
|
|
public TableDataInfo list(DmPlayerTaskGroup dmPlayerTaskGroup)
|
|
{
|
|
startPage();
|
|
List<DmPlayerTaskGroup> list = dmPlayerTaskGroupService.selectDmPlayerTaskGroupList(dmPlayerTaskGroup);
|
|
return getDataTable(list);
|
|
}
|
|
|
|
/**
|
|
* 导出大漠任务组列表
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:dmtaskgroup:export')")
|
|
@Log(title = "大漠任务组", businessType = BusinessType.EXPORT)
|
|
@GetMapping("/export")
|
|
public AjaxResult export(DmPlayerTaskGroup dmPlayerTaskGroup)
|
|
{
|
|
List<DmPlayerTaskGroup> list = dmPlayerTaskGroupService.selectDmPlayerTaskGroupList(dmPlayerTaskGroup);
|
|
ExcelUtil<DmPlayerTaskGroup> util = new ExcelUtil<DmPlayerTaskGroup>(DmPlayerTaskGroup.class);
|
|
return util.exportExcel(list, "dmtaskgroup");
|
|
}
|
|
|
|
/**
|
|
* 获取大漠任务组详细信息
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:dmtaskgroup:query')")
|
|
@GetMapping(value = "/{id}")
|
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
{
|
|
return AjaxResult.success(dmPlayerTaskGroupService.selectDmPlayerTaskGroupById(id));
|
|
}
|
|
|
|
/**
|
|
* 新增大漠任务组
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:dmtaskgroup:add')")
|
|
@Log(title = "大漠任务组", businessType = BusinessType.INSERT)
|
|
@PostMapping
|
|
public AjaxResult add(@RequestBody DmPlayerTaskGroup dmPlayerTaskGroup)
|
|
{
|
|
return toAjax(dmPlayerTaskGroupService.insertDmPlayerTaskGroup(dmPlayerTaskGroup));
|
|
}
|
|
|
|
/**
|
|
* 修改大漠任务组
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:dmtaskgroup:edit')")
|
|
@Log(title = "大漠任务组", businessType = BusinessType.UPDATE)
|
|
@PutMapping
|
|
public AjaxResult edit(@RequestBody DmPlayerTaskGroup dmPlayerTaskGroup)
|
|
{
|
|
return toAjax(dmPlayerTaskGroupService.updateDmPlayerTaskGroup(dmPlayerTaskGroup));
|
|
}
|
|
|
|
/**
|
|
* 删除大漠任务组
|
|
*/
|
|
@PreAuthorize("@ss.hasPermi('system:dmtaskgroup:remove')")
|
|
@Log(title = "大漠任务组", businessType = BusinessType.DELETE)
|
|
@DeleteMapping("/{ids}")
|
|
public AjaxResult remove(@PathVariable Long[] ids)
|
|
{
|
|
return toAjax(dmPlayerTaskGroupService.deleteDmPlayerTaskGroupByIds(ids));
|
|
}
|
|
}
|