完善注释,增加删除功能

pull/1/head
wangziyangyang 2020-03-10 15:50:45 +08:00
parent 1ef4975539
commit 39919fc6bd
9 changed files with 56 additions and 30 deletions

View File

@ -27,9 +27,9 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* <p>
*
* </p>
*
*
*
*
* @author WangZiYang
* @since 2020-03-06
@ -112,9 +112,9 @@ public class SpTableManagerController extends BaseController {
}
/**
*
* +
*
* @param record
* @param record
* @return
*/
@ApiOperation("主数据表头修改")
@ -142,6 +142,20 @@ public class SpTableManagerController extends BaseController {
return Result.success(record.getId());
}
/**
* +
*
* @param req
* @return Result
*/
@ApiOperation("级联删除主表头+明细")
@ApiImplicitParams({@ApiImplicitParam(name = "req", value = "表信息", defaultValue = "表信息")})
@PostMapping("delete/by/tableNameId")
@ResponseBody
public Result deleteByTableNameId(SpTableManager req) throws Exception {
iSpTableManagerService.removeById(req.getId());
iSpTableManagerItemService.deleteItemBytableNameId(req.getId());
return Result.success();
}
}

View File

@ -18,9 +18,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* <p>
*
* </p>
*
*
* @author WangZiYang
* @since 2020-03-06

View File

@ -7,9 +7,9 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <p>
* Mapper
* </p>
*
* Mapper
*
*
* @author WangZiYang
* @since 2020-03-06

View File

@ -7,9 +7,7 @@ import com.songpeng.sparchetype.basedata.entity.SpTableManagerItem;
import java.util.List;
/**
* <p>
* Mapper
* </p>
* Mapper
*
* @author WangZiYang
* @since 2020-03-06

View File

@ -7,7 +7,7 @@ import java.util.List;
/**
* <p>
*
*
* </p>
*
* @author WangZiYang

View File

@ -8,7 +8,7 @@ import java.util.List;
/**
* <p>
*
*
* </p>
*
* @author WangZiYang

View File

@ -11,7 +11,7 @@ import java.util.List;
/**
* <p>
*
*
* </p>
*
* @author WangZiYang

View File

@ -14,7 +14,7 @@ import java.util.List;
/**
* <p>
*
*
* </p>
*
* @author WangZiYang

View File

@ -163,12 +163,28 @@
content: '${request.contextPath}/basedata/manager/add-or-update-ui'
});
}
// 删除
if (obj.event === 'delete') {
layer.confirm('确认要删除吗?', function (index) {
obj.del();
spUtil.ajax({
url: '${request.contextPath}/basedata/manager/delete/by/tableNameId',
async: false,
type: 'POST',
// 是否显示 loading
showLoading: true,
// 是否序列化参数
serializable: false,
// 参数
data: {
id : data.id
},
success: function (data) {
tableIns.reload();
layer.close(index);
},
error: function () {
}
});
});
}
});