StringBuffer buf = new StringBuffer();
buf
.append("select obj from StoreOrder obj Where 1=1");
if (obj.getAuditId()!= null) {
buf.append(" and obj.auditId = ? ");
}
if (obj.getDeleteFlag() != null) {
buf.append(" and obj.deleteFlag = ? ");
}
if (obj.getOrderId() != null) {
buf.append(" and obj.orderId = ? ");
}
if (obj.getPayType() != null) {
buf.append(" and obj.payType = ? ");
}
if (obj.getState() != null) {
buf.append(" and obj.state = ? ");
}
if (obj.getUserId() != null) {
buf.append(" and obj.userId = ? ");
}
if (obj.getPayer() != null) {
buf.append(" and obj.payer like lower(?) ");
}
buf.append(" order by obj.orderId desc ");
posted on 2008-08-31 08:16
長春語林科技 閱讀(164)
評論(0) 編輯 收藏 所屬分類:
java