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.R;
import com.vetti.common.core.page.TableWebDataInfo;
import com.vetti.common.enums.BusinessType;
import com.vetti.hotake.domain.HotakeRolesApplyOperRecord;
import com.vetti.hotake.service.IHotakeRolesApplyOperRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 岗位申请操作信息Controller
 * 
 * @author wangxiangshun
 * @date 2026-01-18
 */
@Api(tags ="岗位申请操作信息")
@RestController
@RequestMapping("/vetti/rolesApplyOperRecord")
public class HotakeRolesApplyOperRecordController extends BaseController
{
    @Autowired
    private IHotakeRolesApplyOperRecordService hotakeRolesApplyOperRecordService;

    /**
     * 查询岗位申请操作信息列表
     */
    @ApiOperation("查询岗位申请操作信息列表")
    @GetMapping("/pageList")
    public TableWebDataInfo<HotakeRolesApplyOperRecord> pageList(HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord)
    {
        startPage();
        List<HotakeRolesApplyOperRecord> list = hotakeRolesApplyOperRecordService.selectHotakeRolesApplyOperRecordList(hotakeRolesApplyOperRecord);
        return getWebDataTable(list);
    }

    /**
     * 查询岗位申请操作信息列表
     */
    @ApiOperation("查询岗位申请操作信息列表(无分页)")
    @GetMapping("/getList")
    public R<List<HotakeRolesApplyOperRecord>> list(HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord)
    {
        List<HotakeRolesApplyOperRecord> list = hotakeRolesApplyOperRecordService.selectHotakeRolesApplyOperRecordList(hotakeRolesApplyOperRecord);
        return R.ok(list);
    }

    /**
     * 获取岗位申请操作信息详细信息
     */
    @ApiOperation("获取岗位申请操作信息详细信息")
    @GetMapping(value = "/{id}")
    public R<HotakeRolesApplyOperRecord> getInfo(@PathVariable("id") Long id)
    {
        return R.ok(hotakeRolesApplyOperRecordService.selectHotakeRolesApplyOperRecordById(id));
    }

    /**
     * 新增岗位申请操作信息
     */
    @ApiOperation("新增岗位申请操作信息")
    @Log(title = "岗位申请操作信息", businessType = BusinessType.INSERT)
    @PostMapping
    public R<?> add(@RequestBody HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord)
    {
        return R.ok(hotakeRolesApplyOperRecordService.insertHotakeRolesApplyOperRecord(hotakeRolesApplyOperRecord));
    }

    /**
     * 修改岗位申请操作信息
     */
    @ApiOperation("修改岗位申请操作信息")
    @Log(title = "岗位申请操作信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public R<?> edit(@RequestBody HotakeRolesApplyOperRecord hotakeRolesApplyOperRecord)
    {
        return R.ok(hotakeRolesApplyOperRecordService.updateHotakeRolesApplyOperRecord(hotakeRolesApplyOperRecord));
    }

    /**
     * 删除岗位申请操作信息
     */
    @ApiOperation("删除岗位申请操作信息")
    @Log(title = "岗位申请操作信息", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public R<?> remove(@PathVariable Long[] ids)
    {
        return R.ok(hotakeRolesApplyOperRecordService.deleteHotakeRolesApplyOperRecordByIds(ids));
    }
}
