|
|
@@ -16,15 +16,14 @@ import org.springblade.common.enums.PaymentType;
|
|
|
import org.springblade.common.enums.TransferStatus;
|
|
|
import org.springblade.common.enums.WithdrawStatus;
|
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
|
+import org.springblade.core.log.logger.BladeLogger;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.ldt.bills.entity.TransferRec;
|
|
|
import org.springblade.ldt.bills.entity.WithdrawRec;
|
|
|
-import org.springblade.ldt.bills.service.IBillsService;
|
|
|
import org.springblade.ldt.bills.service.ITransferRecService;
|
|
|
import org.springblade.ldt.bills.service.IWithdrawRecService;
|
|
|
import org.springblade.ldt.shop.entity.Shop;
|
|
|
import org.springblade.ldt.shop.service.IShopService;
|
|
|
-import org.springblade.ldt.user.service.ILoginUserService;
|
|
|
import org.springblade.payment.entity.PayParam;
|
|
|
import org.springblade.payment.entity.SuccessParams;
|
|
|
import org.springblade.payment.event.UserPointTransferWithdrawEvent;
|
|
|
@@ -55,7 +54,7 @@ import java.util.Set;
|
|
|
@Component
|
|
|
@Slf4j
|
|
|
@AllArgsConstructor
|
|
|
-public class WithdrawPlugin implements Withdraw{
|
|
|
+public class WithdrawPlugin implements Withdraw {
|
|
|
|
|
|
YeePayService yeePayService;
|
|
|
PaymentService paymentService;
|
|
|
@@ -65,6 +64,7 @@ public class WithdrawPlugin implements Withdraw{
|
|
|
IShopService shopService;
|
|
|
ApplicationEventPublisher eventPublisher;
|
|
|
ITransferRecService transferRecService;
|
|
|
+ BladeLogger bladeLogger;
|
|
|
|
|
|
@Override
|
|
|
public void callback(HttpServletRequest request) {
|
|
|
@@ -138,6 +138,7 @@ public class WithdrawPlugin implements Withdraw{
|
|
|
JSONObject res = JSON.parseObject(yopResponse.getStringResult());
|
|
|
if (!Objects.equals(res.getString("returnCode"), "UA00000")) {
|
|
|
userPointWithdrawFail(transferRec, res);
|
|
|
+ bladeLogger.info("userPointWithdraw-转账", res.toJSONString());
|
|
|
throw new ServiceException(res.getString("returnMsg"));
|
|
|
}
|
|
|
|
|
|
@@ -173,6 +174,7 @@ public class WithdrawPlugin implements Withdraw{
|
|
|
WithdrawRec withdrawRec = withdrawRecService.getById(transferRec.getWithdrawId());
|
|
|
withdrawRec.setWithdrawStatus(WithdrawStatus.FAIL.getValue());
|
|
|
withdrawRec.setResponseJson(res.toJSONString());
|
|
|
+ withdrawRec.setFailReason("转账环节出错:" + res.toJSONString());
|
|
|
withdrawRecService.saveOrUpdate(withdrawRec);
|
|
|
|
|
|
//更新转账记录
|