Java Code Examples for com.baomidou.mybatisplus.toolkit.StringUtils#checkValNotNull()
The following examples show how to use
com.baomidou.mybatisplus.toolkit.StringUtils#checkValNotNull() .
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: GlobalConfig.java From mybatis-plus-sharding-jdbc-spring-boot-starter with Apache License 2.0 | 5 votes |
public GlobalConfiguration convertGlobalConfiguration() throws ClassNotFoundException, IllegalAccessException, InstantiationException { GlobalConfiguration globalConfiguration = new GlobalConfiguration(); if (StringUtils.isNotEmpty(this.getIdentifierQuote())) { globalConfiguration.setIdentifierQuote(this.getIdentifierQuote()); } if (StringUtils.isNotEmpty(this.getLogicDeleteValue())) { globalConfiguration.setLogicDeleteValue(this.getLogicDeleteValue()); } if (StringUtils.isNotEmpty(this.getLogicNotDeleteValue())) { globalConfiguration.setLogicNotDeleteValue(this.getLogicNotDeleteValue()); } if (StringUtils.isNotEmpty(this.getSqlInjector())) { globalConfiguration.setSqlInjector((ISqlInjector) Class.forName(this.getSqlInjector()).newInstance()); } if (StringUtils.isNotEmpty(this.getMetaObjectHandler())) { globalConfiguration.setMetaObjectHandler((MetaObjectHandler) Class.forName(this.getMetaObjectHandler()).newInstance()); } if (StringUtils.isNotEmpty(this.getKeyGenerator())) { globalConfiguration.setKeyGenerator((IKeyGenerator) Class.forName(this.getKeyGenerator()).newInstance()); } if (StringUtils.checkValNotNull(this.getIdType())) { globalConfiguration.setIdType(this.getIdType()); } if (null != this.getDbColumnUnderline()) { globalConfiguration.setDbColumnUnderline(this.getDbColumnUnderline()); } if (StringUtils.checkValNotNull(this.getFieldStrategy())) { globalConfiguration.setFieldStrategy(this.getFieldStrategy()); } if (StringUtils.checkValNotNull(this.getRefreshMapper())) { globalConfiguration.setRefresh(this.getRefreshMapper()); } if (StringUtils.checkValNotNull(this.getCapitalMode())) { globalConfiguration.setCapitalMode(this.getCapitalMode()); } if (null != this.getSqlParserCache()) { globalConfiguration.setSqlParserCache(this.getSqlParserCache()); } return globalConfiguration; }
Example 2
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 3
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 4
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"; }