1
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<if test="params.beginTime != null"> and order_time >= #{params.beginTime}</if>
|
||||
<if test="params.endTime != null"> and order_time <= #{params.endTime}</if>
|
||||
</where>
|
||||
1 <choose>
|
||||
<choose>
|
||||
<when test="params.orderBy != null and params.orderBy != ''">
|
||||
order by ${params.orderBy} ${params.isAsc}
|
||||
</when>
|
||||
|
||||
Reference in New Issue
Block a user