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
af2c4822
Commit
af2c4822
authored
Aug 28, 2019
by
đinh thị đầm
Browse files
Options
Browse Files
Download
Plain Diff
damdt accept merge
parents
f58cafce
0136cb05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
src/main/java/com/viettel/campaign/service/impl/CustomerServiceImpl.java
...om/viettel/campaign/service/impl/CustomerServiceImpl.java
+13
-11
src/main/resources/application.yml
src/main/resources/application.yml
+1
-1
No files found.
src/main/java/com/viettel/campaign/service/impl/CustomerServiceImpl.java
View file @
af2c4822
...
@@ -613,12 +613,14 @@ public class CustomerServiceImpl implements CustomerService {
...
@@ -613,12 +613,14 @@ public class CustomerServiceImpl implements CustomerService {
String
convertDate
=
dateFormat
.
format
(
new
Date
());
String
convertDate
=
dateFormat
.
format
(
new
Date
());
String
[]
dateArray
=
convertDate
.
split
(
"/"
);
String
[]
dateArray
=
convertDate
.
split
(
"/"
);
if
(
newDay
==
0
)
{
if
(
customerListDTO
.
getCustomerListCode
().
trim
().
length
()
==
0
)
{
apParamRepository
.
updateCustomerListSeq
(
String
.
valueOf
(
Integer
.
parseInt
(
apParam
.
getParValue
())
+
1
),
apParam
.
getDescription
());
if
(
newDay
==
0
)
{
customerListDTO
.
setCustomerListCode
(
dateArray
[
0
]
+
dateArray
[
2
]
+
dateArray
[
1
]
+
"_"
+
(
Integer
.
parseInt
(
apParam
.
getParValue
())
+
1
)
+
" "
+
customerListDTO
.
getCustomerListCode
());
apParamRepository
.
updateCustomerListSeq
(
String
.
valueOf
(
Integer
.
parseInt
(
apParam
.
getParValue
())
+
1
),
apParam
.
getDescription
());
}
else
{
customerListDTO
.
setCustomerListCode
(
dateArray
[
0
]+
dateArray
[
2
]+
dateArray
[
1
]+
"_"
+(
Integer
.
parseInt
(
apParam
.
getParValue
())
+
1
));
apParamRepository
.
updateCustomerListSeq
(
"1"
,
dateFormat
.
format
(
new
Date
()));
}
else
{
customerListDTO
.
setCustomerListCode
(
dateArray
[
0
]
+
dateArray
[
2
]
+
dateArray
[
1
]
+
"_1"
+
" "
+
customerListDTO
.
getCustomerListCode
());
apParamRepository
.
updateCustomerListSeq
(
"1"
,
dateFormat
.
format
(
new
Date
()));
customerListDTO
.
setCustomerListCode
(
dateArray
[
0
]+
dateArray
[
2
]+
dateArray
[
1
]+
"_1"
);
}
}
}
// THÍM NÀO MERGE CONFLICT THÌ GIỮ LẠI HỘ E CÁI METHOD NÀY VỚI
// THÍM NÀO MERGE CONFLICT THÌ GIỮ LẠI HỘ E CÁI METHOD NÀY VỚI
...
@@ -794,13 +796,13 @@ public class CustomerServiceImpl implements CustomerService {
...
@@ -794,13 +796,13 @@ public class CustomerServiceImpl implements CustomerService {
sb
.
append
(
" AND a.STATUS = 1"
);
sb
.
append
(
" AND a.STATUS = 1"
);
sb
.
append
(
" AND a.COMPANY_SITE_ID = :p_company_site_id"
);
sb
.
append
(
" AND a.COMPANY_SITE_ID = :p_company_site_id"
);
sb
.
append
(
" AND
CREATE_AT BETWEEN to_date(:p_date_from, 'YYYYMMDD') AND
to_date(:p_date_to, 'YYYYMMDD')"
);
sb
.
append
(
" AND
to_date(CREATE_AT, 'DD-MM-RR') >= to_date(:p_date_from, 'YYYYMMDD') AND to_date(CREATE_AT, 'DD-MM-RR') <=
to_date(:p_date_to, 'YYYYMMDD')"
);
if
(!
DataUtil
.
isNullOrEmpty
(
searchCustomerRequestDTO
.
getCustomerListCode
()))
{
if
(!
DataUtil
.
isNullOrEmpty
(
searchCustomerRequestDTO
.
getCustomerListCode
()))
{
sb
.
append
(
" AND
CUSTOMER_LIST_CODE LIKE :p_list_code
"
);
sb
.
append
(
" AND
UPPER(CUSTOMER_LIST_CODE) LIKE UPPER(:p_list_code)
"
);
}
}
if
(!
DataUtil
.
isNullOrEmpty
(
searchCustomerRequestDTO
.
getCustomerListName
()))
{
if
(!
DataUtil
.
isNullOrEmpty
(
searchCustomerRequestDTO
.
getCustomerListName
()))
{
sb
.
append
(
" AND
CUSTOMER_LIST_NAME LIKE :p_list_name
"
);
sb
.
append
(
" AND
UPPER(CUSTOMER_LIST_NAME) LIKE UPPER(:p_list_name)
"
);
}
}
sb
.
append
(
" ORDER BY CREATE_AT DESC"
);
sb
.
append
(
" ORDER BY CREATE_AT DESC"
);
...
@@ -813,7 +815,7 @@ public class CustomerServiceImpl implements CustomerService {
...
@@ -813,7 +815,7 @@ public class CustomerServiceImpl implements CustomerService {
if
(!
DataUtil
.
isNullOrEmpty
(
searchCustomerRequestDTO
.
getCustomerListCode
()))
{
if
(!
DataUtil
.
isNullOrEmpty
(
searchCustomerRequestDTO
.
getCustomerListCode
()))
{
query
.
setParameter
(
"p_list_code"
,
"%"
+
query
.
setParameter
(
"p_list_code"
,
"%"
+
searchCustomerRequestDTO
.
getCustomerListCode
()
searchCustomerRequestDTO
.
getCustomerListCode
()
.
trim
()
.
replace
(
"\\"
,
"\\\\"
)
.
replace
(
"\\"
,
"\\\\"
)
.
replaceAll
(
"%"
,
"\\%"
)
.
replaceAll
(
"%"
,
"\\%"
)
.
replaceAll
(
"_"
,
"\\_"
)
.
replaceAll
(
"_"
,
"\\_"
)
...
@@ -822,7 +824,7 @@ public class CustomerServiceImpl implements CustomerService {
...
@@ -822,7 +824,7 @@ public class CustomerServiceImpl implements CustomerService {
if
(!
DataUtil
.
isNullOrEmpty
(
searchCustomerRequestDTO
.
getCustomerListName
()))
{
if
(!
DataUtil
.
isNullOrEmpty
(
searchCustomerRequestDTO
.
getCustomerListName
()))
{
query
.
setParameter
(
"p_list_name"
,
"%"
+
query
.
setParameter
(
"p_list_name"
,
"%"
+
searchCustomerRequestDTO
.
getCustomerListName
()
searchCustomerRequestDTO
.
getCustomerListName
()
.
trim
()
.
replace
(
"\\"
,
"\\\\"
)
.
replace
(
"\\"
,
"\\\\"
)
.
replaceAll
(
"%"
,
"\\%"
)
.
replaceAll
(
"%"
,
"\\%"
)
.
replaceAll
(
"_"
,
"\\_"
)
.
replaceAll
(
"_"
,
"\\_"
)
...
...
src/main/resources/application.yml
View file @
af2c4822
server
:
server
:
port
:
1111
port
:
9999
spring
:
spring
:
application
:
application
:
name
:
campaign
name
:
campaign
...
...
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