|  | @@ -1,11 +1,11 @@
 | 
											
												
													
														|  |  package com.yami.shop.platform.controller.hb;
 |  |  package com.yami.shop.platform.controller.hb;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  import com.alibaba.fastjson.JSONObject;
 |  |  import com.alibaba.fastjson.JSONObject;
 | 
											
												
													
														|  | 
 |  | +import com.yami.shop.bean.model.hb.StoreManagement;
 | 
											
												
													
														|  | 
 |  | +import com.yami.shop.common.util.hb.HBR;
 | 
											
												
													
														|  | 
 |  | +import com.yami.shop.service.hb.IStoreManagementService;
 | 
											
												
													
														|  |  import lombok.AllArgsConstructor;
 |  |  import lombok.AllArgsConstructor;
 | 
											
												
													
														|  |  import lombok.extern.slf4j.Slf4j;
 |  |  import lombok.extern.slf4j.Slf4j;
 | 
											
												
													
														|  | -import org.gather.zswl.core.entity.StoreManagement;
 |  | 
 | 
											
												
													
														|  | -import org.gather.zswl.platform.service.IStoreManagementService;
 |  | 
 | 
											
												
													
														|  | -import org.gather.zswl.platform.utils.HBR;
 |  | 
 | 
											
												
													
														|  |  import org.springframework.web.bind.annotation.*;
 |  |  import org.springframework.web.bind.annotation.*;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  import javax.servlet.http.HttpServletRequest;
 |  |  import javax.servlet.http.HttpServletRequest;
 | 
											
										
											
												
													
														|  | @@ -114,35 +114,5 @@ public class StoreManagementController {
 | 
											
												
													
														|  |          return storeManagementService.disableStore(storeId);
 |  |          return storeManagementService.disableStore(storeId);
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    /**
 |  | 
 | 
											
												
													
														|  | -     * 获取客户端真实IP地址
 |  | 
 | 
											
												
													
														|  | -     *
 |  | 
 | 
											
												
													
														|  | -     * @param request HTTP请求对象
 |  | 
 | 
											
												
													
														|  | -     * @return 客户端IP地址
 |  | 
 | 
											
												
													
														|  | -     */
 |  | 
 | 
											
												
													
														|  | -    private String getClientIp(HttpServletRequest request) {
 |  | 
 | 
											
												
													
														|  | -        String ip = request.getHeader("X-Forwarded-For");
 |  | 
 | 
											
												
													
														|  | -        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
 |  | 
 | 
											
												
													
														|  | -            ip = request.getHeader("Proxy-Client-IP");
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
 |  | 
 | 
											
												
													
														|  | -            ip = request.getHeader("WL-Proxy-Client-IP");
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
 |  | 
 | 
											
												
													
														|  | -            ip = request.getHeader("HTTP_CLIENT_IP");
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
 |  | 
 | 
											
												
													
														|  | -            ip = request.getHeader("HTTP_X_FORWARDED_FOR");
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
 |  | 
 | 
											
												
													
														|  | -            ip = request.getRemoteAddr();
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        // 如果是多个IP,取第一个
 |  | 
 | 
											
												
													
														|  | -        if (ip != null && ip.contains(",")) {
 |  | 
 | 
											
												
													
														|  | -            ip = ip.split(",")[0].trim();
 |  | 
 | 
											
												
													
														|  | -        }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -        return ip;
 |  | 
 | 
											
												
													
														|  | -    }
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  }
 |  |  }
 |