| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.properties.WechatAuthProperties; |
| | | import com.java110.api.smo.IApiServiceSMO; |
| | | import com.java110.api.smo.IGetCommunityStoreInfoSMO; |
| | | import com.java110.core.component.AbstractComponentSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.core.factory.AuthenticationFactory; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.app.AppDto; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.privilege.BasePrivilegeDto; |
| | | import com.java110.dto.store.StoreDto; |
| | | import com.java110.dto.user.UserDto; |
| | |
| | | import com.java110.utils.util.*; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | headers.put(CommonConstant.USER_ID, StringUtil.isEmpty(pd.getUserId()) ? "-1" : pd.getUserId()); |
| | | |
| | | if (!headers.containsKey(CommonConstant.HTTP_APP_ID)) { |
| | | headers.put(CommonConstant.HTTP_APP_ID, AppDto.WEB_APP_ID); |
| | | headers.put(CommonConstant.HTTP_APP_ID, pd.getAppId()); |
| | | } |
| | | if (!headers.containsKey(CommonConstant.APP_ID)) { |
| | | headers.put(CommonConstant.APP_ID, AppDto.WEB_APP_ID); |
| | | headers.put(CommonConstant.APP_ID, pd.getAppId()); |
| | | } |
| | | |
| | | if (!headers.containsKey(CommonConstant.HTTP_TRANSACTION_ID)) { |
| | |
| | | if (HttpMethod.GET == httpMethod) { |
| | | initUrlParam(JSONObject.parseObject(param), headers); |
| | | headers.put("REQUEST_URL", "http://127.0.0.1:8008/" + url + mapToUrlParam(JSONObject.parseObject(param))); |
| | | } else { |
| | | headers.put("REQUEST_URL", "http://127.0.0.1:8008/" + url); |
| | | } |
| | | AuthenticationFactory.createSign(headers,httpMethod,headers.get("REQUEST_URL"),param); |
| | | AuthenticationFactory.createSign(headers, httpMethod, headers.get("REQUEST_URL"), param); |
| | | |
| | | try { |
| | | responseEntity = apiServiceSMOImpl.service(param, headers); |
| | |
| | | } |
| | | if (HttpMethod.GET == httpMethod) { |
| | | headers.put("REQUEST_URL", "http://127.0.0.1:8008/" + url + mapToUrlParam(JSONObject.parseObject(param))); |
| | | }else { |
| | | headers.put("REQUEST_URL", "http://127.0.0.1:8008/" + url); |
| | | } |
| | | AuthenticationFactory.createSign(headers,httpMethod,headers.get("REQUEST_URL"),param); |
| | | AuthenticationFactory.createSign(headers, httpMethod, headers.get("REQUEST_URL"), param); |
| | | |
| | | try { |
| | | responseEntity = apiServiceSMOImpl.service(param, headers); |