| | |
| | | import com.smartor.service.DingTalkService; |
| | | import com.taobao.api.ApiException; |
| | | import lombok.extern.log4j.Log4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | OapiV2UserGetbymobileResponse rsp = client.execute(req, accessToken); |
| | | String resultBody = rsp.getBody(); |
| | | JSONObject json = JSONObject.parseObject(resultBody); |
| | | if("0".equals(json.get("errcode"))){ |
| | | if(ObjectUtils.isNotEmpty(json.getJSONObject("result")) |
| | | && ObjectUtils.isNotEmpty(json.getJSONObject("result").getString("userid"))){ |
| | | userId = json.getJSONObject("result").getString("userid"); |
| | | } |
| | | return userId; |