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
4511bcf6
Commit
4511bcf6
authored
Aug 19, 2019
by
Vu Duy Anh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
anhvd commit
parent
266fb8e6
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
288 additions
and
327 deletions
+288
-327
pom.xml
pom.xml
+62
-132
src/main/java/com/viettel/campaign/ServiceCampaignApplication.java
...java/com/viettel/campaign/ServiceCampaignApplication.java
+6
-1
src/main/java/com/viettel/campaign/config/ACDFullDatasourceConfig.java
.../com/viettel/campaign/config/ACDFullDatasourceConfig.java
+25
-8
src/main/java/com/viettel/campaign/config/CCMSFullDatasourceConfig.java
...com/viettel/campaign/config/CCMSFullDatasourceConfig.java
+24
-8
src/main/java/com/viettel/campaign/config/DataSourceProperties.java
...ava/com/viettel/campaign/config/DataSourceProperties.java
+110
-0
src/main/java/com/viettel/campaign/config/WebSecurityConfig.java
...n/java/com/viettel/campaign/config/WebSecurityConfig.java
+34
-34
src/main/java/com/viettel/campaign/config/WebSocketConfig.java
...ain/java/com/viettel/campaign/config/WebSocketConfig.java
+0
-27
src/main/java/com/viettel/campaign/service/impl/AgentsServiceImpl.java
.../com/viettel/campaign/service/impl/AgentsServiceImpl.java
+7
-103
src/main/java/com/viettel/campaign/web/rest/CampaignController.java
...ava/com/viettel/campaign/web/rest/CampaignController.java
+0
-1
src/main/resources/application.yml
src/main/resources/application.yml
+20
-13
No files found.
pom.xml
View file @
4511bcf6
This diff is collapsed.
Click to expand it.
src/main/java/com/viettel/campaign/ServiceCampaignApplication.java
View file @
4511bcf6
package
com.viettel.campaign
;
package
com.viettel.campaign
;
import
com.viettel.campaign.config.DataSourceProperties
;
import
com.viettel.campaign.utils.Config
;
import
com.viettel.campaign.utils.Config
;
import
com.viettel.campaign.utils.RedisUtil
;
import
com.viettel.campaign.utils.RedisUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
@SpringBootApplication
(
scanBasePackages
={
"com.viettel.campaign"
})
@SpringBootApplication
public
class
ServiceCampaignApplication
{
public
class
ServiceCampaignApplication
{
@Autowired
DataSourceProperties
dataSourceProperties
;
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ServiceCampaignApplication
.
class
,
args
);
SpringApplication
.
run
(
ServiceCampaignApplication
.
class
,
args
);
...
...
src/main/java/com/viettel/campaign/config/ACDFullDatasourceConfig.java
View file @
4511bcf6
...
@@ -2,6 +2,7 @@ package com.viettel.campaign.config;
...
@@ -2,6 +2,7 @@ package com.viettel.campaign.config;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.*
;
import
org.springframework.context.annotation.*
;
import
org.springframework.core.env.Environment
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.jpa.repository.config.EnableJpaRepositories
;
import
org.springframework.data.jpa.repository.config.EnableJpaRepositories
;
...
@@ -11,6 +12,7 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
...
@@ -11,6 +12,7 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import
org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter
;
import
org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter
;
import
org.springframework.transaction.PlatformTransactionManager
;
import
org.springframework.transaction.PlatformTransactionManager
;
import
javax.persistence.criteria.CriteriaBuilder
;
import
javax.sql.DataSource
;
import
javax.sql.DataSource
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -29,15 +31,30 @@ public class ACDFullDatasourceConfig {
...
@@ -29,15 +31,30 @@ public class ACDFullDatasourceConfig {
@Autowired
@Autowired
private
Environment
env
;
private
Environment
env
;
@Bean
(
"datasource2.datasource"
)
@Value
(
"${datasource-property.acd-full.driver-class-name}"
)
private
String
driverClassName
;
@Value
(
"${datasource-property.acd-full.url}"
)
private
String
url
;
@Value
(
"${datasource-property.acd-full.max_pool_size}"
)
private
Integer
maxPoolSize
;
@Value
(
"${datasource-property.acd-full.password}"
)
private
String
password
;
@Value
(
"${datasource-property.acd-full.username}"
)
private
String
username
;
@Bean
(
"datasource.datasource2"
)
public
DataSource
dataSource
(){
public
DataSource
dataSource
(){
OracleDataSource
r
=
new
OracleDataSource
();
OracleDataSource
r
=
new
OracleDataSource
();
r
.
setDriverClassName
(
env
.
getProperty
(
"spring.datasource2.driver-class-name"
)
);
r
.
setDriverClassName
(
driverClassName
);
r
.
setPoolName
(
"app.datasource2"
);
r
.
setPoolName
(
"app.datasource2"
);
r
.
setJdbcUrl
(
env
.
getProperty
(
"spring.datasource2.url"
)
);
r
.
setJdbcUrl
(
url
);
r
.
setMaximumPoolSize
(
env
.
getProperty
(
"spring.datasource2.max_pool_size"
,
Integer
.
class
)
);
r
.
setMaximumPoolSize
(
maxPoolSize
);
r
.
setPassword
(
env
.
getProperty
(
"spring.datasource2.password"
)
);
r
.
setPassword
(
password
);
r
.
setUsername
(
env
.
getProperty
(
"spring.datasource2.username"
)
);
r
.
setUsername
(
username
);
return
r
;
return
r
;
}
}
...
@@ -69,8 +86,8 @@ public class ACDFullDatasourceConfig {
...
@@ -69,8 +86,8 @@ public class ACDFullDatasourceConfig {
}
}
@Bean
(
name
=
DataSourceQualify
.
NAMED_JDBC_PARAMETER_TEMPLATE_ACD_FULL
)
@Bean
(
name
=
DataSourceQualify
.
NAMED_JDBC_PARAMETER_TEMPLATE_ACD_FULL
)
@DependsOn
(
"datasource
2.datasource
"
)
@DependsOn
(
"datasource
.datasource2
"
)
public
NamedParameterJdbcTemplate
namedParameterJdbcTemplate
(
@Qualifier
(
"datasource
2.datasource
"
)
DataSource
abcDataSource
)
{
public
NamedParameterJdbcTemplate
namedParameterJdbcTemplate
(
@Qualifier
(
"datasource
.datasource2
"
)
DataSource
abcDataSource
)
{
return
new
NamedParameterJdbcTemplate
(
abcDataSource
);
return
new
NamedParameterJdbcTemplate
(
abcDataSource
);
}
}
}
}
...
...
src/main/java/com/viettel/campaign/config/CCMSFullDatasourceConfig.java
View file @
4511bcf6
...
@@ -2,6 +2,7 @@ package com.viettel.campaign.config;
...
@@ -2,6 +2,7 @@ package com.viettel.campaign.config;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.DependsOn
;
import
org.springframework.context.annotation.DependsOn
;
...
@@ -32,15 +33,30 @@ public class CCMSFullDatasourceConfig {
...
@@ -32,15 +33,30 @@ public class CCMSFullDatasourceConfig {
@Autowired
@Autowired
private
Environment
env
;
private
Environment
env
;
@Bean
(
"datasource1.datasource"
)
@Value
(
"${datasource-property.ccms-full.driver-class-name}"
)
private
String
driverClassName
;
@Value
(
"${datasource-property.ccms-full.url}"
)
private
String
url
;
@Value
(
"${datasource-property.ccms-full.max_pool_size}"
)
private
Integer
maxPoolSize
;
@Value
(
"${datasource-property.ccms-full.password}"
)
private
String
password
;
@Value
(
"${datasource-property.ccms-full.username}"
)
private
String
username
;
@Bean
(
name
=
"datasource.datasource1"
)
public
DataSource
dataSource
(){
public
DataSource
dataSource
(){
OracleDataSource
r
=
new
OracleDataSource
();
OracleDataSource
r
=
new
OracleDataSource
();
r
.
setDriverClassName
(
env
.
getProperty
(
"spring.datasource.driver-class-name"
)
);
r
.
setDriverClassName
(
driverClassName
);
r
.
setPoolName
(
"app.datasource1"
);
r
.
setPoolName
(
"app.datasource1"
);
r
.
setJdbcUrl
(
env
.
getProperty
(
"spring.datasource.url"
)
);
r
.
setJdbcUrl
(
url
);
r
.
setMaximumPoolSize
(
env
.
getProperty
(
"spring.datasource.max_pool_size"
,
Integer
.
class
)
);
r
.
setMaximumPoolSize
(
maxPoolSize
);
r
.
setPassword
(
env
.
getProperty
(
"spring.datasource.password"
)
);
r
.
setPassword
(
password
);
r
.
setUsername
(
env
.
getProperty
(
"spring.datasource.username"
)
);
r
.
setUsername
(
username
);
return
r
;
return
r
;
}
}
...
@@ -72,8 +88,8 @@ public class CCMSFullDatasourceConfig {
...
@@ -72,8 +88,8 @@ public class CCMSFullDatasourceConfig {
}
}
@Bean
(
name
=
DataSourceQualify
.
NAMED_JDBC_PARAMETER_TEMPLATE_CCMS_FULL
)
@Bean
(
name
=
DataSourceQualify
.
NAMED_JDBC_PARAMETER_TEMPLATE_CCMS_FULL
)
@DependsOn
(
"datasource
1.datasource
"
)
@DependsOn
(
"datasource
.datasource1
"
)
public
NamedParameterJdbcTemplate
namedParameterJdbcTemplate
(
@Qualifier
(
"datasource
1.datasource
"
)
DataSource
abcDataSource
)
{
public
NamedParameterJdbcTemplate
namedParameterJdbcTemplate
(
@Qualifier
(
"datasource
.datasource1
"
)
DataSource
abcDataSource
)
{
return
new
NamedParameterJdbcTemplate
(
abcDataSource
);
return
new
NamedParameterJdbcTemplate
(
abcDataSource
);
}
}
}
}
src/main/java/com/viettel/campaign/config/DataSourceProperties.java
0 → 100644
View file @
4511bcf6
package
com.viettel.campaign.config
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.stereotype.Component
;
/**
* @author anhvd_itsol
*/
@Component
@ConfigurationProperties
(
prefix
=
"datasource-property"
)
public
class
DataSourceProperties
{
public
static
class
CCMSFull
{
private
String
driverClassName
;
private
String
url
;
private
String
username
;
private
String
password
;
private
Integer
maxPoolSize
;
public
String
getDriverClassName
()
{
return
driverClassName
;
}
public
void
setDriverClassName
(
String
driverClassName
)
{
this
.
driverClassName
=
driverClassName
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
Integer
getMaxPoolSize
()
{
return
maxPoolSize
;
}
public
void
setMaxPoolSize
(
Integer
maxPoolSize
)
{
this
.
maxPoolSize
=
maxPoolSize
;
}
}
public
static
class
ACDFull
{
private
String
driverClassName
;
private
String
url
;
private
String
username
;
private
String
password
;
private
Integer
maxPoolSize
;
public
String
getDriverClassName
()
{
return
driverClassName
;
}
public
void
setDriverClassName
(
String
driverClassName
)
{
this
.
driverClassName
=
driverClassName
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
Integer
getMaxPoolSize
()
{
return
maxPoolSize
;
}
public
void
setMaxPoolSize
(
Integer
maxPoolSize
)
{
this
.
maxPoolSize
=
maxPoolSize
;
}
}
}
src/main/java/com/viettel/campaign/config/WebSecurityConfig.java
View file @
4511bcf6
package
com.viettel.campaign.config
;
//
package com.viettel.campaign.config;
//
import
com.viettel.campaign.filter.CorsFilter
;
//
import com.viettel.campaign.filter.CorsFilter;
import
org.springframework.boot.web.servlet.FilterRegistrationBean
;
//
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import
org.springframework.context.annotation.Bean
;
//
import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
//
import org.springframework.context.annotation.Configuration;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
//
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
;
//
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
//
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//
/**
/
//
**
* @author hanv_itsol
//
* @author hanv_itsol
* @project service-campaign
//
* @project service-campaign
*/
//
*/
//
@EnableWebSecurity
//
@EnableWebSecurity
@Configuration
//
@Configuration
public
class
WebSecurityConfig
extends
WebSecurityConfigurerAdapter
{
//
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
//
@Override
//
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
//
protected void configure(HttpSecurity http) throws Exception {
http
.
csrf
().
disable
();
//
http.csrf().disable();
}
//
}
//
@Bean
//
@Bean
public
FilterRegistrationBean
filterRegistrationBean
()
{
//
public FilterRegistrationBean filterRegistrationBean() {
FilterRegistrationBean
registrationBean
=
new
FilterRegistrationBean
();
//
FilterRegistrationBean registrationBean = new FilterRegistrationBean();
registrationBean
.
setName
(
"CorsFilter"
);
//
registrationBean.setName("CorsFilter");
CorsFilter
corsFilter
=
new
CorsFilter
();
//
CorsFilter corsFilter = new CorsFilter();
registrationBean
.
setFilter
(
corsFilter
);
//
registrationBean.setFilter(corsFilter);
registrationBean
.
setOrder
(
1
);
//
registrationBean.setOrder(1);
return
registrationBean
;
//
return registrationBean;
}
//
}
}
//
}
src/main/java/com/viettel/campaign/config/WebSocketConfig.java
deleted
100644 → 0
View file @
266fb8e6
package
com.viettel.campaign.config
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.messaging.simp.config.MessageBrokerRegistry
;
import
org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker
;
import
org.springframework.web.socket.config.annotation.StompEndpointRegistry
;
import
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
;
/**
* @author hanv_itsol
* @project service-campaign
*/
@Configuration
@EnableWebSocketMessageBroker
public
class
WebSocketConfig
implements
WebSocketMessageBrokerConfigurer
{
@Override
public
void
configureMessageBroker
(
MessageBrokerRegistry
registry
)
{
registry
.
enableSimpleBroker
(
"/topic"
);
registry
.
setApplicationDestinationPrefixes
(
"/app"
);
}
@Override
public
void
registerStompEndpoints
(
StompEndpointRegistry
registry
)
{
registry
.
addEndpoint
(
"/websocket"
).
setAllowedOrigins
(
"*"
).
withSockJS
();
}
}
\ No newline at end of file
src/main/java/com/viettel/campaign/service/impl/AgentsServiceImpl.java
View file @
4511bcf6
...
@@ -86,30 +86,10 @@ public class AgentsServiceImpl implements AgentsService {
...
@@ -86,30 +86,10 @@ public class AgentsServiceImpl implements AgentsService {
sb
.
append
(
" a.USER_NAME userName,"
);
sb
.
append
(
" a.USER_NAME userName,"
);
sb
.
append
(
" a.STATUS status,"
);
sb
.
append
(
" a.STATUS status,"
);
sb
.
append
(
" a.FULL_NAME fullName,"
);
sb
.
append
(
" a.FULL_NAME fullName,"
);
sb
.
append
(
" a.USER_TYPE_ID userTypeId,"
);
sb
.
append
(
" a.CREATE_DATE createDate,"
);
sb
.
append
(
" a.DESCRIPTION description,"
);
sb
.
append
(
" a.STAFF_CODE staffCode,"
);
sb
.
append
(
" a.MANAGER_ID managerId,"
);
sb
.
append
(
" a.LOCATION_ID locationId,"
);
sb
.
append
(
" a.DEPT_ID deptId,"
);
sb
.
append
(
" a.DEPT_LEVEL deptLevel,"
);
sb
.
append
(
" a.POS_ID posId,"
);
sb
.
append
(
" a.DEPT_NAME deptName,"
);
sb
.
append
(
" a.GROUP_ID groupId,"
);
sb
.
append
(
" a.SITE_ID siteId,"
);
sb
.
append
(
" a.COMPANY_SITE_ID companySiteId,"
);
sb
.
append
(
" a.COMPANY_SITE_ID companySiteId,"
);
sb
.
append
(
" a.AGENT_TYPE agentType,"
);
sb
.
append
(
" b.FILTER_TYPE filterType,"
);
sb
.
append
(
" a.MOBILE_NUMBER mobileNumber,"
);
sb
.
append
(
" b.CAMPAIGN_AGENT_ID campaignAgentId"
);
sb
.
append
(
" a.FACEBOOK_ID facebookId,"
);
sb
.
append
(
" a.LOGIN_TYPE loginType,"
);
sb
.
append
(
" a.GOOGLE_ID googleId,"
);
sb
.
append
(
" a.EMAIL email,"
);
sb
.
append
(
" a.AVAILABLE_TICKET availableTicket,"
);
sb
.
append
(
" a.USER_KAZOO_ID userKazooId,"
);
sb
.
append
(
" b.FILTER_TYPE filterType"
);
sb
.
append
(
" FROM VSA_USERS a"
);
sb
.
append
(
" FROM VSA_USERS a"
);
sb
.
append
(
" LEFT JOIN CAMPAIGN_AGENT b on a.USER_ID = b.AGENT_ID"
);
sb
.
append
(
" LEFT JOIN CAMPAIGN_AGENT b on a.USER_ID = b.AGENT_ID"
);
sb
.
append
(
" WHERE 1 = 1"
);
sb
.
append
(
" WHERE 1 = 1"
);
sb
.
append
(
" AND a.COMPANY_SITE_ID = :p_company_site_id"
);
sb
.
append
(
" AND a.COMPANY_SITE_ID = :p_company_site_id"
);
...
@@ -124,28 +104,9 @@ public class AgentsServiceImpl implements AgentsService {
...
@@ -124,28 +104,9 @@ public class AgentsServiceImpl implements AgentsService {
query
.
addScalar
(
"userName"
,
new
StringType
());
query
.
addScalar
(
"userName"
,
new
StringType
());
query
.
addScalar
(
"status"
,
new
ShortType
());
query
.
addScalar
(
"status"
,
new
ShortType
());
query
.
addScalar
(
"fullName"
,
new
StringType
());
query
.
addScalar
(
"fullName"
,
new
StringType
());
query
.
addScalar
(
"userTypeId"
,
new
LongType
());
query
.
addScalar
(
"createDate"
,
new
DateType
());
query
.
addScalar
(
"description"
,
new
StringType
());
query
.
addScalar
(
"staffCode"
,
new
StringType
());
query
.
addScalar
(
"managerId"
,
new
LongType
());
query
.
addScalar
(
"locationId"
,
new
LongType
());
query
.
addScalar
(
"deptId"
,
new
LongType
());
query
.
addScalar
(
"deptLevel"
,
new
StringType
());
query
.
addScalar
(
"posId"
,
new
LongType
());
query
.
addScalar
(
"deptName"
,
new
StringType
());
query
.
addScalar
(
"groupId"
,
new
LongType
());
query
.
addScalar
(
"siteId"
,
new
LongType
());
query
.
addScalar
(
"companySiteId"
,
new
LongType
());
query
.
addScalar
(
"companySiteId"
,
new
LongType
());
query
.
addScalar
(
"agentType"
,
new
ShortType
());
query
.
addScalar
(
"mobileNumber"
,
new
StringType
());
query
.
addScalar
(
"facebookId"
,
new
StringType
());
query
.
addScalar
(
"loginType"
,
new
ShortType
());
query
.
addScalar
(
"googleId"
,
new
StringType
());
query
.
addScalar
(
"email"
,
new
StringType
());
query
.
addScalar
(
"availableTicket"
,
new
LongType
());
query
.
addScalar
(
"userKazooId"
,
new
StringType
());
query
.
addScalar
(
"filterType"
,
new
ShortType
());
query
.
addScalar
(
"filterType"
,
new
ShortType
());
query
.
addScalar
(
"campaignAgentId"
,
new
LongType
());
query
.
setResultTransformer
(
Transformers
.
aliasToBean
(
VSAUsersDTO
.
class
));
query
.
setResultTransformer
(
Transformers
.
aliasToBean
(
VSAUsersDTO
.
class
));
int
count
=
0
;
int
count
=
0
;
...
@@ -194,33 +155,15 @@ public class AgentsServiceImpl implements AgentsService {
...
@@ -194,33 +155,15 @@ public class AgentsServiceImpl implements AgentsService {
// sb.append(SQLBuilder.getSqlQueryById(SQLBuilder.SQL_MODULE_CAMPAIGN_MNG, "campaign-agents-by-params"));
// sb.append(SQLBuilder.getSqlQueryById(SQLBuilder.SQL_MODULE_CAMPAIGN_MNG, "campaign-agents-by-params"));
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"SELECT"
);
sb
.
append
(
"SELECT"
);
sb
.
append
(
" a.USER_ID userId,"
);
sb
.
append
(
" a.USER_ID userId,"
);
sb
.
append
(
" a.USER_NAME userName,"
);
sb
.
append
(
" a.USER_NAME userName,"
);
sb
.
append
(
" a.STATUS status,"
);
sb
.
append
(
" a.STATUS status,"
);
sb
.
append
(
" a.FULL_NAME fullName,"
);
sb
.
append
(
" a.FULL_NAME fullName,"
);
sb
.
append
(
" a.USER_TYPE_ID userTypeId,"
);
sb
.
append
(
" a.CREATE_DATE createDate,"
);
sb
.
append
(
" a.DESCRIPTION description,"
);
sb
.
append
(
" a.STAFF_CODE staffCode,"
);
sb
.
append
(
" a.MANAGER_ID managerId,"
);
sb
.
append
(
" a.LOCATION_ID locationId,"
);
sb
.
append
(
" a.DEPT_ID deptId,"
);
sb
.
append
(
" a.DEPT_LEVEL deptLevel,"
);
sb
.
append
(
" a.POS_ID posId,"
);
sb
.
append
(
" a.DEPT_NAME deptName,"
);
sb
.
append
(
" a.GROUP_ID groupId,"
);
sb
.
append
(
" a.SITE_ID siteId,"
);
sb
.
append
(
" a.COMPANY_SITE_ID companySiteId,"
);
sb
.
append
(
" a.COMPANY_SITE_ID companySiteId,"
);
sb
.
append
(
" a.AGENT_TYPE agentType,"
);
sb
.
append
(
" b.FILTER_TYPE filterType,"
);
sb
.
append
(
" a.MOBILE_NUMBER mobileNumber,"
);
sb
.
append
(
" b.CAMPAIGN_AGENT_ID campaignAgentId"
);
sb
.
append
(
" a.FACEBOOK_ID facebookId,"
);
sb
.
append
(
" a.LOGIN_TYPE loginType,"
);
sb
.
append
(
" a.GOOGLE_ID googleId,"
);
sb
.
append
(
" a.EMAIL email,"
);
sb
.
append
(
" a.AVAILABLE_TICKET availableTicket,"
);
sb
.
append
(
" a.USER_KAZOO_ID userKazooId,"
);
sb
.
append
(
" b.FILTER_TYPE filterType"
);
sb
.
append
(
" FROM VSA_USERS a"
);
sb
.
append
(
" FROM VSA_USERS a"
);
sb
.
append
(
" RIGHT JOIN CAMPAIGN_AGENT b on a.USER_ID = b.AGENT_ID"
);
sb
.
append
(
" RIGHT JOIN CAMPAIGN_AGENT b on a.USER_ID = b.AGENT_ID"
);
...
@@ -238,28 +181,9 @@ public class AgentsServiceImpl implements AgentsService {
...
@@ -238,28 +181,9 @@ public class AgentsServiceImpl implements AgentsService {
query
.
addScalar
(
"userName"
,
new
StringType
());
query
.
addScalar
(
"userName"
,
new
StringType
());
query
.
addScalar
(
"status"
,
new
ShortType
());
query
.
addScalar
(
"status"
,
new
ShortType
());
query
.
addScalar
(
"fullName"
,
new
StringType
());
query
.
addScalar
(
"fullName"
,
new
StringType
());
query
.
addScalar
(
"userTypeId"
,
new
LongType
());
query
.
addScalar
(
"createDate"
,
new
DateType
());
query
.
addScalar
(
"description"
,
new
StringType
());
query
.
addScalar
(
"staffCode"
,
new
StringType
());
query
.
addScalar
(
"managerId"
,
new
LongType
());
query
.
addScalar
(
"locationId"
,
new
LongType
());
query
.
addScalar
(
"deptId"
,
new
LongType
());
query
.
addScalar
(
"deptLevel"
,
new
StringType
());
query
.
addScalar
(
"posId"
,
new
LongType
());
query
.
addScalar
(
"deptName"
,
new
StringType
());
query
.
addScalar
(
"groupId"
,
new
LongType
());
query
.
addScalar
(
"siteId"
,
new
LongType
());
query
.
addScalar
(
"companySiteId"
,
new
LongType
());
query
.
addScalar
(
"companySiteId"
,
new
LongType
());
query
.
addScalar
(
"agentType"
,
new
ShortType
());
query
.
addScalar
(
"mobileNumber"
,
new
StringType
());
query
.
addScalar
(
"facebookId"
,
new
StringType
());
query
.
addScalar
(
"loginType"
,
new
ShortType
());
query
.
addScalar
(
"googleId"
,
new
StringType
());
query
.
addScalar
(
"email"
,
new
StringType
());
query
.
addScalar
(
"availableTicket"
,
new
LongType
());
query
.
addScalar
(
"userKazooId"
,
new
StringType
());
query
.
addScalar
(
"filterType"
,
new
ShortType
());
query
.
addScalar
(
"filterType"
,
new
ShortType
());
query
.
addScalar
(
"campaignAgentId"
,
new
LongType
());
query
.
setResultTransformer
(
Transformers
.
aliasToBean
(
VSAUsersDTO
.
class
));
query
.
setResultTransformer
(
Transformers
.
aliasToBean
(
VSAUsersDTO
.
class
));
int
count
=
0
;
int
count
=
0
;
...
@@ -409,27 +333,7 @@ public class AgentsServiceImpl implements AgentsService {
...
@@ -409,27 +333,7 @@ public class AgentsServiceImpl implements AgentsService {
query
.
addScalar
(
"userName"
,
new
StringType
());
query
.
addScalar
(
"userName"
,
new
StringType
());
query
.
addScalar
(
"status"
,
new
ShortType
());
query
.
addScalar
(
"status"
,
new
ShortType
());
query
.
addScalar
(
"fullName"
,
new
StringType
());
query
.
addScalar
(
"fullName"
,
new
StringType
());
// query.addScalar("userTypeId", new LongType());
// query.addScalar("createDate", new DateType());
// query.addScalar("description", new StringType());
// query.addScalar("staffCode", new StringType());
// query.addScalar("managerId", new LongType());
// query.addScalar("locationId", new LongType());
// query.addScalar("deptId", new LongType());
// query.addScalar("deptLevel", new StringType());
// query.addScalar("posId", new LongType());
// query.addScalar("deptName", new StringType());
// query.addScalar("groupId", new LongType());
// query.addScalar("siteId", new LongType());
query
.
addScalar
(
"companySiteId"
,
new
LongType
());
query
.
addScalar
(
"companySiteId"
,
new
LongType
());
// query.addScalar("agentType", new ShortType());
// query.addScalar("mobileNumber", new StringType());
// query.addScalar("facebookId", new StringType());
// query.addScalar("loginType", new ShortType());
// query.addScalar("googleId", new StringType());
// query.addScalar("email", new StringType());
// query.addScalar("availableTicket", new LongType());
// query.addScalar("userKazooId", new StringType());
query
.
addScalar
(
"filterType"
,
new
ShortType
());
query
.
addScalar
(
"filterType"
,
new
ShortType
());
query
.
addScalar
(
"campaignAgentId"
,
new
LongType
());
query
.
addScalar
(
"campaignAgentId"
,
new
LongType
());
...
...
src/main/java/com/viettel/campaign/web/rest/CampaignController.java
View file @
4511bcf6
...
@@ -11,7 +11,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
...
@@ -11,7 +11,6 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.sleuth.instrument.reactor.ReactorSleuth
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
...
...
src/main/resources/application.yml
View file @
4511bcf6
server
:
server
:
port
:
9999
port
:
1111
spring
:
spring
:
application
:
application
:
name
:
campaign
name
:
campaign
datasource
:
driver-class-name
:
oracle.jdbc.driver.OracleDriver
url
:
jdbc:oracle:thin:@10.60.157.135:1521:vt
username
:
CCMS_FULL
password
:
CCMS_FULL#123
max_pool_size
:
32
datasource2
:
driver-class-name
:
oracle.jdbc.driver.OracleDriver
url
:
jdbc:oracle:thin:@10.60.157.135:1521:vt
username
:
ACD_FULL
password
:
ACD_FULL#123
max_pool_size
:
32
jpa
:
jpa
:
database-platform
:
org.hibernate.dialect.Oracle10gDialect
database-platform
:
org.hibernate.dialect.Oracle10gDialect
show-sql
:
true
show-sql
:
true
...
@@ -34,3 +22,22 @@ spring:
...
@@ -34,3 +22,22 @@ spring:
# bootstrap-servers: 192.168.1.201:9092
# bootstrap-servers: 192.168.1.201:9092
# key-serializer: org.apache.kafka.common.serialization.StringSerializer
# key-serializer: org.apache.kafka.common.serialization.StringSerializer
# value-serializer: org.apache.kafka.common.serialization.StringSerializer
# value-serializer: org.apache.kafka.common.serialization.StringSerializer
datasource-property
:
ccms-full
:
driver-class-name
:
oracle.jdbc.driver.OracleDriver
url
:
jdbc:oracle:thin:@10.60.157.135:1521:vt
username
:
CCMS_FULL
password
:
CCMS_FULL#123
max_pool_size
:
32
acd-full
:
driver-class-name
:
oracle.jdbc.driver.OracleDriver
url
:
jdbc:oracle:thin:@10.60.157.135:1521:vt
username
:
ACD_FULL
password
:
ACD_FULL#123
max_pool_size
:
32
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