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
a10fb050
Commit
a10fb050
authored
Aug 19, 2019
by
đinh thị đầm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit code searchOperation
parent
266fb8e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
src/main/java/com/viettel/campaign/service/CustomerService.java
...in/java/com/viettel/campaign/service/CustomerService.java
+1
-0
src/main/java/com/viettel/campaign/utils/SearchOperation.java
...main/java/com/viettel/campaign/utils/SearchOperation.java
+35
-0
No files found.
src/main/java/com/viettel/campaign/service/CustomerService.java
View file @
a10fb050
...
@@ -28,6 +28,7 @@ public interface CustomerService {
...
@@ -28,6 +28,7 @@ public interface CustomerService {
ResultDTO
getCustomerDetailById
(
Long
companySiteId
,
Long
customerListId
,
Long
customerId
);
ResultDTO
getCustomerDetailById
(
Long
companySiteId
,
Long
customerListId
,
Long
customerId
);
// ------------ customer list ------------ //
// ------------ customer list ------------ //
ResultDTO
getAllCustomerList
(
int
page
,
int
pageSize
,
String
sort
,
Long
companySiteId
);
ResultDTO
getAllCustomerList
(
int
page
,
int
pageSize
,
String
sort
,
Long
companySiteId
);
...
...
src/main/java/com/viettel/campaign/utils/SearchOperation.java
0 → 100644
View file @
a10fb050
package
com.viettel.campaign.utils
;
public
enum
SearchOperation
{
EQUALITY
,
NEGATION
,
GREATER_THAN
,
LESS_THAN
,
LIKE
,
STARTS_WITH
,
ENDS_WITH
,
CONTAINS
;
public
static
final
String
[]
SIMPLE_OPERATION_SET
=
{
":"
,
"!"
,
">"
,
"<"
,
"~"
};
public
static
final
String
OR_PREDICATE_FLAG
=
"'"
;
public
static
final
String
ZERO_OR_MORE_REGEX
=
"*"
;
public
static
final
String
OR_OPERATOR
=
"OR"
;
public
static
final
String
AND_OPERATOR
=
"AND"
;
public
static
final
String
LEFT_PARANTHESIS
=
"("
;
public
static
final
String
RIGHT_PARANTHESIS
=
")"
;
public
static
SearchOperation
getSimpleOperation
(
final
char
input
)
{
switch
(
input
)
{
case
':'
:
return
EQUALITY
;
case
'!'
:
return
NEGATION
;
case
'>'
:
return
GREATER_THAN
;
case
'<'
:
return
LESS_THAN
;
case
'~'
:
return
LIKE
;
default
:
return
null
;
}
}
}
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