Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
FeedbackDomainDao | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
selectFeedbackDetailBySequence | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\App\Models\Dao\Domain; |
6 | |
7 | use Exception; |
8 | use PeServer\App\Models\Cache\PluginCache; |
9 | use PeServer\App\Models\Cache\PluginCacheCategory; |
10 | use PeServer\App\Models\Cache\PluginCacheItem; |
11 | use PeServer\App\Models\Data\Dto\CrashReportDetailDto; |
12 | use PeServer\App\Models\Data\Dto\FeedbackDetailDto; |
13 | use PeServer\App\Models\Domain\PluginUrlKey; |
14 | use PeServer\Core\Collection\Collections; |
15 | use PeServer\Core\Database\DaoBase; |
16 | use PeServer\Core\Database\DaoTrait; |
17 | use PeServer\Core\Database\IDatabaseContext; |
18 | |
19 | class FeedbackDomainDao extends DaoBase |
20 | { |
21 | use DaoTrait; |
22 | |
23 | #region function |
24 | |
25 | public function selectFeedbackDetailBySequence(int $sequence): FeedbackDetailDto |
26 | { |
27 | $result = $this->context->querySingle( |
28 | <<<SQL |
29 | |
30 | select |
31 | feedbacks.sequence, |
32 | |
33 | feedbacks.timestamp, |
34 | feedbacks.ip_address, |
35 | |
36 | feedbacks.version, |
37 | feedbacks.revision, |
38 | feedbacks.build, |
39 | |
40 | feedbacks.user_id, |
41 | |
42 | feedbacks.first_execute_timestamp, |
43 | feedbacks.first_execute_version, |
44 | |
45 | feedbacks.process, |
46 | feedbacks.platform, |
47 | feedbacks.os, |
48 | feedbacks.clr, |
49 | |
50 | feedbacks.kind, |
51 | feedbacks.subject, |
52 | feedbacks.content, |
53 | |
54 | nullif(feedback_comments.comment, '') as developer_comment |
55 | from |
56 | feedbacks |
57 | left join |
58 | feedback_comments |
59 | on |
60 | ( |
61 | feedback_comments.feedback_sequence = feedbacks.sequence |
62 | ) |
63 | |
64 | where |
65 | sequence = :sequence |
66 | |
67 | SQL, |
68 | [ |
69 | 'sequence' => $sequence, |
70 | ] |
71 | ); |
72 | |
73 | return $result->mapping(FeedbackDetailDto::class); |
74 | } |
75 | |
76 | #endregion |
77 | } |