package com.chushang.system.remote;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.chushang.common.core.web.AjaxResult;
import com.chushang.common.core.web.Result;
import com.chushang.common.log.annotation.SysLog;
import com.chushang.common.log.enums.BusinessType;
import com.chushang.common.mybatis.page.CommonParam;
import com.chushang.security.annotation.InnerAuth;
import com.chushang.security.annotation.RequiresPermissions;
import com.chushang.system.entity.po.SysLoginInfo;
import com.chushang.system.feign.RemoteLoginInfoService;
import com.chushang.system.service.SysLoginInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;

@RestController
@RequestMapping(value = "/log/login/info")
public class RemoteLoginInfoController implements RemoteLoginInfoService {

    @Autowired
    private SysLoginInfoService sysLoginInfoService;

    @Override
    @InnerAuth
    @PostMapping
    public Result<Boolean> saveLoginInfo(@RequestBody SysLoginInfo sysLogininfo, String source) {
        return Result.ok(sysLoginInfoService.saveLoginInfo(sysLogininfo).isSuccess());
    }
}
