fix(接口定义): 修复接口定义默认值没有值的缺陷 (#17994)

--bug=1016860 --user=王孝刚 【项目设置】接口模板,模板里设置了默认值,但是创建接口的时候没有显示
https://www.tapd.cn/55049933/s/1244982

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
MeterSphere Bot 2022-09-19 15:16:38 +08:00 committed by GitHub
parent a9f8c7cab6
commit 691c2c6407
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -45,7 +45,7 @@ public class CustomFieldTemplateService {
CustomFieldTemplateExample example = new CustomFieldTemplateExample(); CustomFieldTemplateExample example = new CustomFieldTemplateExample();
example.createCriteria().andTemplateIdEqualTo(templateId); example.createCriteria().andTemplateIdEqualTo(templateId);
example.setOrderByClause("`order` asc"); example.setOrderByClause("`order` asc");
return customFieldTemplateMapper.selectByExample(example); return customFieldTemplateMapper.selectByExampleWithBLOBs(example);
} }
public List<CustomFieldTemplateDao> list(CustomFieldTemplate request) { public List<CustomFieldTemplateDao> list(CustomFieldTemplate request) {
@ -72,7 +72,7 @@ public class CustomFieldTemplateService {
} }
} }
public List<CustomFieldTemplate> getSystemFieldCreateTemplate(CustomFieldDao customField, String templateId) { public List<CustomFieldTemplate> getSystemFieldCreateTemplate(CustomFieldDao customField, String templateId) {
CustomFieldTemplateExample example = new CustomFieldTemplateExample(); CustomFieldTemplateExample example = new CustomFieldTemplateExample();
example.createCriteria().andTemplateIdEqualTo(templateId); example.createCriteria().andTemplateIdEqualTo(templateId);
// 获取全局模板的关联关系 // 获取全局模板的关联关系
@ -87,7 +87,7 @@ public class CustomFieldTemplateService {
return fieldTemplates; return fieldTemplates;
} }
public void updateFieldIdByTemplate(String templateId, String originId , String fieldId) { public void updateFieldIdByTemplate(String templateId, String originId, String fieldId) {
CustomFieldTemplateExample example = new CustomFieldTemplateExample(); CustomFieldTemplateExample example = new CustomFieldTemplateExample();
example.createCriteria() example.createCriteria()
.andTemplateIdEqualTo(templateId) .andTemplateIdEqualTo(templateId)
@ -97,7 +97,7 @@ public class CustomFieldTemplateService {
customFieldTemplateMapper.updateByExampleSelective(customFieldTemplate, example); customFieldTemplateMapper.updateByExampleSelective(customFieldTemplate, example);
} }
public List<CustomFieldTemplate> getFieldTemplateByFieldIds(List<String> fieldIds) { public List<CustomFieldTemplate> getFieldTemplateByFieldIds(List<String> fieldIds) {
if (CollectionUtils.isNotEmpty(fieldIds)) { if (CollectionUtils.isNotEmpty(fieldIds)) {
CustomFieldTemplateExample example = new CustomFieldTemplateExample(); CustomFieldTemplateExample example = new CustomFieldTemplateExample();
example.createCriteria().andFieldIdIn(fieldIds); example.createCriteria().andFieldIdIn(fieldIds);
@ -144,13 +144,14 @@ public class CustomFieldTemplateService {
/** /**
* 将原来全局字段与模板的关联 * 将原来全局字段与模板的关联
* 改为项目下字段与模板的关联 * 改为项目下字段与模板的关联
*
* @param customField * @param customField
* @param templateIds * @param templateIds
* @return * @return
*/ */
public int updateProjectTemplateGlobalField(CustomFieldDao customField, List<String> templateIds) { public int updateProjectTemplateGlobalField(CustomFieldDao customField, List<String> templateIds) {
if (CollectionUtils.isEmpty(templateIds)) { if (CollectionUtils.isEmpty(templateIds)) {
return 0; return 0;
} }
CustomFieldTemplateExample example = new CustomFieldTemplateExample(); CustomFieldTemplateExample example = new CustomFieldTemplateExample();
example.createCriteria() example.createCriteria()

View File

@ -488,7 +488,7 @@ export default {
} }
} }
// //
if (this.routeParamObj.caseId) { if (routeParamObj.caseId) {
this.activeDom = 'middle'; this.activeDom = 'middle';
} }
} }