1. 押金抵扣不成功订单
This commit is contained in:
parent
e097b900bb
commit
368df7be5f
|
@ -27,6 +27,7 @@ import com.ruoyi.framework.web.service.SysLoginService;
|
|||
import com.ruoyi.system.domain.*;
|
||||
import com.ruoyi.system.mapper.AsDeviceMapper;
|
||||
import com.ruoyi.system.mapper.AsUserMapper;
|
||||
import com.ruoyi.system.mapper.EtOrderMapper;
|
||||
import com.ruoyi.system.service.*;
|
||||
import com.wechat.pay.java.service.payments.model.Transaction;
|
||||
import com.wechat.pay.java.service.refund.model.Refund;
|
||||
|
@ -94,6 +95,9 @@ public class AppController extends BaseController
|
|||
@Autowired
|
||||
private IEtCouponService etCouponService;
|
||||
|
||||
@Resource
|
||||
private EtOrderMapper etOrderMapper;
|
||||
|
||||
@Value("${aliyun.accessKeyId}")
|
||||
private String accessKeyId;
|
||||
|
||||
|
@ -724,4 +728,14 @@ public class AppController extends BaseController
|
|||
return success(errorDevices);
|
||||
}
|
||||
|
||||
/**
|
||||
* 押金抵扣不成功订单
|
||||
*/
|
||||
@GetMapping("/getDeductionErrorOrder")
|
||||
public AjaxResult getDeductionErrorOrder()
|
||||
{
|
||||
List<EtOrder> orders = etOrderMapper.deductionErrorOrderList();
|
||||
return success(orders);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -325,4 +325,9 @@ public interface EtOrderMapper
|
|||
* 查询所有正在骑行中的订单
|
||||
*/
|
||||
List<EtOrder> getCurrentOrderList();
|
||||
|
||||
/**
|
||||
* 押金抵扣不成功的修复
|
||||
*/
|
||||
List<EtOrder> deductionErrorOrderList();
|
||||
}
|
||||
|
|
|
@ -483,6 +483,25 @@ public class EtTask {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 押金抵扣不成功的修复
|
||||
* 1. 找出所有押金抵扣不成功的订单
|
||||
* 2. 将状态改成已结束
|
||||
*
|
||||
*/
|
||||
public void deductionErrorOrder(){
|
||||
log.info("-------------------【定时任务】押金抵扣不成功的修复---开始----------------");
|
||||
List<EtOrder> orders = etOrderMapper.deductionErrorOrderList();
|
||||
for (EtOrder order:orders) {
|
||||
EtOrder order1 = new EtOrder();
|
||||
order1.setOrderId(order.getOrderId());
|
||||
order1.setStatus(ServiceConstants.ORDER_STATUS_ORDER_END);
|
||||
order1.setMark("押金抵扣修复,订单已结束");
|
||||
etOrderMapper.updateEtOrder(order1);
|
||||
}
|
||||
log.info("-------------------【定时任务】押金抵扣不成功的修复---结束----------------");
|
||||
}
|
||||
|
||||
/** 更新订单为已支付*/
|
||||
private void updateOrderPaid(EtOrder order) {
|
||||
order.setPaid(ServiceConstants.ORDER_PAY_STATUS_PAID);
|
||||
|
|
|
@ -972,5 +972,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where status = 2
|
||||
</select>
|
||||
|
||||
<select id="deductionErrorOrderList" resultType="com.ruoyi.system.domain.EtOrder">
|
||||
select order_id, area_id, order_no, sn,`status`,pay_type from et_order
|
||||
where status = 3 and pay_type = 'yj' and pay_time is not null
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue
Block a user