示例#1
0
 public Customer getCustomer(String customerTel) {
   Map<String, Object> infos = subaruDao.getCustomerByTel(customerTel);
   if (!infos.isEmpty()) {
     String introducerTypeId = infos.get("introducerTypeId").toString();
     Customer customer =
         new Customer(
             Integer.valueOf(infos.get("customerId").toString()),
             infos.get("name").toString(),
             infos.get("customerTel").toString(),
             infos.get("occupation").toString(),
             infos.get("identityCard").toString(),
             infos.get("birthday").toString(),
             infos.get("email").toString(),
             infos.get("note").toString(),
             StringUtils.hasText(introducerTypeId) ? Integer.parseInt(introducerTypeId) : 0,
             infos.get("introducer").toString(),
             0);
     return customer;
   }
   return null;
 }