From f31d9e981273b383dae9ef7eb7c424042b34facf Mon Sep 17 00:00:00 2001 From: Kane Wang Date: Wed, 26 Apr 2023 20:20:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=9D=90=E5=B8=AD=E5=B7=A5?= =?UTF-8?q?=E5=8F=B7=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../account/StaffInfoQueryController.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/account/StaffInfoQueryController.java b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/account/StaffInfoQueryController.java index 9153c91..283aa2f 100644 --- a/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/account/StaffInfoQueryController.java +++ b/code/后端/desktop_archievement_backend/src/main/java/com/cpic/xim/web/controllers/account/StaffInfoQueryController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.cpic.xim.utils.account.CpicXIMStaffInfo; +import com.cpic.xim.utils.account.TeleSalerInfo; @Controller @RequestMapping( "/account" ) @@ -58,8 +59,31 @@ public class StaffInfoQueryController public TeleSalerQueryResult queryTeleSalerInfo( String teleSalerCode ) { TeleSalerQueryResult result = new TeleSalerQueryResult(); + TeleSalerInfo saler = null; + try + { + saler = TeleSalerInfo.queryTeleSalerInfo( teleSalerCode ); + result.setTeleSalerCode( saler.getCode() ); + result.setTeleSalerName( saler.getName() ); + result.setTeamCode( saler.getTeamCode() ); + result.setTeamName( saler.getTeamName() ); + result.setDepartmentCode( saler.getDepartmentCode() ); + result.setDepartmentName( saler.getDepartmentName() ); + + result.setSuccess( true ); + } + catch ( SQLException error ) + { + result.setSuccess( false ); + result.setMessage( error.getMessage() ); + } + catch ( ClassNotFoundException error ) + { + result.setSuccess( false ); + result.setMessage( error.getMessage() ); + } return result; }