mirror of https://gitee.com/y_project/RuoYi.git
代码生成路径调整
parent
4ac96a8348
commit
b5e8432e2f
|
@ -27,7 +27,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/monitor/job")
|
@RequestMapping("/monitor/job")
|
||||||
public class JobController extends BaseController
|
public class SysJobController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "monitor/job";
|
private String prefix = "monitor/job";
|
||||||
|
|
|
@ -24,7 +24,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/monitor/jobLog")
|
@RequestMapping("/monitor/jobLog")
|
||||||
public class JobLogController extends BaseController
|
public class SysJobLogController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "monitor/job";
|
private String prefix = "monitor/job";
|
||||||
|
|
|
@ -24,7 +24,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/monitor/logininfor")
|
@RequestMapping("/monitor/logininfor")
|
||||||
public class LogininforController extends BaseController
|
public class SysLogininforController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "monitor/logininfor";
|
private String prefix = "monitor/logininfor";
|
||||||
|
|
|
@ -26,7 +26,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/monitor/operlog")
|
@RequestMapping("/monitor/operlog")
|
||||||
public class OperlogController extends BaseController
|
public class SysOperlogController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "monitor/operlog";
|
private String prefix = "monitor/operlog";
|
||||||
|
|
|
@ -28,7 +28,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/monitor/online")
|
@RequestMapping("/monitor/online")
|
||||||
public class UserOnlineController extends BaseController
|
public class SysUserOnlineController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "monitor/online";
|
private String prefix = "monitor/online";
|
||||||
|
|
|
@ -23,7 +23,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/captcha")
|
@RequestMapping("/captcha")
|
||||||
public class CaptchaController extends BaseController
|
public class SysCaptchaController extends BaseController
|
||||||
{
|
{
|
||||||
@Resource(name = "captchaProducer")
|
@Resource(name = "captchaProducer")
|
||||||
private Producer captchaProducer;
|
private Producer captchaProducer;
|
|
@ -27,7 +27,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/config")
|
@RequestMapping("/system/config")
|
||||||
public class ConfigController extends BaseController
|
public class SysConfigController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "system/config";
|
private String prefix = "system/config";
|
||||||
|
|
|
@ -28,7 +28,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/dept")
|
@RequestMapping("/system/dept")
|
||||||
public class DeptController extends BaseController
|
public class SysDeptController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "system/dept";
|
private String prefix = "system/dept";
|
||||||
|
|
|
@ -27,7 +27,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/dict/data")
|
@RequestMapping("/system/dict/data")
|
||||||
public class DictDataController extends BaseController
|
public class SysDictDataController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "system/dict/data";
|
private String prefix = "system/dict/data";
|
||||||
|
|
|
@ -27,7 +27,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/dict")
|
@RequestMapping("/system/dict")
|
||||||
public class DictTypeController extends BaseController
|
public class SysDictTypeController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "system/dict/type";
|
private String prefix = "system/dict/type";
|
||||||
|
|
|
@ -17,7 +17,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class IndexController extends BaseController
|
public class SysIndexController extends BaseController
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysMenuService menuService;
|
private ISysMenuService menuService;
|
|
@ -21,7 +21,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
public class LoginController extends BaseController
|
public class SysLoginController extends BaseController
|
||||||
{
|
{
|
||||||
@GetMapping("/login")
|
@GetMapping("/login")
|
||||||
public String login(HttpServletRequest request, HttpServletResponse response)
|
public String login(HttpServletRequest request, HttpServletResponse response)
|
|
@ -27,7 +27,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/menu")
|
@RequestMapping("/system/menu")
|
||||||
public class MenuController extends BaseController
|
public class SysMenuController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "system/menu";
|
private String prefix = "system/menu";
|
||||||
|
|
|
@ -26,7 +26,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/notice")
|
@RequestMapping("/system/notice")
|
||||||
public class NoticeController extends BaseController
|
public class SysNoticeController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "system/notice";
|
private String prefix = "system/notice";
|
||||||
|
|
|
@ -27,7 +27,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/post")
|
@RequestMapping("/system/post")
|
||||||
public class PostController extends BaseController
|
public class SysPostController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "system/post";
|
private String prefix = "system/post";
|
||||||
|
|
|
@ -30,9 +30,9 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/user/profile")
|
@RequestMapping("/system/user/profile")
|
||||||
public class ProfileController extends BaseController
|
public class SysProfileController extends BaseController
|
||||||
{
|
{
|
||||||
private static final Logger log = LoggerFactory.getLogger(ProfileController.class);
|
private static final Logger log = LoggerFactory.getLogger(SysProfileController.class);
|
||||||
|
|
||||||
private String prefix = "system/user/profile";
|
private String prefix = "system/user/profile";
|
||||||
|
|
|
@ -28,7 +28,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/role")
|
@RequestMapping("/system/role")
|
||||||
public class RoleController extends BaseController
|
public class SysRoleController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "system/role";
|
private String prefix = "system/role";
|
||||||
|
|
|
@ -32,7 +32,7 @@ import com.ruoyi.web.core.base.BaseController;
|
||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@RequestMapping("/system/user")
|
@RequestMapping("/system/user")
|
||||||
public class UserController extends BaseController
|
public class SysUserController extends BaseController
|
||||||
{
|
{
|
||||||
private String prefix = "system/user";
|
private String prefix = "system/user";
|
||||||
|
|
|
@ -127,7 +127,7 @@ gen:
|
||||||
# 作者
|
# 作者
|
||||||
author: ruoyi
|
author: ruoyi
|
||||||
# 默认生成包路径 module 需改成自己的模块名称 如 system monitor tool
|
# 默认生成包路径 module 需改成自己的模块名称 如 system monitor tool
|
||||||
packageName: com.ruoyi.project.module
|
packageName: com.ruoyi.module
|
||||||
# 自动去除表前缀,默认是true
|
# 自动去除表前缀,默认是true
|
||||||
autoRemovePre: true
|
autoRemovePre: true
|
||||||
# 表前缀(类名不会包含表前缀)
|
# 表前缀(类名不会包含表前缀)
|
||||||
|
|
|
@ -468,6 +468,10 @@
|
||||||
url = $.table._option.updateUrl.replace("{id}", id);
|
url = $.table._option.updateUrl.replace("{id}", id);
|
||||||
} else {
|
} else {
|
||||||
var id = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id);
|
var id = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id);
|
||||||
|
if (id.length == 0) {
|
||||||
|
$.modal.alertWarning("请至少选择一条记录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
url = $.table._option.updateUrl.replace("{id}", id);
|
url = $.table._option.updateUrl.replace("{id}", id);
|
||||||
}
|
}
|
||||||
$.modal.open("修改" + $.table._option.modalName, url);
|
$.modal.open("修改" + $.table._option.modalName, url);
|
||||||
|
@ -475,7 +479,7 @@
|
||||||
// 工具栏表格树修改
|
// 工具栏表格树修改
|
||||||
editTree: function() {
|
editTree: function() {
|
||||||
var row = $('#bootstrap-table').bootstrapTreeTable('getSelections')[0];
|
var row = $('#bootstrap-table').bootstrapTreeTable('getSelections')[0];
|
||||||
if ($.common.isEmpty(row)) {
|
if ($.common.isEmpty(row)) {
|
||||||
$.modal.alertWarning("请至少选择一条记录");
|
$.modal.alertWarning("请至少选择一条记录");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,8 +102,7 @@ public class Global
|
||||||
*/
|
*/
|
||||||
public static Boolean isAddressEnabled()
|
public static Boolean isAddressEnabled()
|
||||||
{
|
{
|
||||||
String value = getConfig("ruoyi.addressEnabled");
|
return Boolean.valueOf(getConfig("ruoyi.addressEnabled"));
|
||||||
return Boolean.TRUE.equals(value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -20,7 +20,7 @@ import com.ruoyi.generator.domain.TableInfo;
|
||||||
public class GenUtils
|
public class GenUtils
|
||||||
{
|
{
|
||||||
/** 项目空间路径 */
|
/** 项目空间路径 */
|
||||||
private static final String PROJECT_PATH = "main/java/com/ruoyi/project";
|
private static final String PROJECT_PATH = "main/java/com/ruoyi";
|
||||||
|
|
||||||
/** mybatis空间路径 */
|
/** mybatis空间路径 */
|
||||||
private static final String MYBATIS_PATH = "main/resources/mybatis";
|
private static final String MYBATIS_PATH = "main/resources/mybatis";
|
||||||
|
@ -71,7 +71,7 @@ public class GenUtils
|
||||||
velocityContext.put("classname", table.getClassname());
|
velocityContext.put("classname", table.getClassname());
|
||||||
velocityContext.put("moduleName", GenUtils.getModuleName(packageName));
|
velocityContext.put("moduleName", GenUtils.getModuleName(packageName));
|
||||||
velocityContext.put("columns", table.getColumns());
|
velocityContext.put("columns", table.getColumns());
|
||||||
velocityContext.put("package", packageName + "." + table.getClassname());
|
velocityContext.put("package", packageName);
|
||||||
velocityContext.put("author", Global.getAuthor());
|
velocityContext.put("author", Global.getAuthor());
|
||||||
velocityContext.put("datetime", DateUtils.getDate());
|
velocityContext.put("datetime", DateUtils.getDate());
|
||||||
return velocityContext;
|
return velocityContext;
|
||||||
|
@ -85,16 +85,16 @@ public class GenUtils
|
||||||
public static List<String> getTemplates()
|
public static List<String> getTemplates()
|
||||||
{
|
{
|
||||||
List<String> templates = new ArrayList<String>();
|
List<String> templates = new ArrayList<String>();
|
||||||
templates.add("templates/vm/java/domain.java.vm");
|
templates.add("vm/java/domain.java.vm");
|
||||||
templates.add("templates/vm/java/Mapper.java.vm");
|
templates.add("vm/java/Mapper.java.vm");
|
||||||
templates.add("templates/vm/java/Service.java.vm");
|
templates.add("vm/java/Service.java.vm");
|
||||||
templates.add("templates/vm/java/ServiceImpl.java.vm");
|
templates.add("vm/java/ServiceImpl.java.vm");
|
||||||
templates.add("templates/vm/java/Controller.java.vm");
|
templates.add("vm/java/Controller.java.vm");
|
||||||
templates.add("templates/vm/xml/Mapper.xml.vm");
|
templates.add("vm/xml/Mapper.xml.vm");
|
||||||
templates.add("templates/vm/html/list.html.vm");
|
templates.add("vm/html/list.html.vm");
|
||||||
templates.add("templates/vm/html/add.html.vm");
|
templates.add("vm/html/add.html.vm");
|
||||||
templates.add("templates/vm/html/edit.html.vm");
|
templates.add("vm/html/edit.html.vm");
|
||||||
templates.add("templates/vm/sql/sql.vm");
|
templates.add("vm/sql/sql.vm");
|
||||||
return templates;
|
return templates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,11 +127,6 @@ public class GenUtils
|
||||||
String mybatisPath = MYBATIS_PATH + "/" + moduleName + "/" + className;
|
String mybatisPath = MYBATIS_PATH + "/" + moduleName + "/" + className;
|
||||||
String htmlPath = TEMPLATES_PATH + "/" + moduleName + "/" + classname;
|
String htmlPath = TEMPLATES_PATH + "/" + moduleName + "/" + classname;
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(classname))
|
|
||||||
{
|
|
||||||
javaPath += classname.replace(".", "/") + "/";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (template.contains("domain.java.vm"))
|
if (template.contains("domain.java.vm"))
|
||||||
{
|
{
|
||||||
return javaPath + "domain" + "/" + className + ".java";
|
return javaPath + "domain" + "/" + className + ".java";
|
||||||
|
@ -229,6 +224,6 @@ public class GenUtils
|
||||||
{
|
{
|
||||||
System.out.println(StringUtils.convertToCamelCase("user_name"));
|
System.out.println(StringUtils.convertToCamelCase("user_name"));
|
||||||
System.out.println(replaceKeyword("岗位信息表"));
|
System.out.println(replaceKeyword("岗位信息表"));
|
||||||
System.out.println(getModuleName("com.ruoyi.project.system"));
|
System.out.println(getModuleName("com.ruoyi.system"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package ${package}.controller;
|
package ${package}.web.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
@ -10,13 +10,13 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import ${package}.domain.${className};
|
import ${package}.domain.${className};
|
||||||
import ${package}.service.I${className}Service;
|
import ${package}.service.I${className}Service;
|
||||||
import com.ruoyi.framework.web.controller.BaseController;
|
import com.ruoyi.web.core.base.BaseController;
|
||||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
import com.ruoyi.common.base.AjaxResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ${tableComment} 信息操作处理
|
* ${tableComment} 信息操作处理
|
|
@ -2,7 +2,7 @@ package ${package}.domain;
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
import com.ruoyi.common.base.BaseEntity;
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
#if($column.attrType == 'Date')
|
#if($column.attrType == 'Date')
|
||||||
import java.util.Date;
|
import java.util.Date;
|
Loading…
Reference in New Issue