| | |
| | | import com.ruoyi.im.service.NeteaseTeamService; |
| | | import com.ruoyi.system.domain.NeteaseTeam; |
| | | import com.ruoyi.system.domain.UserAccount; |
| | | import com.ruoyi.system.domain.vo.GroupVo; |
| | | import com.ruoyi.system.domain.vo.UserAccountVo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('im:group:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(@PathVariable(value = "keywords", required = false) String keywords) |
| | | public TableDataInfo list(GroupVo vo) |
| | | { |
| | | // 创建查询条件包装器 |
| | | LambdaQueryWrapper<NeteaseTeam> queryWrapper = new LambdaQueryWrapper<>(); |
| | | |
| | | // 只有当 keyword 不为空时才添加 OR 条件 |
| | | if (ObjectUtil.isNotEmpty(keywords)) { |
| | | if (ObjectUtil.isNotEmpty(vo.getKeywords())) { |
| | | queryWrapper.and(wrapper -> wrapper |
| | | .eq(NeteaseTeam::getTid, keywords) |
| | | .eq(NeteaseTeam::getTid, vo.getKeywords()) |
| | | .or() |
| | | .eq(NeteaseTeam::getOwnerAccountId, keywords) |
| | | .eq(NeteaseTeam::getOwnerAccountId, vo.getKeywords()) |
| | | .or() |
| | | .eq(NeteaseTeam::getName,keywords) |
| | | .eq(NeteaseTeam::getName,vo.getKeywords()) |
| | | ); |
| | | } |
| | | |