lifuquan fe5b976529 20230719 | 1 year ago | |
---|---|---|
doc | 1 year ago | |
src | 1 year ago | |
.gitignore | 1 year ago | |
README.md | 1 year ago | |
pom.xml | 1 year ago |
钉钉各种API的封装,在使用中发现不太方便,所以还是使用工具类吧
<!-- dingtalk-api-starter -->
<dependency>
<groupId>com.nokia</groupId>
<artifactId>dingtalk-api-starter</artifactId>
<version>1.0</version>
</dependency>
dingtalk:
api:
enable: true
appKey: yourAppKey
appSecret: yourAppSecret
redis:
enable: true
host: 192.168.31.83
port: 6379
注意,这里的独立redis可以不用配置,但需要自行注入一个
RedisTemplate<String, Object>
对象
@AutoWired
注入即可使用@Autowired
private DingtalkService service;
@Test
void test() throws InterruptedException {
String sendText = service.SendText("cidcWmmFwduUTDB3G0vPNOldQ==", "测试测试测试====");
System.out.println(sendText);
Thread.sleep(1000 * 5);
service.recallMessage("cidcWmmFwduUTDB3G0vPNOldQ==", sendText);
}