|
@@ -2,11 +2,8 @@ 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.constant.CommonConstant;
|
|
import com.java110.common.constant.CommonConstant;
|
|
|
-import com.java110.common.constant.MappingConstant;
|
|
|
|
|
import com.java110.common.constant.ServiceCodeConstant;
|
|
import com.java110.common.constant.ServiceCodeConstant;
|
|
|
-import com.java110.common.constant.UserLevelConstant;
|
|
|
|
|
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;
|
|
@@ -53,12 +50,11 @@ public class DisableStaffServiceListener extends AbstractServiceApiDataFlowList
|
|
|
Assert.jsonObjectHaveKey(paramIn,"userId","当前请求报文中未包含userId节点");
|
|
Assert.jsonObjectHaveKey(paramIn,"userId","当前请求报文中未包含userId节点");
|
|
|
|
|
|
|
|
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_SERVICE_CODE,ServiceCodeConstant.SERVICE_CODE_REMOVE_USER_INFO);
|
|
|
|
|
+ business.put(CommonConstant.HTTP_BUSINESS_SERVICE_NAME,"停用用户");
|
|
|
|
|
|
|
|
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();
|
|
|
- dataFlowContext.getRequestCurrentHeaders().put(CommonConstant.HTTP_USER_ID,"-1");
|
|
|
|
|
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();
|
|
|
|
|
|
|
@@ -76,13 +72,6 @@ public class DisableStaffServiceListener extends AbstractServiceApiDataFlowList
|
|
|
*/
|
|
*/
|
|
|
private JSONObject refreshParamIn(String paramIn){
|
|
private JSONObject refreshParamIn(String paramIn){
|
|
|
JSONObject paramObj = JSONObject.parseObject(paramIn);
|
|
JSONObject paramObj = JSONObject.parseObject(paramIn);
|
|
|
- paramObj.put("userId","-1");
|
|
|
|
|
- paramObj.put("levelCd", UserLevelConstant.USER_LEVEL_STAFF);
|
|
|
|
|
- //设置默认密码
|
|
|
|
|
- String staffDefaultPassword = MappingCache.getValue(MappingConstant.KEY_STAFF_DEFAULT_PASSWORD);
|
|
|
|
|
- Assert.isNull(staffDefaultPassword,"映射表中未设置员工默认密码,请检查"+MappingConstant.KEY_STAFF_DEFAULT_PASSWORD);
|
|
|
|
|
-
|
|
|
|
|
- paramObj.put("password",staffDefaultPassword);
|
|
|
|
|
return paramObj;
|
|
return paramObj;
|
|
|
}
|
|
}
|
|
|
@Override
|
|
@Override
|