• where的使用


    public Record getAutoAssignOffline(String processName, String bizUuid, String activityName) throws ActiveRecordException {
            //查询是否是首次
            String  statusSql="SELECT receive_no FROM biz_factoring_reception WHERE uuid = ?";
            //获取是否是首次的状态
            String  receiveNo=Db.findFirst(statusSql,bizUuid).getStr("receiveNo");
             String   where="";
            if ("1".equals(receiveNo)) {
                where +=" and  c.first_reception_flag =1" ;
                
            }else if ( !"1".equals(receiveNo)  ) {
                where +=" and  c.first_reception_flag = 0 " ;
            }
            // 查询自动分配状态的SQL
            String sql = String.format(
                    " SELECT " +
                    "    c.task_name , " +
                    "    c.auto_assign , " +
                    "    c.uuid " +
                    " FROM " +
                    "    biz_pay_comfirm_info a, " +
                    "    biz_document_task_info c ," +
                    "   biz_factoring_reception b  "+
                    " WHERE " +
                    "    a.core_enterprise_id = c.core_enterprise_id " +
                    " and a.financial_institutions_id = c.financial_institutions_id " +
                    " and a.signing_body_id = c.signing_body_id " +
                    " and b.biz_id =a.uuid  " + 
                    " and b.uuid = ? " +
                    " and c.process_name = ? " +
                    " and a.sys_status =1    " +
                    " and b.sys_status =1    " +
                    " and c.sys_status =1    " +
                    " and c.activity_name = ?  "
                    + " %s  " ,where);
            Record record=Db.findFirst(sql, bizUuid, processName, activityName );
            return record;
        }
  • 相关阅读:
    CentOS之文件搜索命令locate
    CentOs之链接命令
    CentOs之常见目录作用介绍
    centOs之目录处理命令
    Query注解及方法限制
    Repository接口
    OkHttp和Volley对比
    Base64加密与MD5的区别?
    支付宝集成
    Android 中 非对称(RSA)加密和对称(AES)加密
  • 原文地址:https://www.cnblogs.com/xiaoniuniu886/p/9679290.html
Copyright © 2020-2023  润新知