This commit is contained in:
雷欧(林平凡)
2025-08-14 11:43:39 +08:00
parent 28bb9f29a2
commit 58cb1ef742
6 changed files with 162 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.jarvis;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.jarvis.enums.GroupType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -33,6 +34,11 @@ public class XbGroupController extends BaseController
@Autowired
private IXbGroupService xbGroupService;
@GetMapping("/select/groupType")
public AjaxResult getGroupTypeOptions() {
return AjaxResult.success(GroupType.getSelectItems());
}
/**
* 查询线报群信息列表
*/
@@ -41,7 +47,16 @@ public class XbGroupController extends BaseController
{
startPage();
List<XbGroup> list = xbGroupService.selectXbGroupList(xbGroup);
return getDataTable(list);
TableDataInfo dataTable = getDataTable(list);
if (!dataTable.getRows().isEmpty()) {
@SuppressWarnings("unchecked")
List<XbGroup> rows = (List<XbGroup>) dataTable.getRows();
for (XbGroup xbGroupCache : rows) {
xbGroupCache.setGroupTypeName(GroupType.getName(xbGroup.getGroupType()));
}
}
return dataTable;
}
/**