|
@@ -3,10 +3,7 @@ package com.java110.api.listener.users;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.java110.api.listener.AbstractServiceApiDataFlowListener;
|
|
import com.java110.api.listener.AbstractServiceApiDataFlowListener;
|
|
|
import com.java110.common.cache.MappingCache;
|
|
import com.java110.common.cache.MappingCache;
|
|
|
-import com.java110.common.constant.CommonConstant;
|
|
|
|
|
-import com.java110.common.constant.MappingConstant;
|
|
|
|
|
-import com.java110.common.constant.ServiceCodeConstant;
|
|
|
|
|
-import com.java110.common.constant.UserLevelConstant;
|
|
|
|
|
|
|
+import com.java110.common.constant.*;
|
|
|
import com.java110.common.util.Assert;
|
|
import com.java110.common.util.Assert;
|
|
|
import com.java110.core.annotation.Java110Listener;
|
|
import com.java110.core.annotation.Java110Listener;
|
|
|
import com.java110.core.context.DataFlowContext;
|
|
import com.java110.core.context.DataFlowContext;
|
|
@@ -67,8 +64,9 @@ public class AddStaffServiceListener extends AbstractServiceApiDataFlowListener{
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
|
|
JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
|
|
|
- business.put(CommonConstant.HTTP_BUSINESS_SERVICE_CODE,ServiceCodeConstant.SERVICE_CODE_SAVE_USER_INFO);
|
|
|
|
|
- business.put(CommonConstant.HTTP_BUSINESS_SERVICE_NAME,"用户注册");
|
|
|
|
|
|
|
+ business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_USER_INFO);
|
|
|
|
|
+ business.put(CommonConstant.HTTP_SEQ,1);
|
|
|
|
|
+ business.put(CommonConstant.HTTP_INVOKE_MODEL,CommonConstant.HTTP_INVOKE_MODEL_S);
|
|
|
|
|
|
|
|
business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessUser",refreshParamIn(paramIn));
|
|
business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessUser",refreshParamIn(paramIn));
|
|
|
HttpHeaders header = new HttpHeaders();
|
|
HttpHeaders header = new HttpHeaders();
|
|
@@ -76,6 +74,9 @@ public class AddStaffServiceListener extends AbstractServiceApiDataFlowListener{
|
|
|
dataFlowContext.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD,"D");
|
|
dataFlowContext.getRequestCurrentHeaders().put(CommonConstant.HTTP_ORDER_TYPE_CD,"D");
|
|
|
String paramInObj = super.restToCenterProtocol(business,dataFlowContext.getRequestCurrentHeaders()).toJSONString();
|
|
String paramInObj = super.restToCenterProtocol(business,dataFlowContext.getRequestCurrentHeaders()).toJSONString();
|
|
|
|
|
|
|
|
|
|
+ //将 rest header 信息传递到下层服务中去
|
|
|
|
|
+ super.freshHttpHeader(header,dataFlowContext.getRequestCurrentHeaders());
|
|
|
|
|
+
|
|
|
HttpEntity<String> httpEntity = new HttpEntity<String>(paramInObj, header);
|
|
HttpEntity<String> httpEntity = new HttpEntity<String>(paramInObj, header);
|
|
|
//http://user-service/test/sayHello
|
|
//http://user-service/test/sayHello
|
|
|
super.doRequest(dataFlowContext, service, httpEntity);
|
|
super.doRequest(dataFlowContext, service, httpEntity);
|