RankDictController.java 2.02 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.mapper.RankDictMapper;
import com.subsidy.model.RankDictDO;
import com.subsidy.service.RankDictService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;

/**
 * <p>
 * 职级字典表 前端控制器
 * </p>
 *
 * @author DengMin
 * @since 2022-02-14
 */
@RestController
@Api(tags = "职级字典表")
@RequestMapping("/rankDict")
public class RankDictController {

    @Autowired
    private RankDictService rankDictService;

    @PostMapping("addRank")
    @ApiOperation("添加职级 companyId rank")
    @LoginRequired
    public ResponseVO addRank(@RequestBody RankDictDO rankDictDO){
        return ResponseData.generateCreatedResponse(0,rankDictService.addRank(rankDictDO));
    }

    @PostMapping("deleteRank")
    @ApiOperation("删除职级  id")
    @LoginRequired
    public ResponseVO deleteById(@RequestBody RankDictDO rankDictDO){
        return ResponseData.generateCreatedResponse(0,rankDictService.deleteRank(rankDictDO));
    }

    @PostMapping("updateRank")
    @ApiOperation("添加职级 id rank")
    @LoginRequired
    public ResponseVO updateRank(@RequestBody RankDictDO rankDictDO){
        return ResponseData.generateCreatedResponse(0,rankDictService.updateRank(rankDictDO));
    }

    @PostMapping("queryRanks")
    @ApiOperation("查看职级 companyId")
    @LoginRequired
    public ResponseVO queryRanks(@RequestBody RankDictDO rankDictDO){
        return ResponseData.generateCreatedResponse(0,rankDictService.queryRanks(rankDictDO));
    }

}