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
10aab5e8
Commit
10aab5e8
authored
Jul 31, 2019
by
Vu Duy Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
anhvd commit campaign sql
parent
da43a363
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
12 deletions
+32
-12
pom.xml
pom.xml
+2
-2
src/main/resources/sql/campaign-mng/search-campaign-by-params.sql
.../resources/sql/campaign-mng/search-campaign-by-params.sql
+30
-10
No files found.
pom.xml
View file @
10aab5e8
...
...
@@ -93,8 +93,8 @@
<dependency>
<groupId>
com.oracle
</groupId>
<artifactId>
ojdbc7
</artifactId>
<!-- <scope>system</scope>--
>
<!-- <systemPath>${project.basedir}/lib/ojdbc7.jar</systemPath>--
>
<scope>
system
</scope
>
<systemPath>
${project.basedir}/lib/ojdbc7.jar
</systemPath
>
<version>
1.0
</version>
</dependency>
<dependency>
...
...
src/main/resources/sql/campaign-mng/search-campaign-by-params.sql
View file @
10aab5e8
SELECT
CAMPAIGN_ID
campaignId
,
CAMPAIGN_CODE
campaignCode
,
CAMPAIGN_NAME
campaignName
,
CAMPAIGN_TYPE
campaignType
,
CHANEL
chanel
,
START_TIME
startTime
,
END_TIME
endTime
,
CUSTOMER_NUMBER
customerNumber
,
STATUS
status
FROM
CAMPAIGN
a
.
CAMPAIGN_ID
campaignId
,
a
.
CAMPAIGN_CODE
campaignCode
,
a
.
CAMPAIGN_NAME
campaignName
,
a
.
CAMPAIGN_TYPE
campaignType
,
a
.
CHANEL
chanel
,
a
.
START_TIME
startTime
,
a
.
END_TIME
endTime
,
a
.
CUSTOMER_NUMBER
customerNumber
,
a
.
STATUS
status
,
a
.
CUSTOMER_NUMBER
cusNum
,
b
.
SLKHThamgiaCD
numOfJoinedCus
,
c
.
SLKHChuaTuongTac
numOfNotJoinedCus
,
d
.
SLKHDoNotCall_Khoa
numOfLockCus
FROM
CAMPAIGN
a
LEFT
JOIN
(
SELECT
campaign_id
,
COUNT
(
*
)
AS
SLKHThamgiaCD
FROM
campaign_customer
cc
INNER
JOIN
CUSTOMER
cus
ON
cc
.
CUSTOMER_ID
=
cus
.
CUSTOMER_ID
WHERE
1
=
1
AND
cc
.
IN_CAMPAIGN_STATUS
=
1
AND
cus
.
STATUS
=
1
group
by
campaign_id
)
b
ON
a
.
CAMPAIGN_ID
=
b
.
CAMPAIGN_ID
LEFT
JOIN
(
SELECT
campaign_id
,
COUNT
(
*
)
AS
SLKHChuaTuongTac
FROM
campaign_customer
cc
INNER
JOIN
CUSTOMER
cus
ON
cc
.
CUSTOMER_ID
=
cus
.
CUSTOMER_ID
WHERE
1
=
1
AND
cc
.
STATUS
<>
0
AND
cus
.
STATUS
=
1
group
by
campaign_id
)
c
ON
c
.
CAMPAIGN_ID
=
a
.
CAMPAIGN_ID
LEFT
JOIN
(
SELECT
cc
.
campaign_id
,
count
(
*
)
AS
SLKHDoNotCall_Khoa
FROM
CAMPAIGN_CUSTOMER
cc
,
CUSTOMER
c
WHERE
cc
.
CUSTOMER_ID
=
c
.
CUSTOMER_ID
AND
(
c
.
IPCC_STATUS
=
'locked'
or
c
.
CALL_ALLOWED
=
0
)
AND
cc
.
STATUS
=
1
GROUP
BY
cc
.
CAMPAIGN_ID
)
d
ON
d
.
CAMPAIGN_ID
=
a
.
CAMPAIGN_ID
WHERE
1
=
1
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