Commit f9ce7555 by 袁伟铭

添加获取用户信息的接口

parent 00ab32e6
......@@ -11,6 +11,13 @@ import com.zq.api.form.ApiResp;
public interface IApiLogic extends IApiCommon {
/**
* 获取用户信息
*
* @return
*/
ApiResp getUserInfo(ApiForm form);
/**
* 发送验证码
*
* @param form
......
......@@ -6,6 +6,8 @@ import com.zq.api.form.ApiForm;
import com.zq.api.form.ApiResp;
import com.zq.api.service.IApiLogic;
import com.zq.api.utils.ApiUtils;
import com.zq.common.config.security.ApiTokenUtils;
import com.zq.common.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -18,6 +20,11 @@ public class ApiV100Logic extends BaseApiLogic implements IApiLogic {
private PortalFeign portalFeign;
@Override
public ApiResp getUserInfo(ApiForm form) {
return ApiUtils.toApiResp(form, ResultVo.success(ApiTokenUtils.getAppTokenVo(form.getToken())));
}
@Override
public ApiResp sendCode(ApiForm form) {
return ApiUtils.toApiResp(form, userFeign.sendCode(form.get("phone")));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment