Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
Grievance
Commits
002a2fe3
Commit
002a2fe3
authored
1 year ago
by
shishir suman
Browse files
Options
Download
Patches
Plain Diff
bug fixes
parent
5885fed0
main
Escalate_ticket_send_mail_to_raiser
UAT
UPHRH_7903_mobile_otp
UPHRH_quartz_scheduler
admin_config_changes
github/fork/vky25/patch-1
rahu_test
shishir_dynamic_schedular
shishir_ticket_statistics_by_user
No related merge requests found
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/main/java/org/upsmf/grievance/service/impl/AttachmentServiceImpl.java
+4
-1
...g/upsmf/grievance/service/impl/AttachmentServiceImpl.java
src/main/java/org/upsmf/grievance/service/impl/IntegrationServiceImpl.java
+92
-89
.../upsmf/grievance/service/impl/IntegrationServiceImpl.java
src/main/java/org/upsmf/grievance/service/impl/OtpServiceImpl.java
+3
-2
...java/org/upsmf/grievance/service/impl/OtpServiceImpl.java
src/main/java/org/upsmf/grievance/service/impl/TicketServiceImpl.java
+4
-2
...a/org/upsmf/grievance/service/impl/TicketServiceImpl.java
with
103 additions
and
94 deletions
+103
-94
src/main/java/org/upsmf/grievance/service/impl/AttachmentServiceImpl.java
+
4
−
1
View file @
002a2fe3
...
...
@@ -6,6 +6,7 @@ import com.google.auth.oauth2.ServiceAccountCredentials;
import
com.google.cloud.storage.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.tika.Tika
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
...
...
@@ -57,6 +58,9 @@ public class AttachmentServiceImpl implements AttachmentService {
@Value
(
"${gcp.sub.folder.path}"
)
private
String
subFolderPath
;
@Autowired
private
ObjectMapper
mapper
;
@Override
public
ResponseEntity
<
String
>
uploadObject
(
MultipartFile
file
)
{
Path
filePath
=
null
;
...
...
@@ -81,7 +85,6 @@ public class AttachmentServiceImpl implements AttachmentService {
URL
url
=
blob
.
signUrl
(
30
,
TimeUnit
.
DAYS
);
log
.
info
(
"URL - {}"
,
url
);
String
urlString
=
url
.
toURI
().
toString
();
ObjectMapper
mapper
=
new
ObjectMapper
();
ObjectNode
urlNode
=
mapper
.
createObjectNode
();
urlNode
.
put
(
"url"
,
urlString
);
ObjectNode
node
=
mapper
.
createObjectNode
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/upsmf/grievance/service/impl/IntegrationServiceImpl.java
+
92
−
89
View file @
002a2fe3
This diff is collapsed.
Click to expand it.
src/main/java/org/upsmf/grievance/service/impl/OtpServiceImpl.java
+
3
−
2
View file @
002a2fe3
...
...
@@ -23,6 +23,9 @@ public class OtpServiceImpl implements OtpService {
@Autowired
private
JavaMailSender
mailSender
;
@Autowired
private
ObjectMapper
objectMapper
;
@Value
(
"${otp.expiration.minutes}"
)
private
int
otpExpirationMinutes
;
...
...
@@ -67,7 +70,6 @@ public class OtpServiceImpl implements OtpService {
private
String
toJson
(
Object
obj
)
{
try
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
return
objectMapper
.
writeValueAsString
(
obj
);
}
catch
(
JsonProcessingException
e
)
{
// Handle the exception
...
...
@@ -77,7 +79,6 @@ public class OtpServiceImpl implements OtpService {
private
<
T
>
T
fromJson
(
String
json
,
Class
<
T
>
valueType
)
{
try
{
ObjectMapper
objectMapper
=
new
ObjectMapper
();
return
objectMapper
.
readValue
(
json
,
valueType
);
}
catch
(
JsonProcessingException
e
)
{
// Handle the exception
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/upsmf/grievance/service/impl/TicketServiceImpl.java
+
4
−
2
View file @
002a2fe3
...
...
@@ -62,6 +62,9 @@ public class TicketServiceImpl implements TicketService {
@Autowired
private
EmailService
emailService
;
@Autowired
private
ObjectMapper
mapper
;
/**
*
* @param ticket
...
...
@@ -281,8 +284,7 @@ public class TicketServiceImpl implements TicketService {
*/
private
org
.
upsmf
.
grievance
.
model
.
es
.
Ticket
convertToESTicketObj
(
Ticket
ticket
)
{
DateTimeFormatter
dateTimeFormatter
=
DateTimeFormatter
.
ofPattern
(
DateUtil
.
DEFAULT_DATE_FORMAT
);
ObjectMapper
mapper
=
new
ObjectMapper
();
// TODO get user details based on ID
// get user details based on ID
return
org
.
upsmf
.
grievance
.
model
.
es
.
Ticket
.
builder
()
.
ticketId
(
ticket
.
getId
())
.
firstName
(
ticket
.
getFirstName
())
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets