All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.jpa.SearchRequest.ftl Maven / Gradle / Ivy

There is a newer version: 1.1.10-2024
Show newest version
package ${requestPackage};

import com.nbsaas.boot.rest.filter.Operator;
import com.nbsaas.boot.rest.filter.Search;
import com.nbsaas.boot.rest.request.PageRequest;
import lombok.*;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;
<#if formBean.searches??>
    <#list formBean.searches as item>
        <#if item.fieldType?? && item.fieldType == 5 >
import ${item.fullType};
        
    


/**
* 搜索bean
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ${formBean.className}SearchRequest   extends PageRequest implements Serializable {

/**
* 序列化参数
*/
private static final long serialVersionUID = 1L;

<#list formBean.searches as item>

    @Search(name = "${item.key}",operator = Operator.${item.operator})
    private ${item.className} ${item.id};


<#list formBean.searchFields as item>
    <#if item.fieldType==1>
        <#if item.type == 'String'>

            /**
            * ${item.comment!}
            **/
            @Search(name = "${item.id}",operator = Operator.like)
            private ${item.type} ${item.id};
        <#elseif item.type == 'Long'>

            /**
            * ${item.comment!}
            **/
            @Search(name = "${item.id}",operator = Operator.eq)
            private ${item.type} ${item.id};
        <#elseif item.type == 'Integer'>

            /**
            * ${item.comment!}
            **/
            @Search(name = "${item.id}",operator = Operator.eq)
            private ${item.type} ${item.id};
        
    



<#if formBean.catalog>
    private int fetch;


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy