Authored by liangyi.chen@yoho.cn

钱包设置密码

package com.yohoufo.user.controller.wallet;
import com.yoho.core.rest.client.ServiceCaller;
import com.yoho.service.model.uic.request.UserSmsSendReqBO;
import com.yoho.service.model.wallet.request.WalletPasswordBO;
import com.yoho.tools.common.beans.ApiResponse;
import com.yohoufo.common.interceptor.RemoteIPInterceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
public class WalletPasswordController {
private Logger logger = LoggerFactory.getLogger(WalletPasswordController.class);
@Resource
private ServiceCaller serviceCaller;
@RequestMapping(params = "method=ufo.wallet.changeWalletpwd")
@ResponseBody
public ApiResponse changeWalletpwd(WalletPasswordBO passwordBO){
logger.info("WalletPasswordRest.changeWalletpwd uid is {},new password is {}",passwordBO.getUid(),passwordBO.getNewPwd());
return serviceCaller.call("wallet.changeWalletpwd", passwordBO, ApiResponse.class);
}
@RequestMapping(params = "method=ufo.wallet.preChangeWalletpwd")
@ResponseBody
public ApiResponse preChangeWalletpwd(WalletPasswordBO passwordBO){
logger.info("WalletPasswordRest.preChangeWalletpwd uid is {},verifyCode is {},scene is {}",passwordBO.getUid(),
passwordBO.getVerifyCode(),passwordBO.getScene());
return serviceCaller.call("wallet.preChangeWalletpwd", passwordBO, ApiResponse.class);
}
/**
* 设置钱包密码时发送验证码短信
* @param
*/
@RequestMapping(params = "method=ufo.wallet.walletSmsVerifyCode")
@ResponseBody
public ApiResponse walletSmsVerifyCode(UserSmsSendReqBO reqBO) {
logger.info("Enter .walletSmsVerifyCode, area is {}, uid is {},clientType is {},scene is {}", reqBO.getArea(),
reqBO.getUid(), reqBO.getClient_type(),reqBO.getScene());
String ip = RemoteIPInterceptor.getRemoteIP();
reqBO.setIp(ip);
return serviceCaller.call("wallet.walletSmsVerifyCode", reqBO, ApiResponse.class);
}
}
... ...