package com.sxpcwlkj.system.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaIgnore;
import cn.hutool.core.convert.Convert;
import com.sxpcwlkj.authority.LoginObject;
import com.sxpcwlkj.common.code.controller.BaseController;
import com.sxpcwlkj.common.constant.Constants;
import com.sxpcwlkj.common.utils.R;
import com.sxpcwlkj.framework.sercice.SysSignService;
import com.sxpcwlkj.redis.RedisUtil;
import com.sxpcwlkj.redis.constant.RedisConstant;
import com.sxpcwlkj.system.entity.bo.LoginBodyBo;
import com.sxpcwlkj.system.entity.vo.SysUserVo;
import com.sxpcwlkj.system.service.SysLoginService;
import com.sxpcwlkj.system.service.SysUserService;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.time.Duration;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* 系统登录
* @author xijue
* @Doc MMS文档
*/
@Slf4j
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("system/auth")
public class AuthController extends BaseController {
private final SysLoginService loginService;
private final SysUserService sysUserService;
private final SysSignService sysSignService;
/**
* 登录方法
* @param loginBodyBo 登录参数
* @return 登录结果
*/
@SaIgnore
@PostMapping("/login")
public R