From 6db4b036b0981f42ddd6bcbf14a9791c6d97e03e Mon Sep 17 00:00:00 2001 From: wyd <475583447@qq.com> Date: Wed, 24 Apr 2024 15:05:28 +0800 Subject: [PATCH] ... --- ...{JGApplication.java => JgApplication.java} | 4 +- ...ializer.java => JgServletInitializer.java} | 4 +- .../controller/AboutPartThreeController.java | 19 + .../project/about/domain/AboutPartThree.java | 8 + .../about/service/IAboutPartThreeService.java | 1 + src/main/resources/vm/java/controller.java.vm | 22 +- src/main/resources/vm/java/domain.java.vm | 3 + src/main/resources/vm/vue/index.vue.vm | 1273 +++++++++-------- src/main/resources/vm/vue/v3/index.vue.vm | 16 + target/classes/com/jg/JGApplication.class | Bin 3217 -> 3217 bytes .../classes/com/jg/JGServletInitializer.class | Bin 889 -> 889 bytes .../controller/AboutPartThreeController.class | Bin 4738 -> 5685 bytes ...AboutPartThree$AboutPartThreeBuilder.class | Bin 2447 -> 2447 bytes .../project/about/domain/AboutPartThree.class | Bin 6330 -> 6451 bytes target/classes/vm/java/controller.java.vm | 22 +- target/classes/vm/java/domain.java.vm | 2 + target/classes/vm/vue/index.vue.vm | 1273 +++++++++-------- target/classes/vm/vue/v3/index.vue.vm | 16 + 18 files changed, 1509 insertions(+), 1154 deletions(-) rename src/main/java/com/jg/{JGApplication.java => JgApplication.java} (97%) rename src/main/java/com/jg/{JGServletInitializer.java => JgServletInitializer.java} (73%) diff --git a/src/main/java/com/jg/JGApplication.java b/src/main/java/com/jg/JgApplication.java similarity index 97% rename from src/main/java/com/jg/JGApplication.java rename to src/main/java/com/jg/JgApplication.java index b812702..0a4e5d6 100644 --- a/src/main/java/com/jg/JGApplication.java +++ b/src/main/java/com/jg/JgApplication.java @@ -19,10 +19,10 @@ import java.net.UnknownHostException; @Slf4j @EnableScheduling @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) -public class JGApplication +public class JgApplication { public static void main(String[] args) throws UnknownHostException { - ConfigurableApplicationContext application = SpringApplication.run(JGApplication.class, args); + ConfigurableApplicationContext application = SpringApplication.run(JgApplication.class, args); Environment env = application.getEnvironment(); String ip = InetAddress.getLocalHost().getHostAddress(); String port = env.getProperty("server.port"); diff --git a/src/main/java/com/jg/JGServletInitializer.java b/src/main/java/com/jg/JgServletInitializer.java similarity index 73% rename from src/main/java/com/jg/JGServletInitializer.java rename to src/main/java/com/jg/JgServletInitializer.java index 139908c..d6efddb 100644 --- a/src/main/java/com/jg/JGServletInitializer.java +++ b/src/main/java/com/jg/JgServletInitializer.java @@ -8,11 +8,11 @@ import org.springframework.boot.web.servlet.support.SpringBootServletInitializer * * @author jg */ -public class JGServletInitializer extends SpringBootServletInitializer +public class JgServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(JGApplication.class); + return application.sources(JgApplication.class); } } diff --git a/src/main/java/com/jg/project/about/controller/AboutPartThreeController.java b/src/main/java/com/jg/project/about/controller/AboutPartThreeController.java index 5798aba..dcd27ae 100644 --- a/src/main/java/com/jg/project/about/controller/AboutPartThreeController.java +++ b/src/main/java/com/jg/project/about/controller/AboutPartThreeController.java @@ -1,6 +1,7 @@ package com.jg.project.about.controller; import java.util.List; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -10,6 +11,9 @@ import com.github.pagehelper.PageInfo; import com.jg.common.utils.ListPage; import com.jg.common.utils.PageUtils; import com.jg.common.utils.QueryPage; +import com.jg.common.utils.poi.ExcelUtil; +import com.jg.framework.aspectj.lang.annotation.Log; +import com.jg.framework.aspectj.lang.enums.BusinessType; import com.jg.framework.web.controller.BaseController; import com.jg.framework.web.page.TableDataInfo; import com.jg.project.about.mapper.AboutPartThreeMapper; @@ -101,4 +105,19 @@ public class AboutPartThreeController extends BaseController { boolean res = aboutPartThreeService.removeById(id); return R.ok(res); } + + /** + * 导出关于第三部分列表 + */ + @ApiOperation("第三部分列表数据导出") + @PreAuthorize("@ss.hasPermi('PartThree:partthree:export')") + @Log(title = "关于第三部分", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AboutPartThree aboutPartThree) + { + List list = aboutPartThreeService.selectAboutPartThreeList(aboutPartThree); + ExcelUtil util = new ExcelUtil(AboutPartThree.class); + util.exportExcel(response, list, "关于第三部分数据"); + } + } diff --git a/src/main/java/com/jg/project/about/domain/AboutPartThree.java b/src/main/java/com/jg/project/about/domain/AboutPartThree.java index fd10d0f..0c803d9 100644 --- a/src/main/java/com/jg/project/about/domain/AboutPartThree.java +++ b/src/main/java/com/jg/project/about/domain/AboutPartThree.java @@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import com.jg.framework.aspectj.lang.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; @@ -42,32 +43,39 @@ private static final long serialVersionUID=1L; private Long id; /** 第一标题 */ @ApiModelProperty("第一标题") + @Excel(name = "第一标题") @TableField("title_one") private String titleOne; /** 第二标题 */ @ApiModelProperty("第二标题") + @Excel(name = "第二标题") @TableField("title_two") private String titleTwo; /** 备注 */ @ApiModelProperty("备注") + @Excel(name = "备注") @TableField("remarks") private String remarks; /** 图标 */ @ApiModelProperty("图标") + @Excel(name = "图标") @TableField("icon") private String icon; /** 排序 */ @ApiModelProperty("排序") + @Excel(name = "排序") @TableField("sorts") private Long sorts; /** 创建时间 */ @ApiModelProperty(value = "创建时间",hidden = true) + @Excel(name = "创建时间") @TableField("create_time") @JsonSerialize(using = ToStringSerializer.class) private String createTime; /** 更新时间 */ @ApiModelProperty(value = "更新时间",hidden = true) + @Excel(name = "更新时间") @TableField("update_time") @JsonSerialize(using = ToStringSerializer.class) private String updateTime; diff --git a/src/main/java/com/jg/project/about/service/IAboutPartThreeService.java b/src/main/java/com/jg/project/about/service/IAboutPartThreeService.java index 01225ed..99e320b 100644 --- a/src/main/java/com/jg/project/about/service/IAboutPartThreeService.java +++ b/src/main/java/com/jg/project/about/service/IAboutPartThreeService.java @@ -14,4 +14,5 @@ import java.util.List; */ public interface IAboutPartThreeService extends IService { List selectAboutPartThreeList(AboutPartThree aboutPartThree); + } diff --git a/src/main/resources/vm/java/controller.java.vm b/src/main/resources/vm/java/controller.java.vm index edc7108..eae8fdb 100644 --- a/src/main/resources/vm/java/controller.java.vm +++ b/src/main/resources/vm/java/controller.java.vm @@ -3,9 +3,11 @@ import java.util.List; import javax.annotation.Resource; import lombok.extern.slf4j.Slf4j; import io.swagger.annotations.Api; +import com.jg.common.utils.poi.ExcelUtil; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import com.jg.common.utils.QueryPage; +import com.jg.framework.aspectj.lang.annotation.Log; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -29,11 +31,10 @@ import com.jg.framework.web.domain.R; @RestController @RequestMapping("/${moduleName}") public class ${ClassName}Controller extends BaseController{ + @Resource private I${ClassName}Service ${className}Service; - - /** * ${functionName}分页列表 */ @@ -55,6 +56,7 @@ public class ${ClassName}Controller extends BaseController{ List<${ClassName}> list = ${className}Service.list(); return R.ok(list); } + /** * ${functionName}id详细信息 */ @@ -70,6 +72,7 @@ public class ${ClassName}Controller extends BaseController{ */ @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") @ApiOperation(value = "${functionName}新增信息", notes = "${functionName}新增信息") + @Log(title = "${functionName}", businessType = BusinessType.INSERT) @PostMapping("/add") public R add(${ClassName} ${className}) { boolean res = ${className}Service.save(${className}); @@ -80,6 +83,7 @@ public class ${ClassName}Controller extends BaseController{ */ @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") @ApiOperation(value = "${functionName}修改信息", notes = "${functionName}修改信息") + @Log(title = "${functionName}", businessType = BusinessType.UPDATE) @PostMapping("/edit") public R edit(${ClassName} ${className}) { boolean res = ${className}Service.updateById(${className}); @@ -90,9 +94,23 @@ public class ${ClassName}Controller extends BaseController{ */ @PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") @ApiOperation(value = "${functionName}删除信息", notes = "${functionName}删除信息") + @Log(title = "${functionName}", businessType = BusinessType.DELETE) @PostMapping("/remove") public R remove(Long id) { boolean res = ${className}Service.removeById(id); return R.ok(res); } + + /** + * 导出${functionName}列表 + */ + @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") + @Log(title = "${functionName}", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ${ClassName} ${className}) + { + List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class); + util.exportExcel(response, list, "${functionName}数据"); + } } diff --git a/src/main/resources/vm/java/domain.java.vm b/src/main/resources/vm/java/domain.java.vm index b1b4f5e..16d34a5 100644 --- a/src/main/resources/vm/java/domain.java.vm +++ b/src/main/resources/vm/java/domain.java.vm @@ -4,6 +4,7 @@ import com.alibaba.fastjson2.annotation.JSONField; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; +import com.jg.framework.aspectj.lang.annotation.Excel; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import io.swagger.annotations.ApiModel; @@ -49,6 +50,7 @@ private static final long serialVersionUID=1L; private $column.javaType $column.javaField; #else @ApiModelProperty("$column.columnComment") + @Excel(name = "$column.columnComment") @TableField("$column.columnName") private $column.javaType $column.javaField; #end @@ -56,6 +58,7 @@ private static final long serialVersionUID=1L; #if($column.javaType == 'Date') /** $column.columnComment */ @ApiModelProperty(value = "$column.columnComment",hidden = true) + @Excel(name = "$column.columnComment") @TableField("$column.columnName") @JsonSerialize(using = ToStringSerializer.class) private String $column.javaField; diff --git a/src/main/resources/vm/vue/index.vue.vm b/src/main/resources/vm/vue/index.vue.vm index 5ff768a..e5fdf74 100644 --- a/src/main/resources/vm/vue/index.vue.vm +++ b/src/main/resources/vm/vue/index.vue.vm @@ -1,586 +1,713 @@ diff --git a/src/main/resources/vm/vue/v3/index.vue.vm b/src/main/resources/vm/vue/v3/index.vue.vm index 748d8d1..56b7d38 100644 --- a/src/main/resources/vm/vue/v3/index.vue.vm +++ b/src/main/resources/vm/vue/v3/index.vue.vm @@ -96,6 +96,16 @@ v-hasPermi="['${moduleName}:${businessName}:remove']" >删除 + + 导出 + + @@ -570,5 +580,11 @@ function handle${subClassName}SelectionChange(selection) { } #end +/** 导出按钮操作 */ +function handleExport() { + proxy.download('${moduleName}/${businessName}/export', { + ...queryParams.value + }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`) +} getList(); diff --git a/target/classes/com/jg/JGApplication.class b/target/classes/com/jg/JGApplication.class index 9f23032df06bba12fbf3c73cb666471e15719cb7..12d2766e3a3a1d54e59de56ae20ddedcc127f7e4 100644 GIT binary patch delta 26 fcmbOzIZ<-Lea7^S4>TDW(>HT534thC<`PZ-d#DH5 delta 26 fcmbOzIZ<-LeMa|<4>TDW-8XYF34thC<`PZ-cIXFr diff --git a/target/classes/com/jg/JGServletInitializer.class b/target/classes/com/jg/JGServletInitializer.class index 8361341380f2e274b0257a163cfb31f04fd158bc..d7880131d2dedadf94ed7fbca3ef81c560e050af 100644 GIT binary patch delta 29 jcmey#_LFTw0b}~cLKjBH^vT;8<$$CjlgQ?mj1w3EqiG5L delta 29 jcmey#_LFTw0i*lILKj9x_sQEB<$$CjlgQ?mj1w3EooNZ4 diff --git a/target/classes/com/jg/project/about/controller/AboutPartThreeController.class b/target/classes/com/jg/project/about/controller/AboutPartThreeController.class index 798dfb9d9d07bdcd50e0a29a06f06abf601379e1..5948b49952a7b7fa131e305235269812715b4599 100644 GIT binary patch delta 2111 zcm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5G3!+i zTqv|e4wha#_;)~A{u7p8&+OuW#m!5<(68V7&DYZ(v)aAEAHT=G0LaH%4e>Y@4IRf_ zIDtkDP4H_BPs;F=hSNABmu45v;+%#SoR=l7a<@%IK-vo$F5;5(F3aVLimMu~;kxX4 zL&Z%6&gK@s0==xI&7U1;Zpt6-_eL4tv<8np(K#|c*7tL0XneHySI7H_o-QNB)mb(l zDFTU@r{b1CI)W;03*14wK!@D9i%u0?0^R5l=tYl;djj|IK*d9WKJ*I=;E}*%7z%ub zJJOdV@C1V@p33cK0?#oh@B%Lt6mUD<7!Y39D}mQ|Banc(BVR?L(Q8ukY8{zu|Wtffw3%JT+AQNd^g;jusSj0%-2WG%&9aGMQP+x@ZTFfW?@OxGs#i9!X>@8N)+Od5?HrYHl3q9%uyjZDr`zrveWJ<9N(vK)NxMz zf8(eMb5u)?Y8%HMa_qHkB&3Hw&aOuzIhtnRuU!-Dtk?GX`Aaf4XnL|?f*VMD(koguGaF}~X7+Y`S=pV1n Bn!x}7 diff --git a/target/classes/com/jg/project/about/domain/AboutPartThree$AboutPartThreeBuilder.class b/target/classes/com/jg/project/about/domain/AboutPartThree$AboutPartThreeBuilder.class index 340094c525f6069abe3d739e8a3329f466249741..244047d2aa02b4f04c4172ec0c93a3ce04532361 100644 GIT binary patch delta 97 zcmeAd?ib#$i2FwbE@^?b{;*)vVAu{5V6Tz%`>@YQ)959(! Pj#!Xs9Ls@ZGN%pzz~C5P delta 97 zcmeAd?ib#$i2FwbE@^?b{;*)vVAu{5V6Tz%`>@YQ)959(! Pj#!Xs9Ls@ZGN%pzzSkI3 diff --git a/target/classes/com/jg/project/about/domain/AboutPartThree.class b/target/classes/com/jg/project/about/domain/AboutPartThree.class index 67eb04c83c65981bd78b247eebc41bd6a7dfe705..7111208304372a33e6e47cbbed01d99e7f68ab18 100644 GIT binary patch literal 6451 zcmb_h|92c!6~B}HGP7TjY&H#LN`bTlY&I!dqNr?Ipx;tbl2V$q3W8;lohH+6c9z}Q ze!(x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pJC1RhHBS5dIR&ChyR9foy2bJq~_-)Ah-f2@O4Gz3mpY7 z_?cR`Knw7wy(Otn(?U+0XNQ zFO_l|%XgrerjFUqELl+Hi@4x&SmCdr?mBDF>9cg_>t7iP)Ph%;os1E#CMypkoaYw3W+atO;olens^oRGmhU~{7~YT v4L?Qr?ZB6P0M`N+%$LMhJN}~fJ;Vy%=#J7cDSV%n0m1)6fiJ!EA&UG5)@UJl diff --git a/target/classes/vm/java/controller.java.vm b/target/classes/vm/java/controller.java.vm index edc7108..eae8fdb 100644 --- a/target/classes/vm/java/controller.java.vm +++ b/target/classes/vm/java/controller.java.vm @@ -3,9 +3,11 @@ import java.util.List; import javax.annotation.Resource; import lombok.extern.slf4j.Slf4j; import io.swagger.annotations.Api; +import com.jg.common.utils.poi.ExcelUtil; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import com.jg.common.utils.QueryPage; +import com.jg.framework.aspectj.lang.annotation.Log; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -29,11 +31,10 @@ import com.jg.framework.web.domain.R; @RestController @RequestMapping("/${moduleName}") public class ${ClassName}Controller extends BaseController{ + @Resource private I${ClassName}Service ${className}Service; - - /** * ${functionName}分页列表 */ @@ -55,6 +56,7 @@ public class ${ClassName}Controller extends BaseController{ List<${ClassName}> list = ${className}Service.list(); return R.ok(list); } + /** * ${functionName}id详细信息 */ @@ -70,6 +72,7 @@ public class ${ClassName}Controller extends BaseController{ */ @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") @ApiOperation(value = "${functionName}新增信息", notes = "${functionName}新增信息") + @Log(title = "${functionName}", businessType = BusinessType.INSERT) @PostMapping("/add") public R add(${ClassName} ${className}) { boolean res = ${className}Service.save(${className}); @@ -80,6 +83,7 @@ public class ${ClassName}Controller extends BaseController{ */ @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") @ApiOperation(value = "${functionName}修改信息", notes = "${functionName}修改信息") + @Log(title = "${functionName}", businessType = BusinessType.UPDATE) @PostMapping("/edit") public R edit(${ClassName} ${className}) { boolean res = ${className}Service.updateById(${className}); @@ -90,9 +94,23 @@ public class ${ClassName}Controller extends BaseController{ */ @PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") @ApiOperation(value = "${functionName}删除信息", notes = "${functionName}删除信息") + @Log(title = "${functionName}", businessType = BusinessType.DELETE) @PostMapping("/remove") public R remove(Long id) { boolean res = ${className}Service.removeById(id); return R.ok(res); } + + /** + * 导出${functionName}列表 + */ + @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") + @Log(title = "${functionName}", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ${ClassName} ${className}) + { + List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class); + util.exportExcel(response, list, "${functionName}数据"); + } } diff --git a/target/classes/vm/java/domain.java.vm b/target/classes/vm/java/domain.java.vm index b1b4f5e..01fe80e 100644 --- a/target/classes/vm/java/domain.java.vm +++ b/target/classes/vm/java/domain.java.vm @@ -49,6 +49,7 @@ private static final long serialVersionUID=1L; private $column.javaType $column.javaField; #else @ApiModelProperty("$column.columnComment") + @Excel(name = "$column.columnComment") @TableField("$column.columnName") private $column.javaType $column.javaField; #end @@ -56,6 +57,7 @@ private static final long serialVersionUID=1L; #if($column.javaType == 'Date') /** $column.columnComment */ @ApiModelProperty(value = "$column.columnComment",hidden = true) + @Excel(name = "$column.columnComment") @TableField("$column.columnName") @JsonSerialize(using = ToStringSerializer.class) private String $column.javaField; diff --git a/target/classes/vm/vue/index.vue.vm b/target/classes/vm/vue/index.vue.vm index 5ff768a..e5fdf74 100644 --- a/target/classes/vm/vue/index.vue.vm +++ b/target/classes/vm/vue/index.vue.vm @@ -1,586 +1,713 @@ diff --git a/target/classes/vm/vue/v3/index.vue.vm b/target/classes/vm/vue/v3/index.vue.vm index 748d8d1..56b7d38 100644 --- a/target/classes/vm/vue/v3/index.vue.vm +++ b/target/classes/vm/vue/v3/index.vue.vm @@ -96,6 +96,16 @@ v-hasPermi="['${moduleName}:${businessName}:remove']" >删除 + + 导出 + + @@ -570,5 +580,11 @@ function handle${subClassName}SelectionChange(selection) { } #end +/** 导出按钮操作 */ +function handleExport() { + proxy.download('${moduleName}/${businessName}/export', { + ...queryParams.value + }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`) +} getList();