|
|
@@ -13,6 +13,7 @@ import com.storlead.trade.service.MarketEmailsStatusSyncService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.ArrayList;
|
|
|
@@ -161,6 +162,27 @@ public class MarketEmailsStatusSyncServiceImpl implements MarketEmailsStatusSync
|
|
|
update.set(MarketEmailsEntity::getFirstReplyTheme, change.getFirstReplyTheme());
|
|
|
changed = true;
|
|
|
}
|
|
|
+ // 全部回复邮件 id(逗号隔开):邮件侧是全量列表,有变化则覆盖
|
|
|
+ if (StringUtils.hasText(change.getReplyEmailIds())
|
|
|
+ && !change.getReplyEmailIds().equals(existing.getReplyEmailIds())) {
|
|
|
+ update.set(MarketEmailsEntity::getReplyEmailIds, change.getReplyEmailIds());
|
|
|
+ changed = true;
|
|
|
+ }
|
|
|
+ // 发件箱:空才补
|
|
|
+ if (existing.getOutboxId() == null && change.getOutboxId() != null) {
|
|
|
+ update.set(MarketEmailsEntity::getOutboxId, change.getOutboxId());
|
|
|
+ changed = true;
|
|
|
+ }
|
|
|
+ if (!StringUtils.hasText(existing.getOutbox()) && StringUtils.hasText(change.getOutbox())) {
|
|
|
+ update.set(MarketEmailsEntity::getOutbox, change.getOutbox());
|
|
|
+ changed = true;
|
|
|
+ }
|
|
|
+ // 拒收:只升 1,不回退
|
|
|
+ if (Integer.valueOf(1).equals(change.getHasRefuse())
|
|
|
+ && !Integer.valueOf(1).equals(existing.getHasRefuse())) {
|
|
|
+ update.set(MarketEmailsEntity::getHasRefuse, 1);
|
|
|
+ changed = true;
|
|
|
+ }
|
|
|
if (!changed) {
|
|
|
return ApplyResult.MATCHED_NO_CHANGE;
|
|
|
}
|