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
长春语林科技 阅读(161)
评论(0) 编辑 收藏 所属分类:
java