1
This commit is contained in:
@@ -1157,9 +1157,10 @@ private String handleTF(String input) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 根据订单号查询order_rows,获取京粉实际价格
|
// 根据订单号查询order_rows,获取京粉实际价格
|
||||||
|
OrderRows orderRow = null;
|
||||||
if (!isEmpty(order.getOrderId())) {
|
if (!isEmpty(order.getOrderId())) {
|
||||||
try {
|
try {
|
||||||
OrderRows orderRow = orderRowsService.selectOrderRowsByOrderId(order.getOrderId());
|
orderRow = orderRowsService.selectOrderRowsByOrderId(order.getOrderId());
|
||||||
if (orderRow != null && orderRow.getEstimateCosPrice() != null) {
|
if (orderRow != null && orderRow.getEstimateCosPrice() != null) {
|
||||||
order.setJingfenActualPrice(orderRow.getEstimateCosPrice());
|
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 判断新增/更新
|
// 按 remark 判断新增/更新
|
||||||
JDOrder exists = jdOrderService.selectJDOrderByRemark(order.getRemark());
|
JDOrder exists = jdOrderService.selectJDOrderByRemark(order.getRemark());
|
||||||
if (exists != null) {
|
if (exists != null) {
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
<if test="params.beginTime != null"> and order_time >= #{params.beginTime}</if>
|
<if test="params.beginTime != null"> and order_time >= #{params.beginTime}</if>
|
||||||
<if test="params.endTime != null"> and order_time <= #{params.endTime}</if>
|
<if test="params.endTime != null"> and order_time <= #{params.endTime}</if>
|
||||||
</where>
|
</where>
|
||||||
1 <choose>
|
<choose>
|
||||||
<when test="params.orderBy != null and params.orderBy != ''">
|
<when test="params.orderBy != null and params.orderBy != ''">
|
||||||
order by ${params.orderBy} ${params.isAsc}
|
order by ${params.orderBy} ${params.isAsc}
|
||||||
</when>
|
</when>
|
||||||
|
|||||||
Reference in New Issue
Block a user