mirror of https://gitee.com/xiaonuobase/snowy
【优化】生成代码后加入权限控制接口、修复代码生成点击配置部分内容被重置问题、生成的表单数字输入框值改为10000,滑动输入改为1000
parent
99182cd929
commit
668b3851c5
|
@ -279,8 +279,8 @@
|
||||||
const selectTableColumnsData = (tableName, assign) => {
|
const selectTableColumnsData = (tableName, assign) => {
|
||||||
if (!assign) {
|
if (!assign) {
|
||||||
formData.value.dbTableKey = undefined
|
formData.value.dbTableKey = undefined
|
||||||
|
formFieldAssign(tableName)
|
||||||
}
|
}
|
||||||
formFieldAssign(tableName)
|
|
||||||
// 通过这个 tableName 查到这个表下的字段
|
// 通过这个 tableName 查到这个表下的字段
|
||||||
const param = {
|
const param = {
|
||||||
tableName: tableName
|
tableName: tableName
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
*/
|
*/
|
||||||
package ${packageName}.${moduleName}.modular.${busName}.controller;
|
package ${packageName}.${moduleName}.modular.${busName}.controller;
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||||
|
@ -59,6 +60,7 @@ public class ${className}Controller {
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(order = 1)
|
@ApiOperationSupport(order = 1)
|
||||||
@ApiOperation("获取${functionName}分页")
|
@ApiOperation("获取${functionName}分页")
|
||||||
|
@SaCheckPermission("/${moduleName}/${busName}/page")
|
||||||
@GetMapping("/${moduleName}/${busName}/page")
|
@GetMapping("/${moduleName}/${busName}/page")
|
||||||
public CommonResult<Page<${className}>> page(${className}PageParam ${classNameFirstLower}PageParam) {
|
public CommonResult<Page<${className}>> page(${className}PageParam ${classNameFirstLower}PageParam) {
|
||||||
return CommonResult.data(${classNameFirstLower}Service.page(${classNameFirstLower}PageParam));
|
return CommonResult.data(${classNameFirstLower}Service.page(${classNameFirstLower}PageParam));
|
||||||
|
@ -73,6 +75,7 @@ public class ${className}Controller {
|
||||||
@ApiOperationSupport(order = 2)
|
@ApiOperationSupport(order = 2)
|
||||||
@ApiOperation("添加${functionName}")
|
@ApiOperation("添加${functionName}")
|
||||||
@CommonLog("添加${functionName}")
|
@CommonLog("添加${functionName}")
|
||||||
|
@SaCheckPermission("/${moduleName}/${busName}/add")
|
||||||
@PostMapping("/${moduleName}/${busName}/add")
|
@PostMapping("/${moduleName}/${busName}/add")
|
||||||
public CommonResult<String> add(@RequestBody @Valid ${className}AddParam ${classNameFirstLower}AddParam) {
|
public CommonResult<String> add(@RequestBody @Valid ${className}AddParam ${classNameFirstLower}AddParam) {
|
||||||
${classNameFirstLower}Service.add(${classNameFirstLower}AddParam);
|
${classNameFirstLower}Service.add(${classNameFirstLower}AddParam);
|
||||||
|
@ -88,6 +91,7 @@ public class ${className}Controller {
|
||||||
@ApiOperationSupport(order = 3)
|
@ApiOperationSupport(order = 3)
|
||||||
@ApiOperation("编辑${functionName}")
|
@ApiOperation("编辑${functionName}")
|
||||||
@CommonLog("编辑${functionName}")
|
@CommonLog("编辑${functionName}")
|
||||||
|
@SaCheckPermission("/${moduleName}/${busName}/edit")
|
||||||
@PostMapping("/${moduleName}/${busName}/edit")
|
@PostMapping("/${moduleName}/${busName}/edit")
|
||||||
public CommonResult<String> edit(@RequestBody @Valid ${className}EditParam ${classNameFirstLower}EditParam) {
|
public CommonResult<String> edit(@RequestBody @Valid ${className}EditParam ${classNameFirstLower}EditParam) {
|
||||||
${classNameFirstLower}Service.edit(${classNameFirstLower}EditParam);
|
${classNameFirstLower}Service.edit(${classNameFirstLower}EditParam);
|
||||||
|
@ -103,6 +107,7 @@ public class ${className}Controller {
|
||||||
@ApiOperationSupport(order = 4)
|
@ApiOperationSupport(order = 4)
|
||||||
@ApiOperation("删除${functionName}")
|
@ApiOperation("删除${functionName}")
|
||||||
@CommonLog("删除${functionName}")
|
@CommonLog("删除${functionName}")
|
||||||
|
@SaCheckPermission("/${moduleName}/${busName}/delete")
|
||||||
@PostMapping("/${moduleName}/${busName}/delete")
|
@PostMapping("/${moduleName}/${busName}/delete")
|
||||||
public CommonResult<String> delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
|
public CommonResult<String> delete(@RequestBody @Valid @NotEmpty(message = "集合不能为空")
|
||||||
CommonValidList<${className}IdParam> ${classNameFirstLower}IdParamList) {
|
CommonValidList<${className}IdParam> ${classNameFirstLower}IdParamList) {
|
||||||
|
@ -118,6 +123,7 @@ public class ${className}Controller {
|
||||||
*/
|
*/
|
||||||
@ApiOperationSupport(order = 5)
|
@ApiOperationSupport(order = 5)
|
||||||
@ApiOperation("获取${functionName}详情")
|
@ApiOperation("获取${functionName}详情")
|
||||||
|
@SaCheckPermission("/${moduleName}/${busName}/detail")
|
||||||
@GetMapping("/${moduleName}/${busName}/detail")
|
@GetMapping("/${moduleName}/${busName}/detail")
|
||||||
public CommonResult<${className}> detail(@Valid ${className}IdParam ${classNameFirstLower}IdParam) {
|
public CommonResult<${className}> detail(@Valid ${className}IdParam ${classNameFirstLower}IdParam) {
|
||||||
return CommonResult.data(${classNameFirstLower}Service.detail(${classNameFirstLower}IdParam));
|
return CommonResult.data(${classNameFirstLower}Service.detail(${classNameFirstLower}IdParam));
|
||||||
|
|
|
@ -33,9 +33,9 @@
|
||||||
<% } else if (configList[i].effectType == 'timepicker') {%>
|
<% } else if (configList[i].effectType == 'timepicker') {%>
|
||||||
<a-time-picker v-model:value="formData.${configList[i].fieldNameCamelCase}" placeholder="请选择${configList[i].fieldRemark}" style="width: 100%" />
|
<a-time-picker v-model:value="formData.${configList[i].fieldNameCamelCase}" placeholder="请选择${configList[i].fieldRemark}" style="width: 100%" />
|
||||||
<% } else if (configList[i].effectType == 'inputNumber') {%>
|
<% } else if (configList[i].effectType == 'inputNumber') {%>
|
||||||
<a-input-number v-model:value="formData.${configList[i].fieldNameCamelCase}" :min="1" :max="100" style="width: 100%" />
|
<a-input-number v-model:value="formData.${configList[i].fieldNameCamelCase}" :min="1" :max="10000" style="width: 100%" />
|
||||||
<% } else if (configList[i].effectType == 'slider') {%>
|
<% } else if (configList[i].effectType == 'slider') {%>
|
||||||
<a-slider v-model:value="formData.${configList[i].fieldNameCamelCase}" :max="100" style="width: 100%" />
|
<a-slider v-model:value="formData.${configList[i].fieldNameCamelCase}" :max="1000" style="width: 100%" />
|
||||||
<% } %>
|
<% } %>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -61,9 +61,9 @@
|
||||||
<% } else if (configList[i].effectType == 'timepicker') {%>
|
<% } else if (configList[i].effectType == 'timepicker') {%>
|
||||||
<a-time-picker v-model:value="formData.${configList[i].fieldNameCamelCase}" value-format="YYYY-MM-DD HH:mm:ss" show-time placeholder="请选择${configList[i].fieldRemark}" style="width: 100%" />
|
<a-time-picker v-model:value="formData.${configList[i].fieldNameCamelCase}" value-format="YYYY-MM-DD HH:mm:ss" show-time placeholder="请选择${configList[i].fieldRemark}" style="width: 100%" />
|
||||||
<% } else if (configList[i].effectType == 'inputNumber') {%>
|
<% } else if (configList[i].effectType == 'inputNumber') {%>
|
||||||
<a-input-number v-model:value="formData.${configList[i].fieldNameCamelCase}" placeholder="请输入${configList[i].fieldRemark}" :min="1" :max="100" style="width: 100%" />
|
<a-input-number v-model:value="formData.${configList[i].fieldNameCamelCase}" placeholder="请输入${configList[i].fieldRemark}" :min="1" :max="10000" style="width: 100%" />
|
||||||
<% } else if (configList[i].effectType == 'slider') {%>
|
<% } else if (configList[i].effectType == 'slider') {%>
|
||||||
<a-slider v-model:value="formData.${configList[i].fieldNameCamelCase}" placeholder="请滑动${configList[i].fieldRemark}" :max="100" style="width: 100%" />
|
<a-slider v-model:value="formData.${configList[i].fieldNameCamelCase}" placeholder="请滑动${configList[i].fieldRemark}" :max="1000" style="width: 100%" />
|
||||||
<% } %>
|
<% } %>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
Loading…
Reference in New Issue