diff --git a/17/Controller b/17/Controller deleted file mode 100644 index 875f925..0000000 --- a/17/Controller +++ /dev/null @@ -1,150 +0,0 @@ -package ${package}.${moduleName}.controller; - -#if($queryList) -import cn.hutool.core.util.StrUtil; -#end -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.collection.CollUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.pig4cloud.pigx.common.core.util.R; -import com.pig4cloud.pigx.common.log.annotation.SysLog; -import ${package}.${moduleName}.entity.${ClassName}Entity; -import ${package}.${moduleName}.service.${ClassName}Service; -import org.springframework.security.access.prepost.PreAuthorize; -import com.pig4cloud.pigx.common.excel.annotation.ResponseExcel; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import org.springdoc.api.annotations.ParameterObject; -import org.springframework.http.HttpHeaders; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Operation; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.*; - -import java.util.List; -import java.util.Objects; - -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/${functionName}" ) -@Tag(description = "${functionName}" , name = "${tableComment}管理" ) -@SecurityRequirement(name = HttpHeaders.AUTHORIZATION) -public class ${ClassName}Controller { - - private final ${ClassName}Service ${className}Service; - - /** - * 分页查询 - * @param page 分页对象 - * @param ${className} ${tableComment} - * @return - */ - @Operation(summary = "分页查询" , description = "分页查询" ) - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" ) - public R get${ClassName}Page(@ParameterObject Page page, @ParameterObject ${ClassName}Entity ${className}) { - LambdaQueryWrapper<${ClassName}Entity> wrapper = Wrappers.lambdaQuery(); -#foreach ($field in $queryList) -#set($getAttrName=$str.getProperty($field.attrName)) -#set($var="${className}.$getAttrName()") -#if($field.attrType == 'String') -#set($expression="StrUtil.isNotBlank") -#else -#set($expression="Objects.nonNull") -#end -#if($field.queryType == '=') - wrapper.eq($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'like' ) - wrapper.like($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '!-' ) - wrapper.ne($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '>' ) - wrapper.gt($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '<' ) - wrapper.lt($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '>=' ) - wrapper.ge($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '<=' ) - wrapper.le($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'left like' ) - wrapper.likeLeft($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'right like' ) - wrapper.likeRight($expression($var),${ClassName}Entity::$getAttrName,$var); -#end -#end - return R.ok(${className}Service.page(page, wrapper)); - } - - - /** - * 通过id查询${tableComment} - * @param ${pk.attrName} id - * @return R - */ - @Operation(summary = "通过id查询" , description = "通过id查询" ) - @GetMapping("/{${pk.attrName}}" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" ) - public R getById(@PathVariable("${pk.attrName}" ) ${pk.attrType} ${pk.attrName}) { - return R.ok(${className}Service.getById(${pk.attrName})); - } - - /** - * 新增${tableComment} - * @param ${className} ${tableComment} - * @return R - */ - @Operation(summary = "新增${tableComment}" , description = "新增${tableComment}" ) - @SysLog("新增${tableComment}" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_add')" ) - public R save(@RequestBody ${ClassName}Entity ${className}) { - return R.ok(${className}Service.save(${className})); - } - - /** - * 修改${tableComment} - * @param ${className} ${tableComment} - * @return R - */ - @Operation(summary = "修改${tableComment}" , description = "修改${tableComment}" ) - @SysLog("修改${tableComment}" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_edit')" ) - public R updateById(@RequestBody ${ClassName}Entity ${className}) { - return R.ok(${className}Service.updateById(${className})); - } - - /** - * 通过id删除${tableComment} - * @param ids ${pk.attrName}列表 - * @return R - */ - @Operation(summary = "通过id删除${tableComment}" , description = "通过id删除${tableComment}" ) - @SysLog("通过id删除${tableComment}" ) - @DeleteMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_del')" ) - public R removeById(@RequestBody ${pk.attrType}[] ids) { - return R.ok(${className}Service.removeBatchByIds(CollUtil.toList(ids))); - } - - - /** - * 导出excel 表格 - * @param ${className} 查询条件 - * @param ids 导出指定ID - * @return excel 文件流 - */ - @ResponseExcel - @GetMapping("/export") - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_export')" ) - public List<${ClassName}Entity> export(${ClassName}Entity ${className},${pk.attrType}[] ids) { - return ${className}Service.list(Wrappers.lambdaQuery(${className}).in(ArrayUtil.isNotEmpty(ids), ${ClassName}Entity::$str.getProperty($pk.attrName), ids)); - } -} \ No newline at end of file diff --git a/17/Mapper b/17/Mapper deleted file mode 100644 index 997d76f..0000000 --- a/17/Mapper +++ /dev/null @@ -1,11 +0,0 @@ -package ${package}.${moduleName}.mapper; - -import com.pig4cloud.pigx.common.data.datascope.PigxBaseMapper; -import ${package}.${moduleName}.entity.${ClassName}Entity; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface ${ClassName}Mapper extends PigxBaseMapper<${ClassName}Entity> { - - -} \ No newline at end of file diff --git a/17/Mapper.xml b/17/Mapper.xml deleted file mode 100644 index 34d913e..0000000 --- a/17/Mapper.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - -#foreach ($field in $fieldList) - #if($field.primaryPk) - - #end - #if(!$field.primaryPk) - - #end -#end - - \ No newline at end of file diff --git a/17/Service b/17/Service deleted file mode 100644 index c2eb0cc..0000000 --- a/17/Service +++ /dev/null @@ -1,24 +0,0 @@ -package ${package}.${moduleName}.service; - -#if($ChildClassName) -import com.github.yulichang.extension.mapping.base.MPJDeepService; -import ${package}.${moduleName}.entity.${ChildClassName}Entity; -#else -import com.baomidou.mybatisplus.extension.service.IService; -#end -import ${package}.${moduleName}.entity.${ClassName}Entity; - -#if($ChildClassName) -public interface ${ClassName}Service extends MPJDeepService<${ClassName}Entity> { - Boolean saveDeep(${ClassName}Entity ${className}); - - Boolean updateDeep(${ClassName}Entity ${className}); - - Boolean removeDeep(Long[] ids); - - Boolean removeChild(Long[] ids); -#else -public interface ${ClassName}Service extends IService<${ClassName}Entity> { -#end - -} \ No newline at end of file diff --git a/17/ServiceImpl b/17/ServiceImpl deleted file mode 100644 index ff80e64..0000000 --- a/17/ServiceImpl +++ /dev/null @@ -1,74 +0,0 @@ -package ${package}.${moduleName}.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import ${package}.${moduleName}.entity.${ClassName}Entity; -import ${package}.${moduleName}.mapper.${ClassName}Mapper; -import ${package}.${moduleName}.service.${ClassName}Service; -import org.springframework.stereotype.Service; -#if($ChildClassName) -import cn.hutool.core.collection.CollUtil; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import ${package}.${moduleName}.entity.${ChildClassName}Entity; -import ${package}.${moduleName}.mapper.${ChildClassName}Mapper; -import org.springframework.transaction.annotation.Transactional; -import lombok.RequiredArgsConstructor; -import java.util.Objects; -#end -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@Service -#if($ChildClassName) -@RequiredArgsConstructor -#end -public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${ClassName}Entity> implements ${ClassName}Service { -#if($ChildClassName) - private final ${ChildClassName}Mapper ${childClassName}Mapper; - - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean saveDeep(${ClassName}Entity ${className}) { - baseMapper.insert(${className}); - for (${ChildClassName}Entity ${childClassName} : ${className}.get${ChildClassName}List()) { - ${childClassName}.$str.setProperty($childField)(${className}.$str.getProperty($mainField)()); - ${childClassName}Mapper.insert( ${childClassName}); - } - - return Boolean.TRUE; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean updateDeep(${ClassName}Entity ${className}) { - baseMapper.updateById(${className}); - for (${ChildClassName}Entity ${childClassName} : ${className}.get${ChildClassName}List()) { -#set($getChildPkName=$str.getProperty(${pk.attrName})) - if (Objects.isNull(${childClassName}.$getChildPkName())) { - ${childClassName}.$str.setProperty($childField)(${className}.getId()); - ${childClassName}Mapper.insert(${childClassName}); - } else { - ${childClassName}Mapper.updateById(${childClassName}); - } - } - return Boolean.TRUE; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean removeDeep(Long[] ids) { - baseMapper.deleteBatchIds(CollUtil.toList(ids)); - ${childClassName}Mapper.delete(Wrappers.<${ChildClassName}Entity>lambdaQuery().in(${ChildClassName}Entity::$str.getProperty($childField), ids)); - return Boolean.TRUE; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean removeChild(Long[] ids) { - ${childClassName}Mapper.deleteBatchIds(CollUtil.toList(ids)); - return Boolean.TRUE; - } -#end -} \ No newline at end of file diff --git a/17/api.ts b/17/api.ts deleted file mode 100644 index 8886c6c..0000000 --- a/17/api.ts +++ /dev/null @@ -1,50 +0,0 @@ -import request from "/@/utils/request" - -export function fetchList(query?: Object) { - return request({ - url: '/${moduleName}/${functionName}/page', - method: 'get', - params: query - }) -} - -export function addObj(obj?: Object) { - return request({ - url: '/${moduleName}/${functionName}', - method: 'post', - data: obj - }) -} - -export function getObj(id?: string) { - return request({ - url: '/${moduleName}/${functionName}/' + id, - method: 'get' - }) -} - -export function delObjs(ids?: Object) { - return request({ - url: '/${moduleName}/${functionName}', - method: 'delete', - data: ids - }) -} - -export function putObj(obj?: Object) { - return request({ - url: '/${moduleName}/${functionName}', - method: 'put', - data: obj - }) -} - -#if($ChildClassName) -export function delChildObj(ids?: Object) { - return request({ - url: '/${moduleName}/${functionName}/child', - method: 'delete', - data: ids - }) -} -#end \ No newline at end of file diff --git "a/17/i18n\344\270\255\346\226\207\346\250\241\346\235\277" "b/17/i18n\344\270\255\346\226\207\346\250\241\346\235\277" deleted file mode 100644 index 762cbb7..0000000 --- "a/17/i18n\344\270\255\346\226\207\346\250\241\346\235\277" +++ /dev/null @@ -1,12 +0,0 @@ -export default { - ${functionName}: { - index: '#', - import${className}Tip: '导入${tableComment}', -#foreach($field in $fieldList) - ${field.attrName}: '#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end', -#end -#foreach($field in $fieldList) - input$str.pascalCase(${field.attrName})Tip: '请输入#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end', -#end - } -} \ No newline at end of file diff --git "a/17/i18n\350\213\261\346\226\207\346\250\241\346\235\277" "b/17/i18n\350\213\261\346\226\207\346\250\241\346\235\277" deleted file mode 100644 index 57e3c9b..0000000 --- "a/17/i18n\350\213\261\346\226\207\346\250\241\346\235\277" +++ /dev/null @@ -1,12 +0,0 @@ -export default { - ${functionName}: { - index: '#', - import${className}Tip: 'import ${ClassName}', -#foreach($field in $fieldList) - ${field.attrName}: '${field.attrName}', -#end -#foreach($field in $fieldList) - input$str.pascalCase(${field.attrName})Tip: 'input ${field.attrName}', -#end - } -} \ No newline at end of file diff --git a/17/menu.sql b/17/menu.sql deleted file mode 100644 index c9fcd78..0000000 --- a/17/menu.sql +++ /dev/null @@ -1,22 +0,0 @@ --- 该脚本不要直接执行, 注意维护菜单的父节点ID 默认 父节点-1 , 默认租户 1 -#set($menuId=${dateTool.getSystemTime()}) - --- 菜单SQL -insert into sys_menu ( menu_id,parent_id, path, permission, menu_type, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${menuId}, '-1', '/${moduleName}/${functionName}/index', '', '0', 'icon-bangzhushouji', '0', null , '8', null , '${tableComment}管理', 1); - --- 菜单对应按钮SQL -insert into sys_menu ( menu_id,parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,1)},${menuId}, '${moduleName}_${functionName}_view', '1', null, '1', '0', null, '0', null, '${tableComment}查看', 1); - -insert into sys_menu ( menu_id,parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,2)},${menuId}, '${moduleName}_${functionName}_add', '1', null, '1', '0', null, '1', null, '${tableComment}新增', 1); - -insert into sys_menu (menu_id, parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,3)},${menuId}, '${moduleName}_${functionName}_edit', '1', null, '1', '0', null, '2', null, '${tableComment}修改', 1); - -insert into sys_menu (menu_id, parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,4)},${menuId}, '${moduleName}_${functionName}_del', '1', null, '1', '0', null, '3', null, '${tableComment}删除', 1); - -insert into sys_menu ( menu_id,parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,5)},${menuId}, '${moduleName}_${functionName}_export', '1', null, '1', '0', null, '3', null, '导入导出', 1); \ No newline at end of file diff --git a/17/vform.json b/17/vform.json deleted file mode 100644 index 09be293..0000000 --- a/17/vform.json +++ /dev/null @@ -1,108 +0,0 @@ -#set($key=${dateTool.getSystemTime()}) -{ - "widgetList": [ - { - "key": $key, - "type": "grid", - "category": "container", - "icon": "grid", - "cols": [ -#foreach($field in $formList) -#if($field.attrName != ${pk.attrName}) - { - "type": "grid-col", - "category": "container", - "icon": "grid-col", - "internal": true, - "widgetList": [ - { - "key": ${math.add($key,${foreach.index})}, - #if($field.formType == 'text') - "type": "input", - "icon": "text-field", - #elseif($field.formType == 'number') - "type": "number", - "icon": "number-field", - #elseif($field.formType == 'textarea') - "type": "textarea", - "icon": "textarea-field", - #elseif($field.formType == 'select' && ${field.fieldDict}) - "type": "select", - "icon": "select-field", - #elseif($field.formType == 'radio' && ${field.fieldDict}) - "type": "radio", - "icon": "radio-field", - #elseif($field.formType == 'checkbox' && ${field.fieldDict} ) - "type": "checkbox", - "icon": "checkbox-field", - #elseif($field.formType == 'date') - "type": "date", - "icon": "date-field", - #elseif($field.formType == 'datetime') - "type": "time", - "icon": "time-field", - #elseif($field.formType == 'upload-file') - "type": "file-upload", - "icon": "file-upload-field", - #elseif($field.formType == 'upload-img') - "type": "picture-upload", - "icon": "picture-upload-field", - #elseif($field.formType == 'editor') - "type": "rich-editor", - "icon": "rich-editor-field", - #else - "type": "input", - "icon": "text-field", - #end - "formItemFlag": true, - "options": { - "name": "${field.attrName}", - "label": "#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end", - #if(($field.formType == 'select' || $field.formType == 'radio' || $field.formType == 'checkbox') && ${field.fieldDict}) - "optionItemsDictType": "${field.fieldDict}", - #end - "placeholder": "请输入#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end" - }, - #if($field.formRequired) - "required": true, - #end - "id": "input${math.add($key,${foreach.index})}" - } - ], - "options": { - "name": "gridCol${math.add($key,${foreach.index})}", - "hidden": false, - "offset": 0, - "push": 0, - "pull": 0, - #if($formLayout == 1) - "span": 24, - #elseif($formLayout == 2) - "span": 12, - #end - "responsive": false - }, - "id": "grid-col-${math.add($key,${foreach.index})}" - }#if($foreach.hasNext),#end -#end -#end - ], - "options": { - "name": "grid${functionName}", - "hidden": false, - "gutter": 12 - }, - "id": "grid${functionName}" - } - ], - "formConfig": { - "modelName": "form", - "refName": "form", - "rulesName": "rules", - "labelWidth": 80, - "labelPosition": "left", - "labelAlign": "label-left-align", - "layoutType": "PC", - "jsonVersion": 3 - } -} \ No newline at end of file diff --git a/17/vform.vue b/17/vform.vue deleted file mode 100644 index 5161de4..0000000 --- a/17/vform.vue +++ /dev/null @@ -1,218 +0,0 @@ - - - \ No newline at end of file diff --git "a/17/\344\270\273\345\255\220Contoller" "b/17/\344\270\273\345\255\220Contoller" deleted file mode 100644 index b3bce56..0000000 --- "a/17/\344\270\273\345\255\220Contoller" +++ /dev/null @@ -1,161 +0,0 @@ -package ${package}.${moduleName}.controller; - -#if($queryList) -import cn.hutool.core.util.StrUtil; -#end -import cn.hutool.core.util.ArrayUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.pig4cloud.pigx.common.core.util.R; -import com.pig4cloud.pigx.common.log.annotation.SysLog; -import ${package}.${moduleName}.entity.${ClassName}Entity; -import ${package}.${moduleName}.entity.${ChildClassName}Entity; -import ${package}.${moduleName}.service.${ClassName}Service; -import org.springframework.security.access.prepost.PreAuthorize; -import com.pig4cloud.pigx.common.excel.annotation.ResponseExcel; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import org.springdoc.api.annotations.ParameterObject; -import org.springframework.http.HttpHeaders; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Operation; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.*; - -import java.util.List; -import java.util.Objects; - -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/${functionName}" ) -@Tag(description = "${functionName}" , name = "${tableComment}管理" ) -@SecurityRequirement(name = HttpHeaders.AUTHORIZATION) -public class ${ClassName}Controller { - - private final ${ClassName}Service ${className}Service; - - /** - * 分页查询 - * @param page 分页对象 - * @param ${className} ${tableComment} - * @return - */ - @Operation(summary = "分页查询" , description = "分页查询" ) - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" ) - public R get${ClassName}Page(@ParameterObject Page page, @ParameterObject ${ClassName}Entity ${className}) { - LambdaQueryWrapper<${ClassName}Entity> wrapper = Wrappers.lambdaQuery(); -#foreach ($field in $queryList) -#set($getAttrName=$str.getProperty($field.attrName)) -#set($var="${className}.$getAttrName()") -#if($field.attrType == 'String') -#set($expression="StrUtil.isNotBlank") -#else -#set($expression="Objects.nonNull") -#end -#if($field.queryType == '=') - wrapper.eq($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'like' ) - wrapper.like($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '!-' ) - wrapper.ne($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '>' ) - wrapper.gt($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '<' ) - wrapper.lt($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '>=' ) - wrapper.ge($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '<=' ) - wrapper.le($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'left like' ) - wrapper.likeLeft($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'right like' ) - wrapper.likeRight($expression($var),${ClassName}Entity::$getAttrName,$var); -#end -#end - return R.ok(${className}Service.page(page, wrapper)); - } - - /** - * 通过id查询${tableComment} - * @param ${pk.attrName} id - * @return R - */ - @Operation(summary = "通过id查询" , description = "通过id查询" ) - @GetMapping("/{${pk.attrName}}" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" ) - public R getById(@PathVariable("${pk.attrName}" ) ${pk.attrType} ${pk.attrName}) { - return R.ok(${className}Service.getByIdDeep(${pk.attrName})); - } - - /** - * 新增${tableComment} - * @param ${className} ${tableComment} - * @return R - */ - @Operation(summary = "新增${tableComment}" , description = "新增${tableComment}" ) - @SysLog("新增${tableComment}" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_add')" ) - public R save(@RequestBody ${ClassName}Entity ${className}) { - return R.ok(${className}Service.saveDeep(${className})); - } - - /** - * 修改${tableComment} - * @param ${className} ${tableComment} - * @return R - */ - @Operation(summary = "修改${tableComment}" , description = "修改${tableComment}" ) - @SysLog("修改${tableComment}" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_edit')" ) - public R updateById(@RequestBody ${ClassName}Entity ${className}) { - return R.ok(${className}Service.updateDeep(${className})); - } - - /** - * 通过id删除${tableComment} - * @param ids ${pk.attrName}列表 - * @return R - */ - @Operation(summary = "通过id删除${tableComment}" , description = "通过id删除${tableComment}" ) - @SysLog("通过id删除${tableComment}" ) - @DeleteMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_del')" ) - public R removeById(@RequestBody ${pk.attrType}[] ids) { - return R.ok(${className}Service.removeDeep(ids)); - } - - /** - * 通过id删除${tableComment}子表数据 - * @param ids ${pk.attrName}列表 - * @return R - */ - @Operation(summary = "通过id删除${tableComment}子表数据" , description = "通过id删除${tableComment}子表数据" ) - @SysLog("通过id删除${tableComment}子表数据" ) - @DeleteMapping("/child") - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_del')" ) - public R removeChild(@RequestBody ${pk.attrType}[] ids) { - return R.ok(${className}Service.removeChild(ids)); - } - - /** - * 导出excel 表格 - * @param ${className} 查询条件 - * @param ids 导出指定ID - * @return excel 文件流 - */ - @ResponseExcel - @GetMapping("/export") - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_export')" ) - public List<${ClassName}Entity> export(${ClassName}Entity ${className},${pk.attrType}[] ids) { - return ${className}Service.list(Wrappers.lambdaQuery(${className}).in(ArrayUtil.isNotEmpty(ids), ${ClassName}Entity::$str.getProperty($pk.attrName), ids)); - } -} \ No newline at end of file diff --git "a/17/\344\270\273\345\255\220\350\241\250\345\215\225" "b/17/\344\270\273\345\255\220\350\241\250\345\215\225" deleted file mode 100644 index 79bdf9b..0000000 --- "a/17/\344\270\273\345\255\220\350\241\250\345\215\225" +++ /dev/null @@ -1,259 +0,0 @@ - - - \ No newline at end of file diff --git "a/17/\344\270\273\345\255\220\350\241\250\346\240\274" "b/17/\344\270\273\345\255\220\350\241\250\346\240\274" deleted file mode 100644 index d670d89..0000000 --- "a/17/\344\270\273\345\255\220\350\241\250\346\240\274" +++ /dev/null @@ -1,181 +0,0 @@ - - - \ No newline at end of file diff --git "a/17/\345\255\220Mapper" "b/17/\345\255\220Mapper" deleted file mode 100644 index 29c6053..0000000 --- "a/17/\345\255\220Mapper" +++ /dev/null @@ -1,18 +0,0 @@ -package ${package}.${moduleName}.mapper; - -import com.pig4cloud.pigx.common.data.datascope.PigxBaseMapper; -#if($ChildClassName) -import ${package}.${moduleName}.entity.${ChildClassName}Entity; -#else -import ${package}.${moduleName}.entity.${ClassName}Entity; -#end -import org.apache.ibatis.annotations.Mapper; - -@Mapper -#if($ChildClassName) -public interface ${ChildClassName}Mapper extends PigxBaseMapper<${ChildClassName}Entity> { -#else -public interface ${ClassName}Mapper extends PigxBaseMapper<${ClassName}Entity> { -#end - -} \ No newline at end of file diff --git "a/17/\345\255\220\345\256\236\344\275\223" "b/17/\345\255\220\345\256\236\344\275\223" deleted file mode 100644 index db141f6..0000000 --- "a/17/\345\255\220\345\256\236\344\275\223" +++ /dev/null @@ -1,50 +0,0 @@ -package ${package}.${moduleName}.entity; - -import com.baomidou.mybatisplus.annotation.*; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -#foreach($import in $importList) -import $import; -#end - -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@Data -@TableName("${childTableName}") -@EqualsAndHashCode(callSuper = true) -@Schema(description = "${childTableName}") -public class ${ChildClassName}Entity extends Model<${ChildClassName}Entity> { - -#foreach ($field in $childFieldList) -#if(${field.fieldComment})#set($comment=${field.fieldComment})#else #set($comment=${field.attrName})#end - /** - * $comment - */ -#if($field.primaryPk == '1') - @TableId(type = IdType.ASSIGN_ID) -#end -#if($field.autoFill == 'INSERT') - @TableField(fill = FieldFill.INSERT) -#elseif($field.autoFill == 'INSERT_UPDATE') - @TableField(fill = FieldFill.INSERT_UPDATE) -#elseif($field.autoFill == 'UPDATE') - @TableField(fill = FieldFill.UPDATE) -#end -#if($field.fieldName == 'del_flag') - @TableLogic - @TableField(fill = FieldFill.INSERT) -#end - @Schema(description="$comment"#if($field.hidden),hidden=$field.hidden#end) -#if($field.formType == 'checkbox') - private ${field.attrType}[] $field.attrName; -#else - private $field.attrType $field.attrName; -#end -#end -} diff --git "a/17/\345\256\236\344\275\223" "b/17/\345\256\236\344\275\223" deleted file mode 100644 index 1a48d02..0000000 --- "a/17/\345\256\236\344\275\223" +++ /dev/null @@ -1,62 +0,0 @@ -package ${package}.${moduleName}.entity; - -import com.baomidou.mybatisplus.annotation.*; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -#foreach($import in $importList) -import $import; -#end -#if($ChildClassName) -import com.alibaba.excel.annotation.ExcelIgnore; -import com.github.yulichang.annotation.EntityMapping; -import java.util.List; -#end - -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@Data -@TableName("${tableName}") -@EqualsAndHashCode(callSuper = true) -@Schema(description = "${tableComment}") -public class ${ClassName}Entity extends Model<${ClassName}Entity> { - -#foreach ($field in $fieldList) -#if(${field.fieldComment})#set($comment=${field.fieldComment})#else #set($comment=${field.attrName})#end - - /** - * $comment - */ -#if($field.primaryPk == '1') - @TableId(type = IdType.ASSIGN_ID) -#end -#if($field.autoFill == 'INSERT') - @TableField(fill = FieldFill.INSERT) -#elseif($field.autoFill == 'INSERT_UPDATE') - @TableField(fill = FieldFill.INSERT_UPDATE) -#elseif($field.autoFill == 'UPDATE') - @TableField(fill = FieldFill.UPDATE) -#end -#if($field.fieldName == 'del_flag') - @TableLogic - @TableField(fill = FieldFill.INSERT) -#end - @Schema(description="$comment"#if($field.hidden),hidden=$field.hidden#end) -#if($field.formType == 'checkbox') - private ${field.attrType}[] $field.attrName; -#else - private $field.attrType $field.attrName; -#end -#end -#if($ChildClassName) - @ExcelIgnore - @TableField(exist = false) - @EntityMapping(thisField = "$mainField", joinField = "$childField") - private List<${ChildClassName}Entity> ${childClassName}List; -#end -} \ No newline at end of file diff --git "a/17/\350\241\250\345\215\225" "b/17/\350\241\250\345\215\225" deleted file mode 100644 index 8c18bf1..0000000 --- "a/17/\350\241\250\345\215\225" +++ /dev/null @@ -1,214 +0,0 @@ - - - \ No newline at end of file diff --git "a/17/\350\241\250\346\240\274" "b/17/\350\241\250\346\240\274" deleted file mode 100644 index 8f205dd..0000000 --- "a/17/\350\241\250\346\240\274" +++ /dev/null @@ -1,175 +0,0 @@ - - - \ No newline at end of file diff --git a/8/Controller b/8/Controller deleted file mode 100644 index 875f925..0000000 --- a/8/Controller +++ /dev/null @@ -1,150 +0,0 @@ -package ${package}.${moduleName}.controller; - -#if($queryList) -import cn.hutool.core.util.StrUtil; -#end -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.collection.CollUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.pig4cloud.pigx.common.core.util.R; -import com.pig4cloud.pigx.common.log.annotation.SysLog; -import ${package}.${moduleName}.entity.${ClassName}Entity; -import ${package}.${moduleName}.service.${ClassName}Service; -import org.springframework.security.access.prepost.PreAuthorize; -import com.pig4cloud.pigx.common.excel.annotation.ResponseExcel; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import org.springdoc.api.annotations.ParameterObject; -import org.springframework.http.HttpHeaders; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Operation; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.*; - -import java.util.List; -import java.util.Objects; - -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/${functionName}" ) -@Tag(description = "${functionName}" , name = "${tableComment}管理" ) -@SecurityRequirement(name = HttpHeaders.AUTHORIZATION) -public class ${ClassName}Controller { - - private final ${ClassName}Service ${className}Service; - - /** - * 分页查询 - * @param page 分页对象 - * @param ${className} ${tableComment} - * @return - */ - @Operation(summary = "分页查询" , description = "分页查询" ) - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" ) - public R get${ClassName}Page(@ParameterObject Page page, @ParameterObject ${ClassName}Entity ${className}) { - LambdaQueryWrapper<${ClassName}Entity> wrapper = Wrappers.lambdaQuery(); -#foreach ($field in $queryList) -#set($getAttrName=$str.getProperty($field.attrName)) -#set($var="${className}.$getAttrName()") -#if($field.attrType == 'String') -#set($expression="StrUtil.isNotBlank") -#else -#set($expression="Objects.nonNull") -#end -#if($field.queryType == '=') - wrapper.eq($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'like' ) - wrapper.like($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '!-' ) - wrapper.ne($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '>' ) - wrapper.gt($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '<' ) - wrapper.lt($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '>=' ) - wrapper.ge($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '<=' ) - wrapper.le($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'left like' ) - wrapper.likeLeft($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'right like' ) - wrapper.likeRight($expression($var),${ClassName}Entity::$getAttrName,$var); -#end -#end - return R.ok(${className}Service.page(page, wrapper)); - } - - - /** - * 通过id查询${tableComment} - * @param ${pk.attrName} id - * @return R - */ - @Operation(summary = "通过id查询" , description = "通过id查询" ) - @GetMapping("/{${pk.attrName}}" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" ) - public R getById(@PathVariable("${pk.attrName}" ) ${pk.attrType} ${pk.attrName}) { - return R.ok(${className}Service.getById(${pk.attrName})); - } - - /** - * 新增${tableComment} - * @param ${className} ${tableComment} - * @return R - */ - @Operation(summary = "新增${tableComment}" , description = "新增${tableComment}" ) - @SysLog("新增${tableComment}" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_add')" ) - public R save(@RequestBody ${ClassName}Entity ${className}) { - return R.ok(${className}Service.save(${className})); - } - - /** - * 修改${tableComment} - * @param ${className} ${tableComment} - * @return R - */ - @Operation(summary = "修改${tableComment}" , description = "修改${tableComment}" ) - @SysLog("修改${tableComment}" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_edit')" ) - public R updateById(@RequestBody ${ClassName}Entity ${className}) { - return R.ok(${className}Service.updateById(${className})); - } - - /** - * 通过id删除${tableComment} - * @param ids ${pk.attrName}列表 - * @return R - */ - @Operation(summary = "通过id删除${tableComment}" , description = "通过id删除${tableComment}" ) - @SysLog("通过id删除${tableComment}" ) - @DeleteMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_del')" ) - public R removeById(@RequestBody ${pk.attrType}[] ids) { - return R.ok(${className}Service.removeBatchByIds(CollUtil.toList(ids))); - } - - - /** - * 导出excel 表格 - * @param ${className} 查询条件 - * @param ids 导出指定ID - * @return excel 文件流 - */ - @ResponseExcel - @GetMapping("/export") - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_export')" ) - public List<${ClassName}Entity> export(${ClassName}Entity ${className},${pk.attrType}[] ids) { - return ${className}Service.list(Wrappers.lambdaQuery(${className}).in(ArrayUtil.isNotEmpty(ids), ${ClassName}Entity::$str.getProperty($pk.attrName), ids)); - } -} \ No newline at end of file diff --git a/8/Mapper b/8/Mapper deleted file mode 100644 index 997d76f..0000000 --- a/8/Mapper +++ /dev/null @@ -1,11 +0,0 @@ -package ${package}.${moduleName}.mapper; - -import com.pig4cloud.pigx.common.data.datascope.PigxBaseMapper; -import ${package}.${moduleName}.entity.${ClassName}Entity; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface ${ClassName}Mapper extends PigxBaseMapper<${ClassName}Entity> { - - -} \ No newline at end of file diff --git a/8/Mapper.xml b/8/Mapper.xml deleted file mode 100644 index 34d913e..0000000 --- a/8/Mapper.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - -#foreach ($field in $fieldList) - #if($field.primaryPk) - - #end - #if(!$field.primaryPk) - - #end -#end - - \ No newline at end of file diff --git a/8/Service b/8/Service deleted file mode 100644 index c2eb0cc..0000000 --- a/8/Service +++ /dev/null @@ -1,24 +0,0 @@ -package ${package}.${moduleName}.service; - -#if($ChildClassName) -import com.github.yulichang.extension.mapping.base.MPJDeepService; -import ${package}.${moduleName}.entity.${ChildClassName}Entity; -#else -import com.baomidou.mybatisplus.extension.service.IService; -#end -import ${package}.${moduleName}.entity.${ClassName}Entity; - -#if($ChildClassName) -public interface ${ClassName}Service extends MPJDeepService<${ClassName}Entity> { - Boolean saveDeep(${ClassName}Entity ${className}); - - Boolean updateDeep(${ClassName}Entity ${className}); - - Boolean removeDeep(Long[] ids); - - Boolean removeChild(Long[] ids); -#else -public interface ${ClassName}Service extends IService<${ClassName}Entity> { -#end - -} \ No newline at end of file diff --git a/8/ServiceImpl b/8/ServiceImpl deleted file mode 100644 index ff80e64..0000000 --- a/8/ServiceImpl +++ /dev/null @@ -1,74 +0,0 @@ -package ${package}.${moduleName}.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import ${package}.${moduleName}.entity.${ClassName}Entity; -import ${package}.${moduleName}.mapper.${ClassName}Mapper; -import ${package}.${moduleName}.service.${ClassName}Service; -import org.springframework.stereotype.Service; -#if($ChildClassName) -import cn.hutool.core.collection.CollUtil; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import ${package}.${moduleName}.entity.${ChildClassName}Entity; -import ${package}.${moduleName}.mapper.${ChildClassName}Mapper; -import org.springframework.transaction.annotation.Transactional; -import lombok.RequiredArgsConstructor; -import java.util.Objects; -#end -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@Service -#if($ChildClassName) -@RequiredArgsConstructor -#end -public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${ClassName}Entity> implements ${ClassName}Service { -#if($ChildClassName) - private final ${ChildClassName}Mapper ${childClassName}Mapper; - - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean saveDeep(${ClassName}Entity ${className}) { - baseMapper.insert(${className}); - for (${ChildClassName}Entity ${childClassName} : ${className}.get${ChildClassName}List()) { - ${childClassName}.$str.setProperty($childField)(${className}.$str.getProperty($mainField)()); - ${childClassName}Mapper.insert( ${childClassName}); - } - - return Boolean.TRUE; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean updateDeep(${ClassName}Entity ${className}) { - baseMapper.updateById(${className}); - for (${ChildClassName}Entity ${childClassName} : ${className}.get${ChildClassName}List()) { -#set($getChildPkName=$str.getProperty(${pk.attrName})) - if (Objects.isNull(${childClassName}.$getChildPkName())) { - ${childClassName}.$str.setProperty($childField)(${className}.getId()); - ${childClassName}Mapper.insert(${childClassName}); - } else { - ${childClassName}Mapper.updateById(${childClassName}); - } - } - return Boolean.TRUE; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean removeDeep(Long[] ids) { - baseMapper.deleteBatchIds(CollUtil.toList(ids)); - ${childClassName}Mapper.delete(Wrappers.<${ChildClassName}Entity>lambdaQuery().in(${ChildClassName}Entity::$str.getProperty($childField), ids)); - return Boolean.TRUE; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean removeChild(Long[] ids) { - ${childClassName}Mapper.deleteBatchIds(CollUtil.toList(ids)); - return Boolean.TRUE; - } -#end -} \ No newline at end of file diff --git a/8/api.ts b/8/api.ts deleted file mode 100644 index 8886c6c..0000000 --- a/8/api.ts +++ /dev/null @@ -1,50 +0,0 @@ -import request from "/@/utils/request" - -export function fetchList(query?: Object) { - return request({ - url: '/${moduleName}/${functionName}/page', - method: 'get', - params: query - }) -} - -export function addObj(obj?: Object) { - return request({ - url: '/${moduleName}/${functionName}', - method: 'post', - data: obj - }) -} - -export function getObj(id?: string) { - return request({ - url: '/${moduleName}/${functionName}/' + id, - method: 'get' - }) -} - -export function delObjs(ids?: Object) { - return request({ - url: '/${moduleName}/${functionName}', - method: 'delete', - data: ids - }) -} - -export function putObj(obj?: Object) { - return request({ - url: '/${moduleName}/${functionName}', - method: 'put', - data: obj - }) -} - -#if($ChildClassName) -export function delChildObj(ids?: Object) { - return request({ - url: '/${moduleName}/${functionName}/child', - method: 'delete', - data: ids - }) -} -#end \ No newline at end of file diff --git "a/8/i18n\344\270\255\346\226\207\346\250\241\346\235\277" "b/8/i18n\344\270\255\346\226\207\346\250\241\346\235\277" deleted file mode 100644 index 762cbb7..0000000 --- "a/8/i18n\344\270\255\346\226\207\346\250\241\346\235\277" +++ /dev/null @@ -1,12 +0,0 @@ -export default { - ${functionName}: { - index: '#', - import${className}Tip: '导入${tableComment}', -#foreach($field in $fieldList) - ${field.attrName}: '#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end', -#end -#foreach($field in $fieldList) - input$str.pascalCase(${field.attrName})Tip: '请输入#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end', -#end - } -} \ No newline at end of file diff --git "a/8/i18n\350\213\261\346\226\207\346\250\241\346\235\277" "b/8/i18n\350\213\261\346\226\207\346\250\241\346\235\277" deleted file mode 100644 index 57e3c9b..0000000 --- "a/8/i18n\350\213\261\346\226\207\346\250\241\346\235\277" +++ /dev/null @@ -1,12 +0,0 @@ -export default { - ${functionName}: { - index: '#', - import${className}Tip: 'import ${ClassName}', -#foreach($field in $fieldList) - ${field.attrName}: '${field.attrName}', -#end -#foreach($field in $fieldList) - input$str.pascalCase(${field.attrName})Tip: 'input ${field.attrName}', -#end - } -} \ No newline at end of file diff --git a/8/menu.sql b/8/menu.sql deleted file mode 100644 index c9fcd78..0000000 --- a/8/menu.sql +++ /dev/null @@ -1,22 +0,0 @@ --- 该脚本不要直接执行, 注意维护菜单的父节点ID 默认 父节点-1 , 默认租户 1 -#set($menuId=${dateTool.getSystemTime()}) - --- 菜单SQL -insert into sys_menu ( menu_id,parent_id, path, permission, menu_type, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${menuId}, '-1', '/${moduleName}/${functionName}/index', '', '0', 'icon-bangzhushouji', '0', null , '8', null , '${tableComment}管理', 1); - --- 菜单对应按钮SQL -insert into sys_menu ( menu_id,parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,1)},${menuId}, '${moduleName}_${functionName}_view', '1', null, '1', '0', null, '0', null, '${tableComment}查看', 1); - -insert into sys_menu ( menu_id,parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,2)},${menuId}, '${moduleName}_${functionName}_add', '1', null, '1', '0', null, '1', null, '${tableComment}新增', 1); - -insert into sys_menu (menu_id, parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,3)},${menuId}, '${moduleName}_${functionName}_edit', '1', null, '1', '0', null, '2', null, '${tableComment}修改', 1); - -insert into sys_menu (menu_id, parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,4)},${menuId}, '${moduleName}_${functionName}_del', '1', null, '1', '0', null, '3', null, '${tableComment}删除', 1); - -insert into sys_menu ( menu_id,parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id) -values (${math.add($menuId,5)},${menuId}, '${moduleName}_${functionName}_export', '1', null, '1', '0', null, '3', null, '导入导出', 1); \ No newline at end of file diff --git a/8/vform.json b/8/vform.json deleted file mode 100644 index 09be293..0000000 --- a/8/vform.json +++ /dev/null @@ -1,108 +0,0 @@ -#set($key=${dateTool.getSystemTime()}) -{ - "widgetList": [ - { - "key": $key, - "type": "grid", - "category": "container", - "icon": "grid", - "cols": [ -#foreach($field in $formList) -#if($field.attrName != ${pk.attrName}) - { - "type": "grid-col", - "category": "container", - "icon": "grid-col", - "internal": true, - "widgetList": [ - { - "key": ${math.add($key,${foreach.index})}, - #if($field.formType == 'text') - "type": "input", - "icon": "text-field", - #elseif($field.formType == 'number') - "type": "number", - "icon": "number-field", - #elseif($field.formType == 'textarea') - "type": "textarea", - "icon": "textarea-field", - #elseif($field.formType == 'select' && ${field.fieldDict}) - "type": "select", - "icon": "select-field", - #elseif($field.formType == 'radio' && ${field.fieldDict}) - "type": "radio", - "icon": "radio-field", - #elseif($field.formType == 'checkbox' && ${field.fieldDict} ) - "type": "checkbox", - "icon": "checkbox-field", - #elseif($field.formType == 'date') - "type": "date", - "icon": "date-field", - #elseif($field.formType == 'datetime') - "type": "time", - "icon": "time-field", - #elseif($field.formType == 'upload-file') - "type": "file-upload", - "icon": "file-upload-field", - #elseif($field.formType == 'upload-img') - "type": "picture-upload", - "icon": "picture-upload-field", - #elseif($field.formType == 'editor') - "type": "rich-editor", - "icon": "rich-editor-field", - #else - "type": "input", - "icon": "text-field", - #end - "formItemFlag": true, - "options": { - "name": "${field.attrName}", - "label": "#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end", - #if(($field.formType == 'select' || $field.formType == 'radio' || $field.formType == 'checkbox') && ${field.fieldDict}) - "optionItemsDictType": "${field.fieldDict}", - #end - "placeholder": "请输入#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end" - }, - #if($field.formRequired) - "required": true, - #end - "id": "input${math.add($key,${foreach.index})}" - } - ], - "options": { - "name": "gridCol${math.add($key,${foreach.index})}", - "hidden": false, - "offset": 0, - "push": 0, - "pull": 0, - #if($formLayout == 1) - "span": 24, - #elseif($formLayout == 2) - "span": 12, - #end - "responsive": false - }, - "id": "grid-col-${math.add($key,${foreach.index})}" - }#if($foreach.hasNext),#end -#end -#end - ], - "options": { - "name": "grid${functionName}", - "hidden": false, - "gutter": 12 - }, - "id": "grid${functionName}" - } - ], - "formConfig": { - "modelName": "form", - "refName": "form", - "rulesName": "rules", - "labelWidth": 80, - "labelPosition": "left", - "labelAlign": "label-left-align", - "layoutType": "PC", - "jsonVersion": 3 - } -} \ No newline at end of file diff --git a/8/vform.vue b/8/vform.vue deleted file mode 100644 index 5161de4..0000000 --- a/8/vform.vue +++ /dev/null @@ -1,218 +0,0 @@ - - - \ No newline at end of file diff --git "a/8/\344\270\273\345\255\220Contoller" "b/8/\344\270\273\345\255\220Contoller" deleted file mode 100644 index b3bce56..0000000 --- "a/8/\344\270\273\345\255\220Contoller" +++ /dev/null @@ -1,161 +0,0 @@ -package ${package}.${moduleName}.controller; - -#if($queryList) -import cn.hutool.core.util.StrUtil; -#end -import cn.hutool.core.util.ArrayUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.pig4cloud.pigx.common.core.util.R; -import com.pig4cloud.pigx.common.log.annotation.SysLog; -import ${package}.${moduleName}.entity.${ClassName}Entity; -import ${package}.${moduleName}.entity.${ChildClassName}Entity; -import ${package}.${moduleName}.service.${ClassName}Service; -import org.springframework.security.access.prepost.PreAuthorize; -import com.pig4cloud.pigx.common.excel.annotation.ResponseExcel; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import org.springdoc.api.annotations.ParameterObject; -import org.springframework.http.HttpHeaders; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Operation; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.*; - -import java.util.List; -import java.util.Objects; - -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@RestController -@RequiredArgsConstructor -@RequestMapping("/${functionName}" ) -@Tag(description = "${functionName}" , name = "${tableComment}管理" ) -@SecurityRequirement(name = HttpHeaders.AUTHORIZATION) -public class ${ClassName}Controller { - - private final ${ClassName}Service ${className}Service; - - /** - * 分页查询 - * @param page 分页对象 - * @param ${className} ${tableComment} - * @return - */ - @Operation(summary = "分页查询" , description = "分页查询" ) - @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" ) - public R get${ClassName}Page(@ParameterObject Page page, @ParameterObject ${ClassName}Entity ${className}) { - LambdaQueryWrapper<${ClassName}Entity> wrapper = Wrappers.lambdaQuery(); -#foreach ($field in $queryList) -#set($getAttrName=$str.getProperty($field.attrName)) -#set($var="${className}.$getAttrName()") -#if($field.attrType == 'String') -#set($expression="StrUtil.isNotBlank") -#else -#set($expression="Objects.nonNull") -#end -#if($field.queryType == '=') - wrapper.eq($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'like' ) - wrapper.like($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '!-' ) - wrapper.ne($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '>' ) - wrapper.gt($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '<' ) - wrapper.lt($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '>=' ) - wrapper.ge($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == '<=' ) - wrapper.le($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'left like' ) - wrapper.likeLeft($expression($var),${ClassName}Entity::$getAttrName,$var); -#elseif( $field.queryType == 'right like' ) - wrapper.likeRight($expression($var),${ClassName}Entity::$getAttrName,$var); -#end -#end - return R.ok(${className}Service.page(page, wrapper)); - } - - /** - * 通过id查询${tableComment} - * @param ${pk.attrName} id - * @return R - */ - @Operation(summary = "通过id查询" , description = "通过id查询" ) - @GetMapping("/{${pk.attrName}}" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" ) - public R getById(@PathVariable("${pk.attrName}" ) ${pk.attrType} ${pk.attrName}) { - return R.ok(${className}Service.getByIdDeep(${pk.attrName})); - } - - /** - * 新增${tableComment} - * @param ${className} ${tableComment} - * @return R - */ - @Operation(summary = "新增${tableComment}" , description = "新增${tableComment}" ) - @SysLog("新增${tableComment}" ) - @PostMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_add')" ) - public R save(@RequestBody ${ClassName}Entity ${className}) { - return R.ok(${className}Service.saveDeep(${className})); - } - - /** - * 修改${tableComment} - * @param ${className} ${tableComment} - * @return R - */ - @Operation(summary = "修改${tableComment}" , description = "修改${tableComment}" ) - @SysLog("修改${tableComment}" ) - @PutMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_edit')" ) - public R updateById(@RequestBody ${ClassName}Entity ${className}) { - return R.ok(${className}Service.updateDeep(${className})); - } - - /** - * 通过id删除${tableComment} - * @param ids ${pk.attrName}列表 - * @return R - */ - @Operation(summary = "通过id删除${tableComment}" , description = "通过id删除${tableComment}" ) - @SysLog("通过id删除${tableComment}" ) - @DeleteMapping - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_del')" ) - public R removeById(@RequestBody ${pk.attrType}[] ids) { - return R.ok(${className}Service.removeDeep(ids)); - } - - /** - * 通过id删除${tableComment}子表数据 - * @param ids ${pk.attrName}列表 - * @return R - */ - @Operation(summary = "通过id删除${tableComment}子表数据" , description = "通过id删除${tableComment}子表数据" ) - @SysLog("通过id删除${tableComment}子表数据" ) - @DeleteMapping("/child") - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_del')" ) - public R removeChild(@RequestBody ${pk.attrType}[] ids) { - return R.ok(${className}Service.removeChild(ids)); - } - - /** - * 导出excel 表格 - * @param ${className} 查询条件 - * @param ids 导出指定ID - * @return excel 文件流 - */ - @ResponseExcel - @GetMapping("/export") - @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_export')" ) - public List<${ClassName}Entity> export(${ClassName}Entity ${className},${pk.attrType}[] ids) { - return ${className}Service.list(Wrappers.lambdaQuery(${className}).in(ArrayUtil.isNotEmpty(ids), ${ClassName}Entity::$str.getProperty($pk.attrName), ids)); - } -} \ No newline at end of file diff --git "a/8/\344\270\273\345\255\220\350\241\250\345\215\225" "b/8/\344\270\273\345\255\220\350\241\250\345\215\225" deleted file mode 100644 index 79bdf9b..0000000 --- "a/8/\344\270\273\345\255\220\350\241\250\345\215\225" +++ /dev/null @@ -1,259 +0,0 @@ - - - \ No newline at end of file diff --git "a/8/\344\270\273\345\255\220\350\241\250\346\240\274" "b/8/\344\270\273\345\255\220\350\241\250\346\240\274" deleted file mode 100644 index d670d89..0000000 --- "a/8/\344\270\273\345\255\220\350\241\250\346\240\274" +++ /dev/null @@ -1,181 +0,0 @@ - - - \ No newline at end of file diff --git "a/8/\345\255\220Mapper" "b/8/\345\255\220Mapper" deleted file mode 100644 index 29c6053..0000000 --- "a/8/\345\255\220Mapper" +++ /dev/null @@ -1,18 +0,0 @@ -package ${package}.${moduleName}.mapper; - -import com.pig4cloud.pigx.common.data.datascope.PigxBaseMapper; -#if($ChildClassName) -import ${package}.${moduleName}.entity.${ChildClassName}Entity; -#else -import ${package}.${moduleName}.entity.${ClassName}Entity; -#end -import org.apache.ibatis.annotations.Mapper; - -@Mapper -#if($ChildClassName) -public interface ${ChildClassName}Mapper extends PigxBaseMapper<${ChildClassName}Entity> { -#else -public interface ${ClassName}Mapper extends PigxBaseMapper<${ClassName}Entity> { -#end - -} \ No newline at end of file diff --git "a/8/\345\255\220\345\256\236\344\275\223" "b/8/\345\255\220\345\256\236\344\275\223" deleted file mode 100644 index db141f6..0000000 --- "a/8/\345\255\220\345\256\236\344\275\223" +++ /dev/null @@ -1,50 +0,0 @@ -package ${package}.${moduleName}.entity; - -import com.baomidou.mybatisplus.annotation.*; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -#foreach($import in $importList) -import $import; -#end - -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@Data -@TableName("${childTableName}") -@EqualsAndHashCode(callSuper = true) -@Schema(description = "${childTableName}") -public class ${ChildClassName}Entity extends Model<${ChildClassName}Entity> { - -#foreach ($field in $childFieldList) -#if(${field.fieldComment})#set($comment=${field.fieldComment})#else #set($comment=${field.attrName})#end - /** - * $comment - */ -#if($field.primaryPk == '1') - @TableId(type = IdType.ASSIGN_ID) -#end -#if($field.autoFill == 'INSERT') - @TableField(fill = FieldFill.INSERT) -#elseif($field.autoFill == 'INSERT_UPDATE') - @TableField(fill = FieldFill.INSERT_UPDATE) -#elseif($field.autoFill == 'UPDATE') - @TableField(fill = FieldFill.UPDATE) -#end -#if($field.fieldName == 'del_flag') - @TableLogic - @TableField(fill = FieldFill.INSERT) -#end - @Schema(description="$comment"#if($field.hidden),hidden=$field.hidden#end) -#if($field.formType == 'checkbox') - private ${field.attrType}[] $field.attrName; -#else - private $field.attrType $field.attrName; -#end -#end -} diff --git "a/8/\345\256\236\344\275\223" "b/8/\345\256\236\344\275\223" deleted file mode 100644 index 1a48d02..0000000 --- "a/8/\345\256\236\344\275\223" +++ /dev/null @@ -1,62 +0,0 @@ -package ${package}.${moduleName}.entity; - -import com.baomidou.mybatisplus.annotation.*; -import com.baomidou.mybatisplus.extension.activerecord.Model; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -#foreach($import in $importList) -import $import; -#end -#if($ChildClassName) -import com.alibaba.excel.annotation.ExcelIgnore; -import com.github.yulichang.annotation.EntityMapping; -import java.util.List; -#end - -/** - * ${tableComment} - * - * @author ${author} - * @date ${datetime} - */ -@Data -@TableName("${tableName}") -@EqualsAndHashCode(callSuper = true) -@Schema(description = "${tableComment}") -public class ${ClassName}Entity extends Model<${ClassName}Entity> { - -#foreach ($field in $fieldList) -#if(${field.fieldComment})#set($comment=${field.fieldComment})#else #set($comment=${field.attrName})#end - - /** - * $comment - */ -#if($field.primaryPk == '1') - @TableId(type = IdType.ASSIGN_ID) -#end -#if($field.autoFill == 'INSERT') - @TableField(fill = FieldFill.INSERT) -#elseif($field.autoFill == 'INSERT_UPDATE') - @TableField(fill = FieldFill.INSERT_UPDATE) -#elseif($field.autoFill == 'UPDATE') - @TableField(fill = FieldFill.UPDATE) -#end -#if($field.fieldName == 'del_flag') - @TableLogic - @TableField(fill = FieldFill.INSERT) -#end - @Schema(description="$comment"#if($field.hidden),hidden=$field.hidden#end) -#if($field.formType == 'checkbox') - private ${field.attrType}[] $field.attrName; -#else - private $field.attrType $field.attrName; -#end -#end -#if($ChildClassName) - @ExcelIgnore - @TableField(exist = false) - @EntityMapping(thisField = "$mainField", joinField = "$childField") - private List<${ChildClassName}Entity> ${childClassName}List; -#end -} \ No newline at end of file diff --git "a/8/\350\241\250\345\215\225" "b/8/\350\241\250\345\215\225" deleted file mode 100644 index 8c18bf1..0000000 --- "a/8/\350\241\250\345\215\225" +++ /dev/null @@ -1,214 +0,0 @@ - - - \ No newline at end of file diff --git "a/8/\350\241\250\346\240\274" "b/8/\350\241\250\346\240\274" deleted file mode 100644 index 8f205dd..0000000 --- "a/8/\350\241\250\346\240\274" +++ /dev/null @@ -1,175 +0,0 @@ - - - \ No newline at end of file diff --git a/temps/Controller b/temps/Controller new file mode 100644 index 0000000..327f21d --- /dev/null +++ b/temps/Controller @@ -0,0 +1 @@ +package ${package}.${moduleName}.controller;\n\n#if($queryList)\nimport cn.hutool.core.util.StrUtil;\n#end\nimport cn.hutool.core.util.ArrayUtil;\nimport cn.hutool.core.collection.CollUtil;\nimport com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;\nimport com.baomidou.mybatisplus.core.toolkit.Wrappers;\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\nimport com.pig4cloud.pigx.common.core.util.R;\nimport com.pig4cloud.pigx.common.log.annotation.SysLog;\nimport ${package}.${moduleName}.entity.${ClassName}Entity;\nimport ${package}.${moduleName}.service.${ClassName}Service;\nimport org.springframework.security.access.prepost.PreAuthorize;\nimport com.pig4cloud.pigx.common.excel.annotation.ResponseExcel;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\n#if($isSpringBoot3)\nimport org.springdoc.core.annotations.ParameterObject;\n#else\nimport org.springdoc.api.annotations.ParameterObject;\n#end\nimport org.springframework.http.HttpHeaders;\nimport io.swagger.v3.oas.annotations.tags.Tag;\nimport io.swagger.v3.oas.annotations.Operation;\nimport lombok.RequiredArgsConstructor;\nimport org.springframework.web.bind.annotation.*;\n\nimport java.util.List;\nimport java.util.Objects;\n\n/**\n * ${tableComment}\n *\n * @author ${author}\n * @date ${datetime}\n */\n@RestController\n@RequiredArgsConstructor\n@RequestMapping("/${functionName}" )\n@Tag(description = "${functionName}" , name = "${tableComment}管理" )\n@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)\npublic class ${ClassName}Controller {\n\n private final ${ClassName}Service ${className}Service;\n\n /**\n * 分页查询\n * @param page 分页对象\n * @param ${className} ${tableComment}\n * @return\n */\n @Operation(summary = "分页查询" , description = "分页查询" )\n @GetMapping("/page" )\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" )\n public R get${ClassName}Page(@ParameterObject Page page, @ParameterObject ${ClassName}Entity ${className}) {\n LambdaQueryWrapper<${ClassName}Entity> wrapper = Wrappers.lambdaQuery();\n#foreach ($field in $queryList)\n#set($getAttrName=$str.getProperty($field.attrName))\n#set($var="${className}.$getAttrName()")\n#if($field.attrType == 'String')\n#set($expression="StrUtil.isNotBlank")\n#else\n#set($expression="Objects.nonNull")\n#end\n#if($field.queryType == '=')\n\t\twrapper.eq($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == 'like' )\n\t\twrapper.like($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '!-' )\n\t\twrapper.ne($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '>' )\n\t\twrapper.gt($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '<' )\n\t\twrapper.lt($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '>=' )\n\t\twrapper.ge($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '<=' )\n\t\twrapper.le($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == 'left like' )\n\t\twrapper.likeLeft($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == 'right like' )\n\t\twrapper.likeRight($expression($var),${ClassName}Entity::$getAttrName,$var);\n#end\n#end\n return R.ok(${className}Service.page(page, wrapper));\n }\n\n\n /**\n * 通过id查询${tableComment}\n * @param ${pk.attrName} id\n * @return R\n */\n @Operation(summary = "通过id查询" , description = "通过id查询" )\n @GetMapping("/{${pk.attrName}}" )\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" )\n public R getById(@PathVariable("${pk.attrName}" ) ${pk.attrType} ${pk.attrName}) {\n return R.ok(${className}Service.getById(${pk.attrName}));\n }\n\n /**\n * 新增${tableComment}\n * @param ${className} ${tableComment}\n * @return R\n */\n @Operation(summary = "新增${tableComment}" , description = "新增${tableComment}" )\n @SysLog("新增${tableComment}" )\n @PostMapping\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_add')" )\n public R save(@RequestBody ${ClassName}Entity ${className}) {\n return R.ok(${className}Service.save(${className}));\n }\n\n /**\n * 修改${tableComment}\n * @param ${className} ${tableComment}\n * @return R\n */\n @Operation(summary = "修改${tableComment}" , description = "修改${tableComment}" )\n @SysLog("修改${tableComment}" )\n @PutMapping\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_edit')" )\n public R updateById(@RequestBody ${ClassName}Entity ${className}) {\n return R.ok(${className}Service.updateById(${className}));\n }\n\n /**\n * 通过id删除${tableComment}\n * @param ids ${pk.attrName}列表\n * @return R\n */\n @Operation(summary = "通过id删除${tableComment}" , description = "通过id删除${tableComment}" )\n @SysLog("通过id删除${tableComment}" )\n @DeleteMapping\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_del')" )\n public R removeById(@RequestBody ${pk.attrType}[] ids) {\n return R.ok(${className}Service.removeBatchByIds(CollUtil.toList(ids)));\n }\n\n\n /**\n * 导出excel 表格\n * @param ${className} 查询条件\n \t * @param ids 导出指定ID\n * @return excel 文件流\n */\n @ResponseExcel\n @GetMapping("/export")\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_export')" )\n public List<${ClassName}Entity> export(${ClassName}Entity ${className},${pk.attrType}[] ids) {\n return ${className}Service.list(Wrappers.lambdaQuery(${className}).in(ArrayUtil.isNotEmpty(ids), ${ClassName}Entity::$str.getProperty($pk.attrName), ids));\n }\n} diff --git a/temps/Mapper b/temps/Mapper new file mode 100644 index 0000000..06a7c59 --- /dev/null +++ b/temps/Mapper @@ -0,0 +1 @@ +package ${package}.${moduleName}.mapper;\n\nimport com.pig4cloud.pigx.common.data.datascope.PigxBaseMapper;\nimport ${package}.${moduleName}.entity.${ClassName}Entity;\nimport org.apache.ibatis.annotations.Mapper;\n\n@Mapper\npublic interface ${ClassName}Mapper extends PigxBaseMapper<${ClassName}Entity> {\n\n\n} diff --git a/temps/Mapper.xml b/temps/Mapper.xml new file mode 100644 index 0000000..c514975 --- /dev/null +++ b/temps/Mapper.xml @@ -0,0 +1 @@ +\n\n\n\n\n \n#foreach ($field in $fieldList)\n\t #if($field.primaryPk == '1')\n \n #else\n \n #end\n#end\n \n diff --git a/temps/Service b/temps/Service new file mode 100644 index 0000000..420197d --- /dev/null +++ b/temps/Service @@ -0,0 +1 @@ +package ${package}.${moduleName}.service;\n\n#if($ChildClassName)\nimport com.github.yulichang.extension.mapping.base.MPJDeepService;\nimport ${package}.${moduleName}.entity.${ChildClassName}Entity;\n#else\nimport com.baomidou.mybatisplus.extension.service.IService;\n#end\nimport ${package}.${moduleName}.entity.${ClassName}Entity;\n\n#if($ChildClassName)\npublic interface ${ClassName}Service extends MPJDeepService<${ClassName}Entity> {\n Boolean saveDeep(${ClassName}Entity ${className});\n\n Boolean updateDeep(${ClassName}Entity ${className});\n\n Boolean removeDeep(Long[] ids);\n\n Boolean removeChild(Long[] ids);\n#else\npublic interface ${ClassName}Service extends IService<${ClassName}Entity> {\n#end\n\n} diff --git a/temps/ServiceImpl b/temps/ServiceImpl new file mode 100644 index 0000000..8bdfbd0 --- /dev/null +++ b/temps/ServiceImpl @@ -0,0 +1 @@ +package ${package}.${moduleName}.service.impl;\n\nimport com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;\nimport ${package}.${moduleName}.entity.${ClassName}Entity;\nimport ${package}.${moduleName}.mapper.${ClassName}Mapper;\nimport ${package}.${moduleName}.service.${ClassName}Service;\nimport org.springframework.stereotype.Service;\n#if($ChildClassName)\nimport cn.hutool.core.collection.CollUtil;\nimport com.baomidou.mybatisplus.core.toolkit.Wrappers;\nimport ${package}.${moduleName}.entity.${ChildClassName}Entity;\nimport ${package}.${moduleName}.mapper.${ChildClassName}Mapper;\nimport org.springframework.transaction.annotation.Transactional;\nimport lombok.RequiredArgsConstructor;\nimport java.util.Objects;\n#end\n/**\n * ${tableComment}\n *\n * @author ${author}\n * @date ${datetime}\n */\n@Service\n#if($ChildClassName)\n@RequiredArgsConstructor\n#end\npublic class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${ClassName}Entity> implements ${ClassName}Service {\n#if($ChildClassName)\n private final ${ChildClassName}Mapper ${childClassName}Mapper;\n\n @Override\n @Transactional(rollbackFor = Exception.class)\n public Boolean saveDeep(${ClassName}Entity ${className}) {\n baseMapper.insert(${className});\n for (${ChildClassName}Entity ${childClassName} : ${className}.get${ChildClassName}List()) {\n ${childClassName}.$str.setProperty($childField)(${className}.$str.getProperty($mainField)());\n ${childClassName}Mapper.insert( ${childClassName});\n }\n\n return Boolean.TRUE;\n }\n\n @Override\n @Transactional(rollbackFor = Exception.class)\n public Boolean updateDeep(${ClassName}Entity ${className}) {\n baseMapper.updateById(${className});\n for (${ChildClassName}Entity ${childClassName} : ${className}.get${ChildClassName}List()) {\n#set($getChildPkName=$str.getProperty(${pk.attrName}))\n if (Objects.isNull(${childClassName}.$getChildPkName())) {\n ${childClassName}.$str.setProperty($childField)(${className}.$str.getProperty($mainField)());\n ${childClassName}Mapper.insert(${childClassName});\n } else {\n ${childClassName}Mapper.updateById(${childClassName});\n }\n }\n return Boolean.TRUE;\n }\n\n @Override\n @Transactional(rollbackFor = Exception.class)\n public Boolean removeDeep(Long[] ids) {\n baseMapper.deleteBatchIds(CollUtil.toList(ids));\n ${childClassName}Mapper.delete(Wrappers.<${ChildClassName}Entity>lambdaQuery().in(${ChildClassName}Entity::$str.getProperty($childField), ids));\n return Boolean.TRUE;\n }\n\n @Override\n @Transactional(rollbackFor = Exception.class)\n public Boolean removeChild(Long[] ids) {\n ${childClassName}Mapper.deleteBatchIds(CollUtil.toList(ids));\n return Boolean.TRUE;\n }\n#end\n} diff --git a/temps/api.ts b/temps/api.ts new file mode 100644 index 0000000..6b6981b --- /dev/null +++ b/temps/api.ts @@ -0,0 +1 @@ +import request from "/@/utils/request"\n\nexport function fetchList(query?: Object) {\n return request({\n url: '/${moduleName}/${functionName}/page',\n method: 'get',\n params: query\n })\n}\n\nexport function addObj(obj?: Object) {\n return request({\n url: '/${moduleName}/${functionName}',\n method: 'post',\n data: obj\n })\n}\n\nexport function getObj(id?: string) {\n return request({\n url: '/${moduleName}/${functionName}/' + id,\n method: 'get'\n })\n}\n\nexport function delObjs(ids?: Object) {\n return request({\n url: '/${moduleName}/${functionName}',\n method: 'delete',\n data: ids\n })\n}\n\nexport function putObj(obj?: Object) {\n return request({\n url: '/${moduleName}/${functionName}',\n method: 'put',\n data: obj\n })\n}\n\n#if($ChildClassName)\nexport function delChildObj(ids?: Object) {\n return request({\n url: '/${moduleName}/${functionName}/child',\n method: 'delete',\n data: ids\n })\n}\n#end diff --git "a/temps/i18n\344\270\255\346\226\207\346\250\241\346\235\277" "b/temps/i18n\344\270\255\346\226\207\346\250\241\346\235\277" new file mode 100644 index 0000000..9ce099c --- /dev/null +++ "b/temps/i18n\344\270\255\346\226\207\346\250\241\346\235\277" @@ -0,0 +1 @@ +export default {\n ${functionName}: {\n index: '#',\n import${className}Tip: '导入${tableComment}',\n#foreach($field in $fieldList)\n ${field.attrName}: '#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end',\n#end\n#foreach($field in $fieldList)\n input$str.pascalCase(${field.attrName})Tip: '请输入#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end',\n#end\n }\n} diff --git "a/temps/i18n\350\213\261\346\226\207\346\250\241\346\235\277" "b/temps/i18n\350\213\261\346\226\207\346\250\241\346\235\277" new file mode 100644 index 0000000..997eb43 --- /dev/null +++ "b/temps/i18n\350\213\261\346\226\207\346\250\241\346\235\277" @@ -0,0 +1 @@ +export default {\n ${functionName}: {\n index: '#',\n import${className}Tip: 'import ${ClassName}',\n#foreach($field in $fieldList)\n ${field.attrName}: '${field.attrName}',\n#end\n#foreach($field in $fieldList)\n input$str.pascalCase(${field.attrName})Tip: 'input ${field.attrName}',\n#end\n }\n} diff --git a/temps/vform.json b/temps/vform.json new file mode 100644 index 0000000..782abbc --- /dev/null +++ b/temps/vform.json @@ -0,0 +1 @@ +#set($key=${dateTool.getSystemTime()})\n{\n "widgetList": [\n {\n "key": $key,\n "type": "grid",\n "category": "container",\n "icon": "grid",\n "cols": [\n#foreach($field in $formList)\n#if($field.attrName != ${pk.attrName})\n {\n "type": "grid-col",\n "category": "container",\n "icon": "grid-col",\n "internal": true,\n "widgetList": [\n {\n "key": ${math.add($key,${foreach.index})},\n\t#if($field.formType == 'text')\n "type": "input",\n "icon": "text-field",\n\t#elseif($field.formType == 'number')\n "type": "number",\n "icon": "number-field",\n\t#elseif($field.formType == 'textarea')\n "type": "textarea",\n "icon": "textarea-field",\n\t#elseif($field.formType == 'select' && ${field.fieldDict})\n "type": "select",\n "icon": "select-field",\n\t#elseif($field.formType == 'radio' && ${field.fieldDict})\n "type": "radio",\n "icon": "radio-field",\n\t#elseif($field.formType == 'checkbox' && ${field.fieldDict} )\n "type": "checkbox",\n "icon": "checkbox-field",\n\t#elseif($field.formType == 'date')\n "type": "date",\n "icon": "date-field",\n\t#elseif($field.formType == 'datetime')\n "type": "time",\n "icon": "time-field",\n\t#elseif($field.formType == 'upload-file')\n "type": "file-upload",\n "icon": "file-upload-field",\n\t#elseif($field.formType == 'upload-img')\n "type": "picture-upload",\n "icon": "picture-upload-field",\n\t#elseif($field.formType == 'editor')\n "type": "rich-editor",\n "icon": "rich-editor-field",\n\t#else\n "type": "input",\n "icon": "text-field",\n\t#end\n "formItemFlag": true,\n "options": {\n\t "name": "${field.attrName}",\n\t "label": "#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end",\n\t#if(($field.formType == 'select' || $field.formType == 'radio' || $field.formType == 'checkbox') && ${field.fieldDict})\n "optionItemsDictType": "${field.fieldDict}",\n\t#end\n "placeholder": "请输入#if(${field.fieldComment})${field.fieldComment}#else ${field.attrName}#end"\n },\n #if($field.formRequired)\n "required": true,\n #end\n "id": "input${math.add($key,${foreach.index})}"\n }\n ],\n "options": {\n "name": "gridCol${math.add($key,${foreach.index})}",\n "hidden": false,\n "offset": 0,\n "push": 0,\n "pull": 0,\n\t#if($formLayout == 1)\n "span": 24,\n\t#elseif($formLayout == 2)\n "span": 12,\n\t#end\n "responsive": false\n },\n "id": "grid-col-${math.add($key,${foreach.index})}"\n }#if($foreach.hasNext),#end\n#end\n#end\n ],\n "options": {\n "name": "grid${functionName}",\n "hidden": false,\n "gutter": 12\n },\n "id": "grid${functionName}"\n }\n ],\n "formConfig": {\n "modelName": "form",\n "refName": "form",\n "rulesName": "rules",\n "labelWidth": 80,\n "labelPosition": "left",\n "labelAlign": "label-left-align",\n "layoutType": "PC",\n "jsonVersion": 3\n }\n} diff --git a/temps/vform.vue b/temps/vform.vue new file mode 100644 index 0000000..0ca9c78 --- /dev/null +++ b/temps/vform.vue @@ -0,0 +1 @@ +\n\n diff --git "a/temps/\344\270\273\345\255\220Contoller" "b/temps/\344\270\273\345\255\220Contoller" new file mode 100644 index 0000000..6dd21ae --- /dev/null +++ "b/temps/\344\270\273\345\255\220Contoller" @@ -0,0 +1 @@ +package ${package}.${moduleName}.controller;\n\n#if($queryList)\nimport cn.hutool.core.util.StrUtil;\n#end\nimport cn.hutool.core.util.ArrayUtil;\nimport com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;\nimport com.baomidou.mybatisplus.core.toolkit.Wrappers;\nimport com.baomidou.mybatisplus.extension.plugins.pagination.Page;\nimport com.pig4cloud.pigx.common.core.util.R;\nimport com.pig4cloud.pigx.common.log.annotation.SysLog;\nimport ${package}.${moduleName}.entity.${ClassName}Entity;\nimport ${package}.${moduleName}.entity.${ChildClassName}Entity;\nimport ${package}.${moduleName}.service.${ClassName}Service;\nimport org.springframework.security.access.prepost.PreAuthorize;\nimport com.pig4cloud.pigx.common.excel.annotation.ResponseExcel;\nimport io.swagger.v3.oas.annotations.security.SecurityRequirement;\n#if($isSpringBoot3)\nimport org.springdoc.core.annotations.ParameterObject;\n#else\nimport org.springdoc.api.annotations.ParameterObject;\n#end\nimport org.springframework.http.HttpHeaders;\nimport io.swagger.v3.oas.annotations.tags.Tag;\nimport io.swagger.v3.oas.annotations.Operation;\nimport lombok.RequiredArgsConstructor;\nimport org.springframework.web.bind.annotation.*;\n\nimport java.util.List;\nimport java.util.Objects;\n\n/**\n * ${tableComment}\n *\n * @author ${author}\n * @date ${datetime}\n */\n@RestController\n@RequiredArgsConstructor\n@RequestMapping("/${functionName}" )\n@Tag(description = "${functionName}" , name = "${tableComment}管理" )\n@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)\npublic class ${ClassName}Controller {\n\n private final ${ClassName}Service ${className}Service;\n\n /**\n * 分页查询\n * @param page 分页对象\n * @param ${className} ${tableComment}\n * @return\n */\n @Operation(summary = "分页查询" , description = "分页查询" )\n @GetMapping("/page" )\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" )\n public R get${ClassName}Page(@ParameterObject Page page, @ParameterObject ${ClassName}Entity ${className}) {\n LambdaQueryWrapper<${ClassName}Entity> wrapper = Wrappers.lambdaQuery();\n#foreach ($field in $queryList)\n#set($getAttrName=$str.getProperty($field.attrName))\n#set($var="${className}.$getAttrName()")\n#if($field.attrType == 'String')\n#set($expression="StrUtil.isNotBlank")\n#else\n#set($expression="Objects.nonNull")\n#end\n#if($field.queryType == '=')\n\t\twrapper.eq($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == 'like' )\n\t\twrapper.like($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '!-' )\n\t\twrapper.ne($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '>' )\n\t\twrapper.gt($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '<' )\n\t\twrapper.lt($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '>=' )\n\t\twrapper.ge($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == '<=' )\n\t\twrapper.le($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == 'left like' )\n\t\twrapper.likeLeft($expression($var),${ClassName}Entity::$getAttrName,$var);\n#elseif( $field.queryType == 'right like' )\n\t\twrapper.likeRight($expression($var),${ClassName}Entity::$getAttrName,$var);\n#end\n#end\n return R.ok(${className}Service.page(page, wrapper));\n }\n\n /**\n * 通过id查询${tableComment}\n * @param ${pk.attrName} id\n * @return R\n */\n @Operation(summary = "通过id查询" , description = "通过id查询" )\n @GetMapping("/{${pk.attrName}}" )\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_view')" )\n public R getById(@PathVariable("${pk.attrName}" ) ${pk.attrType} ${pk.attrName}) {\n return R.ok(${className}Service.getByIdDeep(${pk.attrName}));\n }\n\n /**\n * 新增${tableComment}\n * @param ${className} ${tableComment}\n * @return R\n */\n @Operation(summary = "新增${tableComment}" , description = "新增${tableComment}" )\n @SysLog("新增${tableComment}" )\n @PostMapping\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_add')" )\n public R save(@RequestBody ${ClassName}Entity ${className}) {\n return R.ok(${className}Service.saveDeep(${className}));\n }\n\n /**\n * 修改${tableComment}\n * @param ${className} ${tableComment}\n * @return R\n */\n @Operation(summary = "修改${tableComment}" , description = "修改${tableComment}" )\n @SysLog("修改${tableComment}" )\n @PutMapping\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_edit')" )\n public R updateById(@RequestBody ${ClassName}Entity ${className}) {\n return R.ok(${className}Service.updateDeep(${className}));\n }\n\n /**\n * 通过id删除${tableComment}\n * @param ids ${pk.attrName}列表\n * @return R\n */\n @Operation(summary = "通过id删除${tableComment}" , description = "通过id删除${tableComment}" )\n @SysLog("通过id删除${tableComment}" )\n @DeleteMapping\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_del')" )\n public R removeById(@RequestBody ${pk.attrType}[] ids) {\n return R.ok(${className}Service.removeDeep(ids));\n }\n\n /**\n * 通过id删除${tableComment}子表数据\n * @param ids ${pk.attrName}列表\n * @return R\n */\n @Operation(summary = "通过id删除${tableComment}子表数据" , description = "通过id删除${tableComment}子表数据" )\n @SysLog("通过id删除${tableComment}子表数据" )\n @DeleteMapping("/child")\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_del')" )\n public R removeChild(@RequestBody ${pk.attrType}[] ids) {\n return R.ok(${className}Service.removeChild(ids));\n }\n\n /**\n * 导出excel 表格\n * @param ${className} 查询条件\n \t * @param ids 导出指定ID\n * @return excel 文件流\n */\n @ResponseExcel\n @GetMapping("/export")\n @PreAuthorize("@pms.hasPermission('${moduleName}_${functionName}_export')" )\n public List<${ClassName}Entity> export(${ClassName}Entity ${className},${pk.attrType}[] ids) {\n return ${className}Service.list(Wrappers.lambdaQuery(${className}).in(ArrayUtil.isNotEmpty(ids), ${ClassName}Entity::$str.getProperty($pk.attrName), ids));\n }\n} diff --git "a/temps/\344\270\273\345\255\220\350\241\250\345\215\225" "b/temps/\344\270\273\345\255\220\350\241\250\345\215\225" new file mode 100644 index 0000000..70298c3 --- /dev/null +++ "b/temps/\344\270\273\345\255\220\350\241\250\345\215\225" @@ -0,0 +1 @@ +\n\n diff --git "a/temps/\344\270\273\345\255\220\350\241\250\346\240\274" "b/temps/\344\270\273\345\255\220\350\241\250\346\240\274" new file mode 100644 index 0000000..87c5e4e --- /dev/null +++ "b/temps/\344\270\273\345\255\220\350\241\250\346\240\274" @@ -0,0 +1 @@ +\n\n diff --git "a/temps/\345\255\220Mapper" "b/temps/\345\255\220Mapper" new file mode 100644 index 0000000..57acd4a --- /dev/null +++ "b/temps/\345\255\220Mapper" @@ -0,0 +1 @@ +package ${package}.${moduleName}.mapper;\n\nimport com.pig4cloud.pigx.common.data.datascope.PigxBaseMapper;\n#if($ChildClassName)\nimport ${package}.${moduleName}.entity.${ChildClassName}Entity;\n#else\nimport ${package}.${moduleName}.entity.${ClassName}Entity;\n#end\nimport org.apache.ibatis.annotations.Mapper;\n\n@Mapper\n#if($ChildClassName)\npublic interface ${ChildClassName}Mapper extends PigxBaseMapper<${ChildClassName}Entity> {\n#else\npublic interface ${ClassName}Mapper extends PigxBaseMapper<${ClassName}Entity> {\n#end\n\n} diff --git "a/temps/\345\255\220\345\256\236\344\275\223" "b/temps/\345\255\220\345\256\236\344\275\223" new file mode 100644 index 0000000..64dac66 --- /dev/null +++ "b/temps/\345\255\220\345\256\236\344\275\223" @@ -0,0 +1 @@ +package ${package}.${moduleName}.entity;\n\nimport com.baomidou.mybatisplus.annotation.*;\nimport com.baomidou.mybatisplus.extension.activerecord.Model;\nimport io.swagger.v3.oas.annotations.media.Schema;\n#if($isChildTenant)\nimport com.pig4cloud.pigx.common.core.util.TenantTable;\n#end\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\n#foreach($import in $importList)\nimport $import;\n#end\n\n/**\n * ${tableComment}\n *\n * @author ${author}\n * @date ${datetime}\n */\n@Data\n#if($isChildTenant)\n@TenantTable\n#end\n@TableName("${childTableName}")\n@EqualsAndHashCode(callSuper = true)\n@Schema(description = "${childTableName}")\npublic class ${ChildClassName}Entity extends Model<${ChildClassName}Entity> {\n\n#foreach ($field in $childFieldList)\n#if(${field.fieldComment})#set($comment=${field.fieldComment})#else #set($comment=${field.attrName})#end\n\t/**\n\t* $comment\n\t*/\n#if($field.primaryPk == '1')\n\t@TableId(type = IdType.ASSIGN_ID)\n#end\n#if($field.autoFill == 'INSERT')\n\t@TableField(fill = FieldFill.INSERT)\n#elseif($field.autoFill == 'INSERT_UPDATE')\n\t@TableField(fill = FieldFill.INSERT_UPDATE)\n#elseif($field.autoFill == 'UPDATE')\n\t@TableField(fill = FieldFill.UPDATE)\n#end\n#if($field.fieldName == 'del_flag')\n @TableLogic\n\t@TableField(fill = FieldFill.INSERT)\n#end\n\t@Schema(description="$comment"#if($field.hidden),hidden=$field.hidden#end)\n#if($field.formType == 'checkbox')\n private ${field.attrType}[] $field.attrName;\n#else\n private $field.attrType $field.attrName;\n#end \n#end\n} diff --git "a/temps/\345\256\236\344\275\223" "b/temps/\345\256\236\344\275\223" new file mode 100644 index 0000000..5572657 --- /dev/null +++ "b/temps/\345\256\236\344\275\223" @@ -0,0 +1 @@ +package ${package}.${moduleName}.entity;\n\nimport com.baomidou.mybatisplus.annotation.*;\nimport com.baomidou.mybatisplus.extension.activerecord.Model;\nimport io.swagger.v3.oas.annotations.media.Schema;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\n#if($isTenant)\nimport com.pig4cloud.pigx.common.core.util.TenantTable;\n#end\n#foreach($import in $importList)\nimport $import;\n#end\n#if($ChildClassName)\nimport com.alibaba.excel.annotation.ExcelIgnore;\nimport com.github.yulichang.annotation.EntityMapping;\nimport java.util.List;\n#end\n\n/**\n * ${tableComment}\n *\n * @author ${author}\n * @date ${datetime}\n */\n@Data\n#if($isTenant)\n@TenantTable\n#end\n@TableName("${tableName}")\n@EqualsAndHashCode(callSuper = true)\n@Schema(description = "${tableComment}")\npublic class ${ClassName}Entity extends Model<${ClassName}Entity> {\n\n#foreach ($field in $fieldList)\n#if(${field.fieldComment})#set($comment=${field.fieldComment})#else #set($comment=${field.attrName})#end\n\n\t/**\n\t* $comment\n\t*/\n#if($field.primaryPk == '1')\n @TableId(type = IdType.ASSIGN_ID)\n#end\n#if($field.autoFill == 'INSERT')\n\t@TableField(fill = FieldFill.INSERT)\n#elseif($field.autoFill == 'INSERT_UPDATE')\n\t@TableField(fill = FieldFill.INSERT_UPDATE)\n#elseif($field.autoFill == 'UPDATE')\n\t@TableField(fill = FieldFill.UPDATE)\n#end\n#if($field.fieldName == 'del_flag')\n @TableLogic\n\t@TableField(fill = FieldFill.INSERT)\n#end\n @Schema(description="$comment"#if($field.hidden),hidden=$field.hidden#end)\n#if($field.formType == 'checkbox')\n private ${field.attrType}[] $field.attrName;\n#else\n private $field.attrType $field.attrName;\n#end \n#end\n#if($ChildClassName)\n @ExcelIgnore\n @TableField(exist = false)\n @EntityMapping(thisField = "$mainField", joinField = "$childField")\n private List<${ChildClassName}Entity> ${childClassName}List;\n#end\n} diff --git "a/temps/\346\235\203\351\231\220\350\217\234\345\215\225" "b/temps/\346\235\203\351\231\220\350\217\234\345\215\225" new file mode 100644 index 0000000..274fa25 --- /dev/null +++ "b/temps/\346\235\203\351\231\220\350\217\234\345\215\225" @@ -0,0 +1 @@ +-- 该脚本不要直接执行, 注意维护菜单的父节点ID 默认 父节点-1 , 默认租户 1\n#set($menuId=${dateTool.getSystemTime()})\n\n-- 菜单SQL\ninsert into sys_menu ( menu_id,parent_id, path, permission, menu_type, icon, del_flag, create_time, sort_order, update_time, name, tenant_id)\nvalues (${menuId}, '-1', '/${moduleName}/${functionName}/index', '', '0', 'icon-bangzhushouji', '0', null , '8', null , '${tableComment}管理', 1);\n\n-- 菜单对应按钮SQL\ninsert into sys_menu ( menu_id,parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id)\nvalues (${math.add($menuId,1)},${menuId}, '${moduleName}_${functionName}_view', '1', null, '1', '0', null, '0', null, '${tableComment}查看', 1);\n\ninsert into sys_menu ( menu_id,parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id)\nvalues (${math.add($menuId,2)},${menuId}, '${moduleName}_${functionName}_add', '1', null, '1', '0', null, '1', null, '${tableComment}新增', 1);\n\ninsert into sys_menu (menu_id, parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id)\nvalues (${math.add($menuId,3)},${menuId}, '${moduleName}_${functionName}_edit', '1', null, '1', '0', null, '2', null, '${tableComment}修改', 1);\n\ninsert into sys_menu (menu_id, parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id)\nvalues (${math.add($menuId,4)},${menuId}, '${moduleName}_${functionName}_del', '1', null, '1', '0', null, '3', null, '${tableComment}删除', 1);\n\ninsert into sys_menu ( menu_id,parent_id, permission, menu_type, path, icon, del_flag, create_time, sort_order, update_time, name, tenant_id)\nvalues (${math.add($menuId,5)},${menuId}, '${moduleName}_${functionName}_export', '1', null, '1', '0', null, '3', null, '导入导出', 1); diff --git "a/temps/\350\241\250\345\215\225" "b/temps/\350\241\250\345\215\225" new file mode 100644 index 0000000..ee1904a --- /dev/null +++ "b/temps/\350\241\250\345\215\225" @@ -0,0 +1 @@ +\n\n diff --git "a/temps/\350\241\250\346\240\274" "b/temps/\350\241\250\346\240\274" new file mode 100644 index 0000000..92a6991 --- /dev/null +++ "b/temps/\350\241\250\346\240\274" @@ -0,0 +1 @@ +\n\n