1
This commit is contained in:
@@ -79,15 +79,16 @@ public class WeComShareLinkLogisticsJobController extends BaseController {
|
||||
job.getTrackingUrl(), remark, touser);
|
||||
data.put("jobKey", jobKey);
|
||||
|
||||
int nextAttempts = job.getScanAttempts() == null ? 1 : job.getScanAttempts() + 1;
|
||||
int successAttempts = job.getScanAttempts() == null ? 1 : job.getScanAttempts() + 1;
|
||||
String adhocNote = data.get("adhocNote") != null ? data.get("adhocNote").toString() : "";
|
||||
String note = "manual:" + adhocNote;
|
||||
if (Boolean.TRUE.equals(data.get("terminalSuccess"))) {
|
||||
String wb = data.get("waybillNo") != null ? data.get("waybillNo").toString() : null;
|
||||
weComShareLinkLogisticsJobMapper.updateByJobKey(jobKey, "PUSHED", note, nextAttempts,
|
||||
weComShareLinkLogisticsJobMapper.updateByJobKey(jobKey, "PUSHED", note, successAttempts,
|
||||
StringUtils.hasText(wb) ? wb : null);
|
||||
} else {
|
||||
weComShareLinkLogisticsJobMapper.updateByJobKey(jobKey, "WAITING", note, nextAttempts, null);
|
||||
/* 失败仍走自动队列时,不得垫高 scan_attempts,否则 Redis attempts 与定时 drain 上限错位,未超限也会被放弃 */
|
||||
weComShareLinkLogisticsJobMapper.updateByJobKey(jobKey, "WAITING", note, job.getScanAttempts(), null);
|
||||
WeComShareLinkLogisticsJob refreshed = weComShareLinkLogisticsJobService.selectByJobKey(jobKey);
|
||||
if (refreshed != null) {
|
||||
logisticsService.pushShareLinkJobToRedis(refreshed);
|
||||
|
||||
Reference in New Issue
Block a user