Authored by 张帅

给钱包提供支付宝账号查询接口

package com.yohoufo.user.controller.passport;
import com.yoho.tools.common.beans.ApiResponse;
import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO;
import com.yohoufo.common.annotation.IgnoreSession;
import com.yohoufo.user.service.IRealNameAuthorizeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 用户身份通过银行卡实名认证
* Created by craig.qin on 2018/9/11.
*/
@RestController
@RequestMapping(value="/erp/user")
public class ERPRealNameAuthorizeController {
private static final Logger logger = LoggerFactory.getLogger(ERPRealNameAuthorizeController.class);
@Autowired
IRealNameAuthorizeService realNameAuthorizeService;
/***************************************************************************************
* 支付宝账号绑定 (给客户打款用)
**************************************************************************************/
/**
* 获取绑定的支付宝账号信息 给内部调用 忽略session
*/
@IgnoreSession
@RequestMapping(value="/aliPayAccountQuery")
public ApiResponse erpQueryAuthorizeInfo( @RequestParam("uid") Integer uid) {
logger.info("enter erpQueryAuthorizeInfo authorize info param uid is {}", uid);
try{
AuthorizeResultRespVO result = realNameAuthorizeService.queryAuthorizeInfo(uid);
logger.info("erpQueryAuthorizeInfo success! uid={},result={}", uid, result);
//返回结果
ApiResponse apiResponse = new ApiResponse();
apiResponse.setData(result);
return apiResponse;
}catch (Exception e){
logger.warn("erpQueryAuthorizeInfo error! uid={}, e :{}", uid, e);
ApiResponse apiResponse = new ApiResponse(201, "failed");
return apiResponse;
}
}
}
... ...