From e96322043649fdc8fc02d886ac19cf8342a43248 Mon Sep 17 00:00:00 2001 From: yuxc <yuxc@vci-tech.com> Date: 星期一, 04 十一月 2024 11:37:13 +0800 Subject: [PATCH] 在登录时判断用户密码过期需要修改时,由于还未登录去获取当前Session的用户时,是null,所以导致报错,增加如果为空,直接使用界面传的用户。 --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java index 6e05fe5..c6666a8 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/WebCodeGenSchemaController.java @@ -1,12 +1,15 @@ package com.vci.web.controller; +import com.vci.corba.common.PLException; +import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.BaseQueryObject; import com.vci.starter.web.pagemodel.BaseResult; import com.vci.starter.web.pagemodel.DataGrid; import com.vci.starter.web.util.ControllerUtil; import com.vci.starter.web.util.LangBaseUtil; -import com.vci.web.dto.OsCodeGenSchemaDTO; -import com.vci.web.pageModel.OsCodeGenSchemaVO; +import com.vci.dto.OsCodeGenSchemaDTO; +import com.vci.pagemodel.OsCodeGenSchemaVO; +import com.vci.starter.web.util.VciBaseUtil; import com.vci.web.service.OsCodeGenSchemaServiceI; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -71,8 +74,14 @@ */ @PostMapping(value = "/productCodeFile") public BaseResult productCodeFile(String oid){ - codeGenSchemaService.productCodeFile(oid); - return BaseResult.success(); + try { + codeGenSchemaService.productCodeFile(oid); + return BaseResult.success(); + } catch (PLException e) { + e.printStackTrace(); + String exceptionMessage = VciBaseUtil.getExceptionMessage(e); + throw new VciBaseException(exceptionMessage); + } } /** -- Gitblit v1.9.3