This commit is contained in:
2025-11-05 20:32:22 +08:00
parent bbcf9bb7f4
commit 49d2229d1e
2 changed files with 20 additions and 2 deletions

View File

@@ -1157,9 +1157,10 @@ private String handleTF(String input) {
}
// 根据订单号查询order_rows获取京粉实际价格
OrderRows orderRow = null;
if (!isEmpty(order.getOrderId())) {
try {
OrderRows orderRow = orderRowsService.selectOrderRowsByOrderId(order.getOrderId());
orderRow = orderRowsService.selectOrderRowsByOrderId(order.getOrderId());
if (orderRow != null && orderRow.getEstimateCosPrice() != null) {
order.setJingfenActualPrice(orderRow.getEstimateCosPrice());
}
@@ -1168,6 +1169,23 @@ private String handleTF(String input) {
}
}
// 验证1如果查询不到对应订单提示用户
if (isEmpty(order.getOrderId()) || orderRow == null) {
String warn = "[炸弹] [炸弹] [炸弹] 录单警告!!! \n查询不到对应订单使用红包 或者 转链),请五分钟后再试,或重新下单";
return warn;
}
// 验证2如果京粉实际价格不为空检查与付款金额的差值
if (order.getJingfenActualPrice() != null && order.getPaymentAmount() != null) {
double diff = Math.abs(order.getPaymentAmount() - order.getJingfenActualPrice());
if (Math.abs(diff - 100.0) < 0.01) { // 允许浮点数误差
String warn = "[炸弹] [炸弹] [炸弹] 录单警告!!! \n付款金额和实际金额相差100请联系管理员录单\n" +
"付款金额:" + order.getPaymentAmount() + "\n" +
"京粉实际价格:" + order.getJingfenActualPrice();
return warn;
}
}
// 按 remark 判断新增/更新
JDOrder exists = jdOrderService.selectJDOrderByRemark(order.getRemark());
if (exists != null) {

View File

@@ -124,7 +124,7 @@
<if test="params.beginTime != null"> and order_time &gt;= #{params.beginTime}</if>
<if test="params.endTime != null"> and order_time &lt;= #{params.endTime}</if>
</where>
1 <choose>
<choose>
<when test="params.orderBy != null and params.orderBy != ''">
order by ${params.orderBy} ${params.isAsc}
</when>