List<MemberPrivilegeForm> formlist = new ArrayList<MemberPrivilegeForm>();
int status = 0;
List<MemberPrivilege> mplist = this.memberPrivilegeService.listObjectTwo(status, shop_id, startPage, endPageSize, orderby);
for(MemberPrivilege mp:mplist){
String name = "";
String levelLimit = mp.getLevel_limit();
int id = Integer.parseInt(levelLimit);
if(id==0){
name="全部会员";
}else{
MemberLevel level = this.memberLevelService.getObject(id);
if(level!=null){
name = level.getLevel_name();
}
}
int memberPrivilegeId= mp.getMember_privilege_id();
int shopId = mp.getShop_id();
String privilegeName = mp.getPrivilege_name();
String startTime = mp.getStart_time();
String endTime = mp.getEnd_time();
int privilegeType = mp.getPrivilege_type();
String privilegeValue = mp.getPrivilege_value();
String privilegeInfo = mp.getPrivilege_info();
int statuss = mp.getStatus();
MemberPrivilegeForm form = new MemberPrivilegeForm();
form.setMemberPrivilegeId(memberPrivilegeId);
form.setShopId(shopId);
form.setPrivilegeName(privilegeName);
form.setStartTime(startTime);
form.setEndTime(endTime);
form.setPrivilegeType(privilegeType);
form.setPrivilegeValue(privilegeValue);
form.setPrivilegeInfo(privilegeInfo);
form.setStatuss(statuss);
form.setName(name);
formlist.add(form);
}