You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
786 B

package com.project.ding.controller;
import com.project.ding.utils.DingUserSyncUtil;
import org.springframework.beans.factory.annotation.Autowired;
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;
@RestController
@RequestMapping("/ding")
public class SyncController {
@Autowired
private DingUserSyncUtil dingUserSyncUtil;
/**
* 手动触发同步接口
* 强刷:/sync/all?force=true
*/
@GetMapping("/sync")
public String triggerSync(@RequestParam(defaultValue = "false") boolean force) {
return dingUserSyncUtil.triggerSync(force);
}
}