|
@@ -721,13 +721,13 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
*/
|
|
|
public boolean orderRefund(Long id) {
|
|
|
TbOrder order = getById(id);
|
|
|
- int refundStatus=order.getRefundStatus();
|
|
|
- if(refundStatus==1||refundStatus==3){
|
|
|
+ int refundStatus = order.getRefundStatus();
|
|
|
+ if (refundStatus == 1 || refundStatus == 3) {
|
|
|
StaticLog.error("\n---------退货退款失败:{}已退货退款", id);
|
|
|
throw new AjaxError("订单已退款或者退款中");
|
|
|
}
|
|
|
- int sx010Status=order.getSxb010Status();
|
|
|
- if (sx010Status!=1){
|
|
|
+ int sx010Status = order.getSxb010Status();
|
|
|
+ if (sx010Status != 1) {
|
|
|
StaticLog.error("\n---------退货退款失败:{}银行��边民的款未成功", id);
|
|
|
throw new AjaxError("银行扣边民的款未成功");
|
|
|
}
|
|
@@ -767,9 +767,9 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
throw new AjaxError("订单无商品信息");
|
|
|
}
|
|
|
Integer deductionCount = tbOrder.getDeductionCount() + 1;
|
|
|
- if (tbOrder.getRefundStatus()!=0){
|
|
|
- String tradeNo=tbOrder.getTradeNo();
|
|
|
- tradeNo=StrUtil.subBefore(tradeNo,"_",false);
|
|
|
+ if (tbOrder.getRefundStatus() != 0) {
|
|
|
+ String tradeNo = tbOrder.getTradeNo();
|
|
|
+ tradeNo = StrUtil.subBefore(tradeNo, "_", false);
|
|
|
tbOrder.setTradeNo(tradeNo + "_" + deductionCount);
|
|
|
}
|
|
|
PaymentDto paymentDto = this.getPaymentData(tbOrder);
|
|
@@ -795,9 +795,9 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
if (!tbOrders.isEmpty()) {
|
|
|
for (TbOrder tbOrder : tbOrders) {
|
|
|
Integer deductionCount = tbOrder.getDeductionCount() + 1;
|
|
|
- if (tbOrder.getRefundStatus()!=0){
|
|
|
- String tradeNo=tbOrder.getTradeNo();
|
|
|
- tradeNo=StrUtil.subBefore(tradeNo,"_",false);
|
|
|
+ if (tbOrder.getRefundStatus() != 0) {
|
|
|
+ String tradeNo = tbOrder.getTradeNo();
|
|
|
+ tradeNo = StrUtil.subBefore(tradeNo, "_", false);
|
|
|
tbOrder.setTradeNo(tradeNo + "_" + deductionCount);
|
|
|
}
|
|
|
PaymentDto paymentDto = this.getPaymentData(tbOrder);
|
|
@@ -1155,13 +1155,16 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
}
|
|
|
|
|
|
public void up(Long id, String upPrice) {
|
|
|
- TbOrder tbOrder = new TbOrder();
|
|
|
+ TbOrder tbOrder = this.getById(id);
|
|
|
tbOrder.setId(id);
|
|
|
tbOrder.setUpPrice(new BigDecimal(upPrice)).setUpTime(new Date()).setUpStatus(2);
|
|
|
int i = tbOrderMapper.updateById(tbOrder);
|
|
|
if (i != 1) {
|
|
|
throw new AjaxError("上架失败");
|
|
|
}
|
|
|
+ HtTradeSettlement htTradeSettlement = htTradeSettlementService.getById(tbOrder.getSaleMainId());
|
|
|
+ htTradeSettlement.setUpCount(htTradeSettlement.getUpCount() + 1);
|
|
|
+ htTradeSettlementService.updateById(htTradeSettlement);
|
|
|
}
|
|
|
|
|
|
public void down(Long id) {
|
|
@@ -1174,6 +1177,9 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
|
|
|
}
|
|
|
db.setUpStatus(1);
|
|
|
this.updateById(db);
|
|
|
+ HtTradeSettlement htTradeSettlement = htTradeSettlementService.getById(db.getSaleMainId());
|
|
|
+ htTradeSettlement.setUpCount(htTradeSettlement.getUpCount() - 1);
|
|
|
+ htTradeSettlementService.updateById(htTradeSettlement);
|
|
|
}
|
|
|
|
|
|
public List<OrderDto> getOrderListByMainIds(String mainIds) {
|