mirror of https://github.com/jeecgboot/jeecg-boot
parent
f3b77442fc
commit
6f90a09558
|
@ -4,24 +4,24 @@
|
|||
<#assign id = '${.now?string["yyyyMMddhhmmSSsss"]}0'>
|
||||
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
|
||||
VALUES ('${id}', NULL, '${tableVo.ftlDescription}', '/${entityPackage}/${entityName?uncap_first}List', '${entityPackage}/${entityName}List', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 1, 0, 0, 0, NULL, '1', 0, 0, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0);
|
||||
VALUES ('${id}', NULL, '${tableVo.ftlDescription}', '/${entityPackage}/${entityName?uncap_first}List', '${entityPackage}/${entityName}List', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0);
|
||||
|
||||
-- 权限控制sql
|
||||
-- 新增
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}1', '${id}', '添加${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${bussiPackage}:${tableName}:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}1', '${id}', '添加${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 编辑
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}2', '${id}', '编辑${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${bussiPackage}:${tableName}:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}2', '${id}', '编辑${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 删除
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}3', '${id}', '删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${bussiPackage}:${tableName}:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}3', '${id}', '删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 批量删除
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}4', '${id}', '批量删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${bussiPackage}:${tableName}:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}4', '${id}', '批量删除${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 导出excel
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}5', '${id}', '导出excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${bussiPackage}:${tableName}:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}5', '${id}', '导出excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
-- 导入excel
|
||||
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}6', '${id}', '导入excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${bussiPackage}:${tableName}:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
||||
VALUES ('${.now?string["yyyyMMddhhmmSSsss"]}6', '${id}', '导入excel_${tableVo.ftlDescription}', NULL, NULL, 0, NULL, NULL, 2, '${entityPackage}:${tableName}:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '${.now?string["yyyy-MM-dd HH:mm:ss"]}', NULL, NULL, 0, 0, '1', 0);
|
|
@ -35,6 +35,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
<#assign bpm_flag=false>
|
||||
<#list originalColumns as po>
|
||||
<#if po.fieldDbName=='bpm_status'>
|
||||
|
@ -86,7 +87,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-添加")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:add")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
||||
<#if bpm_flag>
|
||||
|
@ -104,7 +105,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:edit")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
||||
${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
|
||||
|
@ -119,7 +120,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:delete")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName?uncap_first}Service.removeById(id);
|
||||
|
@ -134,7 +135,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:deleteBatch")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.${entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
|
@ -164,7 +165,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
* @param request
|
||||
* @param ${entityName?uncap_first}
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:exportXls")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
|
||||
return super.exportXls(request, ${entityName?uncap_first}, ${entityName}.class, "${tableVo.ftlDescription}");
|
||||
|
@ -177,7 +178,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("${tableName}:importExcel")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ${entityName}.class);
|
||||
|
|
|
@ -45,6 +45,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
<#assign bpm_flag=false>
|
||||
<#list originalColumns as po>
|
||||
<#if po.fieldDbName=='bpm_status'>
|
||||
|
@ -100,7 +101,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-添加")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:add")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
|
@ -120,7 +121,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:edit")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
|
@ -141,7 +142,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:delete")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName?uncap_first}Service.delMain(id);
|
||||
|
@ -156,7 +157,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:deleteBatch")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
|
@ -203,7 +204,7 @@ public class ${entityName}Controller {
|
|||
* @param request
|
||||
* @param ${entityName?uncap_first}
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:exportXls")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
|
||||
// Step.1 组装查询条件查询数据
|
||||
|
@ -247,7 +248,7 @@ public class ${entityName}Controller {
|
|||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:importExcel")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: ${tableVo.ftlDescription}
|
||||
|
@ -206,7 +207,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-添加")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:add")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
||||
${entityName?uncap_first}Service.add${entityName}(${entityName?uncap_first});
|
||||
|
@ -221,7 +222,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:edit")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
||||
${entityName?uncap_first}Service.update${entityName}(${entityName?uncap_first});
|
||||
|
@ -236,7 +237,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:delete")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName?uncap_first}Service.delete${entityName}(id);
|
||||
|
@ -251,7 +252,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:deleteBatch")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.${entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
|
@ -281,7 +282,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
* @param request
|
||||
* @param ${entityName?uncap_first}
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:exportXls")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
|
||||
return super.exportXls(request, ${entityName?uncap_first}, ${entityName}.class, "${tableVo.ftlDescription}");
|
||||
|
@ -294,7 +295,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:importExcel")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ${entityName}.class);
|
||||
|
|
|
@ -38,6 +38,7 @@ import java.io.IOException;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: ${tableVo.ftlDescription}
|
||||
|
@ -90,7 +91,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-添加")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:add")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
||||
${entityName?uncap_first}Service.save(${entityName?uncap_first});
|
||||
|
@ -104,7 +105,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:edit")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
|
||||
${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
|
||||
|
@ -118,7 +119,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:delete")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName?uncap_first}Service.delMain(id);
|
||||
|
@ -132,7 +133,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:deleteBatch")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
|
@ -143,7 +144,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
* 导出
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:exportXls")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
|
||||
return super.exportXls(request, ${entityName?uncap_first}, ${entityName}.class, "${tableVo.ftlDescription}");
|
||||
|
@ -153,7 +154,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
|
|||
* 导入
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:importExcel")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ${entityName}.class);
|
||||
|
|
|
@ -45,6 +45,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: ${tableVo.ftlDescription}
|
||||
|
@ -94,7 +95,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-添加")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:add")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
|
@ -111,7 +112,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:edit")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
|
@ -132,7 +133,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:delete")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName?uncap_first}Service.delMain(id);
|
||||
|
@ -147,7 +148,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:deleteBatch")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
|
@ -198,7 +199,7 @@ public class ${entityName}Controller {
|
|||
* @param request
|
||||
* @param ${entityName?uncap_first}
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:exportXls")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
|
||||
// Step.1 组装查询条件查询数据
|
||||
|
@ -242,7 +243,7 @@ public class ${entityName}Controller {
|
|||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:importExcel")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
|
|
|
@ -45,6 +45,8 @@ import com.alibaba.fastjson.JSON;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
<#assign bpm_flag=false>
|
||||
<#list originalColumns as po>
|
||||
<#if po.fieldDbName=='bpm_status'>
|
||||
|
@ -100,7 +102,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-添加")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:add")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
|
@ -120,7 +122,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:edit")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
|
@ -141,7 +143,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:delete")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName?uncap_first}Service.delMain(id);
|
||||
|
@ -156,7 +158,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:deleteBatch")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
|
@ -203,7 +205,7 @@ public class ${entityName}Controller {
|
|||
* @param request
|
||||
* @param ${entityName?uncap_first}
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:exportXls")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
|
||||
// Step.1 组装查询条件查询数据
|
||||
|
@ -247,7 +249,7 @@ public class ${entityName}Controller {
|
|||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:importExcel")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
<#else>
|
||||
<j-vxe-table
|
||||
:keep-source="true"
|
||||
resizable
|
||||
ref="${sub.entityName?uncap_first}TableRef"
|
||||
v-if="${sub.entityName?uncap_first}Table.show"
|
||||
:loading="${sub.entityName?uncap_first}Table.loading"
|
||||
:columns="${sub.entityName?uncap_first}Table.columns"
|
||||
:dataSource="${sub.entityName?uncap_first}Table.dataSource"
|
||||
|
@ -140,8 +140,7 @@
|
|||
const ${sub.entityName?uncap_first}Table = reactive<Record<string, any>>({
|
||||
loading: false,
|
||||
columns: ${sub.entityName?uncap_first}Columns,
|
||||
dataSource: [],
|
||||
show: false
|
||||
dataSource: []
|
||||
});
|
||||
</#if>
|
||||
</#list>
|
||||
|
@ -203,7 +202,6 @@
|
|||
<#else>
|
||||
const ${sub.entityName?uncap_first}DataList = await query${sub.entityName}ListByMainId(row['${subMainFieldMap[sub.entityName]}']);
|
||||
${sub.entityName?uncap_first}Table.dataSource = [...${sub.entityName?uncap_first}DataList];
|
||||
${sub.entityName?uncap_first}Table.show = true;
|
||||
</#if>
|
||||
</#list>
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: ${tableVo.ftlDescription}
|
||||
|
@ -94,7 +95,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-添加")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-添加", notes="${tableVo.ftlDescription}-添加")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:add")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
|
@ -111,7 +112,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-编辑", notes="${tableVo.ftlDescription}-编辑")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:edit")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
|
||||
${entityName} ${entityName?uncap_first} = new ${entityName}();
|
||||
|
@ -132,7 +133,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-通过id删除", notes="${tableVo.ftlDescription}-通过id删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:delete")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
${entityName?uncap_first}Service.delMain(id);
|
||||
|
@ -147,7 +148,7 @@ public class ${entityName}Controller {
|
|||
*/
|
||||
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
|
||||
@ApiOperation(value="${tableVo.ftlDescription}-批量删除", notes="${tableVo.ftlDescription}-批量删除")
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:deleteBatch")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
|
@ -194,7 +195,7 @@ public class ${entityName}Controller {
|
|||
* @param request
|
||||
* @param ${entityName?uncap_first}
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:exportXls")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
|
||||
// Step.1 组装查询条件查询数据
|
||||
|
@ -238,7 +239,7 @@ public class ${entityName}Controller {
|
|||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("${bussiPackage}:${tableName}:importExcel")
|
||||
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
|
|
|
@ -149,12 +149,10 @@
|
|||
const tabsStyle = computed(() => {
|
||||
let height: Nullable<string> = null
|
||||
let minHeight = '100px'
|
||||
let maxHeight: Nullable<string> = '500px'
|
||||
// 弹窗wrapper
|
||||
|
||||
<#-- update-begin-author:taoyan date:2022-11-14 for:VUEN-2674 【代码生成】对接流程表单 附加单据显示问题 5.多tab生成代码后,新增 没有滚动条,只能填写部分字段 -->
|
||||
let overflow = 'auto';
|
||||
return {height, minHeight, maxHeight, overflow};
|
||||
return {height, minHeight, overflow};
|
||||
<#-- update-end-author:taoyan date:2022-11-14 for:VUEN-2674 【代码生成】对接流程表单 附加单据显示问题 5.多tab生成代码后,新增 没有滚动条,只能填写部分字段 -->
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue