zoukankan      html  css  js  c++  java
  • StringBuilder 线程不安全,效率高的使用

        // 获取任务类型的uuid
                    String taskUuids = ctr.getPara("taskUuids"); // 获取的数组
                  
                    // 不为空时添加查询条件            
                    if (StringUtils.notBlank(taskUuids)) {
                         String[] taskU=taskUuids.split(",");
                         StringBuilder stringBuilder=new  StringBuilder();
                            for (int i = 0; i <taskU.length; i++) {
                                stringBuilder.append("'"+taskU[i]+"',");
                            }
                            stringBuilder.deleteCharAt(stringBuilder.length()-1);
                            where += " and x.uuid in ( "+stringBuilder.toString()+" ) ";
                                                
                    }

     x.uuid in ( 'pt066','pt068' )

  • 相关阅读:
    oracle 日期和时间转换
    layui 分页 java后端封装
    excel 时间格式
    excel的编程VBA
    excel条件格式
    python列表变成字符串
    Django的ORM源码学习
    robot 源码解读6【元类和描述符类】
    @staticmethod
    python 类定义后调用名称也执行内部代码
  • 原文地址:https://www.cnblogs.com/xiaoniuniu886/p/9473094.html
Copyright © 2011-2022 走看看