package com.zxdmy.excite.admin.controller.cloud.role;


import cn.dev33.satoken.stp.StpUtil;
import com.zxdmy.excite.common.base.BaseResult;
import com.zxdmy.excite.system.entity.cloud.role.CloudRole;
import com.zxdmy.excite.system.service.ISysUserService;
import com.zxdmy.excite.system.service.cloud.role.ICloudRoleUserService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import com.zxdmy.excite.common.base.BaseController;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 * 云盘权限用户表 前端控制器
 * </p>
 *
 * @author ss
 * @since 2026-01-27
 */
@Controller
@AllArgsConstructor
@RequestMapping("/cloud/roleUser")
public class CloudRoleUserController extends BaseController {
    private ICloudRoleUserService iCloudRoleUserService;

    @GetMapping("/getRole")
    @ResponseBody
    public BaseResult getRole() {
        try {
            CloudRole data = iCloudRoleUserService.getCloudShareRole(StpUtil.getLoginIdAsInt());
            return success("获取数据成功",data);
        } catch (Exception e) {
            return error(500, "发生错误:" + e.getMessage());
        }
    }

}
