|
@@ -31,6 +31,7 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.tuple.Triple;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import tk.mybatis.mapper.entity.Condition;
|
|
|
import tk.mybatis.mapper.entity.Example;
|
|
@@ -80,13 +81,14 @@ 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) {
|
|
|
+ public Result add(@Validated @RequestBody WithdrawParam param, @RequestHeader(value = X_CLIENT_TOKEN, required = false) String token) {
|
|
|
if (param == null) {
|
|
|
return ResultGenerator.genFailResult(ResultCode.OBJECT_IS_NULL);
|
|
|
}
|
|
@@ -282,7 +284,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 {
|
|
@@ -306,8 +308,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";
|