Java Code Examples for com.baomidou.mybatisplus.mapper.EntityWrapper#where()
The following examples show how to use
com.baomidou.mybatisplus.mapper.EntityWrapper#where() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AttachServiceImpl.java From Ffast-Java with MIT License | 6 votes |
/** * 删除垃圾文件 */ @Override public ServiceRowsResult deleteRubbish() { EntityWrapper ew = new EntityWrapper(); ew.where("count={0}", 0); List<Attach> list = baseMapper.selectList(ew); List idList = new ArrayList(); //删除记录 for (int i = 0; i < list.size(); i++) { idList.add(list.get(i).getId()); attachMapper.deleteById(list.get(i).getId()); } //删除文件 deleteAfter(idList.toString().replaceAll("[\\[\\]]", "")); ServiceRowsResult result = new ServiceRowsResult(true); result.setMessage("删除成功"); return result; }
Example 2
Source File: BacklogServiceImpl.java From Ffast-Java with MIT License | 5 votes |
@Override protected ServiceRowsResult listBefore(Backlog m, EntityWrapper<Backlog> ew) { m.setUserIds(getLoginUserId().toString()); if (StringUtils.isNotBlank(m.getAfterDate())) { ew.where("unix_timestamp(start_time) >= unix_timestamp({0})", m.getAfterDate()); m.setAfterDate(null); } return null; }
Example 3
Source File: UserServiceImpl.java From xmanager with Apache License 2.0 | 5 votes |
@Override public List<User> selectByLoginName(UserVo userVo) { User user = new User(); user.setLoginName(userVo.getLoginName()); EntityWrapper<User> wrapper = new EntityWrapper<User>(user); if (null != userVo.getId()) { wrapper.where("id != {0}", userVo.getId()); } return this.selectList(wrapper); }
Example 4
Source File: AdminTypeController.java From MI-S with MIT License | 5 votes |
/** * 加载分类信息列表 * @param pages 分页对象 * @param param 搜索条件 * @param model * @return */ @RequestMapping("/list") public String selectPage(Page pages, String param, Model model) { Page<Type> page; EntityWrapper<Type> ex = new EntityWrapper<>(); if (StringUtils.checkValNotNull(param)) { ex.where("type_name like concat('%',{0},'%')", param); } ex.orderBy("sort", true); ex.orderBy("create_time", true); page = iTypeService.selectPage(new Page(pages.getCurrent(), pages.getSize()), ex); model.addAttribute("page", page); return "admin/type/typeTable"; }
Example 5
Source File: AdminFlinkController.java From MI-S with MIT License | 5 votes |
/** * 加载列表(分页) * @return */ @RequestMapping("/list") public String selectPage(Page pages, String param, Model model) { Page<Friendlink> page; EntityWrapper<Friendlink> ex = new EntityWrapper<>(); if (StringUtils.checkValNotNull(param)) { ex.where("site_name like concat('%',{0},'%')", param); } page = iFriendlinkService.selectPage(new Page(pages.getCurrent(), pages.getSize()), ex); model.addAttribute("page", page); return "admin/flink/flinkTable"; }
Example 6
Source File: AdminTagController.java From MI-S with MIT License | 5 votes |
/** * 分页加载标签 * @param pages 分页对象 * @param param 搜索条件 * @param model * @return */ @RequestMapping("/list") public String selectPage(Page pages, String param, Model model) { Page<Tag> page; EntityWrapper<Tag> ex = new EntityWrapper<>(); if (StringUtils.checkValNotNull(param)) { ex.where("tag_name like concat('%',{0},'%')", param); } ex.orderBy("sort", true); ex.orderBy("create_time", true); page = iTagService.selectPage(new Page(pages.getCurrent(), pages.getSize()), ex); model.addAttribute("page", page); return "admin/tag/tagTable"; }