!85 空指针判断

Merge pull request !85 from Arno/dyc
This commit is contained in:
Arno 2019-04-08 15:45:53 +08:00
commit 7dc7880e5e

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);