This commit is contained in:
van
2026-05-09 22:57:53 +08:00
parent f4697481fa
commit 30ff4077fe
14 changed files with 744 additions and 55 deletions

View File

@@ -0,0 +1,18 @@
package com.ruoyi.jarvis.wecom;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import com.ruoyi.jarvis.service.IPhoneForwardActivePush;
@Component
public class PhoneForwardActivePushImpl implements IPhoneForwardActivePush {
@Resource
private WxSendWeComPushClient wxSendWeComPushClient;
@Override
public void schedulePushChunks(String toUser, List<String> chunks) {
wxSendWeComPushClient.scheduleActivePushes(toUser, chunks);
}
}

View File

@@ -0,0 +1,82 @@
package com.ruoyi.web.controller.jarvis;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.jarvis.domain.TgScalperPhone;
import com.ruoyi.jarvis.service.ITgScalperPhoneService;
/**
* TG 管理 - 黄牛电话库
*/
@RestController
@RequestMapping("/jarvis/tgScalperPhone")
public class TgScalperPhoneController extends BaseController
{
@Autowired
private ITgScalperPhoneService tgScalperPhoneService;
@PreAuthorize("@ss.hasPermi('jarvis:tg:scalperPhone:list')")
@GetMapping("/list")
public TableDataInfo list(TgScalperPhone q)
{
startPage();
List<TgScalperPhone> list = tgScalperPhoneService.selectTgScalperPhoneList(q);
return getDataTable(list);
}
@PreAuthorize("@ss.hasPermi('jarvis:tg:scalperPhone:export')")
@Log(title = "TG黄牛电话库", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TgScalperPhone q)
{
List<TgScalperPhone> list = tgScalperPhoneService.selectTgScalperPhoneList(q);
ExcelUtil<TgScalperPhone> util = new ExcelUtil<>(TgScalperPhone.class);
return util.exportExcel(list, "TG黄牛电话库");
}
@PreAuthorize("@ss.hasPermi('jarvis:tg:scalperPhone:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(tgScalperPhoneService.selectTgScalperPhoneById(id));
}
@PreAuthorize("@ss.hasPermi('jarvis:tg:scalperPhone:add')")
@Log(title = "TG黄牛电话库", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TgScalperPhone row)
{
return toAjax(tgScalperPhoneService.insertTgScalperPhone(row));
}
@PreAuthorize("@ss.hasPermi('jarvis:tg:scalperPhone:edit')")
@Log(title = "TG黄牛电话库", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TgScalperPhone row)
{
return toAjax(tgScalperPhoneService.updateTgScalperPhone(row));
}
@PreAuthorize("@ss.hasPermi('jarvis:tg:scalperPhone:remove')")
@Log(title = "TG黄牛电话库", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tgScalperPhoneService.deleteTgScalperPhoneByIds(ids));
}
}

View File

@@ -244,6 +244,13 @@ jarvis:
# 连续失败后熔断,不再发起 HTTP与 tg_bridge 侧熔断互不替代)
circuit-failure-threshold: 5
circuit-open-ms: 120000
# 先查库 jarvis_tg_scalper_phone启用+有备注),命中则不请求 tg_bridge
scalper-library-enabled: true
# 被动立即回「收到电话」TG 结果经 wxSend /wecom/active-push 推送
async-result-push-enabled: true
# 同一企微 MsgIdwxSend 已透传)在 TTL 内复用首次成功结果,防重试重复计费;错误文案不缓存
dedup-enabled: true
dedup-ttl-seconds: 900
# reply_take_nth仅「开」用 2「慢开」由 tg_bridge reply_adaptive_skip_middle_ad 在 2/3 条间自适应
# Ollama 大模型服务(监控健康度调试用)
ollama:

View File

@@ -231,6 +231,10 @@ jarvis:
lock-acquire-timeout-ms: 180000
circuit-failure-threshold: 5
circuit-open-ms: 120000
scalper-library-enabled: true
async-result-push-enabled: true
dedup-enabled: true
dedup-ttl-seconds: 900
# 「开」取第 2 条;「慢开」由桥接自适应第 2/3 条
# Ollama 大模型服务(监控健康度调试用)
ollama: