Commit 87a9adf2 by naan1993

代码生成页面添加模块英文名称

parent 59950c3b
...@@ -42,20 +42,22 @@ public class CodeController extends BaseController { ...@@ -42,20 +42,22 @@ public class CodeController extends BaseController {
*/ */
@ApiOperation("生成代码") @ApiOperation("生成代码")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "moduleName", value = "模块名称", required = true, dataType = "String"),
@ApiImplicitParam(name = "bizChName", value = "业务名称", required = true, dataType = "String"), @ApiImplicitParam(name = "bizChName", value = "业务名称", required = true, dataType = "String"),
@ApiImplicitParam(name = "bizEnName", value = "业务英文名称", required = true, dataType = "String"), @ApiImplicitParam(name = "bizEnName", value = "业务英文名称", required = true, dataType = "String"),
@ApiImplicitParam(name = "path", value = "项目生成类路径", required = true, dataType = "String") @ApiImplicitParam(name = "path", value = "项目生成类路径", required = true, dataType = "String")
}) })
@RequestMapping(value = "/generate",method = RequestMethod.POST) @RequestMapping(value = "/generate", method = RequestMethod.POST)
@ResponseBody @ResponseBody
@Permission(Const.ADMIN_NAME) @Permission(Const.ADMIN_NAME)
public Object add(String bizChName, String bizEnName, String path) { public Object add(String moduleName, String bizChName, String bizEnName, String path) {
if (ToolUtil.isOneEmpty(bizChName, bizEnName)) { if (ToolUtil.isOneEmpty(bizChName, bizEnName)) {
throw new BussinessException(BizExceptionEnum.REQUEST_NULL); throw new BussinessException(BizExceptionEnum.REQUEST_NULL);
} }
ContextConfig contextConfig = new ContextConfig(); ContextConfig contextConfig = new ContextConfig();
contextConfig.setBizChName(bizChName); contextConfig.setBizChName(bizChName);
contextConfig.setBizEnName(bizEnName); contextConfig.setBizEnName(bizEnName);
contextConfig.setModuleName(moduleName);
if (ToolUtil.isNotEmpty(path)) { if (ToolUtil.isNotEmpty(path)) {
contextConfig.setProjectPath(path); contextConfig.setProjectPath(path);
} }
......
...@@ -8,6 +8,12 @@ ...@@ -8,6 +8,12 @@
<div class="ibox-content"> <div class="ibox-content">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">模块英文名称</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="moduleName"> <span class="help-block m-b-none">例如:system</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">业务名称</label> <label class="col-sm-2 control-label">业务名称</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input type="text" class="form-control" id="bizChName"> <span class="help-block m-b-none">例如:测试</span> <input type="text" class="form-control" id="bizChName"> <span class="help-block m-b-none">例如:测试</span>
......
...@@ -13,5 +13,6 @@ Code.generate = function () { ...@@ -13,5 +13,6 @@ Code.generate = function () {
baseAjax.set("bizChName"); baseAjax.set("bizChName");
baseAjax.set("bizEnName"); baseAjax.set("bizEnName");
baseAjax.set("path"); baseAjax.set("path");
baseAjax.set("moduleName");
baseAjax.start(); baseAjax.start();
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment