企微同步,需要有租户ID
This commit is contained in:
28
src/test/java/com/rj/qiwei/QweiUserSyncIntegrationTest.java
Normal file
28
src/test/java/com/rj/qiwei/QweiUserSyncIntegrationTest.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.rj.qiwei;
|
||||
|
||||
import com.rj.service.IQweiUserService;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@SpringBootTest
|
||||
@ActiveProfiles("test")
|
||||
public class QweiUserSyncIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private IQweiUserService qweiUserService;
|
||||
|
||||
@Test
|
||||
void syncUsersToDb() {
|
||||
Map<String, Object> result = qweiUserService.syncFromQiWei();
|
||||
Object success = result.get("success");
|
||||
assertTrue(Boolean.TRUE.equals(success), "同步失败: " + result);
|
||||
System.out.println("qwei user sync result: " + result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user