岗位业务逻辑初始化

This commit is contained in:
2025-12-11 22:20:00 +08:00
parent 65255bafb9
commit 356d886b2d
6 changed files with 733 additions and 0 deletions

View File

@@ -0,0 +1,106 @@
package com.vetti.web.controller.hotake;
import com.vetti.common.annotation.Log;
import com.vetti.common.core.controller.BaseController;
import com.vetti.common.core.domain.AjaxResult;
import com.vetti.common.core.page.TableDataInfo;
import com.vetti.common.enums.BusinessType;
import com.vetti.common.utils.poi.ExcelUtil;
import com.vetti.hotake.domain.HotakeRolesInfo;
import com.vetti.hotake.service.IHotakeRolesInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 岗位信息Controller
*
* @author wangxiangshun
* @date 2025-12-11
*/
@Api(tags ="岗位信息")
@RestController
@RequestMapping("/hotake/rolesInfo")
public class HotakeRolesInfoController extends BaseController
{
@Autowired
private IHotakeRolesInfoService hotakeRolesInfoService;
/**
* 查询岗位信息列表
*/
@ApiOperation("查询岗位信息列表")
@PreAuthorize("@ss.hasPermi('hotake:rolesInfo:list')")
@GetMapping("/list")
public TableDataInfo list(HotakeRolesInfo hotakeRolesInfo)
{
startPage();
List<HotakeRolesInfo> list = hotakeRolesInfoService.selectHotakeRolesInfoList(hotakeRolesInfo);
return getDataTable(list);
}
/**
* 导出岗位信息列表
*/
@ApiOperation("导出岗位信息列表")
@PreAuthorize("@ss.hasPermi('hotake:rolesInfo:export')")
@Log(title = "岗位信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(HotakeRolesInfo hotakeRolesInfo)
{
List<HotakeRolesInfo> list = hotakeRolesInfoService.selectHotakeRolesInfoList(hotakeRolesInfo);
ExcelUtil<HotakeRolesInfo> util = new ExcelUtil<HotakeRolesInfo>(HotakeRolesInfo.class);
return util.exportExcel(list, "岗位信息数据");
}
/**
* 获取岗位信息详细信息
*/
@ApiOperation("获取岗位信息详细信息")
@PreAuthorize("@ss.hasPermi('hotake:rolesInfo:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(hotakeRolesInfoService.selectHotakeRolesInfoById(id));
}
/**
* 新增岗位信息
*/
@ApiOperation("新增岗位信息")
@PreAuthorize("@ss.hasPermi('hotake:rolesInfo:add')")
@Log(title = "岗位信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody HotakeRolesInfo hotakeRolesInfo)
{
return toAjax(hotakeRolesInfoService.insertHotakeRolesInfo(hotakeRolesInfo));
}
/**
* 修改岗位信息
*/
@ApiOperation("修改岗位信息")
@PreAuthorize("@ss.hasPermi('hotake:rolesInfo:edit')")
@Log(title = "岗位信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody HotakeRolesInfo hotakeRolesInfo)
{
return toAjax(hotakeRolesInfoService.updateHotakeRolesInfo(hotakeRolesInfo));
}
/**
* 删除岗位信息
*/
@ApiOperation("删除岗位信息")
@PreAuthorize("@ss.hasPermi('hotake:rolesInfo:remove')")
@Log(title = "岗位信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(hotakeRolesInfoService.deleteHotakeRolesInfoByIds(ids));
}
}