feat: 后台管理页面查询条件统一改为独立卡片+按钮触发模式
业务组管理、用户管理、配置管理、应用管理页面的查询条件拆分为独立卡片, 新增查询/重置按钮,移除下拉选中即时触发查询的交互; 应用管理新增应用名称、应用编码模糊查询和业务组精确查询条件。
This commit is contained in:
@@ -24,6 +24,9 @@ type AppListRequest struct {
|
||||
PageNo int `form:"pageNo" binding:"required"`
|
||||
PageSize int `form:"pageSize" binding:"required"`
|
||||
AppType string `form:"appType"`
|
||||
Name string `form:"name"`
|
||||
Code string `form:"code"`
|
||||
GroupId string `form:"groupId"`
|
||||
}
|
||||
|
||||
func (h *AppHandler) List(c *gin.Context) {
|
||||
@@ -66,6 +69,15 @@ func (h *AppHandler) List(c *gin.Context) {
|
||||
if req.AppType != "" {
|
||||
whereClause += " AND service_id = '" + req.AppType + "'"
|
||||
}
|
||||
if req.Name != "" {
|
||||
whereClause += " AND name LIKE '%" + req.Name + "%'"
|
||||
}
|
||||
if req.Code != "" {
|
||||
whereClause += " AND code LIKE '%" + req.Code + "%'"
|
||||
}
|
||||
if req.GroupId != "" {
|
||||
whereClause += " AND group_id = " + req.GroupId
|
||||
}
|
||||
|
||||
total, _ := dao.Engine.Where(whereClause).Count(&model.Application{})
|
||||
dao.Engine.Where(whereClause).Limit(req.PageSize, (req.PageNo-1)*req.PageSize).Find(&apps)
|
||||
|
||||
Reference in New Issue
Block a user