修改提交
This commit is contained in:
+6
-4
@@ -118,7 +118,8 @@ public class RelabelApplicationService {
|
||||
|
||||
for (RelabelRequests.Item source : request.items()) insertItem(customerId, applicationId, source, now);
|
||||
insertHistory(customerId, applicationId, null, PENDING_PROCESSING, operatorId, "Relabel application submitted", now);
|
||||
insertOrderHistory(order.getId(), null, order.getCurrentStatus(), "Relabel application submitted", now);
|
||||
insertOrderHistory(customerId, order.getId(), null, order.getCurrentStatus(),
|
||||
"Relabel application submitted", now);
|
||||
return detail(customerId, relabelNo);
|
||||
}
|
||||
|
||||
@@ -194,7 +195,7 @@ public class RelabelApplicationService {
|
||||
orders.updateById(order);
|
||||
insertHistory(customerId, application.getId(), before, next, operatorId, request.remark(), now);
|
||||
if (!Objects.equals(orderBefore, orderStatus)) {
|
||||
insertOrderHistory(order.getId(), orderBefore, orderStatus, request.remark(), now);
|
||||
insertOrderHistory(customerId, order.getId(), orderBefore, orderStatus, request.remark(), now);
|
||||
}
|
||||
return detail(customerId, relabelNo);
|
||||
}
|
||||
@@ -248,8 +249,9 @@ public class RelabelApplicationService {
|
||||
value.setApplicationId(id); value.setFromStatus(from); value.setToStatus(to); value.setOperatorId(trim(operator));
|
||||
value.setRemark(trim(remark)); value.setCreatedAt(now); histories.insert(value);
|
||||
}
|
||||
private void insertOrderHistory(Long id, String from, String to, String remark, LocalDateTime now) {
|
||||
LastlegOrderStatusHistory value = new LastlegOrderStatusHistory(); value.setOrderId(id); value.setFromStatus(from);
|
||||
private void insertOrderHistory(String customerId, Long id, String from, String to, String remark,
|
||||
LocalDateTime now) {
|
||||
LastlegOrderStatusHistory value = new LastlegOrderStatusHistory(); value.setCustomerId(customerId); value.setOrderId(id); value.setFromStatus(from);
|
||||
value.setToStatus(to); value.setEventId("RELABEL_APPLICATION"); value.setRemark(trim(remark)); value.setCreatedAt(now);
|
||||
orderHistories.insert(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user