package jnpf.attendance.controller;

import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.attendance.service.InitializationService;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.config.ConfigValueUtil;
import jnpf.database.util.TenantDataSourceUtil;
import jnpf.exception.ApproveException;
import jnpf.exception.LoginException;
import jnpf.util.NoDataSourceBind;
import jnpf.util.StringUtil;
import jnpf.util.UserProvider;
import jnpf.util.data.DataSourceContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 初始化控制器
 * @Author huanglinpan
 * @Date 2024/7/1 9:14
 * @Version 1.0 （版本号）
 */
@RestController
@RequestMapping("/config")
@Tag(name = "初始化", description = "initialization")
public class InitializationController {


    @Autowired
    private ConfigValueUtil configValueUtil;


    @Resource
    private InitializationService initializationService;

    /**
     * 初始化存休 有效期考勤v1.3版本
     */
    @GetMapping(value = "/storageRest")
    @Deprecated
    public ActionResult storageRest() {
        Integer i = initializationService.storageRest();

        return ActionResult.success("初始化成功"+i+"条数据");
    }

}
