|
@@ -80,11 +80,10 @@ public class WithdrawRecordApiController {
|
|
|
|
|
|
@Resource
|
|
|
private OperatingConfigDubboServiceClient operatingConfigDubboServiceClient;
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
@Resource
|
|
|
private NoticeDubboServiceClient noticeDubboServiceClient;
|
|
|
-
|
|
|
@PostMapping("/add")
|
|
|
@ApiOperation(value = "新增提现订单", httpMethod = "POST")
|
|
|
public Result add(@RequestBody WithdrawParam param, @RequestHeader(value = X_CLIENT_TOKEN, required = false) String token) {
|
|
@@ -103,9 +102,6 @@ public class WithdrawRecordApiController {
|
|
|
Claims claims = result.getRight();
|
|
|
Long userId = Long.valueOf(claims.get("userId").toString());
|
|
|
User user = userService.findById(userId);
|
|
|
- if (user.getHasWithdraw() != 1) {
|
|
|
- return ResultGenerator.genFailResult(ResultCode.USER_STATUS_IS_ERROR);
|
|
|
- }
|
|
|
if (user == null) {
|
|
|
return ResultGenerator.genFailResult(ResultCode.USER_IS_NULL);
|
|
|
}
|
|
@@ -283,7 +279,7 @@ public class WithdrawRecordApiController {
|
|
|
withdrawRecordService.success(record, DateUtil.parse(dto.getDatetime(), "yyyyMMddHHmmss"));
|
|
|
if (record.getAccountType() == 1) {
|
|
|
ne = NoticeEnum.MONEY_WITHDRAWAL_WALLET_SUCCESS;
|
|
|
- } else if (record.getAccountType() == 2) {
|
|
|
+ } else if (record.getAccountType() == 2) {
|
|
|
ne = NoticeEnum.MONEY_WITHDRAWAL_ACCOUNT_SUCCESS;
|
|
|
}
|
|
|
} else {
|
|
@@ -307,8 +303,8 @@ public class WithdrawRecordApiController {
|
|
|
|
|
|
}
|
|
|
try {
|
|
|
- noticeDubboServiceClient.addMoneyNotice(ne, record.getUserId());
|
|
|
- } catch (Exception e) {
|
|
|
+ noticeDubboServiceClient.addMoneyNotice(ne,record.getUserId());
|
|
|
+ }catch (Exception e) {
|
|
|
log.error("新增提现回调消息失败", e);
|
|
|
}
|
|
|
return "OK";
|