Java Code Examples for cn.hutool.core.util.StrUtil#isNotBlank()

The following examples show how to use cn.hutool.core.util.StrUtil#isNotBlank() . 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: SettingController.java    From sk-admin with Apache License 2.0 6 votes vote down vote up
@RequestMapping(value = "/oss/set", method = RequestMethod.POST)
@ApiOperation(value = "OSS配置")
public Result<Object> ossSet(@ModelAttribute OssSetting ossSetting) {

    String name = ossSetting.getServiceName();
    Setting setting = settingService.get(name);
    if (name.equals(SettingConstant.QINIU_OSS) || name.equals(SettingConstant.ALI_OSS)
            || name.equals(SettingConstant.TENCENT_OSS) || name.equals(SettingConstant.MINIO_OSS)) {

        // 判断是否修改secrectKey 保留原secrectKey 避免保存***加密字符
        if (StrUtil.isNotBlank(setting.getValue()) && !ossSetting.getChanged()) {
            String secrectKey = new Gson().fromJson(setting.getValue(), OssSetting.class).getSecretKey();
            ossSetting.setSecretKey(secrectKey);
        }
    }
    setting.setValue(new Gson().toJson(ossSetting));
    settingService.saveOrUpdate(setting);
    Setting used = settingService.get(SettingConstant.OSS_USED);
    used.setValue(name);
    settingService.saveOrUpdate(used);
    return new ResultUtil<>().setData(null);
}
 
Example 2
Source File: PermissionServiceImpl.java    From SENS with GNU General Public License v3.0 6 votes vote down vote up
@Override
public QueryWrapper<Permission> getQueryWrapper(Permission permission) {
    //对指定字段查询
    QueryWrapper<Permission> queryWrapper = new QueryWrapper<>();
    if (permission != null) {
        if (StrUtil.isNotBlank(permission.getResourceType())) {
            queryWrapper.eq("resource_type", permission.getResourceType());
        }
        if (StrUtil.isNotBlank(permission.getTarget())) {
            queryWrapper.eq("target", permission.getTarget());
        }
        if (StrUtil.isNotBlank(permission.getResourceType())) {
            queryWrapper.eq("resource_type", permission.getResourceType());
        }
        if (StrUtil.isNotBlank(permission.getUrl())) {
            queryWrapper.eq("url", permission.getUrl());
        }
        if (StrUtil.isNotBlank(permission.getName())) {
            queryWrapper.eq("name", permission.getName());
        }
    }
    return queryWrapper;
}
 
Example 3
Source File: BaseService.java    From SENS with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 根据查询条件分页获取
 *
 * @param page
 * @param condition
 * @return
 */
default Page<E> findAll(Page<E> page, QueryCondition<E> condition) {
    E e = condition.getData();
    SearchVo searchVo = condition.getSearchVo();

    //对指定字段查询
    QueryWrapper<E> queryWrapper = getQueryWrapper(e);

    //查询日期范围
    if (searchVo != null) {
        String startDate = searchVo.getStartDate();
        String endDate = searchVo.getEndDate();
        if (StrUtil.isNotBlank(startDate) && StrUtil.isNotBlank(endDate)) {
            Date start = DateUtil.parse(startDate);
            Date end = DateUtil.parse(endDate);
            queryWrapper.between("create_time", start, end);
        }
    }
    return (Page<E>) getRepository().selectPage(page, queryWrapper);
}
 
Example 4
Source File: LogServiceImpl.java    From SENS with GNU General Public License v3.0 6 votes vote down vote up
@Override
public QueryWrapper<Log> getQueryWrapper(Log log) {
    //对指定字段查询
    QueryWrapper<Log> queryWrapper = new QueryWrapper<>();
    if (log != null) {
        if (StrUtil.isNotBlank(log.getName())) {
            queryWrapper.eq("name", log.getName());
        }
        if (StrUtil.isNotBlank(log.getIp())) {
            queryWrapper.eq("ip", log.getIp());
        }
        if (StrUtil.isNotBlank(log.getLogType())) {
            queryWrapper.eq("log_type", log.getLogType());
        }
        if (StrUtil.isNotBlank(log.getUsername())) {
            queryWrapper.eq("username", log.getUsername());
        }
        if (StrUtil.isNotBlank(log.getRequestType())) {
            queryWrapper.eq("request_type", log.getRequestType());
        }
    }
    return queryWrapper;
}
 
Example 5
Source File: FrontIndexController.java    From stone with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 首页分页
 *
 * @param model model
 * @param page  当前页码
 * @param size  每页数量
 * @return 模板路径/themes/{theme}/index
 */
@GetMapping(value = "page/{page}")
public String index(Model model,
                    @PathVariable(value = "page") Integer page) {
    final Sort sort = new Sort(Sort.Direction.DESC, "postDate");
    //默认显示10条
    int size = 10;
    if (StrUtil.isNotBlank(HaloConst.OPTIONS.get(BlogPropertiesEnum.INDEX_POSTS.getProp()))) {
        size = Integer.parseInt(HaloConst.OPTIONS.get(BlogPropertiesEnum.INDEX_POSTS.getProp()));
    }
    //所有文章数据,分页
    final Pageable pageable = PageRequest.of(page - 1, size, sort);
    final Page<Post> posts = postService.findPostByStatus(pageable);
    if (null == posts) {
        return this.renderNotFound();
    }
    final int[] rainbow = PageUtil.rainbow(page, posts.getTotalPages(), 3);
    model.addAttribute("is_index",true);
    model.addAttribute("posts", posts);
    model.addAttribute("rainbow", rainbow);
    return this.render("index");
}
 
Example 6
Source File: ThirdAppBindServiceImpl.java    From SENS with GNU General Public License v3.0 6 votes vote down vote up
@Override
public QueryWrapper<ThirdAppBind> getQueryWrapper(ThirdAppBind thirdAppBind) {
    //对指定字段查询
    QueryWrapper<ThirdAppBind> queryWrapper = new QueryWrapper<>();
    if (thirdAppBind != null) {
        if (StrUtil.isNotBlank(thirdAppBind.getAppType())) {
            queryWrapper.eq("app_type", thirdAppBind.getAppType());
        }
        if (StrUtil.isNotBlank(thirdAppBind.getOpenId())) {
            queryWrapper.eq("open_id", thirdAppBind.getOpenId());
        }
        if (thirdAppBind.getUserId() != null) {
            queryWrapper.eq("user_id", thirdAppBind.getUserId());
        }
        if (thirdAppBind.getStatus() != null) {
            queryWrapper.eq("status", thirdAppBind.getStatus());
        }
    }
    return queryWrapper;
}
 
Example 7
Source File: RibbonController.java    From fw-spring-cloud with Apache License 2.0 6 votes vote down vote up
/**
     * 配合gateway
     * @return
     * @throws InterruptedException
     */
    @GetMapping("/header")
    public String header(@RequestHeader(value = "Host", required = false)  String host,
                         @RequestHeader(value = "Blue", required = false)  String blue,
                         @RequestHeader(value = "X-Request-Red", required = false)  String requestRed) {

        StringBuilder sp=new StringBuilder();
//        if(StrUtil.isNotBlank(host)){
//            sp.append("Host:").append(host).append(System.lineSeparator());
//        }
        if(StrUtil.isNotBlank(host)){
            sp.append("Blue:").append(blue).append(System.lineSeparator());
        }
        if(StrUtil.isNotBlank(host)){
            sp.append("X-Request-Red:").append(requestRed).append(System.lineSeparator());
        }
        return sp.toString();
    }
 
Example 8
Source File: RequestProcessorContext.java    From bitchat with Apache License 2.0 6 votes vote down vote up
private void initRequestProcessor() {
    if (!init.compareAndSet(false, true)) {
        return;
    }
    BaseConfig baseConfig = ConfigFactory.getConfig(BaseConfig.class);
    Set<Class<?>> classSet = ClassScaner.scanPackageBySuper(baseConfig.basePackage(), RequestProcessor.class);
    if (CollectionUtil.isEmpty(classSet)) {
        log.warn("[RequestProcessorContext] No RequestProcessor found");
        return;
    }
    for (Class<?> clazz : classSet) {
        if (clazz.isInterface() || Modifier.isAbstract(clazz.getModifiers()) || !RequestProcessor.class.isAssignableFrom(clazz)) {
            continue;
        }
        try {
            // check whether the class has @Processor annotation
            // use name specified by @Processor first
            Processor processor = clazz.getAnnotation(Processor.class);
            String serviceName = (processor != null && StrUtil.isNotBlank(processor.name())) ? GenericsUtil.unifiedProcessorName(processor.name()) : clazz.getName();
            cacheRequestProcessor(serviceName, clazz);
        } catch (Exception e) {
            log.warn("[RequestProcessorContext] cacheRequestProcessor failed", e);
        }
    }
}
 
Example 9
Source File: FrontPageController.java    From blog-sharon with Apache License 2.0 5 votes vote down vote up
/**
 * 渲染自定义页面
 *
 * @param postUrl 页面路径
 * @param model   model
 * @return 模板路径/themes/{theme}/post
 */
@GetMapping(value = "/p/{postUrl}")
public String getPage(@PathVariable(value = "postUrl") String postUrl,
                      @RequestParam(value = "cp", defaultValue = "1") Integer cp,
                      Model model) {
    Post post = postService.findByPostUrl(postUrl, PostTypeEnum.POST_TYPE_PAGE.getDesc());
    if (null == post) {
        return this.renderNotFound();
    }
    List<Comment> comments = null;
    if (StrUtil.equals(HaloConst.OPTIONS.get(BlogPropertiesEnum.NEW_COMMENT_NEED_CHECK.getProp()), TrueFalseEnum.TRUE.getDesc()) || HaloConst.OPTIONS.get(BlogPropertiesEnum.NEW_COMMENT_NEED_CHECK.getProp()) == null) {
        comments = commentService.findCommentsByPostAndCommentStatus(post, CommentStatusEnum.PUBLISHED.getCode());
    } else {
        comments = commentService.findCommentsByPostAndCommentStatusNot(post, CommentStatusEnum.RECYCLE.getCode());
    }
    //默认显示10条
    Integer size = 10;
    //获取每页评论条数
    if (StrUtil.isNotBlank(HaloConst.OPTIONS.get(BlogPropertiesEnum.INDEX_COMMENTS.getProp()))) {
        size = Integer.parseInt(HaloConst.OPTIONS.get(BlogPropertiesEnum.INDEX_COMMENTS.getProp()));
    }
    //评论分页
    ListPage<Comment> commentsPage = new ListPage<Comment>(CommentUtil.getComments(comments), cp, size);
    int[] rainbow = PageUtil.rainbow(cp, commentsPage.getTotalPage(), 3);
    model.addAttribute("is_page", true);
    model.addAttribute("post", post);
    model.addAttribute("comments", commentsPage);
    model.addAttribute("commentsCount", comments.size());
    model.addAttribute("rainbow", rainbow);
    postService.cacheViews(post.getPostId());

    //如果设置了自定义模板,则渲染自定义模板
    if (StrUtil.isNotEmpty(post.getCustomTpl())) {
        return this.render(post.getCustomTpl());
    }
    return this.render("page");
}
 
Example 10
Source File: UserService.java    From Aooms with Apache License 2.0 5 votes vote down vote up
@Transactional
public void update() {
       Record record = Record.empty();
       record.setByJsonKey("formData");
       record.set("update_time",DateUtil.now());
	String password = record.getString("password");
	if(StrUtil.isNotBlank(password)){
		record.set("password", PasswordHash.createHash(password));
	}
       db.update("aooms_rbac_user",record);

	String userId = record.getString("id");
	db.update(RbacMapper.PKG.by("UserMapper.deleteRoleByUserId"),SqlPara.empty().set("user_id",userId));
	addRoles(userId);
}
 
Example 11
Source File: MailRetrieveServiceImpl.java    From SENS with GNU General Public License v3.0 5 votes vote down vote up
@Override
public QueryWrapper<MailRetrieve> getQueryWrapper(MailRetrieve mailRetrieve) {
    //对指定字段查询
    QueryWrapper<MailRetrieve> queryWrapper = new QueryWrapper<>();
    if (mailRetrieve != null) {
        if (StrUtil.isNotBlank(mailRetrieve.getEmail())) {
            queryWrapper.eq("email", mailRetrieve.getEmail());
        }
        if (StrUtil.isNotBlank(mailRetrieve.getCode())) {
            queryWrapper.eq("code", mailRetrieve.getCode());
        }
    }
    return queryWrapper;
}
 
Example 12
Source File: Commons.java    From mayday with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 显示分类
 * 
 * @param categorysUrl
 *            分类URL
 * @param categorysName
 *            分类名称
 * @return
 */
public static String show_categories(String categorysUrl, String categorysName) throws Exception {
	StringBuffer sb = new StringBuffer();
	if (StrUtil.isNotBlank(categorysUrl)) {
		String[] categoryUrl = categorysUrl.split(",");
		String[] categoryName = categorysName.split(",");
		int i = 0;
		for (String url : categoryUrl) {
			sb.append("<a href=\"/category/" + URLEncoder.encode(url, "UTF-8") + "\">" + categoryName[i] + "</a>");
			i++;
		}
	}
	return sb.toString();
}
 
Example 13
Source File: UserServiceImpl.java    From spring-boot-demo with MIT License 5 votes vote down vote up
/**
 * 更新用户
 *
 * @param user 用户实体
 * @param id   主键id
 * @return 更新成功 {@code true} 更新失败 {@code false}
 */
@Override
public Boolean update(User user, Long id) {
	User exist = getUser(id);
	if (StrUtil.isNotBlank(user.getPassword())) {
		String rawPass = user.getPassword();
		String salt = IdUtil.simpleUUID();
		String pass = SecureUtil.md5(rawPass + Const.SALT_PREFIX + salt);
		user.setPassword(pass);
		user.setSalt(salt);
	}
	BeanUtil.copyProperties(user, exist, CopyOptions.create().setIgnoreNullValue(true));
	exist.setLastUpdateTime(new DateTime());
	return userDao.update(exist, id) > 0;
}
 
Example 14
Source File: DefaultRouterContext.java    From redant with Apache License 2.0 5 votes vote down vote up
private void addProxy(Class<?> cls, Method method, Controller controller, Mapping mapping) {
    try {
        // Controller+Mapping 唯一确定一个控制器的方法
        String path = controller.path() + mapping.path();
        ControllerProxy proxy = new ControllerProxy();
        proxy.setRenderType(mapping.renderType());
        proxy.setRequestMethod(mapping.requestMethod());
        Object object;
        // 如果该controller也使用了Bean注解,则从BeanContext中获取该controller的实现类
        Bean bean = cls.getAnnotation(Bean.class);
        if (bean != null) {
            // 如果该controller设置了bean的名字则以该名称从BeanHolder中获取bean,否则以
            String beanName = StrUtil.isNotBlank(bean.name()) ? bean.name() : cls.getName();
            object = beanContext.getBean(beanName);
        } else {
            object = cls.newInstance();
        }
        proxy.setController(object);
        proxy.setMethod(method);
        proxy.setMethodName(method.getName());

        controllerContext.addProxy(path, proxy);
        LOGGER.info("[DefaultRouterContext] addProxy path={} to proxy={}", path, proxy);
    } catch (Exception e) {
        LOGGER.error("[DefaultRouterContext] addProxy error,cause:", e.getMessage(), e);
    }
}
 
Example 15
Source File: MqNoTransactionSynchronizationAdapter.java    From scaffold-cloud with MIT License 5 votes vote down vote up
public static void commit(List<MqBaseModel> mqBaseModels) {
    if (mqBaseModels == null || mqBaseModels.isEmpty()) {
        log.info("传入消息model为空");
        return;
    }
    for (MqBaseModel mqBaseModel : mqBaseModels) {
        if (mqBaseModel.getMessage() == null) {
            log.info("mqBaseModel:{},message为空", mqBaseModel);
            continue;
        }
        if (StrUtil.isBlank(mqBaseModel.getKey())) {
            log.info("mqBaseModel:{},key为空", mqBaseModel);
            continue;
        }
        if (StrUtil.isBlank(mqBaseModel.getRequestNo())) {
            log.info("mqBaseModel:{},requestNo为空", mqBaseModel);
            continue;
        }
        //发送MQ消息
        String messageId = RocketCoreUtil.sendRocketMsg(mqBaseModel.getMessage());
        long status = StrUtil.isNotBlank(messageId) ? 0 : -1;
        //构造中间消息内容
        Message message = new Message();
        message.setMsgID(messageId);
        message.setKey(mqBaseModel.getKey());
        MqRedisModel mqRedisModel = MqModelFactoryBuilder.buildMqRedisModel(mqBaseModel, status, message);
        //存储redis对象
        JedisUtil.setObject(String.format(CacheConstant.MQ_REDISMODEL_KEY, mqBaseModel.getKey()), mqRedisModel, 0);
        JedisUtil.setnx(String.format(CacheConstant.MQ_REDISMODEL_KEY_EXPIRE, mqBaseModel.getKey()), CacheConstant.YES, ExpireTime.ONE_HOUR.getTime());
    }
}
 
Example 16
Source File: CategoryServiceImpl.java    From SENS with GNU General Public License v3.0 5 votes vote down vote up
@Override
public QueryWrapper<Category> getQueryWrapper(Category category) {
    //对指定字段查询
    QueryWrapper<Category> queryWrapper = new QueryWrapper<>();
    if (category != null) {
        if (StrUtil.isNotBlank(category.getCateName())) {
            queryWrapper.like("cate_name", category.getCateName());
        }
        if (category.getCateLevel() != null) {
            queryWrapper.eq("cate_level", category.getCateLevel());
        }
    }
    return queryWrapper;
}
 
Example 17
Source File: SqlPara.java    From Aooms with Apache License 2.0 5 votes vote down vote up
/**
 * 追加条件
 * @return
 */
private boolean appendCondition(String join, SqlExpression sqlExpression){
    if(StrUtil.isNotBlank(String.valueOf(sqlExpression.getValue()))){
        //conditions.append(express + "'" + WAF.escapeSql(value) + "'");
        conditions.append(join + sqlExpression.toSqlString(alias));
        return true;
    }
    return false;
}
 
Example 18
Source File: AppealService.java    From runscore with Apache License 2.0 5 votes vote down vote up
@ParamValid
@Transactional
public void userStartAppeal(String receivedAccountId, UserStartAppealParam param) {
	MerchantOrder merchantOrder = merchantOrderRepo.findByIdAndReceivedAccountId(param.getMerchantOrderId(),
			receivedAccountId);
	if (merchantOrder == null) {
		throw new BizException(BizError.商户订单不存在);
	}
	if (Constant.商户订单状态_申诉中.equals(merchantOrder.getOrderState())) {
		throw new BizException(BizError.该订单存在未处理的申诉记录不能重复发起);
	}
	if (!Constant.申诉类型_未支付申请取消订单.equals(param.getAppealType())
			&& !Constant.申诉类型_实际支付金额小于收款金额.equals(param.getAppealType())) {
		throw new BizException(BizError.参数异常);
	}
	if (Constant.申诉类型_实际支付金额小于收款金额.equals(param.getAppealType())) {
		if (param.getActualPayAmount() == null || param.getActualPayAmount() <= 0) {
			throw new BizException(BizError.参数异常);
		}
		if (merchantOrder.getGatheringAmount() - param.getActualPayAmount() < 0) {
			throw new BizException(BizError.实际支付金额须小于收款金额);
		}
		if (StrUtil.isBlank(param.getUserSreenshotIds())) {
			throw new BizException(BizError.参数异常);
		}
	}

	merchantOrder.setOrderState(Constant.商户订单状态_申诉中);
	merchantOrderRepo.save(merchantOrder);
	Appeal appeal = param.convertToPo();
	appealRepo.save(appeal);
	if (StrUtil.isNotBlank(param.getUserSreenshotIds())) {
		for (String sreenshotId : param.getUserSreenshotIds().split(",")) {
			Storage storage = storageRepo.getOne(sreenshotId);
			storage.setAssociateId(appeal.getId());
			storage.setAssociateBiz("appealSreenshot");
			storageRepo.save(storage);
		}
	}
}
 
Example 19
Source File: FileController.java    From sk-admin with Apache License 2.0 4 votes vote down vote up
@RequestMapping(value = "/upload", method = RequestMethod.POST)
@ApiOperation(value = "文件上传")
public Result<Object> upload(@RequestParam(required = false) MultipartFile file,
                             @RequestParam(required = false) String base64,
                             HttpServletRequest request) {

    Setting setting = settingService.get(SettingConstant.OSS_USED);
    if (setting == null || StrUtil.isBlank(setting.getValue())) {
        return new ResultUtil<>().setErrorMsg(501, "您还未配置OSS存储服务");
    }

    // IP限流 在线Demo所需 1分钟限1个请求
    String token = redisRaterLimiter.acquireTokenFromBucket("upload:" + StringUtils.getIp(request), 1, 60000);
    if (StrUtil.isBlank(token)) {
        throw new SkException("上传那么多干嘛,等等再传吧");
    }

    if (StrUtil.isNotBlank(base64)) {
        // base64上传
        file = Base64DecodeMultipartFile.base64Convert(base64);
    }
    String result;
    String fKey = CommonUtil.renamePic(Objects.requireNonNull(file.getOriginalFilename()));
    File f = new File();
    try {
        InputStream inputStream = file.getInputStream();
        // 上传至第三方云服务或服务器
        result = fileManageFactory.getFileManage(-1).inputStreamUpload(inputStream, fKey, file);
        f.setLocation(getType(setting.getValue()));
        // 保存数据信息至数据库
        f.setName(file.getOriginalFilename());
        f.setSize(file.getSize());
        f.setType(file.getContentType());
        f.setFKey(fKey);
        f.setUrl(result);
        fileService.save(f);
    } catch (Exception e) {
        log.error(e.toString());
        return new ResultUtil<>().setErrorMsg(e.toString());
    }
    if (setting.getValue().equals(SettingConstant.LOCAL_OSS)) {
        OssSetting os = new Gson().fromJson(settingService.get(SettingConstant.LOCAL_OSS).getValue(), OssSetting.class);
        result = os.getHttp() + os.getEndpoint() + "/" + f.getId();
    }
    return new ResultUtil<>().setData(result);
}
 
Example 20
Source File: UserAccountService.java    From runscore with Apache License 2.0 4 votes vote down vote up
@Transactional(readOnly = true)
public PageResult<AccountChangeLogVO> findLowerLevelAccountChangeLogByPage(
		LowerLevelAccountChangeLogQueryCondParam param) {
	UserAccount currentAccount = userAccountRepo.getOne(param.getCurrentAccountId());
	UserAccount lowerLevelAccount = currentAccount;
	if (StrUtil.isNotBlank(param.getUserName())) {
		lowerLevelAccount = userAccountRepo.findByUserName(param.getUserName());
		if (lowerLevelAccount == null) {
			throw new BizException(BizError.用户名不存在);
		}
		// 说明该用户名对应的账号不是当前账号的下级账号
		if (!lowerLevelAccount.getAccountLevelPath().startsWith(currentAccount.getAccountLevelPath())) {
			throw new BizException(BizError.不是上级账号无权查看该账号及下级的帐变日志);
		}
	}
	String lowerLevelAccountId = lowerLevelAccount.getId();
	String lowerLevelAccountLevelPath = lowerLevelAccount.getAccountLevelPath();

	Specification<AccountChangeLog> spec = new Specification<AccountChangeLog>() {
		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;

		public Predicate toPredicate(Root<AccountChangeLog> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
			List<Predicate> predicates = new ArrayList<Predicate>();
			if (StrUtil.isNotBlank(param.getUserName())) {
				predicates.add(builder.equal(root.get("userAccountId"), lowerLevelAccountId));
			} else {
				predicates.add(builder.like(root.join("userAccount", JoinType.INNER).get("accountLevelPath"),
						lowerLevelAccountLevelPath + "%"));
			}
			if (param.getStartTime() != null) {
				predicates.add(builder.greaterThanOrEqualTo(root.get("accountChangeTime").as(Date.class),
						DateUtil.beginOfDay(param.getStartTime())));
			}
			if (param.getEndTime() != null) {
				predicates.add(builder.lessThanOrEqualTo(root.get("accountChangeTime").as(Date.class),
						DateUtil.endOfDay(param.getEndTime())));
			}
			if (StrUtil.isNotBlank(param.getAccountChangeTypeCode())) {
				predicates.add(builder.equal(root.get("accountChangeTypeCode"), param.getAccountChangeTypeCode()));
			}
			return predicates.size() > 0 ? builder.and(predicates.toArray(new Predicate[predicates.size()])) : null;
		}
	};
	Page<AccountChangeLog> result = accountChangeLogRepo.findAll(spec, PageRequest.of(param.getPageNum() - 1,
			param.getPageSize(), Sort.by(Sort.Order.desc("accountChangeTime"))));
	PageResult<AccountChangeLogVO> pageResult = new PageResult<>(AccountChangeLogVO.convertFor(result.getContent()),
			param.getPageNum(), param.getPageSize(), result.getTotalElements());
	return pageResult;
}