| | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | // 过滤返回报文中的字段,只返回name字段 |
| | | //{"address":"","orderTypeCd":"Q","serviceCode":"","responseTime":"20190401194712","sex":"","localtionCd":"","userId":"302019033054910001","levelCd":"00","transactionId":"-1","dataFlowId":"-1","response":{"code":"0000","message":"成功"},"name":"996icu","tel":"18909780341","bId":"-1","businessType":"","email":""} |
| | | |
| | | return responseEntity; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取用户信息 |
| | | * |
| | | * @param pd |
| | | * @param restTemplate |
| | | * @return |
| | | */ |
| | | protected ResponseEntity<String> getUserAndAttr(IPageData pd, RestTemplate restTemplate, Map paramIn) { |
| | | //Assert.hasLength(pd.getUserId(), "用户未登录请先登录"); |
| | | ResponseEntity<String> responseEntity = null; |
| | | if(paramIn !=null){ |
| | | paramIn.put("page","1"); |
| | | paramIn.put("row","1"); |
| | | } |
| | | responseEntity = this.callCenterService(restTemplate, pd, "", |
| | | ServiceConstant.SERVICE_API_URL + "/api/user.listUsers" +mapToUrlParam(paramIn), HttpMethod.GET); |
| | | // 过滤返回报文中的字段,只返回name字段 |
| | | //{"address":"","orderTypeCd":"Q","serviceCode":"","responseTime":"20190401194712","sex":"","localtionCd":"","userId":"302019033054910001","levelCd":"00","transactionId":"-1","dataFlowId":"-1","response":{"code":"0000","message":"成功"},"name":"996icu","tel":"18909780341","bId":"-1","businessType":"","email":""} |
| | | return responseEntity; |
| | | |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * map 参数转 url get 参数 非空值转为get参数 空值忽略 |
| | | * |
| | | * @param info map数据 |
| | | * @return url get 参数 带? |
| | | */ |
| | | protected String mapToUrlParam(Map info) { |
| | | String urlParam = ""; |
| | | if (info == null || info.isEmpty()) { |
| | | return urlParam; |
| | | } |
| | | |
| | | urlParam += "?"; |
| | | |
| | | for (Object key : info.keySet()) { |
| | | if (StringUtils.isEmpty(info.get(key) + "")) { |
| | | continue; |
| | | } |
| | | |
| | | urlParam += (key + "=" + info.get(key) + "&"); |
| | | } |
| | | |
| | | urlParam = urlParam.endsWith("&") ? urlParam.substring(0, urlParam.length() - 1) : urlParam; |
| | | |
| | | return urlParam; |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | JSONObject paramIn = JSONObject.parseObject(pd.getReqData()); |
| | | |
| | | String communityId = ""; |
| | | if (paramIn.containsKey("communityId")) { |
| | | if (paramIn.containsKey("communityId")&& !StringUtil.isEmpty(paramIn.getString("communityId"))) { |
| | | communityId = paramIn.getString("communityId"); |
| | | checkStoreEnterCommunity(pd, storeId, storeTypeCd, communityId, restTemplate); |
| | | } |