java110 лет назад: 4
Родитель
Сommit
6807a044b4

+ 2 - 5
service-front/src/main/java/com/java110/front/smo/api/impl/ApiSMOImpl.java

@@ -12,11 +12,7 @@ import com.java110.utils.util.StringUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
+import org.springframework.http.*;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.HttpStatusCodeException;
 import org.springframework.web.client.RestTemplate;
@@ -85,6 +81,7 @@ public class ApiSMOImpl extends BaseComponentSMO implements IApiSMO {
 
         ComponentValidateResult result = this.validateStoreStaffCommunityRelationship(pd, restTemplate);
         if (!StringUtil.isEmpty(result.getUserId())) {
+            header.remove("user-id");
             header.add("user-id", result.getUserId());
             if (!StringUtil.isEmpty(result.getUserName())) {
                 header.add("user-name", URLEncoder.encode(result.getUserName(), "UTF-8"));