Authored by liangyi.chen@yoho.cn

钱包设置密码

  1 +package com.yohoufo.user.controller.wallet;
  2 +
  3 +import com.yoho.core.rest.client.ServiceCaller;
  4 +import com.yoho.service.model.uic.request.UserSmsSendReqBO;
  5 +import com.yoho.service.model.wallet.request.WalletPasswordBO;
  6 +import com.yoho.tools.common.beans.ApiResponse;
  7 +import com.yohoufo.common.interceptor.RemoteIPInterceptor;
  8 +import org.slf4j.Logger;
  9 +import org.slf4j.LoggerFactory;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.ResponseBody;
  12 +import org.springframework.web.bind.annotation.RestController;
  13 +
  14 +import javax.annotation.Resource;
  15 +
  16 +
  17 +@RestController
  18 +public class WalletPasswordController {
  19 +
  20 + private Logger logger = LoggerFactory.getLogger(WalletPasswordController.class);
  21 +
  22 + @Resource
  23 + private ServiceCaller serviceCaller;
  24 +
  25 + @RequestMapping(params = "method=ufo.wallet.changeWalletpwd")
  26 + @ResponseBody
  27 + public ApiResponse changeWalletpwd(WalletPasswordBO passwordBO){
  28 + logger.info("WalletPasswordRest.changeWalletpwd uid is {},new password is {}",passwordBO.getUid(),passwordBO.getNewPwd());
  29 + return serviceCaller.call("wallet.changeWalletpwd", passwordBO, ApiResponse.class);
  30 + }
  31 +
  32 + @RequestMapping(params = "method=ufo.wallet.preChangeWalletpwd")
  33 + @ResponseBody
  34 + public ApiResponse preChangeWalletpwd(WalletPasswordBO passwordBO){
  35 + logger.info("WalletPasswordRest.preChangeWalletpwd uid is {},verifyCode is {},scene is {}",passwordBO.getUid(),
  36 + passwordBO.getVerifyCode(),passwordBO.getScene());
  37 + return serviceCaller.call("wallet.preChangeWalletpwd", passwordBO, ApiResponse.class);
  38 + }
  39 +
  40 + /**
  41 + * 设置钱包密码时发送验证码短信
  42 + * @param
  43 + */
  44 + @RequestMapping(params = "method=ufo.wallet.walletSmsVerifyCode")
  45 + @ResponseBody
  46 + public ApiResponse walletSmsVerifyCode(UserSmsSendReqBO reqBO) {
  47 + logger.info("Enter .walletSmsVerifyCode, area is {}, uid is {},clientType is {},scene is {}", reqBO.getArea(),
  48 + reqBO.getUid(), reqBO.getClient_type(),reqBO.getScene());
  49 + String ip = RemoteIPInterceptor.getRemoteIP();
  50 + reqBO.setIp(ip);
  51 + return serviceCaller.call("wallet.walletSmsVerifyCode", reqBO, ApiResponse.class);
  52 + }
  53 +
  54 +}