}
@Override
public Customer findById(long id)
{
Customer c = customerMapper.selectByPrimaryKey(id);
// 可用状态
c.setIsEnabledStr(customerEnabledHtml.get(c.getIsEnabled().toString()));
// 顾客类型
c.setCustomerTypeStr(customerTypeHtml.get(c.getCustomerType().toString()));
// 注册时间
c.setRegisterTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(c.getRegisterTime()));
// 最后登录时间
c.setLastLoginTimeStr(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(c.getLastLoginTime()));
// 所属社区
c.setCommunityName(communityMapper.selectByPrimaryKey(c.getCommunityId()).getName());
// 所属学校
c.setSchoolName(schoolMapper.selectByPrimaryKey(c.getSchoolId()).getName());
return c;
}