空指针判断

This commit is contained in:
Arno 2019-04-08 15:45:19 +08:00
parent 0b8d56fbbd
commit 3b9c48f8d9

View File

@ -175,6 +175,9 @@ public class CertificateController extends BaseController {
public String export(String id) {
try {
CertModel item = certService.getItem(id);
if (null == item) {
return JsonMessage.getString(400, "导出失败");
}
String parent = FileUtil.file(item.getCert()).getParent();
File zip = ZipUtil.zip(parent);
ServletUtil.write(getResponse(), zip);