package com.dk.mdm.controller.mst;

import com.dk.common.response.ResponseResultVO;
import com.dk.mdm.model.pojo.mst.RoleSensitive;
import com.dk.common.controller.BaseController;
import com.dk.common.service.BaseService;
import com.dk.mdm.model.vo.mst.RoleVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import com.dk.mdm.service.mst.RoleSensitiveService;

import java.util.Map;

@Api(tags = "角色敏感信息权限API接口")
@RestController
@RequestMapping("/mst/roleSensitive")
public class RoleSensitiveController{

    public BaseService<RoleSensitive> getService() {
        return roleSensitiveService;
    }

    @Autowired
    private RoleSensitiveService roleSensitiveService;

    /**
     * @desc : 获取角色敏感信息权限
     * @author : 于继渤
     * @date : 2024/2/26 10:36
     */
    @ApiOperation(
            value = "角色敏感信息权限",
            notes = "角色敏感信息权限"
    )
    @PostMapping("get_role_sensitive")
    public ResponseResultVO<Map<String, Object>> getRoleSensitive(@RequestBody Map<String, Object> param) {
        return roleSensitiveService.getRoleSensitive(param);
    }


    /**
     * @desc : 批量修改敏感信息
     * @author : 于继渤
     * @date : 2023/1/5 9:39
     */
    @ApiOperation(value = "批量修改敏感信息", notes = "批量修改敏感信息")
    @PostMapping({"update_batch"})
    public ResponseResultVO<?> updateBatch(@RequestBody RoleVo roleVo) {
        return roleSensitiveService.updateBatch(roleVo);
    }

}
