From 668b3851c5eb3193aeb278162a1ae91f7e1a682e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=AF=BA?= <1253070437@qq.com> Date: Fri, 27 Jan 2023 13:12:24 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=BB=A3=E7=A0=81=E5=90=8E=E5=8A=A0=E5=85=A5=E6=9D=83?= =?UTF-8?q?=E9=99=90=E6=8E=A7=E5=88=B6=E6=8E=A5=E5=8F=A3=E3=80=81=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=83=A8=E5=88=86=E5=86=85=E5=AE=B9=E8=A2=AB?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E9=97=AE=E9=A2=98=E3=80=81=E7=94=9F=E6=88=90?= =?UTF-8?q?=E7=9A=84=E8=A1=A8=E5=8D=95=E6=95=B0=E5=AD=97=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E5=80=BC=E6=94=B9=E4=B8=BA10000=EF=BC=8C=E6=BB=91?= =?UTF-8?q?=E5=8A=A8=E8=BE=93=E5=85=A5=E6=94=B9=E4=B8=BA1000?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snowy-admin-web/src/views/gen/basic.vue | 2 +- .../src/main/resources/backend/Controller.java.btl | 6 ++++++ .../src/main/resources/frontend/form.vue.btl | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/snowy-admin-web/src/views/gen/basic.vue b/snowy-admin-web/src/views/gen/basic.vue index ee588ffc..f5e0632b 100644 --- a/snowy-admin-web/src/views/gen/basic.vue +++ b/snowy-admin-web/src/views/gen/basic.vue @@ -279,8 +279,8 @@ const selectTableColumnsData = (tableName, assign) => { if (!assign) { formData.value.dbTableKey = undefined + formFieldAssign(tableName) } - formFieldAssign(tableName) // 通过这个 tableName 查到这个表下的字段 const param = { tableName: tableName diff --git a/snowy-plugin/snowy-plugin-gen/src/main/resources/backend/Controller.java.btl b/snowy-plugin/snowy-plugin-gen/src/main/resources/backend/Controller.java.btl index 2e16bba4..cc57da2a 100644 --- a/snowy-plugin/snowy-plugin-gen/src/main/resources/backend/Controller.java.btl +++ b/snowy-plugin/snowy-plugin-gen/src/main/resources/backend/Controller.java.btl @@ -12,6 +12,7 @@ */ package ${packageName}.${moduleName}.modular.${busName}.controller; +import cn.dev33.satoken.annotation.SaCheckPermission; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiSupport; @@ -59,6 +60,7 @@ public class ${className}Controller { */ @ApiOperationSupport(order = 1) @ApiOperation("获取${functionName}分页") + @SaCheckPermission("/${moduleName}/${busName}/page") @GetMapping("/${moduleName}/${busName}/page") public CommonResult> page(${className}PageParam ${classNameFirstLower}PageParam) { return CommonResult.data(${classNameFirstLower}Service.page(${classNameFirstLower}PageParam)); @@ -73,6 +75,7 @@ public class ${className}Controller { @ApiOperationSupport(order = 2) @ApiOperation("添加${functionName}") @CommonLog("添加${functionName}") + @SaCheckPermission("/${moduleName}/${busName}/add") @PostMapping("/${moduleName}/${busName}/add") public CommonResult add(@RequestBody @Valid ${className}AddParam ${classNameFirstLower}AddParam) { ${classNameFirstLower}Service.add(${classNameFirstLower}AddParam); @@ -88,6 +91,7 @@ public class ${className}Controller { @ApiOperationSupport(order = 3) @ApiOperation("编辑${functionName}") @CommonLog("编辑${functionName}") + @SaCheckPermission("/${moduleName}/${busName}/edit") @PostMapping("/${moduleName}/${busName}/edit") public CommonResult edit(@RequestBody @Valid ${className}EditParam ${classNameFirstLower}EditParam) { ${classNameFirstLower}Service.edit(${classNameFirstLower}EditParam); @@ -103,6 +107,7 @@ public class ${className}Controller { @ApiOperationSupport(order = 4) @ApiOperation("删除${functionName}") @CommonLog("删除${functionName}") + @SaCheckPermission("/${moduleName}/${busName}/delete") @PostMapping("/${moduleName}/${busName}/delete") public CommonResult delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空") CommonValidList<${className}IdParam> ${classNameFirstLower}IdParamList) { @@ -118,6 +123,7 @@ public class ${className}Controller { */ @ApiOperationSupport(order = 5) @ApiOperation("获取${functionName}详情") + @SaCheckPermission("/${moduleName}/${busName}/detail") @GetMapping("/${moduleName}/${busName}/detail") public CommonResult<${className}> detail(@Valid ${className}IdParam ${classNameFirstLower}IdParam) { return CommonResult.data(${classNameFirstLower}Service.detail(${classNameFirstLower}IdParam)); diff --git a/snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/form.vue.btl b/snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/form.vue.btl index 30f9071e..00c566fe 100644 --- a/snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/form.vue.btl +++ b/snowy-plugin/snowy-plugin-gen/src/main/resources/frontend/form.vue.btl @@ -33,9 +33,9 @@ <% } else if (configList[i].effectType == 'timepicker') {%> <% } else if (configList[i].effectType == 'inputNumber') {%> - + <% } else if (configList[i].effectType == 'slider') {%> - + <% } %> @@ -61,9 +61,9 @@ <% } else if (configList[i].effectType == 'timepicker') {%> <% } else if (configList[i].effectType == 'inputNumber') {%> - + <% } else if (configList[i].effectType == 'slider') {%> - + <% } %> <% } %>