|
@@ -15,6 +15,7 @@ import com.txz.cif.core.Result;
|
|
|
import com.txz.cif.core.ResultCode;
|
|
|
import com.txz.cif.core.ResultGenerator;
|
|
|
import com.txz.cif.dto.tfpay.CheckWithdrawSignDTO;
|
|
|
+import com.txz.cif.dubbo.client.NoticeDubboServiceClient;
|
|
|
import com.txz.cif.dubbo.client.OperatingConfigDubboServiceClient;
|
|
|
import com.txz.cif.model.*;
|
|
|
import com.txz.cif.service.*;
|
|
@@ -22,6 +23,7 @@ import com.txz.cif.util.TFPayUtil;
|
|
|
import com.txz.cif.web.para.RecordParam;
|
|
|
import com.txz.cif.web.para.WithdrawParam;
|
|
|
import com.txz.cif.web.ro.TFWithdrawCallbackDTO;
|
|
|
+import com.txz.mall.enums.NoticeEnum;
|
|
|
import com.txz.operating.dto.ConfigDTO;
|
|
|
import io.jsonwebtoken.Claims;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -78,7 +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) {
|
|
@@ -267,13 +272,20 @@ public class WithdrawRecordApiController {
|
|
|
// log.error("新增充值回调日志失败", e);
|
|
|
// }
|
|
|
// return ResultGenerator.genSuccessResult();
|
|
|
-
|
|
|
+ WithdrawRecord record = records.get(0);
|
|
|
+ NoticeEnum ne = null;
|
|
|
Integer type = 8;
|
|
|
if (StrUtil.equals("1", dto.getReturncode())) {
|
|
|
- withdrawRecordService.success(records.get(0), DateUtil.parse(dto.getDatetime(), "yyyyMMddHHmmss"));
|
|
|
+ withdrawRecordService.success(record, DateUtil.parse(dto.getDatetime(), "yyyyMMddHHmmss"));
|
|
|
+ if (record.getAccountType() == 1) {
|
|
|
+ ne = NoticeEnum.MONEY_WITHDRAWAL_WALLET_SUCCESS;
|
|
|
+ } else if (record.getAccountType() == 2) {
|
|
|
+ ne = NoticeEnum.MONEY_WITHDRAWAL_ACCOUNT_SUCCESS;
|
|
|
+ }
|
|
|
} else {
|
|
|
withdrawRecordService.fail(records.get(0));
|
|
|
type = 9;
|
|
|
+ ne = NoticeEnum.MONEY_WITHDRAWAL_FAIL;
|
|
|
}
|
|
|
try {
|
|
|
// 新增充值回调日志
|
|
@@ -290,6 +302,11 @@ public class WithdrawRecordApiController {
|
|
|
// }
|
|
|
|
|
|
}
|
|
|
+ try {
|
|
|
+ noticeDubboServiceClient.addMoneyNotice(ne,record.getUserId());
|
|
|
+ }catch (Exception e) {
|
|
|
+ log.error("新增提现回调消息失败", e);
|
|
|
+ }
|
|
|
return "OK";
|
|
|
} finally {
|
|
|
lockTemplate.releaseLock(lockInfo);
|