| | 156 | * createNativeQuery sql中参数对应的类型和传入的类型必须一致: |
| | 157 | {{{ |
| | 158 | String stmt = "select a.* from v_ent_product a, ent_company b " + " where a.user_id=b.id " + " and a.product_id=?1" |
| | 159 | + " and a.sell_status=" + CompanyProduct.SELLER_STATUS_UP + " and a.status<=" |
| | 160 | + CompanyProduct.CONTENT_STATUS_NORMAL + " and b.status>=" + Company.STATUS_NO_AUDIT + " and b.vip_rank>=" |
| | 161 | + Company.VIP_RANK_FREE + " and b.id IN(" + inStr.toString() + ") "; |
| | 162 | ... |
| | 163 | query.setParameter( i + 2, Integer.parseInt(companyIds[i]) );//Oracle 版本的这里不需要转换 |
| | 164 | }}} |
| | 165 | |