mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 03:48:05 +08:00
空指针判断
This commit is contained in:
parent
0b8d56fbbd
commit
3b9c48f8d9
@ -175,6 +175,9 @@ public class CertificateController extends BaseController {
|
|||||||
public String export(String id) {
|
public String export(String id) {
|
||||||
try {
|
try {
|
||||||
CertModel item = certService.getItem(id);
|
CertModel item = certService.getItem(id);
|
||||||
|
if (null == item) {
|
||||||
|
return JsonMessage.getString(400, "导出失败");
|
||||||
|
}
|
||||||
String parent = FileUtil.file(item.getCert()).getParent();
|
String parent = FileUtil.file(item.getCert()).getParent();
|
||||||
File zip = ZipUtil.zip(parent);
|
File zip = ZipUtil.zip(parent);
|
||||||
ServletUtil.write(getResponse(), zip);
|
ServletUtil.write(getResponse(), zip);
|
||||||
|
Loading…
Reference in New Issue
Block a user