Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
service-campaign
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyen Ha
service-campaign
Commits
e440cc13
Commit
e440cc13
authored
5 years ago
by
Vu Duy Anh
Browse files
Options
Browse Files
Download
Plain Diff
anhvd accept merge
parents
192788e0
74441932
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
222 additions
and
36 deletions
+222
-36
src/main/java/com/viettel/campaign/job/CampaignJob.java
src/main/java/com/viettel/campaign/job/CampaignJob.java
+1
-1
src/main/java/com/viettel/campaign/model/ccms_full/CustomerTime.java
...va/com/viettel/campaign/model/ccms_full/CustomerTime.java
+8
-5
src/main/java/com/viettel/campaign/repository/ccms_full/CampaignCfgRepository.java
.../campaign/repository/ccms_full/CampaignCfgRepository.java
+6
-0
src/main/java/com/viettel/campaign/repository/ccms_full/CampaignExecuteRepository.java
...paign/repository/ccms_full/CampaignExecuteRepository.java
+0
-1
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignExecuteRepositoryImp.java
...pository/ccms_full/impl/CampaignExecuteRepositoryImp.java
+1
-25
src/main/java/com/viettel/campaign/service/AgentsService.java
...main/java/com/viettel/campaign/service/AgentsService.java
+2
-0
src/main/java/com/viettel/campaign/service/CampaignExecuteService.java
.../com/viettel/campaign/service/CampaignExecuteService.java
+6
-0
src/main/java/com/viettel/campaign/service/impl/AgentsServiceImpl.java
.../com/viettel/campaign/service/impl/AgentsServiceImpl.java
+24
-0
src/main/java/com/viettel/campaign/service/impl/CampaignExecuteServiceImp.java
...ttel/campaign/service/impl/CampaignExecuteServiceImp.java
+116
-3
src/main/java/com/viettel/campaign/web/dto/ContactCustResultDTO.java
...va/com/viettel/campaign/web/dto/ContactCustResultDTO.java
+1
-1
src/main/java/com/viettel/campaign/web/dto/CustomerTimeDTO.java
...in/java/com/viettel/campaign/web/dto/CustomerTimeDTO.java
+24
-0
src/main/java/com/viettel/campaign/web/rest/AgentsController.java
.../java/com/viettel/campaign/web/rest/AgentsController.java
+8
-0
src/main/java/com/viettel/campaign/web/rest/CampaignExecuteController.java
.../viettel/campaign/web/rest/CampaignExecuteController.java
+25
-0
No files found.
src/main/java/com/viettel/campaign/job/CampaignJob.java
View file @
e440cc13
...
...
@@ -123,7 +123,7 @@ public class CampaignJob {
List
<
CustomerTime
>
customerTimes
=
customerTimeService
.
findByCustomerId
(
customer
.
getCustomerId
());
customerTimes
.
parallelStream
().
forEach
(
customerTime
->
{
log
.
info
(
"Cap nhat Customer time cua KH ... #{}"
,
customerTime
.
getCustomerId
());
customerTime
.
setStatus
(
2
);
customerTime
.
setStatus
(
(
short
)
2
);
customerTime
.
setUpdateTime
(
new
Date
());
customerTimeService
.
update
(
customerTime
);
});
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/model/ccms_full/CustomerTime.java
View file @
e440cc13
...
...
@@ -19,15 +19,18 @@ import java.util.Date;
public
class
CustomerTime
{
@Id
@GeneratedValue
(
generator
=
"CUSTOMER_TIME_SEQ"
)
@SequenceGenerator
(
name
=
"CUSTOMER_TIME_SEQ"
,
sequenceName
=
"CUSTOMER_TIME_SEQ"
,
allocationSize
=
1
)
@Basic
(
optional
=
false
)
@NotNull
@Column
(
name
=
"CUSTOMER_TIME_ID"
)
private
Long
customerTimeId
;
@Column
(
name
=
"COMPANY_SITE_ID"
)
private
Stri
ng
companySiteId
;
private
Lo
ng
companySiteId
;
@Column
(
name
=
"CUSTOMER_ID"
)
private
Stri
ng
customerId
;
private
Lo
ng
customerId
;
@Column
(
name
=
"START_TIME"
)
private
Date
startTime
;
...
...
@@ -36,7 +39,7 @@ public class CustomerTime {
private
Date
endTime
;
@Column
(
name
=
"STATUS"
)
private
Integer
status
;
private
Short
status
;
@Column
(
name
=
"CREATE_TIME"
)
private
Date
createTime
;
...
...
@@ -45,10 +48,10 @@ public class CustomerTime {
private
Date
updateTime
;
@Column
(
name
=
"CREATE_BY"
)
private
Stri
ng
createBy
;
private
Lo
ng
createBy
;
@Column
(
name
=
"UPDATE_BY"
)
private
Stri
ng
updateBy
;
private
Lo
ng
updateBy
;
@Column
(
name
=
"CONTACT_CUST_RESULT_ID"
)
private
Long
contactCustResultId
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/repository/ccms_full/CampaignCfgRepository.java
View file @
e440cc13
package
com.viettel.campaign.repository.ccms_full
;
import
com.viettel.campaign.config.DataSourceQualify
;
import
com.viettel.campaign.model.ccms_full.CampaignCfg
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
...
...
@@ -8,10 +9,12 @@ import org.springframework.data.jpa.repository.Modifying;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
@Repository
@Transactional
(
DataSourceQualify
.
CCMS_FULL
)
public
interface
CampaignCfgRepository
extends
JpaRepository
<
CampaignCfg
,
Long
>
{
@Query
(
"FROM CampaignCfg u WHERE u.status = 1 AND u.completeValue NOT IN (1,2,3,4)"
)
...
...
@@ -46,4 +49,7 @@ public interface CampaignCfgRepository extends JpaRepository<CampaignCfg, Long>
@Query
(
"select c from CampaignCfg c where c.companySiteId =:p_company_site_id"
)
List
<
CampaignCfg
>
findAllCampaignCompleteCode
();
@Query
(
value
=
"FROM CampaignCfg WHERE status = 1 AND completeValue = :completeValue AND companySiteId = :companySiteId"
)
CampaignCfg
findByCompanySiteIdAndCompleteValue
(
@Param
(
"companySiteId"
)
Long
companySiteId
,
@Param
(
"completeValue"
)
String
completeValue
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/repository/ccms_full/CampaignExecuteRepository.java
View file @
e440cc13
...
...
@@ -22,5 +22,4 @@ public interface CampaignExecuteRepository {
List
<
ContactCustResultDTO
>
getExcelInteractiveResult
(
CampaignRequestDTO
dto
);
List
<
ContactQuestResultDTO
>
createListContacQuestResult
(
List
<
ContactQuestResultDTO
>
dtoList
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignExecuteRepositoryImp.java
View file @
e440cc13
...
...
@@ -291,7 +291,7 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
item
.
setPhoneNumber
((
String
)
obj
[
5
]);
item
.
setCustomerName
((
String
)
obj
[
6
]);
item
.
setStartCall
(
obj
[
7
]
==
null
?
null
:
(
Date
)
obj
[
7
]);
item
.
setContactStatus
((
S
tring
)
obj
[
8
]);
item
.
setContactStatus
((
S
hort
)
obj
[
8
]);
item
.
setSurveyStatus
((
String
)
obj
[
9
]);
item
.
setStatus
(
obj
[
10
]
==
null
?
0
:
((
BigDecimal
)
obj
[
10
]).
shortValueExact
());
item
.
setRecordStatus
(
obj
[
11
]
==
null
?
0
:
((
BigDecimal
)
obj
[
11
]).
shortValueExact
());
...
...
@@ -585,28 +585,4 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
return
result
;
}
@Override
@Transactional
(
DataSourceQualify
.
CCMS_FULL
)
public
List
<
ContactQuestResultDTO
>
createListContacQuestResult
(
List
<
ContactQuestResultDTO
>
dtoList
)
{
ResultDTO
resultDTO
=
new
ResultDTO
();
List
<
ContactQuestResultDTO
>
list
=
new
ArrayList
<>();
SessionFactory
sessionFactory
=
HibernateUtil
.
getSessionFactory
();
Session
session
=
sessionFactory
.
openSession
();
session
.
beginTransaction
();
try
{
// list = contactQuestResultRepository.saveAll(dtoList);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
resultDTO
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
finally
{
session
.
close
();
}
return
list
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/service/AgentsService.java
View file @
e440cc13
...
...
@@ -22,4 +22,6 @@ public interface AgentsService {
ResultDTO
searchCampaignAgentSelectByName
(
int
page
,
int
pageSize
,
Long
companySiteId
,
Long
campaignId
,
String
userName
,
String
fullName
);
ResultDTO
createMultipleCampaignAgent
(
CampaignAgentRequestDTO
campaignAgentRequestDTO
);
ResultDTO
updateAgent
(
CampaignAgentDTO
campaignAgentDTO
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/service/CampaignExecuteService.java
View file @
e440cc13
...
...
@@ -38,6 +38,8 @@ public interface CampaignExecuteService {
ResultDTO
updateContactCustResult
(
ContactCustResultDTO
dto
,
UserSession
userSession
);
ResultDTO
draftAtTen
(
ContactCustResultDTO
dto
,
UserSession
userSession
);
ResultDTO
recallCustomer
(
ContactCustResultDTO
dto
);
ResultDTO
callCustomerEnd
(
ContactCustResultDTO
dto
);
...
...
@@ -53,4 +55,8 @@ public interface CampaignExecuteService {
String
getDialModeAtCurrent
(
Long
campaignId
,
Long
companySiteId
);
ResultDTO
getContactCustResultById
(
Long
contactCustResultId
);
ResultDTO
updateCampaignCustomer
(
CampaignCustomerDTO
dto
);
ResultDTO
updateSurveyStatus
(
CustomerTimeDTO
dto
,
UserSession
userSession
);
}
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/service/impl/AgentsServiceImpl.java
View file @
e440cc13
...
...
@@ -537,4 +537,28 @@ public class AgentsServiceImpl implements AgentsService {
return
resultDTO
;
}
@Override
public
ResultDTO
updateAgent
(
CampaignAgentDTO
campaignAgentDTO
)
{
ResultDTO
resultDTO
=
new
ResultDTO
();
try
{
if
(
campaignAgentDTO
!=
null
)
{
Agents
agents
=
new
Agents
();
agents
.
setAgentId
(
campaignAgentDTO
.
getAgentId
().
toString
());
agents
.
setCampaignSystemStatus
(
"AVAILABLE"
);
agentsRepository
.
save
(
agents
);
resultDTO
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
}
else
{
resultDTO
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
}
catch
(
Exception
e
)
{
// e.printStackTrace();
}
return
resultDTO
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/service/impl/CampaignExecuteServiceImp.java
View file @
e440cc13
...
...
@@ -5,6 +5,7 @@ import com.viettel.campaign.model.acd_full.Agents;
import
com.viettel.campaign.model.ccms_full.*
;
import
com.viettel.campaign.repository.acd_full.AgentsRepository
;
import
com.viettel.campaign.repository.ccms_full.*
;
import
com.viettel.campaign.service.CampaignCfgService
;
import
com.viettel.campaign.service.CampaignExecuteService
;
import
com.viettel.campaign.utils.*
;
import
com.viettel.campaign.web.dto.*
;
...
...
@@ -25,6 +26,8 @@ import java.io.IOException;
import
java.security.NoSuchAlgorithmException
;
import
java.security.SecureRandom
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.ZoneId
;
import
java.util.*
;
@Service
...
...
@@ -71,6 +74,12 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
@Autowired
ContactQuestResultRepository
contactQuestResultRepository
;
@Autowired
CampaignCfgRepository
cfgRepository
;
@Autowired
CustomerRepository
customerRepository
;
public
CampaignExecuteServiceImp
()
throws
NoSuchAlgorithmException
{
}
...
...
@@ -555,7 +564,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
}
else
if
(
dto
.
getEventCall
().
equalsIgnoreCase
(
"ended"
))
{
ccr
.
setDurationCall
(
dto
.
getDurationCall
());
ccr
.
setStartCall
(
dto
.
getStartCall
());
ccr
.
setReceiveTime
(
dto
.
getReceiveTime
());
//
ccr
.
setReceiveTime
(
dto
.
getReceiveTime
());
ccr
.
setPreEndTime
(
ccResultRepository
.
getMaxCreateTime
(
dto
.
getCampaignId
(),
dto
.
getAgentId
()));
ccr
.
setEndTime
(
dto
.
getEndTime
());
ccr
.
setWaitTime
(
dto
.
getWaitTime
());
...
...
@@ -581,6 +590,51 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
return
result
;
}
@Override
public
ResultDTO
draftAtTen
(
ContactCustResultDTO
dto
,
UserSession
userSession
)
{
ResultDTO
result
=
new
ResultDTO
();
ContactCustResult
ccr
=
new
ContactCustResult
();
try
{
ccResultRepository
.
deleteById
(
dto
.
getContactCustResultId
());
ccr
.
setCompanySiteId
(
dto
.
getCompanySiteId
());
ccr
.
setCallStatus
(
dto
.
getCallStatus
());
ccr
.
setContactStatus
(
dto
.
getContactStatus
());
ccr
.
setStatus
(
dto
.
getStatus
());
ccr
.
setDescription
(
dto
.
getDescription
());
ccr
.
setCreateTime
(
new
Date
());
ccr
.
setAgentId
(
dto
.
getAgentId
());
ccr
.
setCampaignId
(
dto
.
getCampaignId
());
ccr
.
setUpdateBy
(
userSession
.
getUserId
());
ccr
.
setCustomerId
(
dto
.
getCustomerId
());
ccr
.
setDurationCall
(
dto
.
getDurationCall
());
ccr
.
setStartCall
(
dto
.
getStartCall
());
ccr
.
setReceiveCustLogId
(
dto
.
getReceiveCustLogId
());
ccr
.
setCallId
(
dto
.
getCallId
());
ccr
.
setPhoneNumber
(
dto
.
getPhoneNumber
());
ccr
.
setReceiveTime
(
dto
.
getReceiveTime
());
ccr
.
setPreEndTime
(
ccResultRepository
.
getMaxCreateTime
(
dto
.
getCampaignId
(),
dto
.
getAgentId
()));
ccr
.
setRecallTime
(
dto
.
getRecallTime
());
ccr
.
setIsFinalRecall
(
dto
.
getIsFinalRecall
());
ccr
.
setIsSendEmail
(
dto
.
getIsSendEmail
());
ccr
.
setEndTime
(
dto
.
getEndTime
());
ccr
.
setWaitTime
(
dto
.
getWaitTime
());
ccr
.
setDialMode
(
dto
.
getDialMode
());
ccr
=
ccResultRepository
.
save
(
ccr
);
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
result
.
setData
(
ccr
);
}
catch
(
Exception
e
)
{
// e.printStackTrace();
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
return
result
;
}
@Override
public
ResultDTO
recallCustomer
(
ContactCustResultDTO
dto
)
{
ResultDTO
result
=
new
ResultDTO
();
...
...
@@ -650,8 +704,9 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
@Transactional
(
DataSourceQualify
.
CCMS_FULL
)
public
ResultDTO
countRecallCustomer
(
Long
companySiteId
,
Long
agentId
)
{
Long
count
=
campaignCustomerRepository
.
countRecallCustomer
(
companySiteId
,
agentId
);
ResultDTO
resultDTO
=
new
ResultDTO
();
Long
count
=
campaignCustomerRepository
.
countRecallCustomer
(
companySiteId
,
agentId
);
if
(
count
!=
null
)
{
resultDTO
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
...
...
@@ -743,7 +798,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
return
lstTimeZone
.
getDialMode
().
toString
();
}
}
catch
(
Exception
e
)
{
//
e.printStackTrace();
e
.
printStackTrace
();
}
return
"-1"
;
...
...
@@ -752,6 +807,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
@Override
public
ResultDTO
getContactCustResultById
(
Long
contactCustResultId
)
{
ResultDTO
resultDTO
=
new
ResultDTO
();
try
{
resultDTO
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
...
...
@@ -763,4 +819,61 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
return
resultDTO
;
}
@Override
public
ResultDTO
updateCampaignCustomer
(
CampaignCustomerDTO
dto
)
{
ResultDTO
resultDTO
=
new
ResultDTO
();
try
{
CampaignCustomer
cc
=
campaignCustomerRepository
.
findCampaignCustomersByCampaignIdAndCustomerId
(
dto
.
getCampaignId
(),
dto
.
getCustomerId
());
cc
.
setStatus
(
dto
.
getStatus
());
cc
.
setAgentId
(
dto
.
getAgentId
());
cc
.
setRecallTime
(
dto
.
getRecallTime
());
cc
.
setRecallCount
(
cc
.
getRecallCount
()
+
1
);
cc
.
setCallTime
(
dto
.
getCallTime
());
resultDTO
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
resultDTO
.
setData
(
cc
);
}
catch
(
Exception
e
)
{
resultDTO
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
return
resultDTO
;
}
public
ResultDTO
updateSurveyStatus
(
CustomerTimeDTO
dto
,
UserSession
userSession
)
{
ResultDTO
resultDTO
=
new
ResultDTO
();
try
{
CampaignCfg
cfg
=
cfgRepository
.
findByCompanySiteIdAndCompleteValue
(
dto
.
getCompanySiteId
(),
dto
.
getCompleteValue
());
if
(
cfg
.
getIsLock
()
==
1
)
{
Customer
c
=
customerRepository
.
getOne
(
dto
.
getCustomerId
());
c
.
setIpccStatus
(
"locked"
);
c
=
customerRepository
.
save
(
c
);
}
else
{
CustomerTime
c
=
new
CustomerTime
();
c
.
setCompanySiteId
(
dto
.
getCompanySiteId
());
c
.
setCustomerId
(
dto
.
getCustomerId
());
c
.
setStartTime
(
dto
.
getStartTime
());
LocalDateTime
ldt
=
dto
.
getStartTime
().
toInstant
().
atZone
(
ZoneId
.
systemDefault
()).
toLocalDateTime
().
plusDays
(
cfg
.
getDurationLock
());
c
.
setEndTime
(
Date
.
from
(
ldt
.
atZone
(
ZoneId
.
systemDefault
()).
toInstant
()));
c
.
setStatus
((
short
)
1
);
c
.
setCreateTime
(
new
Date
());
c
.
setCreateBy
(
userSession
.
getUserId
());
c
.
setUpdateTime
(
new
Date
());
c
.
setUpdateBy
(
userSession
.
getUserId
());
c
.
setContactCustResultId
(
dto
.
getContactCustResultId
());
}
resultDTO
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
resultDTO
.
setData
(
null
);
}
catch
(
Exception
e
)
{
resultDTO
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
return
resultDTO
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/web/dto/ContactCustResultDTO.java
View file @
e440cc13
...
...
@@ -14,7 +14,7 @@ public class ContactCustResultDTO extends BaseDTO {
private
Long
contactCustResultId
;
private
Long
companySiteId
;
private
Short
callStatus
;
private
S
tring
contactStatus
;
private
S
hort
contactStatus
;
private
Short
status
;
private
Integer
satisfaction
;
private
String
description
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/web/dto/CustomerTimeDTO.java
0 → 100644
View file @
e440cc13
package
com.viettel.campaign.web.dto
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.util.Date
;
@Getter
@Setter
public
class
CustomerTimeDTO
extends
BaseDTO
{
private
Long
customerTimeId
;
private
Long
companySiteId
;
private
Long
customerId
;
private
Date
startTime
;
private
Date
endTime
;
private
Short
status
;
private
Date
createTime
;
private
Date
updateTime
;
private
Long
createBy
;
private
Long
updateBy
;
private
Long
contactCustResultId
;
private
String
completeValue
;
}
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/web/rest/AgentsController.java
View file @
e440cc13
...
...
@@ -82,4 +82,12 @@ public class AgentsController {
result
=
agentsService
.
createMultipleCampaignAgent
(
campaignAgentRequestDTO
);
return
result
;
}
@PostMapping
(
"/updateAgent"
)
@ResponseBody
public
ResultDTO
updateAgent
(
@RequestBody
@Valid
CampaignAgentDTO
requestDTO
)
{
ResultDTO
result
=
new
ResultDTO
();
result
=
agentsService
.
updateAgent
(
requestDTO
);
return
result
;
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/web/rest/CampaignExecuteController.java
View file @
e440cc13
...
...
@@ -186,4 +186,29 @@ public class CampaignExecuteController {
ResultDTO
result
=
campaignExecuteService
.
getContactCustResultById
(
contactCustResultId
);
return
new
ResponseEntity
<>(
result
,
HttpStatus
.
OK
);
}
@PostMapping
(
"/draftAtTen"
)
@ResponseBody
public
ResponseEntity
<
ResultDTO
>
draftAtTen
(
@RequestBody
ContactCustResultDTO
requestDto
,
HttpServletRequest
request
)
{
String
xAuthToken
=
request
.
getHeader
(
"X-Auth-Token"
);
UserSession
userSession
=
(
UserSession
)
RedisUtil
.
getInstance
().
get
(
xAuthToken
);
ResultDTO
result
=
campaignExecuteService
.
draftAtTen
(
requestDto
,
userSession
);
return
new
ResponseEntity
<>(
result
,
HttpStatus
.
OK
);
}
@PostMapping
(
"/updateCampaignCustomer"
)
@ResponseBody
public
ResponseEntity
<
ResultDTO
>
updateCampaignCustomer
(
@RequestBody
CampaignCustomerDTO
requestDto
)
{
ResultDTO
result
=
campaignExecuteService
.
updateCampaignCustomer
(
requestDto
);
return
new
ResponseEntity
<>(
result
,
HttpStatus
.
OK
);
}
@PostMapping
(
"/updateSurveyStatus"
)
@ResponseBody
public
ResponseEntity
<
ResultDTO
>
updateSurveyStatus
(
@RequestBody
CustomerTimeDTO
requestDto
,
HttpServletRequest
request
)
{
String
xAuthToken
=
request
.
getHeader
(
"X-Auth-Token"
);
UserSession
userSession
=
(
UserSession
)
RedisUtil
.
getInstance
().
get
(
xAuthToken
);
ResultDTO
result
=
campaignExecuteService
.
updateSurveyStatus
(
requestDto
,
userSession
);
return
new
ResponseEntity
<>(
result
,
HttpStatus
.
OK
);
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment