Commit 3356201f authored by Nguyen Ha's avatar Nguyen Ha

fix vul

parent f7378f37
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
...@@ -9,10 +9,10 @@ import java.util.Date; ...@@ -9,10 +9,10 @@ import java.util.Date;
@Entity @Entity
@Table(name = "CUSTOMIZE_FIELDS") @Table(name = "CUSTOMIZE_FIELDS")
@Getter //@Getter
@Setter //@Setter
@NoArgsConstructor //@NoArgsConstructor
@AllArgsConstructor //@AllArgsConstructor
public class CustomizeFields implements Serializable { public class CustomizeFields implements Serializable {
@Id @Id
@GeneratedValue(generator = "CUSTOMIZE_FIELDS_SEQ") @GeneratedValue(generator = "CUSTOMIZE_FIELDS_SEQ")
...@@ -64,10 +64,180 @@ public class CustomizeFields implements Serializable { ...@@ -64,10 +64,180 @@ public class CustomizeFields implements Serializable {
@Column(name = "ACTIVE") @Column(name = "ACTIVE")
private Long 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.type = type;
this.title = title; 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;
}
} }
...@@ -67,7 +67,7 @@ public class CampaignCustomerListColumnRepositoryImpl implements CampaignCustome ...@@ -67,7 +67,7 @@ public class CampaignCustomerListColumnRepositoryImpl implements CampaignCustome
data = query.list(); data = query.list();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} finally { } finally {
session.close(); session.close();
} }
......
...@@ -66,7 +66,7 @@ public class CampaignCustomerRepositoryImpl implements CampaignCustomerRepositor ...@@ -66,7 +66,7 @@ public class CampaignCustomerRepositoryImpl implements CampaignCustomerRepositor
result = query.list(); result = query.list();
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); // ex.printStackTrace();
} finally { } finally {
session.close(); session.close();
} }
......
...@@ -579,7 +579,7 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository { ...@@ -579,7 +579,7 @@ public class CampaignExecuteRepositoryImp implements CampaignExecuteRepository {
return result; return result;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return result; return result;
......
...@@ -54,7 +54,7 @@ public class TicketRepositoryImpl implements TicketRepositoryCustom { ...@@ -54,7 +54,7 @@ public class TicketRepositoryImpl implements TicketRepositoryCustom {
return lst; return lst;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return lst; return lst;
......
...@@ -54,7 +54,7 @@ public class AgentsServiceImpl implements AgentsService { ...@@ -54,7 +54,7 @@ public class AgentsServiceImpl implements AgentsService {
result.setDescription("agents data null"); result.setDescription("agents data null");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return result; return result;
...@@ -251,7 +251,7 @@ public class AgentsServiceImpl implements AgentsService { ...@@ -251,7 +251,7 @@ public class AgentsServiceImpl implements AgentsService {
resultDTO.setDescription(Constants.ApiErrorDesc.ERROR); resultDTO.setDescription(Constants.ApiErrorDesc.ERROR);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
...@@ -274,7 +274,7 @@ public class AgentsServiceImpl implements AgentsService { ...@@ -274,7 +274,7 @@ public class AgentsServiceImpl implements AgentsService {
resultDTO.setDescription(Constants.ApiErrorDesc.ERROR); resultDTO.setDescription(Constants.ApiErrorDesc.ERROR);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
...@@ -532,7 +532,7 @@ public class AgentsServiceImpl implements AgentsService { ...@@ -532,7 +532,7 @@ public class AgentsServiceImpl implements AgentsService {
resultDTO.setDescription(Constants.ApiErrorDesc.ERROR); resultDTO.setDescription(Constants.ApiErrorDesc.ERROR);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
......
...@@ -176,7 +176,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService { ...@@ -176,7 +176,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService {
resultDTO.setDescription("CompleteCodeDTO null"); resultDTO.setDescription("CompleteCodeDTO null");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
...@@ -203,7 +203,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService { ...@@ -203,7 +203,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService {
resultDTO.setDescription("CompleteCodeDTO null"); resultDTO.setDescription("CompleteCodeDTO null");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
...@@ -227,7 +227,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService { ...@@ -227,7 +227,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService {
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
...@@ -249,7 +249,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService { ...@@ -249,7 +249,7 @@ public class CampaignCfgServiceImpl implements CampaignCfgService {
resultDTO.setDescription(Constants.ApiErrorDesc.ERROR); resultDTO.setDescription(Constants.ApiErrorDesc.ERROR);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
} }
......
...@@ -303,7 +303,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService { ...@@ -303,7 +303,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result.setErrorCode(Constants.ApiErrorCode.SUCCESS); result.setErrorCode(Constants.ApiErrorCode.SUCCESS);
result.setDescription(Constants.ApiErrorDesc.SUCCESS); result.setDescription(Constants.ApiErrorDesc.SUCCESS);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
result.setErrorCode(Constants.ApiErrorCode.ERROR); result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR); result.setDescription(Constants.ApiErrorDesc.ERROR);
} }
...@@ -475,7 +475,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService { ...@@ -475,7 +475,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result.setDescription(Constants.ApiErrorDesc.SUCCESS); result.setDescription(Constants.ApiErrorDesc.SUCCESS);
result.setData(rclResult); result.setData(rclResult);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
result.setErrorCode(Constants.ApiErrorCode.ERROR); result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR); result.setDescription(Constants.ApiErrorDesc.ERROR);
} }
...@@ -529,7 +529,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService { ...@@ -529,7 +529,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result.setErrorCode(Constants.ApiErrorCode.SUCCESS); result.setErrorCode(Constants.ApiErrorCode.SUCCESS);
result.setDescription(Constants.ApiErrorDesc.SUCCESS); result.setDescription(Constants.ApiErrorDesc.SUCCESS);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
result.setErrorCode(Constants.ApiErrorCode.ERROR); result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR); result.setDescription(Constants.ApiErrorDesc.ERROR);
} }
...@@ -548,7 +548,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService { ...@@ -548,7 +548,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result.setDescription(Constants.ApiErrorDesc.SUCCESS); result.setDescription(Constants.ApiErrorDesc.SUCCESS);
result.setData(ccr); result.setData(ccr);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
result.setErrorCode(Constants.ApiErrorCode.ERROR); result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR); result.setDescription(Constants.ApiErrorDesc.ERROR);
} }
...@@ -569,7 +569,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService { ...@@ -569,7 +569,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result.setDescription(Constants.ApiErrorDesc.SUCCESS); result.setDescription(Constants.ApiErrorDesc.SUCCESS);
result.setData(ccr); result.setData(ccr);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
result.setErrorCode(Constants.ApiErrorCode.ERROR); result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR); result.setDescription(Constants.ApiErrorDesc.ERROR);
} }
...@@ -589,7 +589,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService { ...@@ -589,7 +589,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result.setDescription(Constants.ApiErrorDesc.SUCCESS); result.setDescription(Constants.ApiErrorDesc.SUCCESS);
result.setData(ccr); result.setData(ccr);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
result.setErrorCode(Constants.ApiErrorCode.ERROR); result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR); result.setDescription(Constants.ApiErrorDesc.ERROR);
} }
...@@ -615,7 +615,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService { ...@@ -615,7 +615,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
result.setDescription(Constants.ApiErrorDesc.SUCCESS); result.setDescription(Constants.ApiErrorDesc.SUCCESS);
result.setData(resultUpdate); result.setData(resultUpdate);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
result.setErrorCode(Constants.ApiErrorCode.ERROR); result.setErrorCode(Constants.ApiErrorCode.ERROR);
result.setDescription(Constants.ApiErrorDesc.ERROR); result.setDescription(Constants.ApiErrorDesc.ERROR);
} }
...@@ -715,7 +715,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService { ...@@ -715,7 +715,7 @@ public class CampaignExecuteServiceImp implements CampaignExecuteService {
return lstTimeZone.getDialMode().toString(); return lstTimeZone.getDialMode().toString();
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return "-1"; return "-1";
......
...@@ -32,8 +32,8 @@ import java.util.*; ...@@ -32,8 +32,8 @@ import java.util.*;
public class CampaignServiceImpl implements CampaignService { public class CampaignServiceImpl implements CampaignService {
private static final Logger logger = LogManager.getLogger(CampaignServiceImpl.class); private static final Logger logger = LogManager.getLogger(CampaignServiceImpl.class);
public static String CAMPAIGN_TYPE = "CAMPAIGN_TYPE"; public static final String CAMPAIGN_TYPE = "CAMPAIGN_TYPE";
public static String CAMPAIGN_STATUS = "CAMPAIGN_STATUS"; public static final String CAMPAIGN_STATUS = "CAMPAIGN_STATUS";
@Autowired @Autowired
CampaignRepository campaignRepository; CampaignRepository campaignRepository;
......
...@@ -377,7 +377,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -377,7 +377,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO.setDescription("customerDTO null"); resultDTO.setDescription("customerDTO null");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
...@@ -400,7 +400,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -400,7 +400,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO.setDescription(Constants.ApiErrorDesc.ERROR); resultDTO.setDescription(Constants.ApiErrorDesc.ERROR);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
...@@ -421,7 +421,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -421,7 +421,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO.setDescription(Constants.ApiErrorDesc.ERROR); resultDTO.setDescription(Constants.ApiErrorDesc.ERROR);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
} }
...@@ -513,7 +513,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -513,7 +513,7 @@ public class CustomerServiceImpl implements CustomerService {
} }
} catch (Exception e) { } catch (Exception e) {
//logger.info(e.getMessage(), e); //logger.info(e.getMessage(), e);
e.printStackTrace(); // e.printStackTrace();
} }
return new Date(); return new Date();
} }
...@@ -698,7 +698,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -698,7 +698,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO.setDescription(Constants.ApiErrorDesc.ERROR); resultDTO.setDescription(Constants.ApiErrorDesc.ERROR);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
...@@ -725,7 +725,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -725,7 +725,7 @@ public class CustomerServiceImpl implements CustomerService {
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
...@@ -753,7 +753,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -753,7 +753,7 @@ public class CustomerServiceImpl implements CustomerService {
resultDTO.setDescription(Constants.ApiErrorDesc.ERROR); resultDTO.setDescription(Constants.ApiErrorDesc.ERROR);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return resultDTO; return resultDTO;
} }
...@@ -897,7 +897,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -897,7 +897,7 @@ public class CustomerServiceImpl implements CustomerService {
result.setTotalRow(customerContactRepository.findByCustomerIdAndAndContactTypeAndContact(customer.getCustomerId(), customer.getContactType(), customer.getContact(), null).size()); result.setTotalRow(customerContactRepository.findByCustomerIdAndAndContactTypeAndContact(customer.getCustomerId(), customer.getContactType(), customer.getContact(), null).size());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return result; return result;
} }
...@@ -920,7 +920,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -920,7 +920,7 @@ public class CustomerServiceImpl implements CustomerService {
result.setDescription("campaign customer data null"); result.setDescription("campaign customer data null");
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} }
return result; return result;
} }
...@@ -1819,7 +1819,7 @@ public class CustomerServiceImpl implements CustomerService { ...@@ -1819,7 +1819,7 @@ public class CustomerServiceImpl implements CustomerService {
rootNode = new RSQLParser().parse(queryString); rootNode = new RSQLParser().parse(queryString);
query = rootNode.accept(visitor, entityManager); query = rootNode.accept(visitor, entityManager);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
throw new IllegalArgumentException(e.getMessage()); throw new IllegalArgumentException(e.getMessage());
} }
return query; return query;
......
...@@ -114,7 +114,7 @@ public final class DateTimeUtil { ...@@ -114,7 +114,7 @@ public final class DateTimeUtil {
try { try {
expression = new CronExpression(cron); expression = new CronExpression(cron);
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); // e.printStackTrace();
} }
Date currentDate = new Date(); Date currentDate = new Date();
assert expression != null; assert expression != null;
......
...@@ -2,19 +2,19 @@ package com.viettel.campaign.utils; ...@@ -2,19 +2,19 @@ package com.viettel.campaign.utils;
public enum SearchOperation { public enum SearchOperation {
EQUALITY, NEGATION, GREATER_THAN, LESS_THAN, LIKE, STARTS_WITH, ENDS_WITH, CONTAINS; EQUALITY, NEGATION, GREATER_THAN, LESS_THAN, LIKE, STARTS_WITH, ENDS_WITH, CONTAINS;
public static final String[] SIMPLE_OPERATION_SET = { ":", "!", ">", "<", "~" }; protected static final String[] SIMPLE_OPERATION_SET = { ":", "!", ">", "<", "~" };
public static final String OR_PREDICATE_FLAG = "'"; protected static final String OR_PREDICATE_FLAG = "'";
public static final String ZERO_OR_MORE_REGEX = "*"; protected static final String ZERO_OR_MORE_REGEX = "*";
public static final String OR_OPERATOR = "OR"; protected static final String OR_OPERATOR = "OR";
public static final String AND_OPERATOR = "AND"; protected static final String AND_OPERATOR = "AND";
public static final String LEFT_PARANTHESIS = "("; protected static final String LEFT_PARANTHESIS = "(";
public static final String RIGHT_PARANTHESIS = ")"; protected static final String RIGHT_PARANTHESIS = ")";
public static SearchOperation getSimpleOperation(final char input) { public static SearchOperation getSimpleOperation(final char input) {
switch (input) { switch (input) {
......
...@@ -13,18 +13,18 @@ import java.util.Date; ...@@ -13,18 +13,18 @@ import java.util.Date;
@Getter @Getter
@Setter @Setter
public class ScenarioAnswerDTO implements Serializable { public class ScenarioAnswerDTO implements Serializable {
public Long scenarioAnswerId; private Long scenarioAnswerId;
public Long companySiteId; private Long companySiteId;
public Long scenarioQuestionId; private Long scenarioQuestionId;
public String code; private String code;
public String answer; private String answer;
public Integer orderIndex; private Integer orderIndex;
public Short hasInput; private Short hasInput;
public Short status; private Short status;
public Date createTime; private Date createTime;
public Date deleteTime; private Date deleteTime;
public Long mappingQuestionId; private Long mappingQuestionId;
public Long campaignId; private Long campaignId;
public String importQuestionCode; private String importQuestionCode;
public String mappingQuestionCode; private String mappingQuestionCode;
} }
...@@ -39,7 +39,7 @@ public class ScenarioAnswerController { ...@@ -39,7 +39,7 @@ public class ScenarioAnswerController {
} }
@RequestMapping(value = "/count-duplicate-code", method = RequestMethod.GET) @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); Integer count = scenarioAnswerService.countDuplicateScenarioCode(code, scenarioQuestionId, scenarioAnswerId);
return new ResponseEntity<>(count, HttpStatus.OK); return new ResponseEntity<>(count, HttpStatus.OK);
} }
......
...@@ -46,30 +46,30 @@ public class ScenarioController { ...@@ -46,30 +46,30 @@ public class ScenarioController {
ScenarioService scenarioService; ScenarioService scenarioService;
@RequestMapping(value = "/findOneByCampaignIdAndCompanyId", method = RequestMethod.GET) @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); return scenarioService.findScenarioByCampaignIdAndCompanySiteId(campaignId, companySiteId);
} }
@RequestMapping(method = RequestMethod.PUT) @RequestMapping(method = RequestMethod.PUT)
ResponseEntity<ResultDTO> update(@RequestBody ScenarioDTO scenario) { public ResponseEntity<ResultDTO> update(@RequestBody ScenarioDTO scenario) {
ResultDTO resultDTO = scenarioService.update(scenario); ResultDTO resultDTO = scenarioService.update(scenario);
return new ResponseEntity<>(resultDTO, HttpStatus.OK); return new ResponseEntity<>(resultDTO, HttpStatus.OK);
} }
@RequestMapping(value = "/sort-question-answer", method = RequestMethod.POST) @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); ResultDTO resultDTO = scenarioService.sortQuestionAndAnswer(scenarioDTO);
return new ResponseEntity<>(resultDTO, HttpStatus.OK); return new ResponseEntity<>(resultDTO, HttpStatus.OK);
} }
@RequestMapping(value = "/count-duplicate-code", method = RequestMethod.GET) @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); Integer count = scenarioService.countDuplicateScenarioCode(companySiteId, code, scenarioId);
return new ResponseEntity<>(count, HttpStatus.OK); return new ResponseEntity<>(count, HttpStatus.OK);
} }
@RequestMapping(value = "/saveContactQuestResult", method = RequestMethod.POST) @RequestMapping(value = "/saveContactQuestResult", method = RequestMethod.POST)
ResponseEntity<ResultDTO> saveContactQuestResult(@RequestBody ContactQuestResultDTO dto) { public ResponseEntity<ResultDTO> saveContactQuestResult(@RequestBody ContactQuestResultDTO dto) {
ResultDTO resultDTO = scenarioService.saveContacQuestResult(dto); ResultDTO resultDTO = scenarioService.saveContacQuestResult(dto);
return new ResponseEntity<>(resultDTO, HttpStatus.OK); return new ResponseEntity<>(resultDTO, HttpStatus.OK);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment