updated code for form table removed orderNo and update the data type of form table
This commit is contained in:
@@ -46,7 +46,6 @@ public class FormDao {
|
|||||||
formEntity.setCall(callEntity);
|
formEntity.setCall(callEntity);
|
||||||
formEntity.setLabel(formRequest.getLabel());
|
formEntity.setLabel(formRequest.getLabel());
|
||||||
formEntity.setContent(setContentResponseBean(formRequest.getContent()));
|
formEntity.setContent(setContentResponseBean(formRequest.getContent()));
|
||||||
formEntity.setOrderNo(formRequest.getOrderNo());
|
|
||||||
formEntity=saveFormEntity(formEntity);
|
formEntity=saveFormEntity(formEntity);
|
||||||
return formEntity;
|
return formEntity;
|
||||||
}
|
}
|
||||||
@@ -56,7 +55,6 @@ public class FormDao {
|
|||||||
formResponseBean.setContent(Utils.convertJsonStringToList(formEntity.getContent(), ContentResponseBean.class));
|
formResponseBean.setContent(Utils.convertJsonStringToList(formEntity.getContent(), ContentResponseBean.class));
|
||||||
formResponseBean.setLabel(formEntity.getLabel());
|
formResponseBean.setLabel(formEntity.getLabel());
|
||||||
formResponseBean.setCallId(formEntity.getCall().getId());
|
formResponseBean.setCallId(formEntity.getCall().getId());
|
||||||
formResponseBean.setOrderNo(formEntity.getOrderNo());
|
|
||||||
return formResponseBean;
|
return formResponseBean;
|
||||||
}
|
}
|
||||||
public FormResponseBean createForm(Long callId,FormRequest formRequest){
|
public FormResponseBean createForm(Long callId,FormRequest formRequest){
|
||||||
@@ -73,9 +71,6 @@ public class FormDao {
|
|||||||
FormEntity formEntity = formService.getFormEntityById(formId);
|
FormEntity formEntity = formService.getFormEntityById(formId);
|
||||||
Utils.setIfUpdated(formEntity::getLabel,formEntity::setLabel,formRequest.getLabel());
|
Utils.setIfUpdated(formEntity::getLabel,formEntity::setLabel,formRequest.getLabel());
|
||||||
Utils.setIfUpdated(formEntity::getContent,formEntity::setContent,setContentResponseBean(formRequest.getContent()));
|
Utils.setIfUpdated(formEntity::getContent,formEntity::setContent,setContentResponseBean(formRequest.getContent()));
|
||||||
if(formRequest.getOrderNo()!=null && formRequest.getOrderNo() > 0) {
|
|
||||||
Utils.setIfUpdated(formEntity::getOrderNo, formEntity::setOrderNo, formRequest.getOrderNo());
|
|
||||||
}
|
|
||||||
formEntity.setUpdatedDate(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
formEntity.setUpdatedDate(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
||||||
formEntity=saveFormEntity(formEntity);
|
formEntity=saveFormEntity(formEntity);
|
||||||
return convertFormEntityToFormResponseBean(formEntity);
|
return convertFormEntityToFormResponseBean(formEntity);
|
||||||
|
|||||||
@@ -23,7 +23,4 @@ public class FormEntity extends BaseEntity{
|
|||||||
|
|
||||||
@Column(name = "CONTENT", length = 255)
|
@Column(name = "CONTENT", length = 255)
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
@Column(name = "ORDER_NO")
|
|
||||||
private Integer orderNo;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,4 @@ public class FormRequest {
|
|||||||
|
|
||||||
private List<ContentRequestBean> content;
|
private List<ContentRequestBean> content;
|
||||||
|
|
||||||
private Integer orderNo;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,5 +7,5 @@ public class SettingRequestBean {
|
|||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private String value;
|
private Object value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,4 @@ public class FormResponseBean {
|
|||||||
private Long callId;
|
private Long callId;
|
||||||
|
|
||||||
private List<ContentResponseBean> content;
|
private List<ContentResponseBean> content;
|
||||||
|
|
||||||
private Integer orderNo;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,5 +7,5 @@ public class SettingResponseBean {
|
|||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private String value;
|
private Object value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ spring.liquibase.enabled=true
|
|||||||
|
|
||||||
# Swagger Configuration
|
# Swagger Configuration
|
||||||
springdoc.api-docs.path=/v1/api-docs
|
springdoc.api-docs.path=/v1/api-docs
|
||||||
|
springdoc.swagger-ui.tagsSorter=alpha
|
||||||
|
|
||||||
|
|
||||||
#aws configuration
|
#aws configuration
|
||||||
|
|||||||
@@ -534,4 +534,10 @@
|
|||||||
</column>
|
</column>
|
||||||
</addColumn>
|
</addColumn>
|
||||||
</changeSet>
|
</changeSet>
|
||||||
|
|
||||||
|
<changeSet id="02-09-2024_1" author="Rajesh Khore">
|
||||||
|
<dropColumn tableName="FORM"
|
||||||
|
columnName="order_no" />
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
|
|||||||
Reference in New Issue
Block a user