提交 7b6ae81d 编写于 作者: sq3536's avatar sq3536

aipvo

上级 35132d4d
...@@ -16,68 +16,33 @@ ...@@ -16,68 +16,33 @@
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId> <artifactId>jackson-annotations</artifactId>
<version>2.11.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.83</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.18.16</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
<version>1.5.22</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>jakarta.validation</groupId> <groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId> <artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
<version>2.11.3</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
<includes>
<include>**/**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>cn.ibizlab</groupId>
<artifactId>ibizlab-generator-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<output>
../
</output>
<inputSpec>
../../XFOnline_1_3/model
</inputSpec>
<templateDirs>
${basedir}/src/main/resources/templ
</templateDirs>
<packageName>
${project.groupId}
</packageName>
<name>
${parent.artifactId}
</name>
</configuration>
<dependencies>
<dependency>
<groupId>cn.ibizlab</groupId>
<artifactId>ibizlab-template-apivo</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> </project>
...@@ -22,15 +22,13 @@ import lombok.*; ...@@ -22,15 +22,13 @@ import lombok.*;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import {{packageName}}.api.{{apps}}.dict.*; import {{packageName}}.api.{{apps}}.dict.*;
/** /**
* {{ctrl.appEntity.entity.logicName}}AddDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}} * {{ctrl.appEntity.entity.logicName}}AddDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}
*/ */
@Getter @Data
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "{{ctrl.appEntity.entity.codeName}}-{{ctrl.codeName}}-Add", description = "{{ctrl.appEntity.entity.logicName}}AddDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}") @ApiModel(value = "{{ctrl.appEntity.entity.codeName}}-{{ctrl.codeName}}-Add", description = "{{ctrl.appEntity.entity.logicName}}AddDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}")
public class {{pascalCase ctrl.codeName}}AddDto extends {{pascalCase ctrl.codeName}}BaseDto { public class {{pascalCase ctrl.codeName}}AddDto extends {{pascalCase ctrl.codeName}}BaseDto {
...@@ -44,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}AddDto extends {{pascalCase ctrl.codeNa ...@@ -44,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}AddDto extends {{pascalCase ctrl.codeNa
@JsonProperty("{{camelCase codeName}}") @JsonProperty("{{camelCase codeName}}")
{{#timeType}} {{#timeType}}
@JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8") @JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8")
@DateTimeFormat(pattern = "{{format}}")
{{/timeType}} {{/timeType}}
@JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}}) @JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}})
{{#eq javaType "Long"}} {{#eq javaType "Long"}}
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
{{/eq}} {{/eq}}
@ApiModelProperty(value = "{{logicName}}"{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}}) @ApiModelProperty(value = "{{logicName}}{{#if dict}},字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}"{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
protected {{javaType}} {{camelCase codeName}} {{#if createDefaultValue}}= {{createDefaultValue}}{{/if}}; protected {{javaType}} {{camelCase codeName}} {{#if createDefaultValue}}= {{createDefaultValue}}{{/if}};
{{/if}} {{/if}}
......
...@@ -22,14 +22,13 @@ import lombok.*; ...@@ -22,14 +22,13 @@ import lombok.*;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import {{packageName}}.api.{{apps}}.dict.*; import {{packageName}}.api.{{apps}}.dict.*;
/** /**
* {{ctrl.appEntity.entity.logicName}}BaseDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}} * {{ctrl.appEntity.entity.logicName}}BaseDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}
*/ */
@Getter @Data
@Setter
@NoArgsConstructor
@ApiModel(value = "{{ctrl.appEntity.entity.codeName}}-{{ctrl.codeName}}-Base", description = "{{ctrl.appEntity.entity.logicName}}BaseDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}") @ApiModel(value = "{{ctrl.appEntity.entity.codeName}}-{{ctrl.codeName}}-Base", description = "{{ctrl.appEntity.entity.logicName}}BaseDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}")
public class {{pascalCase ctrl.codeName}}BaseDto implements Serializable { public class {{pascalCase ctrl.codeName}}BaseDto implements Serializable {
...@@ -43,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}BaseDto implements Serializable { ...@@ -43,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}BaseDto implements Serializable {
@JsonProperty("{{camelCase codeName}}") @JsonProperty("{{camelCase codeName}}")
{{#timeType}} {{#timeType}}
@JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8") @JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8")
@DateTimeFormat(pattern = "{{format}}")
{{/timeType}} {{/timeType}}
@JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}}) @JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}})
{{#eq javaType "Long"}} {{#eq javaType "Long"}}
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
{{/eq}} {{/eq}}
@ApiModelProperty(value = "{{logicName}}"{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}}) @ApiModelProperty(value = "{{logicName}}{{#if dict}},字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}"{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
protected {{javaType}} {{camelCase codeName}}; protected {{javaType}} {{camelCase codeName}};
{{/unless}} {{/unless}}
......
...@@ -22,15 +22,13 @@ import lombok.*; ...@@ -22,15 +22,13 @@ import lombok.*;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import {{packageName}}.api.{{apps}}.dict.*; import {{packageName}}.api.{{apps}}.dict.*;
/** /**
* {{ctrl.appEntity.entity.logicName}}DTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}} * {{ctrl.appEntity.entity.logicName}}DTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}
*/ */
@Getter @Data
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "{{ctrl.appEntity.entity.codeName}}-{{ctrl.codeName}}", description = "{{ctrl.appEntity.entity.logicName}}DTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}") @ApiModel(value = "{{ctrl.appEntity.entity.codeName}}-{{ctrl.codeName}}", description = "{{ctrl.appEntity.entity.logicName}}DTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}")
public class {{pascalCase ctrl.codeName}}Dto extends {{pascalCase ctrl.codeName}}BaseDto { public class {{pascalCase ctrl.codeName}}Dto extends {{pascalCase ctrl.codeName}}BaseDto {
...@@ -44,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}Dto extends {{pascalCase ctrl.codeName} ...@@ -44,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}Dto extends {{pascalCase ctrl.codeName}
@JsonProperty("{{camelCase codeName}}") @JsonProperty("{{camelCase codeName}}")
{{#timeType}} {{#timeType}}
@JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8") @JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8")
@DateTimeFormat(pattern = "{{format}}")
{{/timeType}} {{/timeType}}
@JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}}) @JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}})
{{#eq javaType "Long"}} {{#eq javaType "Long"}}
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
{{/eq}} {{/eq}}
@ApiModelProperty(value = "{{logicName}}"{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}}) @ApiModelProperty(value = "{{logicName}}{{#if dict}},字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}"{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
protected {{javaType}} {{camelCase codeName}}; protected {{javaType}} {{camelCase codeName}};
{{/if}} {{/if}}
......
...@@ -22,15 +22,13 @@ import lombok.*; ...@@ -22,15 +22,13 @@ import lombok.*;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import {{packageName}}.api.{{apps}}.dict.*; import {{packageName}}.api.{{apps}}.dict.*;
/** /**
* {{ctrl.appEntity.entity.logicName}}UpdateDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}} * {{ctrl.appEntity.entity.logicName}}UpdateDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}
*/ */
@Getter @Data
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "{{ctrl.appEntity.entity.codeName}}-{{ctrl.codeName}}-Update", description = "{{ctrl.appEntity.entity.logicName}}UpdateDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}") @ApiModel(value = "{{ctrl.appEntity.entity.codeName}}-{{ctrl.codeName}}-Update", description = "{{ctrl.appEntity.entity.logicName}}UpdateDTO对象[{{ctrl.codeName}}]{{replace ctrl.logicName "表单" ""}}")
public class {{pascalCase ctrl.codeName}}UpdateDto extends {{pascalCase ctrl.codeName}}BaseDto { public class {{pascalCase ctrl.codeName}}UpdateDto extends {{pascalCase ctrl.codeName}}BaseDto {
...@@ -44,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}UpdateDto extends {{pascalCase ctrl.cod ...@@ -44,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}UpdateDto extends {{pascalCase ctrl.cod
@JsonProperty("{{camelCase codeName}}") @JsonProperty("{{camelCase codeName}}")
{{#timeType}} {{#timeType}}
@JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8") @JsonFormat(pattern = "{{format}}", locale = "zh", timezone = "GMT+8")
@DateTimeFormat(pattern = "{{format}}")
{{/timeType}} {{/timeType}}
@JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}}) @JSONField(name = "{{jsonName}}"{{#timeType}} , format = "{{format}}"{{/timeType}})
{{#eq javaType "Long"}} {{#eq javaType "Long"}}
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
{{/eq}} {{/eq}}
@ApiModelProperty(value = "{{logicName}}"{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}}) @ApiModelProperty(value = "{{logicName}}{{#if dict}},字典:{{dict.name}}{{/if}}{{#if timeType}},格式:{{format}}{{/if}}"{{#if timeType}}, notes = "格式:{{format}}"{{/if}}{{#if dict}}, notes = "字典:{{dict.name}}", dataType = "{{lowerCase type.java}}", reference = "{{dictCodeName}}"{{/if}}{{#if required}}, required = true{{/if}}{{#if hidden}}, hidden = true{{/if}}{{#if example}}, example = "{{example}}"{{/if}})
protected {{javaType}} {{camelCase codeName}} {{#if updateDefaultValue}}= {{updateDefaultValue}}{{/if}}; protected {{javaType}} {{camelCase codeName}} {{#if updateDefaultValue}}= {{updateDefaultValue}}{{/if}};
{{/if}} {{/if}}
......
...@@ -35,7 +35,7 @@ import {{packageName}}.api.{{apps}}.dict.*; ...@@ -35,7 +35,7 @@ import {{packageName}}.api.{{apps}}.dict.*;
@Slf4j @Slf4j
@Api(tags = {"{{appEntity.entity.logicName}}" }) @Api(tags = {"{{appEntity.entity.logicName}}" })
@RestController("{{lowerCase appEntity.app.codeName}}-{{lowerCase appEntity.entity.codeName}}") @RestController("{{lowerCase appEntity.app.codeName}}-{{lowerCase appEntity.entity.codeName}}")
@RequestMapping("/{{lowerCase appEntity.app.codeName}}/{{pluralize codeName}}") @RequestMapping("/{{lowerCase appEntity.app.codeName}}/{{pluralize appEntity.entity.codeName}}")
public class {{pascalCase appEntity.codeName}}Resource { public class {{pascalCase appEntity.codeName}}Resource {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册