📄 merchantassociatorinfodao.java
字号:
/*
* 作者:
* 时间:2007年11月28日
* 功能:会员信息管理 ->本店会员信息查询
* 查看本店会员信息
*/
package com.mole.struts.dao;
import java.util.ArrayList;
import java.util.Iterator;
import com.mole.struts.bean.MerchantAssociatorInfoBean;
public class MerchantAssociatorInfoDAO extends AbstractPageDAO {
public MerchantAssociatorInfoDAO() {
}
public MerchantAssociatorInfoDAO(String column, String where, String id,
String group, String order, int pageSize) {
this.setColumnCondition(column);
this.setWhereCondition(where);
this.setIdCondition(id);
this.setGroupCondition(group);
this.setOrderCondition(order);
this.setPageSize(pageSize);
}
public void setWhere(String table, String storeId, String cardId,
String LoginName) {
String where = table + "WHERE StoreID=" + storeId;
if (LoginName != null && !LoginName.equals("")) {
where = where + " AND loginName LIKE '%" + LoginName + "%' ";
}
if (cardId != null && !cardId.equals("")) {
where = where + " AND cardId LIKE '%" + cardId + "%' ";
}
this.setWhereCondition(where);
}
// 获取本店会员的信息记录集
public MerchantAssociatorInfoBean[] getAllAssociatorInfo() {
ArrayList<Object[]> arrayList = this.executeQuery(getSql());
if (arrayList == null)
return null;
MerchantAssociatorInfoBean[] records = new MerchantAssociatorInfoBean[arrayList
.size()];
Iterator<Object[]> it = arrayList.iterator();
int i = 0;
while (it.hasNext()) {
Object[] obj = it.next();
MerchantAssociatorInfoBean record = new MerchantAssociatorInfoBean();
record.setLoginName(obj[0].toString());
record.setName(obj[1].toString());
record.setCardId(obj[2].toString());
record.setJoinDate(obj[3].toString().substring(0, 10));
record.setCustomerState(obj[4].toString());
record.setCardState(obj[5].toString());
record.setScore(obj[6].toString());
record.setCustomerId(obj[7].toString());
records[i++] = record;
}
return records;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -