package com.malk.xiaoliu.controller;

import com.malk.xiaoliu.service.personService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能：
 * 作者：hanxue
 * 日期：2026/5/7 17:32
 */
@RequestMapping("/hr")
@RestController
@Slf4j
public class personController {
    @Autowired
    private personService personservice;
    @Scheduled(cron = "0 0 21 * * ?")
    @PostMapping("/syncPerson")
    public void syncPerson(){
        log.info("同步人员信息");
        personservice.syncPerson("1","根组织");
    }
}
