package com.rongwei.savecheck.controller;

import com.rongwei.rwcommon.base.R;
import com.rongwe.scentity.vo.DepartmentAndPersonnelReq;
import com.rongwei.sfcommon.sys.service.DepartmentAndPersonnelService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：sc
 * @since ：2024/9/3
 */
@RestController
@RequestMapping("/dataSync")
@Log4j2
public class DepartmentAndPersonnelController {
    @Autowired
    private DepartmentAndPersonnelService departmentAndPersonnelService;

    /**
     * 同步部门和用户信息
     */
    @PostMapping("/departmentAndPersonnel")
    public R departmentAndPersonnel(@RequestBody DepartmentAndPersonnelReq req){
        log.info("开始同步部门和用户信息，入参：{}",req);
        return departmentAndPersonnelService.departmentAndPersonnel(req);
    }
}
