Browse Source

fix: bug

master
李永德 3 months ago
parent
commit
78795ca2e9
  1. 8
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/impl/InterfaceBackServiceImpl.java
  2. 8
      lms/nladmin-ui/src/views/wms/basedata/master/interfaceback/index.vue

8
lms/nladmin-system/src/main/java/org/nl/wms/basedata/master/interfaceback/service/impl/InterfaceBackServiceImpl.java

@ -61,6 +61,10 @@ public class InterfaceBackServiceImpl extends ServiceImpl<InterfaceBackMapper, I
@Override
public void create(InterfaceBack dto) {
InterfaceBack one = findByCode(dto.getInterface_name());
if (ObjectUtil.isNotEmpty(one)) {
throw new BadRequestException("接口重复!");
}
dto.setInterface_id(IdUtil.getSnowflake(1, 1).nextIdStr());
String result = Arrays.toString(dto.getProduct_areas());
result = result.replaceAll(" ", "");
@ -74,6 +78,10 @@ public class InterfaceBackServiceImpl extends ServiceImpl<InterfaceBackMapper, I
if (entity == null) {
throw new BadRequestException("被删除或无权限,操作失败!");
}
InterfaceBack one = findByCode(dto.getInterface_name());
if (ObjectUtil.isNotEmpty(one) && !one.getInterface_id().equals(dto.getInterface_id())) {
throw new BadRequestException("接口重复!");
}
String result = Arrays.toString(dto.getProduct_areas());
result = result.replaceAll(" ", "");
dto.setProduct_area(result);

8
lms/nladmin-ui/src/views/wms/basedata/master/interfaceback/index.vue

@ -109,7 +109,7 @@
<el-table-column prop="is_back" label="是否回传" :formatter="formatBack" :min-width="flexWidth('is_back',crud.data,'是否回传')" />
<el-table-column prop="remark" label="接口描述" :min-width="flexWidth('remark',crud.data,'接口描述')" />
<el-table-column prop="business_comment" label="业务说明" :min-width="flexWidth('business_comment',crud.data,'业务说明')" />
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<el-table-column v-permission="['admin', 'Interfaceback:edit', 'Interfaceback:del']" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<udOperation
:data="scope.row"
@ -166,6 +166,9 @@ export default {
data() {
return {
permission: {
add: ['admin', 'Interfaceback:add'],
edit: ['admin', 'Interfaceback:edit'],
del: ['admin', 'Interfaceback:del']
},
rules: {
interface_type: [
@ -189,6 +192,9 @@ export default {
},
formatBack(row) {
return this.dict.label.is_upload[row.is_back]
},
hand() {
this.crud.toQuery()
}
}
}

Loading…
Cancel
Save