mirror of https://github.com/jeecgboot/jeecg-boot
【代码生成器】修复vue3模板引用路径和文件路径大小写不一致的问题
parent
c8a26d73e3
commit
cd5fd2f4d4
|
@ -62,8 +62,8 @@
|
||||||
import {useModal} from '/@/components/Modal';
|
import {useModal} from '/@/components/Modal';
|
||||||
import { useListPage } from '/@/hooks/system/useListPage'
|
import { useListPage } from '/@/hooks/system/useListPage'
|
||||||
import ${entityName}Modal from './components/${entityName}Modal.vue'
|
import ${entityName}Modal from './components/${entityName}Modal.vue'
|
||||||
import {columns, searchFormSchema} from './${entityName?uncap_first}.data';
|
import {columns, searchFormSchema} from './${entityName}.data';
|
||||||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName?uncap_first}.api';
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName}.api';
|
||||||
<#if list_need_category>
|
<#if list_need_category>
|
||||||
import { loadCategoryData } from '/@/api/common/api'
|
import { loadCategoryData } from '/@/api/common/api'
|
||||||
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
import {ref, computed, unref} from 'vue';
|
import {ref, computed, unref} from 'vue';
|
||||||
import {BasicModal, useModalInner} from '/@/components/Modal';
|
import {BasicModal, useModalInner} from '/@/components/Modal';
|
||||||
import {BasicForm, useForm} from '/@/components/Form/index';
|
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||||
import {formSchema} from '../${entityName?uncap_first}.data';
|
import {formSchema} from '../${entityName}.data';
|
||||||
import {saveOrUpdate} from '../${entityName?uncap_first}.api';
|
import {saveOrUpdate} from '../${entityName}.api';
|
||||||
// Emits声明
|
// Emits声明
|
||||||
const emit = defineEmits(['register','success']);
|
const emit = defineEmits(['register','success']);
|
||||||
const isUpdate = ref(true);
|
const isUpdate = ref(true);
|
||||||
|
|
|
@ -250,7 +250,8 @@ public class ${entityName}Controller {
|
||||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||||
MultipartFile file = entity.getValue();// 获取上传文件对象
|
// 获取上传文件对象
|
||||||
|
MultipartFile file = entity.getValue();
|
||||||
ImportParams params = new ImportParams();
|
ImportParams params = new ImportParams();
|
||||||
params.setTitleRows(2);
|
params.setTitleRows(2);
|
||||||
params.setHeadRows(1);
|
params.setHeadRows(1);
|
||||||
|
|
|
@ -15,8 +15,20 @@ import org.apache.ibatis.annotations.Param;
|
||||||
*/
|
*/
|
||||||
public interface ${subTab.entityName}Mapper extends BaseMapper<${subTab.entityName}> {
|
public interface ${subTab.entityName}Mapper extends BaseMapper<${subTab.entityName}> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主表id删除子表数据
|
||||||
|
*
|
||||||
|
* @param mainId 主表id
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
public boolean deleteByMainId(@Param("mainId") String mainId);
|
public boolean deleteByMainId(@Param("mainId") String mainId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主表id查询子表数据
|
||||||
|
*
|
||||||
|
* @param mainId 主表id
|
||||||
|
* @return List<${subTab.entityName}>
|
||||||
|
*/
|
||||||
public List<${subTab.entityName}> selectByMainId(@Param("mainId") String mainId);
|
public List<${subTab.entityName}> selectByMainId(@Param("mainId") String mainId);
|
||||||
}
|
}
|
||||||
</#list>
|
</#list>
|
|
@ -20,22 +20,34 @@ public interface I${entityName}Service extends IService<${entityName}> {
|
||||||
/**
|
/**
|
||||||
* 添加一对多
|
* 添加一对多
|
||||||
*
|
*
|
||||||
|
* @param ${entityName?uncap_first}
|
||||||
|
<#list subTables as sub>
|
||||||
|
* @param ${sub.entityName?uncap_first}List
|
||||||
|
</#list>
|
||||||
*/
|
*/
|
||||||
public void saveMain(${entityName} ${entityName?uncap_first},<#list subTables as sub>List<${sub.entityName}> ${sub.entityName?uncap_first}List<#if sub_has_next>,</#if></#list>) ;
|
public void saveMain(${entityName} ${entityName?uncap_first},<#list subTables as sub>List<${sub.entityName}> ${sub.entityName?uncap_first}List<#if sub_has_next>,</#if></#list>) ;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改一对多
|
* 修改一对多
|
||||||
*
|
*
|
||||||
|
* @param ${entityName?uncap_first}
|
||||||
|
<#list subTables as sub>
|
||||||
|
* @param ${sub.entityName?uncap_first}List
|
||||||
|
</#list>
|
||||||
*/
|
*/
|
||||||
public void updateMain(${entityName} ${entityName?uncap_first},<#list subTables as sub>List<${sub.entityName}> ${sub.entityName?uncap_first}List<#if sub_has_next>,</#if></#list>);
|
public void updateMain(${entityName} ${entityName?uncap_first},<#list subTables as sub>List<${sub.entityName}> ${sub.entityName?uncap_first}List<#if sub_has_next>,</#if></#list>);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除一对多
|
* 删除一对多
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
*/
|
*/
|
||||||
public void delMain (String id);
|
public void delMain (String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除一对多
|
* 批量删除一对多
|
||||||
|
*
|
||||||
|
* @param idList
|
||||||
*/
|
*/
|
||||||
public void delBatchMain (Collection<? extends Serializable> idList);
|
public void delBatchMain (Collection<? extends Serializable> idList);
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,12 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface I${subTab.entityName}Service extends IService<${subTab.entityName}> {
|
public interface I${subTab.entityName}Service extends IService<${subTab.entityName}> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主表id查询子表数据
|
||||||
|
*
|
||||||
|
* @param mainId 主表id
|
||||||
|
* @return List<${subTab.entityName}>
|
||||||
|
*/
|
||||||
public List<${subTab.entityName}> selectByMainId(String mainId);
|
public List<${subTab.entityName}> selectByMainId(String mainId);
|
||||||
}
|
}
|
||||||
</#list>
|
</#list>
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
import {ref, computed, unref} from 'vue';
|
import {ref, computed, unref} from 'vue';
|
||||||
import {BasicModal, useModalInner} from '/src/components/Modal';
|
import {BasicModal, useModalInner} from '/src/components/Modal';
|
||||||
import {BasicForm, useForm} from '/src/components/Form';
|
import {BasicForm, useForm} from '/src/components/Form';
|
||||||
import {formSchema} from '../${entityName?uncap_first}.data';
|
import {formSchema} from '../${entityName}.data';
|
||||||
import {loadTreeData, saveOrUpdateDict} from '../${entityName?uncap_first}.api';
|
import {loadTreeData, saveOrUpdateDict} from '../${entityName}.api';
|
||||||
// 获取emit
|
// 获取emit
|
||||||
const emit = defineEmits(['register', 'success']);
|
const emit = defineEmits(['register', 'success']);
|
||||||
const isUpdate = ref(true);
|
const isUpdate = ref(true);
|
||||||
|
|
|
@ -75,8 +75,8 @@
|
||||||
<#list subTables as sub>
|
<#list subTables as sub>
|
||||||
import ${sub.entityName}List from './${sub.entityName}List.vue'
|
import ${sub.entityName}List from './${sub.entityName}List.vue'
|
||||||
</#list>
|
</#list>
|
||||||
import {columns, searchFormSchema} from './${entityName?uncap_first}.data';
|
import {columns, searchFormSchema} from './${entityName}.data';
|
||||||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName?uncap_first}.api';
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName}.api';
|
||||||
<#if list_need_category>
|
<#if list_need_category>
|
||||||
import { loadCategoryData } from '/@/api/common/api'
|
import { loadCategoryData } from '/@/api/common/api'
|
||||||
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
import {ref, computed, unref} from 'vue';
|
import {ref, computed, unref} from 'vue';
|
||||||
import {BasicModal, useModalInner} from '/@/components/Modal';
|
import {BasicModal, useModalInner} from '/@/components/Modal';
|
||||||
import {BasicForm, useForm} from '/@/components/Form/index';
|
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||||
import {formSchema} from '../${entityName?uncap_first}.data';
|
import {formSchema} from '../${entityName}.data';
|
||||||
import {saveOrUpdate} from '../${entityName?uncap_first}.api';
|
import {saveOrUpdate} from '../${entityName}.api';
|
||||||
// Emits声明
|
// Emits声明
|
||||||
const emit = defineEmits(['register','success']);
|
const emit = defineEmits(['register','success']);
|
||||||
const isUpdate = ref(true);
|
const isUpdate = ref(true);
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
import {ref, computed, unref,inject} from 'vue';
|
import {ref, computed, unref,inject} from 'vue';
|
||||||
import {BasicModal, useModalInner} from '/@/components/Modal';
|
import {BasicModal, useModalInner} from '/@/components/Modal';
|
||||||
import {BasicForm, useForm} from '/@/components/Form/index';
|
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||||
import {${sub.entityName?uncap_first}FormSchema} from '../${entityName?uncap_first}.data';
|
import {${sub.entityName?uncap_first}FormSchema} from '../${entityName}.data';
|
||||||
import {${sub.entityName?uncap_first}SaveOrUpdate} from '../${entityName?uncap_first}.api';
|
import {${sub.entityName?uncap_first}SaveOrUpdate} from '../${entityName}.api';
|
||||||
|
|
||||||
//接收主表id
|
//接收主表id
|
||||||
const mainId = inject('mainId');
|
const mainId = inject('mainId');
|
||||||
|
|
|
@ -79,8 +79,8 @@
|
||||||
<#list subTables as sub>
|
<#list subTables as sub>
|
||||||
import ${sub.entityName}SubTable from './subTables/${sub.entityName}SubTable.vue'
|
import ${sub.entityName}SubTable from './subTables/${sub.entityName}SubTable.vue'
|
||||||
</#list>
|
</#list>
|
||||||
import {columns, searchFormSchema} from './${entityName?uncap_first}.data';
|
import {columns, searchFormSchema} from './${entityName}.data';
|
||||||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName?uncap_first}.api';
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName}.api';
|
||||||
<#if list_need_category>
|
<#if list_need_category>
|
||||||
import { loadCategoryData } from '/@/api/common/api'
|
import { loadCategoryData } from '/@/api/common/api'
|
||||||
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
import ${sub.entityName}Form from './${sub.entityName}Form.vue'
|
import ${sub.entityName}Form from './${sub.entityName}Form.vue'
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
import {formSchema<#list subTables as sub><#if sub.foreignRelationType =='0'>,${sub.entityName?uncap_first}JVxeColumns</#if></#list>} from '../${entityName?uncap_first}.data';
|
import {formSchema<#list subTables as sub><#if sub.foreignRelationType =='0'>,${sub.entityName?uncap_first}JVxeColumns</#if></#list>} from '../${entityName}.data';
|
||||||
import {saveOrUpdate<#list subTables as sub>,query${sub.entityName}</#list>} from '../${entityName?uncap_first}.api';
|
import {saveOrUpdate<#list subTables as sub>,query${sub.entityName}</#list>} from '../${entityName}.api';
|
||||||
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
|
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
|
||||||
// Emits声明
|
// Emits声明
|
||||||
const emit = defineEmits(['register','success']);
|
const emit = defineEmits(['register','success']);
|
||||||
|
|
|
@ -62,8 +62,8 @@
|
||||||
import { useListPage } from '/@/hooks/system/useListPage'
|
import { useListPage } from '/@/hooks/system/useListPage'
|
||||||
import {useModal} from '/@/components/Modal';
|
import {useModal} from '/@/components/Modal';
|
||||||
import ${entityName}Modal from './components/${entityName}Modal.vue'
|
import ${entityName}Modal from './components/${entityName}Modal.vue'
|
||||||
import {columns, searchFormSchema} from './${entityName?uncap_first}.data';
|
import {columns, searchFormSchema} from './${entityName}.data';
|
||||||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName?uncap_first}.api';
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName}.api';
|
||||||
<#if list_need_category>
|
<#if list_need_category>
|
||||||
import { loadCategoryData } from '/@/api/common/api'
|
import { loadCategoryData } from '/@/api/common/api'
|
||||||
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
import ${sub.entityName}Form from './${sub.entityName}Form.vue'
|
import ${sub.entityName}Form from './${sub.entityName}Form.vue'
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
import {formSchema<#list subTables as sub><#if sub.foreignRelationType =='0'>,${sub.entityName?uncap_first}Columns</#if></#list>} from '../${entityName?uncap_first}.data';
|
import {formSchema<#list subTables as sub><#if sub.foreignRelationType =='0'>,${sub.entityName?uncap_first}Columns</#if></#list>} from '../${entityName}.data';
|
||||||
import {saveOrUpdate<#list subTables as sub>,${sub.entityName?uncap_first}List</#list>} from '../${entityName?uncap_first}.api';
|
import {saveOrUpdate<#list subTables as sub>,${sub.entityName?uncap_first}List</#list>} from '../${entityName}.api';
|
||||||
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
|
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
|
||||||
// Emits声明
|
// Emits声明
|
||||||
const emit = defineEmits(['register','success']);
|
const emit = defineEmits(['register','success']);
|
||||||
|
|
|
@ -62,8 +62,8 @@
|
||||||
import { useListPage } from '/@/hooks/system/useListPage'
|
import { useListPage } from '/@/hooks/system/useListPage'
|
||||||
import {useModal} from '/@/components/Modal';
|
import {useModal} from '/@/components/Modal';
|
||||||
import ${entityName}Modal from './components/${entityName}Modal.vue'
|
import ${entityName}Modal from './components/${entityName}Modal.vue'
|
||||||
import {columns, searchFormSchema} from './${entityName?uncap_first}.data';
|
import {columns, searchFormSchema} from './${entityName}.data';
|
||||||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName?uncap_first}.api';
|
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName}.api';
|
||||||
<#if list_need_category>
|
<#if list_need_category>
|
||||||
import { loadCategoryData } from '/@/api/common/api'
|
import { loadCategoryData } from '/@/api/common/api'
|
||||||
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
import { getAuthCache, setAuthCache } from '/@/utils/auth';
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
import ${sub.entityName}Form from './${sub.entityName}Form.vue'
|
import ${sub.entityName}Form from './${sub.entityName}Form.vue'
|
||||||
</#if>
|
</#if>
|
||||||
</#list>
|
</#list>
|
||||||
import {formSchema<#list subTables as sub><#if sub.foreignRelationType =='0'>,${sub.entityName?uncap_first}Columns</#if></#list>} from '../${entityName?uncap_first}.data';
|
import {formSchema<#list subTables as sub><#if sub.foreignRelationType =='0'>,${sub.entityName?uncap_first}Columns</#if></#list>} from '../${entityName}.data';
|
||||||
import {saveOrUpdate<#list subTables as sub>,${sub.entityName?uncap_first}List</#list>} from '../${entityName?uncap_first}.api';
|
import {saveOrUpdate<#list subTables as sub>,${sub.entityName?uncap_first}List</#list>} from '../${entityName}.api';
|
||||||
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
|
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
|
||||||
// Emits声明
|
// Emits声明
|
||||||
const emit = defineEmits(['register','success']);
|
const emit = defineEmits(['register','success']);
|
||||||
|
|
Loading…
Reference in New Issue