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
623d4956
Commit
623d4956
authored
Sep 06, 2019
by
Vu Duy Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
anhvd fix bug
parent
7e6a4c2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignRepositoryImpl.java
...ign/repository/ccms_full/impl/CampaignRepositoryImpl.java
+8
-9
No files found.
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignRepositoryImpl.java
View file @
623d4956
...
...
@@ -40,7 +40,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
CampaignRepositoryImpl
.
class
);
@Autowired
@PersistenceContext
(
unitName
=
DataSourceQualify
.
JPA_UNIT_NAME_CCMS_FULL
)
@PersistenceContext
(
unitName
=
DataSourceQualify
.
JPA_UNIT_NAME_CCMS_FULL
)
EntityManager
entityManager
;
@Autowired
...
...
@@ -121,7 +121,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
sb
.
append
(
" AND a.STATUS <> -1"
);
if
(!
DataUtil
.
isNullOrEmpty
(
requestDto
.
getCampaignCode
()))
{
if
(!
DataUtil
.
isNullOrEmpty
(
requestDto
.
getCampaignCode
())
&&
!
DataUtil
.
isNullOrEmpty
(
requestDto
.
getCampaignCode
().
trim
())
)
{
sb
.
append
(
" AND a.CAMPAIGN_CODE IN (:p_code) "
);
}
if
(!
DataUtil
.
isNullOrEmpty
(
requestDto
.
getCampaignName
()))
{
...
...
@@ -164,7 +164,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
sb
.
append
(
" ORDER BY a.CREATE_TIME DESC "
);
SQLQuery
query
=
session
.
createSQLQuery
(
sb
.
toString
());
if
(!
DataUtil
.
isNullOrEmpty
(
requestDto
.
getCampaignCode
()))
{
if
(!
DataUtil
.
isNullOrEmpty
(
requestDto
.
getCampaignCode
())
&&
!
DataUtil
.
isNullOrEmpty
(
requestDto
.
getCampaignCode
().
trim
())
)
{
String
[]
lstCode
=
requestDto
.
getCampaignCode
().
trim
().
split
(
","
);
query
.
setParameterList
(
"p_code"
,
lstCode
);
}
...
...
@@ -260,7 +260,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
logger
.
error
(
ex
.
getMessage
(),
ex
);
}
finally
{
if
(
null
!=
session
)
{
if
(
null
!=
session
)
{
session
.
close
();
}
}
...
...
@@ -350,7 +350,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
finally
{
if
(
session
!=
null
)
session
.
close
();
if
(
session
!=
null
)
session
.
close
();
}
return
result
;
}
...
...
@@ -381,8 +381,8 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
}
}
catch
(
Exception
ex
)
{
logger
.
error
(
ex
.
getMessage
(),
ex
);
}
finally
{
if
(
session
!=
null
)
session
.
close
();
}
finally
{
if
(
session
!=
null
)
session
.
close
();
}
return
null
;
}
...
...
@@ -514,7 +514,7 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
ResultDTO
resultDTO
=
new
ResultDTO
();
try
{
List
<
CustomerCustomDTO
>
list
=
dto
.
getCustomerCustomDTOList
();
for
(
CustomerCustomDTO
customerCustomDTO:
list
)
{
for
(
CustomerCustomDTO
customerCustomDTO
:
list
)
{
CampaignCustomer
campaignCustomer
=
campaignCustomerRepository
.
findCampaignCustomerByCampaignCustomerId
(
customerCustomDTO
.
getCampaignCustomerId
());
campaignCustomer
.
setStatus
((
short
)
0
);
campaignCustomer
.
setCallStatus
(
null
);
...
...
@@ -885,7 +885,6 @@ public class CampaignRepositoryImpl implements CampaignRepositoryCustom {
}
@Override
@Transactional
(
DataSourceQualify
.
CCMS_FULL
)
public
ResultDTO
getCampaignCustomerInformation
(
CampaignRequestDTO
dto
)
{
...
...
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