Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
M
mobiloca-reservation-service
Gestion
Activité
Membres
Labels
Programmation
Tickets
0
Tableaux des tickets
Jalons
Wiki
Jira
Code
Requêtes de fusion
0
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Service d'assistance
Analyse
Données d'analyse des chaînes de valeur
Contributor analytics
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
marketing confort
mobiloca
mobiloca-reservation-service
Validations
8c41e619
Valider
8c41e619
rédigé
il y a 4 semaines
par
mohammed echahbouni
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
resolve the comment and remove the unnecessary variable creation
parent
a423a705
Branches
Branches contenant la validation
1 requête de fusion
!5
MLC-260/add cancellationReason and creationdate and update contractController
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
src/main/java/com/marketingconfort/mobiloca/controller/ContractController.java
+12
-26
12 ajouts, 26 suppressions
...ketingconfort/mobiloca/controller/ContractController.java
avec
12 ajouts
et
26 suppressions
src/main/java/com/marketingconfort/mobiloca/controller/ContractController.java
+
12
−
26
Voir le fichier @
8c41e619
...
...
@@ -55,18 +55,20 @@ public class ContractController {
return
ResponseEntity
.
ok
(
contracts
);
}
@PostMapping
(
Paths
.
UPDATE_CONTRACT_STATUS
)
public
ResponseEntity
<
ContractDTO
>
changeContractStatus
(
@PathVariable
Long
id
,
@RequestParam
ContractStatus
status
,
@RequestParam
(
required
=
false
)
String
cancellationReason
)
throws
FunctionalException
{
if
(
status
==
ContractStatus
.
CANCELED
&&
(
cancellationReason
==
null
||
cancellationReason
.
trim
().
isEmpty
()))
{
throw
new
FunctionalException
(
"ERR_CONTRACT_CANCEL_REASON_REQUIRED"
);
}
@PostMapping
(
Paths
.
UPDATE_CONTRACT_STATUS
)
public
ResponseEntity
<
ContractDTO
>
changeContractStatus
(
@PathVariable
Long
id
,
@RequestParam
ContractStatus
status
,
@RequestParam
(
required
=
false
)
String
cancellationReason
)
throws
FunctionalException
{
if
(
status
.
equals
(
ContractStatus
.
CANCELED
)
&&
(
cancellationReason
==
null
||
cancellationReason
.
trim
().
isEmpty
()))
{
throw
new
FunctionalException
(
"Le motif de résiliation est requis pour le statut 'Résilié'."
);
ContractDTO
updatedContract
=
contractService
.
changeContractStatus
(
id
,
status
,
cancellationReason
);
return
ResponseEntity
.
ok
(
updatedContract
);
}
ContractDTO
updatedContract
=
contractService
.
changeContractStatus
(
id
,
status
,
cancellationReason
);
return
ResponseEntity
.
ok
(
updatedContract
);
}
@PostMapping
(
"/delete"
)
public
ResponseEntity
<
Void
>
deleteContract
(
@RequestParam
Long
id
)
throws
FunctionalException
{
...
...
@@ -81,22 +83,6 @@ public ResponseEntity<ContractDTO> changeContractStatus(
return
ResponseEntity
.
ok
(
saved
);
}
@PostMapping
(
"/update-deposit/{id}"
)
public
ResponseEntity
<
ContractDTO
>
updateDepositAndActivate
(
@PathVariable
Long
id
,
@RequestParam
double
depositAmount
)
throws
FunctionalException
{
ContractDTO
updatedContract
=
contractService
.
updateDepositAndActivate
(
id
,
depositAmount
);
return
ResponseEntity
.
ok
(
updatedContract
);
}
@PostMapping
(
"/upload-temp-signed"
)
public
ResponseEntity
<
String
>
uploadTempSignedContract
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
S3FunctionalException
{
String
fileUrl
=
s3FileService
.
uploadSingleFile
(
file
);
return
ResponseEntity
.
ok
(
fileUrl
);
}
}
This diff is collapsed.
Click to expand it.
Aperçu
0%
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter