|
|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.project.ding.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.project.base.domain.result.Result; |
|
|
|
import com.project.ding.utils.DingUserSyncUtil; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
@ -9,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@RequestMapping("/api/ding") |
|
|
|
@RequestMapping("/api/admin/ding") |
|
|
|
public class SyncController { |
|
|
|
@Autowired |
|
|
|
private DingUserSyncUtil dingUserSyncUtil; |
|
|
|
@ -19,7 +20,8 @@ public class SyncController { |
|
|
|
* 强刷:/sync/all?force=true |
|
|
|
*/ |
|
|
|
@GetMapping("/sync") |
|
|
|
public String triggerSync(@RequestParam(defaultValue = "false") boolean force) { |
|
|
|
return dingUserSyncUtil.triggerSync(force); |
|
|
|
public Result<String> triggerSync(@RequestParam(defaultValue = "false") boolean force) { |
|
|
|
dingUserSyncUtil.triggerSync(force); |
|
|
|
return Result.success("同步钉钉组织架构需要10-30分钟,请耐心等待"); |
|
|
|
} |
|
|
|
} |
|
|
|
|