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
3356201f
Commit
3356201f
authored
Sep 03, 2019
by
Nguyen Ha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix vul
parent
f7378f37
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
244 additions
and
65 deletions
+244
-65
sonar-scanner.properties
sonar-scanner.properties
+9
-0
src/main/java/com/viettel/campaign/model/ccms_full/CustomizeFields.java
...com/viettel/campaign/model/ccms_full/CustomizeFields.java
+175
-5
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignCustomerListColumnRepositoryImpl.java
...s_full/impl/CampaignCustomerListColumnRepositoryImpl.java
+1
-1
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignCustomerRepositoryImpl.java
...sitory/ccms_full/impl/CampaignCustomerRepositoryImpl.java
+1
-1
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignExecuteRepositoryImp.java
...pository/ccms_full/impl/CampaignExecuteRepositoryImp.java
+1
-1
src/main/java/com/viettel/campaign/repository/ccms_full/impl/TicketRepositoryImpl.java
...paign/repository/ccms_full/impl/TicketRepositoryImpl.java
+1
-1
src/main/java/com/viettel/campaign/service/impl/AgentsServiceImpl.java
.../com/viettel/campaign/service/impl/AgentsServiceImpl.java
+4
-4
src/main/java/com/viettel/campaign/service/impl/CampaignCfgServiceImpl.java
...viettel/campaign/service/impl/CampaignCfgServiceImpl.java
+4
-4
src/main/java/com/viettel/campaign/service/impl/CampaignExecuteServiceImp.java
...ttel/campaign/service/impl/CampaignExecuteServiceImp.java
+8
-8
src/main/java/com/viettel/campaign/service/impl/CampaignServiceImpl.java
...om/viettel/campaign/service/impl/CampaignServiceImpl.java
+2
-2
src/main/java/com/viettel/campaign/service/impl/CustomerServiceImpl.java
...om/viettel/campaign/service/impl/CustomerServiceImpl.java
+10
-10
src/main/java/com/viettel/campaign/utils/DateTimeUtil.java
src/main/java/com/viettel/campaign/utils/DateTimeUtil.java
+1
-1
src/main/java/com/viettel/campaign/utils/SearchOperation.java
...main/java/com/viettel/campaign/utils/SearchOperation.java
+7
-7
src/main/java/com/viettel/campaign/web/dto/ScenarioAnswerDTO.java
.../java/com/viettel/campaign/web/dto/ScenarioAnswerDTO.java
+14
-14
src/main/java/com/viettel/campaign/web/rest/ScenarioAnswerController.java
...m/viettel/campaign/web/rest/ScenarioAnswerController.java
+1
-1
src/main/java/com/viettel/campaign/web/rest/ScenarioController.java
...ava/com/viettel/campaign/web/rest/ScenarioController.java
+5
-5
No files found.
sonar-scanner.properties
0 → 100644
View file @
3356201f
sonar.host.url
=
http://192.168.1.210:9000
sonar.sourceEncoding
=
UTF-8
sonar.projectKey
=
0ad5d5fb7aa141b4ac383bcb096e2ec3faba0b1b
sonar.projectName
=
VTT_CAMPAIGN
sonar.projectVersion
=
1.0
sonar.sources
=
.
sonar.language
=
java
mvn
sonar
:
sonar -Dsonar.host.url=http://192.168.1.210:9000 -Dsonar.login=0ad5d5fb7aa141b4ac383bcb096e2ec3faba0b1b
\ No newline at end of file
src/main/java/com/viettel/campaign/model/ccms_full/CustomizeFields.java
View file @
3356201f
...
...
@@ -9,10 +9,10 @@ import java.util.Date;
@Entity
@Table
(
name
=
"CUSTOMIZE_FIELDS"
)
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
//
@Getter
//
@Setter
//
@NoArgsConstructor
//
@AllArgsConstructor
public
class
CustomizeFields
implements
Serializable
{
@Id
@GeneratedValue
(
generator
=
"CUSTOMIZE_FIELDS_SEQ"
)
...
...
@@ -64,10 +64,180 @@ public class CustomizeFields implements Serializable {
@Column
(
name
=
"ACTIVE"
)
private
Long
active
;
public
CustomizeFields
(
@NotNull
String
type
,
@NotNull
String
title
)
{
public
CustomizeFields
()
{
}
public
CustomizeFields
(
String
type
,
String
title
)
{
// public CustomizeFields(@NotNull String type, @NotNull String title) {
this
.
type
=
type
;
this
.
title
=
title
;
}
public
Long
getCustomizeFieldId
()
{
return
customizeFieldId
;
}
public
void
setCustomizeFieldId
(
Long
customizeFieldId
)
{
this
.
customizeFieldId
=
customizeFieldId
;
}
public
Long
getSiteId
()
{
return
siteId
;
}
public
void
setSiteId
(
Long
siteId
)
{
this
.
siteId
=
siteId
;
}
public
String
getFunctionCode
()
{
return
functionCode
;
}
public
void
setFunctionCode
(
String
functionCode
)
{
this
.
functionCode
=
functionCode
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Date
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
Date
createDate
)
{
this
.
createDate
=
createDate
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
Date
getUpdateDate
()
{
return
updateDate
;
}
public
void
setUpdateDate
(
Date
updateDate
)
{
this
.
updateDate
=
updateDate
;
}
public
Long
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Long
status
)
{
this
.
status
=
status
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getPlaceholder
()
{
return
placeholder
;
}
public
void
setPlaceholder
(
String
placeholder
)
{
this
.
placeholder
=
placeholder
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
Long
getPosition
()
{
return
position
;
}
public
void
setPosition
(
Long
position
)
{
this
.
position
=
position
;
}
public
Long
getRequired
()
{
return
required
;
}
public
void
setRequired
(
Long
required
)
{
this
.
required
=
required
;
}
public
Long
getFieldOptionsId
()
{
return
fieldOptionsId
;
}
public
void
setFieldOptionsId
(
Long
fieldOptionsId
)
{
this
.
fieldOptionsId
=
fieldOptionsId
;
}
public
String
getRegexpForValidation
()
{
return
regexpForValidation
;
}
public
void
setRegexpForValidation
(
String
regexpForValidation
)
{
this
.
regexpForValidation
=
regexpForValidation
;
}
public
Long
getMaxLength
()
{
return
maxLength
;
}
public
void
setMaxLength
(
Long
maxLength
)
{
this
.
maxLength
=
maxLength
;
}
public
Long
getMinLength
()
{
return
minLength
;
}
public
void
setMinLength
(
Long
minLength
)
{
this
.
minLength
=
minLength
;
}
public
Long
getMin
()
{
return
min
;
}
public
void
setMin
(
Long
min
)
{
this
.
min
=
min
;
}
public
Long
getMax
()
{
return
max
;
}
public
void
setMax
(
Long
max
)
{
this
.
max
=
max
;
}
public
Long
getActive
()
{
return
active
;
}
public
void
setActive
(
Long
active
)
{
this
.
active
=
active
;
}
}
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignCustomerListColumnRepositoryImpl.java
View file @
3356201f
...
...
@@ -67,7 +67,7 @@ public class CampaignCustomerListColumnRepositoryImpl implements CampaignCustome
data
=
query
.
list
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
finally
{
session
.
close
();
}
...
...
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignCustomerRepositoryImpl.java
View file @
3356201f
...
...
@@ -66,7 +66,7 @@ public class CampaignCustomerRepositoryImpl implements CampaignCustomerRepositor
result
=
query
.
list
();
}
catch
(
Exception
ex
)
{
ex
.
printStackTrace
();
//
ex.printStackTrace();
}
finally
{
session
.
close
();
}
...
...
src/main/java/com/viettel/campaign/repository/ccms_full/impl/CampaignExecuteRepositoryImp.java
View file @
3356201f
...
...
@@ -579,7 +579,7 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
return
result
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
result
;
...
...
src/main/java/com/viettel/campaign/repository/ccms_full/impl/TicketRepositoryImpl.java
View file @
3356201f
...
...
@@ -54,7 +54,7 @@ public class TicketRepositoryImpl implements TicketRepositoryCustom {
return
lst
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
lst
;
...
...
src/main/java/com/viettel/campaign/service/impl/AgentsServiceImpl.java
View file @
3356201f
...
...
@@ -54,7 +54,7 @@ public class AgentsServiceImpl implements AgentsService {
result
.
setDescription
(
"agents data null"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
result
;
...
...
@@ -251,7 +251,7 @@ public class AgentsServiceImpl implements AgentsService {
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
@@ -274,7 +274,7 @@ public class AgentsServiceImpl implements AgentsService {
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
@@ -532,7 +532,7 @@ public class AgentsServiceImpl implements AgentsService {
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
src/main/java/com/viettel/campaign/service/impl/CampaignCfgServiceImpl.java
View file @
3356201f
...
...
@@ -176,7 +176,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService {
resultDTO
.
setDescription
(
"CompleteCodeDTO null"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
@@ -203,7 +203,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService {
resultDTO
.
setDescription
(
"CompleteCodeDTO null"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
@@ -227,7 +227,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService {
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
@@ -249,7 +249,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService {
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
}
...
...
src/main/java/com/viettel/campaign/service/impl/CampaignExecuteServiceImp.java
View file @
3356201f
...
...
@@ -303,7 +303,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
...
...
@@ -475,7 +475,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
result
.
setData
(
rclResult
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
...
...
@@ -529,7 +529,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
SUCCESS
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
...
...
@@ -548,7 +548,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
result
.
setData
(
ccr
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
...
...
@@ -569,7 +569,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
result
.
setData
(
ccr
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
...
...
@@ -589,7 +589,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
result
.
setData
(
ccr
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
...
...
@@ -615,7 +615,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
SUCCESS
);
result
.
setData
(
resultUpdate
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
result
.
setErrorCode
(
Constants
.
ApiErrorCode
.
ERROR
);
result
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
...
...
@@ -715,7 +715,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
return
lstTimeZone
.
getDialMode
().
toString
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
"-1"
;
...
...
src/main/java/com/viettel/campaign/service/impl/CampaignServiceImpl.java
View file @
3356201f
...
...
@@ -32,8 +32,8 @@ import java.util.*;
public
class
CampaignServiceImpl
implements
CampaignService
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
CampaignServiceImpl
.
class
);
public
static
String
CAMPAIGN_TYPE
=
"CAMPAIGN_TYPE"
;
public
static
String
CAMPAIGN_STATUS
=
"CAMPAIGN_STATUS"
;
public
static
final
String
CAMPAIGN_TYPE
=
"CAMPAIGN_TYPE"
;
public
static
final
String
CAMPAIGN_STATUS
=
"CAMPAIGN_STATUS"
;
@Autowired
CampaignRepository
campaignRepository
;
...
...
src/main/java/com/viettel/campaign/service/impl/CustomerServiceImpl.java
View file @
3356201f
...
...
@@ -377,7 +377,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO
.
setDescription
(
"customerDTO null"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
@@ -400,7 +400,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
@@ -421,7 +421,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
}
...
...
@@ -513,7 +513,7 @@ public class CustomerServiceImpl implements CustomerService {
}
}
catch
(
Exception
e
)
{
//logger.info(e.getMessage(), e);
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
new
Date
();
}
...
...
@@ -698,7 +698,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
@@ -725,7 +725,7 @@ public class CustomerServiceImpl implements CustomerService {
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
...
...
@@ -753,7 +753,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO
.
setDescription
(
Constants
.
ApiErrorDesc
.
ERROR
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
resultDTO
;
}
...
...
@@ -897,7 +897,7 @@ public class CustomerServiceImpl implements CustomerService {
result
.
setTotalRow
(
customerContactRepository
.
findByCustomerIdAndAndContactTypeAndContact
(
customer
.
getCustomerId
(),
customer
.
getContactType
(),
customer
.
getContact
(),
null
).
size
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
result
;
}
...
...
@@ -920,7 +920,7 @@ public class CustomerServiceImpl implements CustomerService {
result
.
setDescription
(
"campaign customer data null"
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
return
result
;
}
...
...
@@ -1819,7 +1819,7 @@ public class CustomerServiceImpl implements CustomerService {
rootNode
=
new
RSQLParser
().
parse
(
queryString
);
query
=
rootNode
.
accept
(
visitor
,
entityManager
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
throw
new
IllegalArgumentException
(
e
.
getMessage
());
}
return
query
;
...
...
src/main/java/com/viettel/campaign/utils/DateTimeUtil.java
View file @
3356201f
...
...
@@ -114,7 +114,7 @@ public final class DateTimeUtil {
try
{
expression
=
new
CronExpression
(
cron
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
//
e.printStackTrace();
}
Date
currentDate
=
new
Date
();
assert
expression
!=
null
;
...
...
src/main/java/com/viettel/campaign/utils/SearchOperation.java
View file @
3356201f
...
...
@@ -2,19 +2,19 @@ package com.viettel.campaign.utils;
public
enum
SearchOperation
{
EQUALITY
,
NEGATION
,
GREATER_THAN
,
LESS_THAN
,
LIKE
,
STARTS_WITH
,
ENDS_WITH
,
CONTAINS
;
p
ublic
static
final
String
[]
SIMPLE_OPERATION_SET
=
{
":"
,
"!"
,
">"
,
"<"
,
"~"
};
p
rotected
static
final
String
[]
SIMPLE_OPERATION_SET
=
{
":"
,
"!"
,
">"
,
"<"
,
"~"
};
p
ublic
static
final
String
OR_PREDICATE_FLAG
=
"'"
;
p
rotected
static
final
String
OR_PREDICATE_FLAG
=
"'"
;
p
ublic
static
final
String
ZERO_OR_MORE_REGEX
=
"*"
;
p
rotected
static
final
String
ZERO_OR_MORE_REGEX
=
"*"
;
p
ublic
static
final
String
OR_OPERATOR
=
"OR"
;
p
rotected
static
final
String
OR_OPERATOR
=
"OR"
;
p
ublic
static
final
String
AND_OPERATOR
=
"AND"
;
p
rotected
static
final
String
AND_OPERATOR
=
"AND"
;
p
ublic
static
final
String
LEFT_PARANTHESIS
=
"("
;
p
rotected
static
final
String
LEFT_PARANTHESIS
=
"("
;
p
ublic
static
final
String
RIGHT_PARANTHESIS
=
")"
;
p
rotected
static
final
String
RIGHT_PARANTHESIS
=
")"
;
public
static
SearchOperation
getSimpleOperation
(
final
char
input
)
{
switch
(
input
)
{
...
...
src/main/java/com/viettel/campaign/web/dto/ScenarioAnswerDTO.java
View file @
3356201f
...
...
@@ -13,18 +13,18 @@ import java.util.Date;
@Getter
@Setter
public
class
ScenarioAnswerDTO
implements
Serializable
{
p
ublic
Long
scenarioAnswerId
;
p
ublic
Long
companySiteId
;
p
ublic
Long
scenarioQuestionId
;
p
ublic
String
code
;
p
ublic
String
answer
;
p
ublic
Integer
orderIndex
;
p
ublic
Short
hasInput
;
p
ublic
Short
status
;
p
ublic
Date
createTime
;
p
ublic
Date
deleteTime
;
p
ublic
Long
mappingQuestionId
;
p
ublic
Long
campaignId
;
p
ublic
String
importQuestionCode
;
p
ublic
String
mappingQuestionCode
;
p
rivate
Long
scenarioAnswerId
;
p
rivate
Long
companySiteId
;
p
rivate
Long
scenarioQuestionId
;
p
rivate
String
code
;
p
rivate
String
answer
;
p
rivate
Integer
orderIndex
;
p
rivate
Short
hasInput
;
p
rivate
Short
status
;
p
rivate
Date
createTime
;
p
rivate
Date
deleteTime
;
p
rivate
Long
mappingQuestionId
;
p
rivate
Long
campaignId
;
p
rivate
String
importQuestionCode
;
p
rivate
String
mappingQuestionCode
;
}
src/main/java/com/viettel/campaign/web/rest/ScenarioAnswerController.java
View file @
3356201f
...
...
@@ -39,7 +39,7 @@ public class ScenarioAnswerController {
}
@RequestMapping
(
value
=
"/count-duplicate-code"
,
method
=
RequestMethod
.
GET
)
ResponseEntity
<
Integer
>
countDuplicateCode
(
@RequestParam
String
code
,
@RequestParam
Long
scenarioQuestionId
,
@RequestParam
Long
scenarioAnswerId
)
{
public
ResponseEntity
<
Integer
>
countDuplicateCode
(
@RequestParam
String
code
,
@RequestParam
Long
scenarioQuestionId
,
@RequestParam
Long
scenarioAnswerId
)
{
Integer
count
=
scenarioAnswerService
.
countDuplicateScenarioCode
(
code
,
scenarioQuestionId
,
scenarioAnswerId
);
return
new
ResponseEntity
<>(
count
,
HttpStatus
.
OK
);
}
...
...
src/main/java/com/viettel/campaign/web/rest/ScenarioController.java
View file @
3356201f
...
...
@@ -46,30 +46,30 @@ public class ScenarioController {
ScenarioService
scenarioService
;
@RequestMapping
(
value
=
"/findOneByCampaignIdAndCompanyId"
,
method
=
RequestMethod
.
GET
)
Scenario
findOneByCampaignIdAndCompanyId
(
@RequestParam
Long
campaignId
,
@RequestParam
Long
companySiteId
)
{
public
Scenario
findOneByCampaignIdAndCompanyId
(
@RequestParam
Long
campaignId
,
@RequestParam
Long
companySiteId
)
{
return
scenarioService
.
findScenarioByCampaignIdAndCompanySiteId
(
campaignId
,
companySiteId
);
}
@RequestMapping
(
method
=
RequestMethod
.
PUT
)
ResponseEntity
<
ResultDTO
>
update
(
@RequestBody
ScenarioDTO
scenario
)
{
public
ResponseEntity
<
ResultDTO
>
update
(
@RequestBody
ScenarioDTO
scenario
)
{
ResultDTO
resultDTO
=
scenarioService
.
update
(
scenario
);
return
new
ResponseEntity
<>(
resultDTO
,
HttpStatus
.
OK
);
}
@RequestMapping
(
value
=
"/sort-question-answer"
,
method
=
RequestMethod
.
POST
)
ResponseEntity
<
ResultDTO
>
sortQuestionAndAnswer
(
@RequestBody
ScenarioDTO
scenarioDTO
)
{
public
ResponseEntity
<
ResultDTO
>
sortQuestionAndAnswer
(
@RequestBody
ScenarioDTO
scenarioDTO
)
{
ResultDTO
resultDTO
=
scenarioService
.
sortQuestionAndAnswer
(
scenarioDTO
);
return
new
ResponseEntity
<>(
resultDTO
,
HttpStatus
.
OK
);
}
@RequestMapping
(
value
=
"/count-duplicate-code"
,
method
=
RequestMethod
.
GET
)
ResponseEntity
<
Integer
>
countDuplicateCode
(
@RequestParam
String
code
,
@RequestParam
Long
scenarioId
,
@RequestParam
Long
companySiteId
)
{
public
ResponseEntity
<
Integer
>
countDuplicateCode
(
@RequestParam
String
code
,
@RequestParam
Long
scenarioId
,
@RequestParam
Long
companySiteId
)
{
Integer
count
=
scenarioService
.
countDuplicateScenarioCode
(
companySiteId
,
code
,
scenarioId
);
return
new
ResponseEntity
<>(
count
,
HttpStatus
.
OK
);
}
@RequestMapping
(
value
=
"/saveContactQuestResult"
,
method
=
RequestMethod
.
POST
)
ResponseEntity
<
ResultDTO
>
saveContactQuestResult
(
@RequestBody
ContactQuestResultDTO
dto
)
{
public
ResponseEntity
<
ResultDTO
>
saveContactQuestResult
(
@RequestBody
ContactQuestResultDTO
dto
)
{
ResultDTO
resultDTO
=
scenarioService
.
saveContacQuestResult
(
dto
);
return
new
ResponseEntity
<>(
resultDTO
,
HttpStatus
.
OK
);
}
...
...
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