From 0f56bf78e7c81b54040ea62ada32d138647a632e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E8=90=8C=E5=93=92Sakura=E9=85=B1?= Date: Mon, 25 Mar 2019 20:20:07 +0800 Subject: [PATCH] :bug: Fixing a bug.fix generator template --- .../main/resources/config/pigx-upms-biz-dev.yml | 1 + .../controller/SysSocialDetailsController.java | 4 ++++ .../src/main/resources/template/crud.js.vm | 3 --- .../src/main/resources/template/index.vue.vm | 16 +++++++++++++--- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/pigx-config/src/main/resources/config/pigx-upms-biz-dev.yml b/pigx-config/src/main/resources/config/pigx-upms-biz-dev.yml index fd0ed5553..35ede8fcf 100644 --- a/pigx-config/src/main/resources/config/pigx-upms-biz-dev.yml +++ b/pigx-config/src/main/resources/config/pigx-upms-biz-dev.yml @@ -45,4 +45,5 @@ pigx: - sys_log - sys_social_details - sys_dict + - sys_dict_item - sys_log diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysSocialDetailsController.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysSocialDetailsController.java index 0389e15d6..0c688194c 100755 --- a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysSocialDetailsController.java +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysSocialDetailsController.java @@ -26,6 +26,7 @@ import com.pig4cloud.pigx.common.log.annotation.SysLog; import com.pig4cloud.pigx.common.security.annotation.Inner; import io.swagger.annotations.Api; import lombok.AllArgsConstructor; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @@ -77,6 +78,7 @@ public class SysSocialDetailsController { */ @SysLog("保存三方信息") @PostMapping + @PreAuthorize("@pms.hasPermission('sys_social_details_add')") public R save(@Valid @RequestBody SysSocialDetails sysSocialDetails) { return new R<>(sysSocialDetailsService.save(sysSocialDetails)); } @@ -89,6 +91,7 @@ public class SysSocialDetailsController { */ @SysLog("修改三方信息") @PutMapping + @PreAuthorize("@pms.hasPermission('sys_social_details_edit')") public R updateById(@Valid @RequestBody SysSocialDetails sysSocialDetails) { sysSocialDetailsService.updateById(sysSocialDetails); return new R<>(Boolean.TRUE); @@ -102,6 +105,7 @@ public class SysSocialDetailsController { */ @SysLog("删除三方信息") @DeleteMapping("/{id}") + @PreAuthorize("@pms.hasPermission('sys_social_details_del')") public R removeById(@PathVariable Integer id) { return new R<>(sysSocialDetailsService.removeById(id)); } diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/crud.js.vm b/pigx-visual/pigx-codegen/src/main/resources/template/crud.js.vm index c9e692c4b..ba643de40 100644 --- a/pigx-visual/pigx-codegen/src/main/resources/template/crud.js.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/crud.js.vm @@ -22,9 +22,6 @@ export const tableOption = { stripe: true, menuAlign: 'center', align: 'center', - editBtn: false, - delBtn: false, - addBtn: false, column: [ #foreach ($column in $columns) { diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/index.vue.vm b/pigx-visual/pigx-codegen/src/main/resources/template/index.vue.vm index 7a80c9ce4..6fd88767a 100755 --- a/pigx-visual/pigx-codegen/src/main/resources/template/index.vue.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/index.vue.vm @@ -34,9 +34,19 @@