Commit 432f8c4b by zhoujinghao

对外登录接口提交代码

1 parent f3dc596b
......@@ -36,12 +36,4 @@ public class UserFeignController {
ApiResponse userLogin = feignService.userLogin(object);
return userLogin;
}
@ApiOperation( value = "app手机号登陆接口",notes = "app手机号登陆接口")
@PostMapping("/phoneLogin")
@ResponseBody
public ApiResponse phoneLogin (@RequestBody JSONObject object){
ApiResponse phoneLogin = feignService.phoneLogin(object);
return phoneLogin;
}
}
......@@ -12,8 +12,6 @@ import org.nafmii.common.response.ApiResponse;
* @remark:
*/
public interface UserFeignService {
//对外提供手机号登陆接口
ApiResponse phoneLogin(JSONObject object);
//对外提供用户登陆接口
ApiResponse userLogin(JSONObject object);
......
......@@ -28,36 +28,21 @@ public class UserFeignServiceImpl implements UserFeignService {
private UserClient userClient;
/**
* 对外提供手机号登陆接口
* @param object
* @return
*/
@Override
public ApiResponse phoneLogin(JSONObject object) {
ApiResponse<UserFeignVO> apiResponse = new ApiResponse<>();
log.info("对外提供手机号登陆接口相关json参数========》{}",object.toJSONString());
LoginClientParam loginClientParam = BeanTransferUtils.transfer(object, LoginClientParam.class);
log.info("对外提供手机号登陆接口相关对象参数========》{}",loginClientParam);
if("002".equals(object.get("apiCode"))){
apiResponse = userClient.phoneLogin(loginClientParam);
}
return apiResponse;
}
/**
* 对外提供用户登陆接口
* @param object
* @return
*/
@Override
public ApiResponse userLogin(JSONObject object) {
ApiResponse<UserFeignVO> apiResponse = new ApiResponse<>();
log.info("对外提供登陆接口相关json参数========》{}",object.toJSONString());
LoginClientParam loginClientParam = BeanTransferUtils.transfer(object, LoginClientParam.class);
log.info("对外提供登陆接口相关对象参数========》{}",loginClientParam);
if("001".equals(object.get("apiCode"))){
apiResponse = userClient.userLogin(loginClientParam);
if("ul-0001".equals(object.get("apiCode"))){
return new ApiResponse(userClient.userLogin(loginClientParam));
}
if("ul-0002".equals(object.get("apiCode"))){
return new ApiResponse(userClient.phoneLogin(loginClientParam));
}
return apiResponse;
return new ApiResponse();
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!