public User getUser() {
   if (user == null) {
     UserService userService = (UserService) HkUtil.getBean("userService");
     user = userService.getUser(userId);
   }
   return user;
 }
Exemple #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();
     }
   }
 }