updated code for form table removed orderNo and update the data type of form table

This commit is contained in:
rajesh
2024-09-02 19:37:22 +05:30
parent 18e6c87a6a
commit c05a5d22ee
8 changed files with 9 additions and 14 deletions

View File

@@ -46,7 +46,6 @@ public class FormDao {
formEntity.setCall(callEntity);
formEntity.setLabel(formRequest.getLabel());
formEntity.setContent(setContentResponseBean(formRequest.getContent()));
formEntity.setOrderNo(formRequest.getOrderNo());
formEntity=saveFormEntity(formEntity);
return formEntity;
}
@@ -56,7 +55,6 @@ public class FormDao {
formResponseBean.setContent(Utils.convertJsonStringToList(formEntity.getContent(), ContentResponseBean.class));
formResponseBean.setLabel(formEntity.getLabel());
formResponseBean.setCallId(formEntity.getCall().getId());
formResponseBean.setOrderNo(formEntity.getOrderNo());
return formResponseBean;
}
public FormResponseBean createForm(Long callId,FormRequest formRequest){
@@ -73,9 +71,6 @@ public class FormDao {
FormEntity formEntity = formService.getFormEntityById(formId);
Utils.setIfUpdated(formEntity::getLabel,formEntity::setLabel,formRequest.getLabel());
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=saveFormEntity(formEntity);
return convertFormEntityToFormResponseBean(formEntity);

View File

@@ -23,7 +23,4 @@ public class FormEntity extends BaseEntity{
@Column(name = "CONTENT", length = 255)
private String content;
@Column(name = "ORDER_NO")
private Integer orderNo;
}

View File

@@ -11,6 +11,4 @@ public class FormRequest {
private List<ContentRequestBean> content;
private Integer orderNo;
}

View File

@@ -7,5 +7,5 @@ public class SettingRequestBean {
private String name;
private String value;
private Object value;
}

View File

@@ -15,6 +15,4 @@ public class FormResponseBean {
private Long callId;
private List<ContentResponseBean> content;
private Integer orderNo;
}

View File

@@ -7,5 +7,5 @@ public class SettingResponseBean {
private String name;
private String value;
private Object value;
}

View File

@@ -21,6 +21,7 @@ spring.liquibase.enabled=true
# Swagger Configuration
springdoc.api-docs.path=/v1/api-docs
springdoc.swagger-ui.tagsSorter=alpha
#aws configuration

View File

@@ -534,4 +534,10 @@
</column>
</addColumn>
</changeSet>
<changeSet id="02-09-2024_1" author="Rajesh Khore">
<dropColumn tableName="FORM"
columnName="order_no" />
</changeSet>
</databaseChangeLog>