|
|
@@ -6,15 +6,12 @@ import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springblade.common.enums.AppConstant;
|
|
|
import org.springblade.common.enums.FrozenSatus;
|
|
|
import org.springblade.common.enums.FrozenType;
|
|
|
+import org.springblade.common.enums.GoodsConstant;
|
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
|
-import org.springblade.ldt.bills.entity.BalanceBills;
|
|
|
-import org.springblade.ldt.bills.entity.Bills;
|
|
|
-import org.springblade.ldt.bills.entity.FrozenRec;
|
|
|
-import org.springblade.ldt.bills.entity.PointBills;
|
|
|
-import org.springblade.ldt.bills.service.IBalanceBillsService;
|
|
|
-import org.springblade.ldt.bills.service.IBillsService;
|
|
|
-import org.springblade.ldt.bills.service.IFrozenRecService;
|
|
|
-import org.springblade.ldt.bills.service.IPointBillsService;
|
|
|
+import org.springblade.core.mp.support.Condition;
|
|
|
+import org.springblade.core.tool.utils.ObjectUtil;
|
|
|
+import org.springblade.ldt.bills.entity.*;
|
|
|
+import org.springblade.ldt.bills.service.*;
|
|
|
import org.springblade.ldt.user.entity.LoginUser;
|
|
|
import org.springblade.ldt.user.entity.UserChannelPoint;
|
|
|
import org.springblade.ldt.user.service.ILoginUserService;
|
|
|
@@ -41,6 +38,7 @@ public class CancelTradeHandle {
|
|
|
private IBalanceBillsService balanceBillsService;
|
|
|
private IFrozenRecService frozenRecService;
|
|
|
private IUserChannelPointService userChannelPointService;
|
|
|
+ private IGoodsBillsService goodsBillsService;
|
|
|
|
|
|
public void handle(SuccessParams successParams) throws ServiceException {
|
|
|
Bills bills = successParams.getBills();
|
|
|
@@ -84,5 +82,13 @@ public class CancelTradeHandle {
|
|
|
balanceBills.setPayStatus(AppConstant.BillPayStatus.取消付款.name());
|
|
|
balanceBillsService.saveOrUpdate(balanceBills);
|
|
|
}
|
|
|
+
|
|
|
+ //取消商品订单
|
|
|
+ GoodsBills goodsBills = goodsBillsService.getOne(Condition.getQueryWrapper(new GoodsBills()).lambda().eq(GoodsBills::getBillsId, bills.getId()));
|
|
|
+ if (ObjectUtil.isNotEmpty(goodsBills)) {
|
|
|
+ goodsBills.setPayStatus(AppConstant.BillPayStatus.取消付款.name());
|
|
|
+ goodsBills.setOrderStatus(GoodsConstant.GOODS_STATUS.取消付款.name());
|
|
|
+ goodsBillsService.updateById(goodsBills);
|
|
|
+ }
|
|
|
}
|
|
|
}
|