fix: 空指针异常

This commit is contained in:
wenyann 2021-01-29 11:50:41 +08:00
parent 0b1a1e0135
commit 5ad5d1c702
3 changed files with 6 additions and 6 deletions

View File

@ -661,7 +661,10 @@ public class ApiDefinitionService {
public String getResourceId(SwaggerUrlRequest swaggerUrlRequest) {
SwaggerUrlProjectExample swaggerUrlProjectExample = new SwaggerUrlProjectExample();
SwaggerUrlProjectExample.Criteria criteria = swaggerUrlProjectExample.createCriteria();
criteria.andProjectIdEqualTo(swaggerUrlRequest.getProjectId()).andSwaggerUrlEqualTo(swaggerUrlRequest.getSwaggerUrl()).andModuleIdEqualTo(swaggerUrlRequest.getModuleId());
criteria.andProjectIdEqualTo(swaggerUrlRequest.getProjectId()).andSwaggerUrlEqualTo(swaggerUrlRequest.getSwaggerUrl());
if (StringUtils.isNotBlank(swaggerUrlRequest.getModuleId())) {
criteria.andModuleIdEqualTo(swaggerUrlRequest.getModuleId());
}
List<SwaggerUrlProject> list = swaggerUrlProjectMapper.selectByExample(swaggerUrlProjectExample);
String resourceId = "";
if (list.size() == 1) {

View File

@ -117,7 +117,7 @@ export default {
},
{
id: 'incrementalMerge',
name: this.$t('commons.not.cover')
name: this.$t('commons.not_cover')
}],
protocol: "",
platforms: [
@ -152,7 +152,7 @@ export default {
formData: {
file: undefined,
swaggerUrl: '',
modeId: this.$t('commons.not.cover'),
modeId: this.$t('commons.not_cover'),
moduleId: '',
},
rules: {},

View File

@ -252,9 +252,6 @@ export default {
activated() {
this.initTableData();
},
created() {
this.list()
},
methods: {
create() {
this.dialogOrgAddVisible = true;