|
@@ -42,7 +42,10 @@ public class OrderVisitRepository : BaseRepository<OrderVisit>, IOrderVisitRepos
|
|
|
if (dto.IsSmsReply == false || dto.SmsReplyContent.IsNullOrEmpty() || dto.ExternalId.IsNullOrEmpty()) return;
|
|
|
|
|
|
var orderVisit = await GetAsync(data.ExternalId)
|
|
|
- ?? throw new UserFriendlyException($"回访单不存在, visitId: {dto.ExternalId} message: {data.ToJson()}");
|
|
|
+ ?? throw new UserFriendlyException($"回访单不存在, visitId: {data.ExternalId} message: {data.ToJson()}");
|
|
|
+
|
|
|
+ if (orderVisit.VisitState == EVisitState.Visited)
|
|
|
+ throw new UserFriendlyException($"回访单已回访. visitId: {data.ExternalId}");
|
|
|
|
|
|
Dictionary<string, string> dics = new()
|
|
|
{
|