use of cn.exrick.manager.pojo.TbMemberExample in project xmall by Exrick.
the class MemberServiceImpl method getMemberCount.
@Override
public DataTablesResult getMemberCount() {
DataTablesResult result = new DataTablesResult();
TbMemberExample example = new TbMemberExample();
TbMemberExample.Criteria criteria = example.createCriteria();
criteria.andStateNotEqualTo(2);
try {
result.setRecordsTotal((int) tbMemberMapper.countByExample(example));
} catch (Exception e) {
throw new XmallException("统计会员数失败");
}
return result;
}
use of cn.exrick.manager.pojo.TbMemberExample in project xmall by Exrick.
the class MemberServiceImpl method getMemberByEmail.
@Override
public TbMember getMemberByEmail(String email) {
List<TbMember> list;
TbMemberExample example = new TbMemberExample();
TbMemberExample.Criteria criteria = example.createCriteria();
criteria.andEmailEqualTo(email);
try {
list = tbMemberMapper.selectByExample(example);
} catch (Exception e) {
throw new XmallException("Email获取会员信息失败");
}
if (!list.isEmpty()) {
list.get(0).setPassword("");
return list.get(0);
}
return null;
}
Aggregations