Merge branch 'hotfix/limit001'
This commit is contained in:
commit
24ce27cf6c
|
|
@ -4,6 +4,11 @@
|
|||
"name": "like.upload-directory",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for like.upload-directory."
|
||||
},
|
||||
{
|
||||
"name": "like.production",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for like.production."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -3,6 +3,9 @@ package com.hxkj.generator.controller;
|
|||
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
||||
import com.hxkj.common.core.AjaxResult;
|
||||
import com.hxkj.common.core.PageResult;
|
||||
import com.hxkj.common.exception.OperateException;
|
||||
import com.hxkj.common.utils.StringUtil;
|
||||
import com.hxkj.common.utils.YmlUtil;
|
||||
import com.hxkj.common.validator.annotation.IDMust;
|
||||
import com.hxkj.generator.service.IGenerateService;
|
||||
import com.hxkj.generator.validate.GenParam;
|
||||
|
|
@ -159,6 +162,11 @@ public class GenController {
|
|||
*/
|
||||
@GetMapping("/downloadCode")
|
||||
public void downloadCode(HttpServletResponse response, String tables) throws IOException {
|
||||
String production = YmlUtil.get("like.production");
|
||||
if (StringUtil.isNotEmpty(production) && production.equals("true")) {
|
||||
throw new OperateException("抱歉,演示环境不允许操作!");
|
||||
}
|
||||
|
||||
Assert.notNull(tables, "请选择要生成的表");
|
||||
String[] tableNames = tables.split(",");
|
||||
byte[] data = iGenerateService.downloadCode(tableNames);
|
||||
|
|
|
|||
Loading…
Reference in New Issue