Authored by 张帅

暴露钱包模块接口

... ... @@ -6,7 +6,7 @@
<parent>
<groupId>com.yoho</groupId>
<artifactId>parent</artifactId>
<version>1.6.4-SNAPSHOT</version>
<version>1.6.5-SNAPSHOT</version>
</parent>
<groupId>com.yohoufo.fore</groupId>
... ...
... ... @@ -19,6 +19,7 @@
<artifactId>reviewed-service-model</artifactId>
</dependency>
<dependency>
<groupId>com.yohoufo.fore</groupId>
<artifactId>yohoufo-fore-dal</artifactId>
... ... @@ -150,5 +151,11 @@
<artifactId>xom</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>com.yoho.service.model</groupId>
<artifactId>wallet-service-model</artifactId>
<version>1.6.5-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
... ...
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.WalletChangeBO;
import com.yoho.tools.common.beans.ApiResponse;
import com.yohoufo.common.interceptor.RemoteIPInterceptor;
import com.yohoufo.user.requestVO.UserSmsSendReqVO;
import com.yohoufo.user.requestVO.WalletChangeVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/WalletChangeRest")
public class WalletChangeController {
private Logger logger = LoggerFactory.getLogger(WalletChangeController.class);
@Autowired
private ServiceCaller serviceCaller;
/**
* 钱包提现
* @param
* @return
*/
@RequestMapping("method = ufo.wallet.assertWithdraw")
public ApiResponse assetWithdraw( WalletChangeVO walletChangeVO){
logger.info("enter ufo.wallet.assertWithdraw with param {}", walletChangeVO);
WalletChangeBO reqBO = new WalletChangeBO();
BeanUtils.copyProperties(walletChangeVO, reqBO);
return serviceCaller.call("wallet.assetWithdraw", reqBO, ApiResponse.class);
}
/**
* 钱包提现 (给平台端使用)
* @param
* @return
*/
@RequestMapping("/assetWithdrawForPlat")
public ApiResponse assetWithdrawForPlat(WalletChangeVO walletChangeVO){
logger.info("enter assetWithdrawForPlat with param {}", walletChangeVO);
WalletChangeBO reqBO = new WalletChangeBO();
BeanUtils.copyProperties(walletChangeVO, reqBO);
return serviceCaller.call("wallet.assetWithdrawForPlat", reqBO, ApiResponse.class);
}
/**
* 异常流水处理 (给平台端使用)
* @param
* @return
*/
@RequestMapping("/handleExceptionForPlat")
public ApiResponse handleExceptionForPlat(WalletChangeVO walletChangeVO){
logger.info("enter handleExceptionForPlat with param {}", walletChangeVO);
WalletChangeBO reqBO = new WalletChangeBO();
BeanUtils.copyProperties(walletChangeVO, reqBO);
return serviceCaller.call("wallet.assetWithdrawForPlat", reqBO, ApiResponse.class);
}
/**
* 提现时发送验证码短信
* @param
*/
@RequestMapping("/sendWithdrawCodeToMobile")
@ResponseBody
public ApiResponse sendWithdrawCodeToMobile(UserSmsSendReqVO reqVO) {
logger.info("Enter .sendWithdrawCodeToMobile, area is {}, mobile is {}, business_line is {}, clientType is {}", reqVO.getArea(),
reqVO.getMobile(), reqVO.getBusiness_line(), reqVO.getClient_type());
String ip = RemoteIPInterceptor.getRemoteIP();
UserSmsSendReqBO userSmsSendReqBO = new UserSmsSendReqBO();
BeanUtils.copyProperties(reqVO, userSmsSendReqBO);
userSmsSendReqBO.setIp(ip);
return serviceCaller.call("wallet.sendWithdrawCodeToMobile", userSmsSendReqBO, ApiResponse.class);
}
}
... ...
package com.yohoufo.user.requestVO;
import com.yoho.service.model.uic.BaseBO;
import java.util.List;
/**
*/
public class UserSmsSendReqVO extends BaseBO {
private String area;
private String mobile;
private String code;
private String uid;
private String fromPage;
private List<Integer> degrees;
private String app_version;
private String udid;
private String client_type;
private String app_type;
private String business_line;
private String ip;
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public String getFromPage() {
return fromPage;
}
public void setFromPage(String fromPage) {
this.fromPage = fromPage;
}
public List<Integer> getDegrees() {
return degrees;
}
public void setDegrees(List<Integer> degrees) {
this.degrees = degrees;
}
public String getApp_version() {
return app_version;
}
public void setApp_version(String app_version) {
this.app_version = app_version;
}
public String getUdid() {
return udid;
}
public void setUdid(String udid) {
this.udid = udid;
}
public String getClient_type() {
return client_type;
}
public void setClient_type(String client_type) {
this.client_type = client_type;
}
public String getApp_type() {
return app_type;
}
public void setApp_type(String app_type) {
this.app_type = app_type;
}
public String getBusiness_line() {
return business_line;
}
public void setBusiness_line(String business_line) {
this.business_line = business_line;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
}
... ...
package com.yohoufo.user.requestVO;
import lombok.Data;
import lombok.ToString;
import java.math.BigDecimal;
@Data
@ToString
public class WalletChangeVO {
//uid
private Integer uid;
//金额
private BigDecimal amount;
//业务来源
private Integer source;
//订单号
private Long orderCode;
//交易场景类型
private Integer tradeType;
private String ip;
private String udid;
private String verifyCode;
private String area;
private String mobile;
private String tradeNo;
//手工打款操作员id
private Integer dealUid;
//手工打款操作员名字
private String dealUserName;
}
\ No newline at end of file
... ...