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); } }