机器人可以根据用户命或电话号码查询用户信息

This commit is contained in:
heavyrain.lee
2020-02-27 16:18:02 +08:00
parent 0d03ef5758
commit 1bd060936c
@@ -21,4 +21,16 @@ public class RobotService {
InputGetUserInfo getUserInfo = new InputGetUserInfo(userId, null, null);
return RobotHttpUtils.httpJsonPost(path, getUserInfo, InputOutputUserInfo.class);
}
public static IMResult<InputOutputUserInfo> getUserInfoByMobile(String phone) throws Exception {
String path = APIPath.Robot_User_Info;
InputGetUserInfo getUserInfo = new InputGetUserInfo(null, null, phone);
return RobotHttpUtils.httpJsonPost(path, getUserInfo, InputOutputUserInfo.class);
}
public static IMResult<InputOutputUserInfo> getUserInfoByName(String userName) throws Exception {
String path = APIPath.Robot_User_Info;
InputGetUserInfo getUserInfo = new InputGetUserInfo(null, userName, null);
return RobotHttpUtils.httpJsonPost(path, getUserInfo, InputOutputUserInfo.class);
}
}