From 9d177b0ff6bffe0161403216e834dafc0bfc5efe Mon Sep 17 00:00:00 2001 From: Lucky0829 <641787296@qq.com> Date: Tue, 30 Apr 2019 10:47:39 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96ing.=20=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E6=8E=A5=E5=8F=A3=E6=96=87=E6=A1=A3=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/template/Controller.java.vm | 4 ++++ .../pigx-codegen/src/main/resources/template/Entity.java.vm | 2 ++ 2 files changed, 6 insertions(+) diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/Controller.java.vm b/pigx-visual/pigx-codegen/src/main/resources/template/Controller.java.vm index 766859cbf..420b9fd90 100755 --- a/pigx-visual/pigx-codegen/src/main/resources/template/Controller.java.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/Controller.java.vm @@ -24,6 +24,9 @@ import com.pig4cloud.pigx.common.log.annotation.SysLog; import ${package}.${moduleName}.entity.${className}; import ${package}.${moduleName}.service.${className}Service; import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -37,6 +40,7 @@ import org.springframework.web.bind.annotation.*; @RestController @AllArgsConstructor @RequestMapping("/${pathName}" ) +@Api(value = "${pathName}", tags = "${pathName}管理") public class ${className}Controller { private final ${className}Service ${classname}Service; diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/Entity.java.vm b/pigx-visual/pigx-codegen/src/main/resources/template/Entity.java.vm index fbada9818..dab4a86c5 100755 --- a/pigx-visual/pigx-codegen/src/main/resources/template/Entity.java.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/Entity.java.vm @@ -20,6 +20,7 @@ package ${package}.${moduleName}.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; +import io.swagger.annotations.ApiModel; import lombok.Data; import lombok.EqualsAndHashCode; #if(${hasBigDecimal}) @@ -37,6 +38,7 @@ import java.time.LocalDateTime; @Data @TableName("${tableName}") @EqualsAndHashCode(callSuper = true) +@ApiModel(description = ${comments}) public class ${className} extends Model<${className}> { private static final long serialVersionUID = 1L;