This commit is contained in:
777
2025-08-21 01:14:43 +08:00
parent 4e2869ee2c
commit 54665ca816
3 changed files with 34 additions and 8 deletions

View File

@@ -1,14 +1,19 @@
package com.ruoyi.test;
import com.alibaba.fastjson.JSON;
import com.ruoyi.cai.service.AnchorImCountDayService;
import com.ruoyi.web.controller.monitor.SysOperlogController;
import com.ruoyi.yunxin.client.ImUserRefClient;
import com.ruoyi.yunxin.req.GetUnifoReq;
import com.ruoyi.yunxin.resp.YxUpdateUinfoR;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import javax.annotation.Resource;
import java.time.LocalDate;
import java.time.LocalDateTime;
@SpringBootTest // 此注解只能在 springboot 主包下使用 需包含 main 方法与 yml 配置文件
@Slf4j
@@ -16,6 +21,8 @@ public class OpTest {
@Resource
private ImUserRefClient imUserRefClient;
@Autowired
private AnchorImCountDayService anchorImCountDayService;
@Test
public void test(){
@@ -25,4 +32,22 @@ public class OpTest {
YxUpdateUinfoR uinfos = imUserRefClient.getUinfos(getUnifoReq);
log.info(JSON.toJSONString(uinfos));
}
@Test
public void test1(){
anchorImCountDayService.incCount(2L);
anchorImCountDayService.incCount(2L);
anchorImCountDayService.incCount(2L);
anchorImCountDayService.incCount(2L);
anchorImCountDayService.incCount(2L);
anchorImCountDayService.incCount(2L);
anchorImCountDayService.incCount(4L);
anchorImCountDayService.incCount(4L);
anchorImCountDayService.incCount(4L);
anchorImCountDayService.incCount(4L);
anchorImCountDayService.incCount(4L);
System.out.println("asd");
anchorImCountDayService.refreshCount(LocalDate.now());
anchorImCountDayService.totalUserCount();
}
}