1、修复昨日95值不显示问题。

2、开发frpc端口自动分配功能。
This commit is contained in:
gaoyutao
2025-12-22 18:51:48 +08:00
parent 4e7a30ed61
commit 1af9d3fbc5
22 changed files with 1365 additions and 52 deletions
@@ -0,0 +1,113 @@
package com.tongran.rocketmq.controller;
import com.tongran.common.core.utils.poi.ExcelUtil;
import com.tongran.common.core.web.controller.BaseController;
import com.tongran.common.core.web.domain.AjaxResult;
import com.tongran.common.core.web.page.PageDomain;
import com.tongran.common.core.web.page.TableDataInfo;
import com.tongran.common.log.annotation.Log;
import com.tongran.common.log.enums.BusinessType;
import com.tongran.common.security.annotation.RequiresPermissions;
import com.tongran.rocketmq.domain.RmFrpcConfigManage;
import com.tongran.rocketmq.service.IRmFrpcConfigManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* FRPC配置管理Controller
*
* @author gyt
* @date 2025-12-19
*/
@RestController
@RequestMapping("/frpcConfigManage")
@RequiresPermissions("rocketmq:frpcConfigManage")
public class RmFrpcConfigManageController extends BaseController
{
@Autowired
private IRmFrpcConfigManageService rmFrpcConfigManageService;
/**
* 查询FRPC配置管理列表
*/
@PostMapping("/list")
public TableDataInfo list(@RequestBody RmFrpcConfigManage rmFrpcConfigManage)
{
PageDomain pageDomain = new PageDomain();
pageDomain.setPageNum(rmFrpcConfigManage.getPageNum());
pageDomain.setPageSize(rmFrpcConfigManage.getPageSize());
startPage(pageDomain);
List<RmFrpcConfigManage> list = rmFrpcConfigManageService.selectRmFrpcConfigManageList(rmFrpcConfigManage);
return getDataTable(list);
}
/**
* 导出FRPC配置管理列表
*/
@RequiresPermissions("rocketmq:frpcConfigManage:export")
@Log(title = "FRPC配置管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, @RequestBody RmFrpcConfigManage rmFrpcConfigManage)
{
List<RmFrpcConfigManage> list = rmFrpcConfigManageService.selectRmFrpcConfigManageList(rmFrpcConfigManage);
ExcelUtil<RmFrpcConfigManage> util = new ExcelUtil<RmFrpcConfigManage>(RmFrpcConfigManage.class);
util.showColumn(rmFrpcConfigManage.getProperties());
util.exportExcel(response, list, "FRPC配置管理数据");
}
/**
* 获取FRPC配置管理详细信息
*/
@RequiresPermissions("rocketmq:frpcConfigManage:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(rmFrpcConfigManageService.selectRmFrpcConfigManageById(id));
}
/**
* 新增FRPC配置管理
*/
@RequiresPermissions("rocketmq:frpcConfigManage:add")
@Log(title = "FRPC配置管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody RmFrpcConfigManage rmFrpcConfigManage)
{
return toAjax(rmFrpcConfigManageService.insertRmFrpcConfigManage(rmFrpcConfigManage));
}
/**
* 修改FRPC配置管理
*/
@RequiresPermissions("rocketmq:frpcConfigManage:edit")
@Log(title = "FRPC配置管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody RmFrpcConfigManage rmFrpcConfigManage)
{
return toAjax(rmFrpcConfigManageService.updateRmFrpcConfigManage(rmFrpcConfigManage));
}
/**
* 删除FRPC配置管理
*/
@RequiresPermissions("rocketmq:frpcConfigManage:remove")
@Log(title = "FRPC配置管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(rmFrpcConfigManageService.deleteRmFrpcConfigManageByIds(ids));
}
/**
* 生成FRP连接
*/
@Log(title = "生成FRP连接", businessType = BusinessType.OTHER)
@PostMapping("/addFrpConnect")
public AjaxResult addFrpConnect(@RequestBody RmFrpcConfigManage rmFrpcConfigManage)
{
return toAjax(rmFrpcConfigManageService.addFrpConnect(rmFrpcConfigManage));
}
}
@@ -0,0 +1,58 @@
package com.tongran.rocketmq.controller;
import com.tongran.common.core.web.controller.BaseController;
import com.tongran.common.core.web.domain.AjaxResult;
import com.tongran.common.log.annotation.Log;
import com.tongran.common.log.enums.BusinessType;
import com.tongran.common.security.annotation.RequiresPermissions;
import com.tongran.rocketmq.domain.RmFrpcPortMapping;
import com.tongran.rocketmq.service.IRmFrpcPortMappingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* FRPC端口映射配置Controller
*
* @author gyt
* @date 2025-12-19
*/
@RestController
@RequestMapping("/frpcPortMapping")
public class RmFrpcPortMappingController extends BaseController
{
@Autowired
private IRmFrpcPortMappingService rmFrpcPortMappingService;
/**
* 查询FRPC端口映射配置列表
*/
@RequiresPermissions("rocketmq:frpcPortMapping:list")
@PostMapping("/list")
public AjaxResult list(@RequestBody RmFrpcPortMapping rmFrpcPortMapping)
{
List<RmFrpcPortMapping> list = rmFrpcPortMappingService.selectRmFrpcPortMappingList(rmFrpcPortMapping);
return success(list);
}
/**
* 获取FRPC端口映射配置详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(rmFrpcPortMappingService.selectRmFrpcPortMappingById(id));
}
/**
* 新增FRPC端口映射配置
*/
@Log(title = "FRPC端口映射配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody RmFrpcPortMapping rmFrpcPortMapping)
{
return toAjax(rmFrpcPortMappingService.insertRmFrpcPortMapping(rmFrpcPortMapping));
}
}