feat: 支持关联多标签、计划任务立即执行、标签相关操作优化

This commit is contained in:
meilin.huang
2023-12-05 23:03:51 +08:00
parent b347bd7ef5
commit 57361d8241
107 changed files with 1819 additions and 825 deletions

View File

@@ -26,9 +26,7 @@ func (m *machineRepoImpl) GetMachineList(condition *entity.MachineQuery, pagePar
Eq("status", condition.Status).
Like("ip", condition.Ip).
Like("name", condition.Name).
In("tag_id", condition.TagIds).
RLike("tag_path", condition.TagPath).
OrderByAsc("tag_path")
In("code", condition.Codes)
if condition.Ids != "" {
// ,分割id转为id数组
@@ -40,12 +38,3 @@ func (m *machineRepoImpl) GetMachineList(condition *entity.MachineQuery, pagePar
return gormx.PageQuery(qd, pageParam, toEntity)
}
func (m *machineRepoImpl) Count(condition *entity.MachineQuery) int64 {
where := make(map[string]any)
if len(condition.TagIds) > 0 {
where["tag_id"] = condition.TagIds
}
return m.CountByCond(where)
}