package com.mosty.base.controller;

import com.mosty.base.model.dto.base.GetDeptListDTO;
import com.mosty.base.model.dto.base.SysDeptDTO;
import com.mosty.base.model.vo.base.DeptInfoVo;
import com.mosty.base.service.DeptService;
import com.mosty.base.service.UserConfigService;
import com.mosty.common.base.domain.ResponseResult;
import com.mosty.common.core.business.entity.SysUserAppHomeconfig;
import com.mosty.common.core.business.entity.request.SysUserAppHomeconfigQuery;
import com.mosty.common.core.business.entity.vo.SysUserAppHomeconfigVo;
import com.mosty.common.token.JwtSysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author dw
 * @since 2022/8/1
 * 部门数据处理相关
 **/
@Api(tags = "APP用户配置相关接口（NEW）")
@RestController
@AllArgsConstructor
@RequestMapping("/AppUserConfig")
public class UserConfigController {

    private final UserConfigService userConfigService;

    @ApiOperation("查询用户配置")
    @JwtSysUser
    @GetMapping("getUserConfig")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "用户ID", name = "userId", dataType = "int"),
            @ApiImplicitParam(value = "首页ID", name = "homeId", dataType = "int"),
    })
    public ResponseResult<SysUserAppHomeconfigVo> getUserConfig(int userId, int homeId) {
        return ResponseResult.success(this.userConfigService.getUserConfig(userId, homeId));
    }

//    @ApiOperation("修改用户配置")
//    @JwtSysUser
//    @GetMapping("updateUserConfig")
//    @ApiImplicitParams({
//            @ApiImplicitParam(value = "用户ID", name = "userId", dataType = "int"),
//            @ApiImplicitParam(value = "首页ID", name = "homeId", dataType = "int"),
//    })
//    public ResponseResult<SysUserAppHomeconfigVo> updateUserConfig(List<SysUserAppHomeconfig> plates) {
//        return ResponseResult.success(this.userConfigService.updateUserConfig(plates));
//    }
}
