Ejemplo n.º 1
0
 public User getUser() {
   if (user == null) {
     UserService userService = (UserService) HkUtil.getBean("userService");
     user = userService.getUser(userId);
   }
   return user;
 }
Ejemplo n.º 2
0
 public void setIp(String ip) {
   this.ip = ip;
   if (ip != null) {
     IpCityService ipCityService = (IpCityService) HkUtil.getBean("ipCityService");
     IpCityRange range = ipCityService.getIpCityRange(ip);
     if (range != null) {
       rangeId = range.getRangeId();
       cityId = range.getCityId();
     }
   }
 }