package jnpf.attendance.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.attendance.service.UserConfigService;
import jnpf.base.ActionResult;


import jnpf.model.attendance.vo.attendance.GroupShiftTimeVo;
import jnpf.model.attendance.vo.attendance.UserConfigVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author huanglinpan
 * @Date 2024/6/24 11:23
 * @Version 1.0 （版本号）
 */

@RestController
@RequestMapping("/config")
@Tag(name = "APP/后台 - 用户配置", description = "group")
public class UserConfigController {

    @Resource
    private UserConfigService userConfigService;

    /**
     * 获取用户app考勤配置
     */
    @GetMapping("/userConfig")
    public ActionResult<UserConfigVo> getUserConfig()  {

        return ActionResult.success(userConfigService.getUserConfig());
    }

    /**
     * 修改用户APP考勤配置
     */
    @PutMapping("/userConfig")
    public ActionResult updateUserConfig(@RequestBody UserConfigVo userConfigVo)  {
        userConfigService.updateUserConfig(userConfigVo);
        return ActionResult.success();
    }
}
