-
Notifications
You must be signed in to change notification settings - Fork 0
Support ai order cancel and undo #709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vlvvh
wants to merge
24
commits into
main
Choose a base branch
from
ai-order-cancel-and-undo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+598
−163
Open
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
cf92897
Support ai order cancel and undo
80202aa
add phone order push task and sequential push handling
775f428
format
9a294c4
Fixed comments
ab61442
fixed logic comment
7f20582
fix
ac651c7
fix is completed
426663d
Preventing overwriting is completed
46d4785
Preventing overwriting order id
90cb644
fixed comment
0f65ee9
Update SpeechMaticsService.cs
b135b44
Add assistant id
995ffc2
Add ai assistant id
bcc6101
Update SpeechMaticsService.cs
4f4107f
fixed prompt
bf76fc2
check pending push tasks before completing
2d4f8ae
Delete PhoneOrderProcessResult.cs
d787abd
fix avoid redundant push enqueue
a4b6a7b
Merge branch 'main' into ai-order-cancel-and-undo
1ae905c
revert: undo merge from main
46606bf
Merge branch 'record-query-by-order-ids' into ai-order-cancel-and-undo
53c2ab8
Merge branch 'main' into ai-order-cancel-and-undo
22a0fe1
Update PhoneOrderProcessJobService.Record.cs
25f6d8c
Merge branch 'main' into ai-order-cancel-and-undo
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
src/SmartTalk.Core/DbUpFile/Scripts_2025/Script0073_add_parent_id_to_phone_order_record.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| alter table `phone_order_record` add column `parent_record_id` int null; | ||
| alter table `phone_order_record` add column `is_completed` tinyint(1) not null default 0; |
18 changes: 18 additions & 0 deletions
18
src/SmartTalk.Core/DbUpFile/Scripts_2025/Script0074_add_phone_order_push_task.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| CREATE TABLE IF NOT EXISTS `phone_order_push_task` | ||
| ( | ||
| `id` INT AUTO_INCREMENT PRIMARY KEY, | ||
| `record_id` INT NOT NULL, | ||
| `parent_record_id` INT NULL, | ||
| `assistant_id` INT NOT NULL, | ||
| `business_key` VARCHAR(128) NOT NULL, | ||
| `task_type` INT NOT NULL, | ||
| `request_json` LONGTEXT NOT NULL, | ||
| `status` INT NOT NULL, | ||
| `created_at` DATETIME(3) NOT NULL | ||
| ) CHARSET = utf8mb4; | ||
|
|
||
| CREATE INDEX idx_record_id ON phone_order_push_task(record_id); | ||
|
|
||
| CREATE INDEX idx_parent_record_id ON phone_order_push_task(parent_record_id); | ||
|
|
||
| CREATE UNIQUE INDEX uk_record_business ON phone_order_push_task(record_id, business_key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| using System.ComponentModel.DataAnnotations; | ||
| using System.ComponentModel.DataAnnotations.Schema; | ||
| using SmartTalk.Messages.Enums.Sales; | ||
|
|
||
| namespace SmartTalk.Core.Domain.Sales; | ||
|
|
||
| [Table("phone_order_push_task")] | ||
| public class PhoneOrderPushTask : IEntity | ||
| { | ||
| [Key] | ||
| [Column("id")] | ||
| [DatabaseGenerated(DatabaseGeneratedOption.Identity)] | ||
| public int Id { get; set; } | ||
|
|
||
| [Column("record_id")] | ||
| public int RecordId { get; set; } | ||
|
|
||
| [Column("parent_record_id")] | ||
| public int? ParentRecordId { get; set; } | ||
|
|
||
| [Column("assistant_id")] | ||
| public int AssistantId { get; set; } | ||
|
|
||
| [Column("business_key"), StringLength(128)] | ||
| public string BusinessKey { get; set; } | ||
|
|
||
| [Column("task_type")] | ||
| public PhoneOrderPushTaskType TaskType { get; set; } | ||
|
|
||
| [Column("request_json")] | ||
| public string RequestJson { get; set; } | ||
|
|
||
| [Column("status")] | ||
| public PhoneOrderPushTaskStatus Status { get; set; } | ||
|
|
||
| [Column("created_at")] | ||
| public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.Now; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.