cloud-server/cloud-modules/cloud-modules-gen/src/main/resources/vm/java/query.java.vm

63 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package ${packageName}.domain.req;
#foreach ($import in $importList)
import ${import};
#end
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.muyu.common.core.web.page.PageReq;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.experimental.SuperBuilder;
import ${packageName}.domain.model.${ClassName}QueryModel;
/**
* ${functionName}查询请求对象
*
* @author ${author}
* @date ${datetime}
*/
#if($table.crud)
#set($Entity="BaseEntity")
#elseif($table.tree)
#set($Entity="TreeEntity")
#end
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "${functionName}查询请求对象")
@EqualsAndHashCode(callSuper = true)
public class ${ClassName}QueryReq extends PageReq {
#foreach ($column in $columns)
#if(!$table.isSuperColumn($column.javaField))
#if($column.isQuery == '1')
/**
* $column.columnComment
*/
#if($column.list)
#set($parentheseIndex=$column.columnComment.indexOf(""))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
#if($column.javaType == 'Date')
@JsonFormat(pattern = "yyyy-MM-dd")
#end
#end
#if($column.javaField == $pkColumn.javaField)
@TableId(value = "${pkColumn.javaField}",type = IdType.AUTO)
#end
@Schema(name = "${column.javaField}", title = "${column.columnComment}", description = "${column.columnComment}")
private $column.javaType $column.javaField;
#end
#end
#end
}