generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove non-required fields and switch search criteria to defendant_ac…
…count_id DefendantAccount Details service Fix a few improperly derived fields Unit tests and tidy up handling address and name
- Loading branch information
1 parent
6e91f31
commit a6bc891
Showing
18 changed files
with
378 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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,47 @@ | ||
{ | ||
"info": { | ||
"_postman_id": "b689ac72-601a-4bd1-8746-9cf76fa0caa8", | ||
"name": "Account Enquiry", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | ||
"_exporter_id": "31122798" | ||
}, | ||
"item": [ | ||
{ | ||
"name": "GET http://localhost:4550/api/defendant-account/details", | ||
"protocolProfileBehavior": { | ||
"disableBodyPruning": true | ||
}, | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
} | ||
} | ||
}, | ||
"url": { | ||
"raw": "https://opal-fines-service.staging.platform.hmcts.net/api/defendant-account/1", | ||
"protocol": "https", | ||
"host": [ | ||
"opal-fines-service", | ||
"staging", | ||
"platform", | ||
"hmcts", | ||
"net" | ||
], | ||
"path": [ | ||
"api", | ||
"defendant-account", | ||
"1" | ||
] | ||
}, | ||
"description": "Get a defendant account from opal, account number is only unique within a businessunit" | ||
}, | ||
"response": [] | ||
} | ||
] | ||
} |
This file contains 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 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 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 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 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 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 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 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 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
11 changes: 2 additions & 9 deletions
11
src/main/java/uk/gov/hmcts/opal/repository/DefendantAccountPartiesRepository.java
This file contains 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 |
---|---|---|
@@ -1,19 +1,12 @@ | ||
package uk.gov.hmcts.opal.repository; | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
import org.springframework.stereotype.Repository; | ||
import uk.gov.hmcts.opal.entity.DefendantAccountPartiesEntity; | ||
|
||
@Repository | ||
public interface DefendantAccountPartiesRepository extends JpaRepository<DefendantAccountPartiesEntity, Long> { | ||
|
||
@Query(""" | ||
SELECT dap FROM DefendantAccountPartiesEntity dap | ||
JOIN dap.party p | ||
JOIN dap.defendantAccount da | ||
JOIN da.lastHearingCourtId c | ||
WHERE da.defendantAccountId = :defendantAccountId""") | ||
DefendantAccountPartiesEntity findByDefendantAccountId(@Param("defendantAccountId") Long defendantAccountId); | ||
|
||
DefendantAccountPartiesEntity findByDefendantAccountDefendantAccountId(Long defendantAccountId); | ||
} |
This file contains 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 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 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 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.