|
|
@@ -2,6 +2,7 @@ package com.tzld.piaoquan.api;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.tzld.piaoquan.api.component.AigcApiService;
|
|
|
import com.tzld.piaoquan.api.component.ManagerApiService;
|
|
|
import com.tzld.piaoquan.api.dao.mapper.GhDetailExtMapper;
|
|
|
import com.tzld.piaoquan.api.model.po.GhDetailExt;
|
|
|
@@ -18,6 +19,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@SpringBootTest(classes = GrowthServerApplication.class)
|
|
|
@Slf4j
|
|
|
@@ -31,6 +33,8 @@ public class GhDetailTest {
|
|
|
CgiReplyBucketDataMapper cgiReplyBucketDataMapper;
|
|
|
@Autowired
|
|
|
CgiReplyBucketDataMapperExt cgiReplyBucketDataMapperExt;
|
|
|
+ @Autowired
|
|
|
+ AigcApiService aigcApiService;
|
|
|
|
|
|
@Test
|
|
|
public void testGhDetailExtId() {
|
|
|
@@ -103,4 +107,15 @@ public class GhDetailTest {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Test
|
|
|
+ public void refreshGzhAutoReplyMsgData() {
|
|
|
+ CgiReplyBucketDataExample example = new CgiReplyBucketDataExample();
|
|
|
+ example.createCriteria().andIsDeleteEqualTo(0);
|
|
|
+ List<CgiReplyBucketData> list = cgiReplyBucketDataMapper.selectByExample(example);
|
|
|
+ List<String> ghIds = list.stream().map(CgiReplyBucketData::getGhId).distinct().collect(Collectors.toList());
|
|
|
+ for (String ghId : ghIds) {
|
|
|
+ aigcApiService.refreshGzhAutoReplyMsgData(ghId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|