From 7e4b8cef4261fe8f1ce6c23918a7f4f6268329e5 Mon Sep 17 00:00:00 2001 From: yuqin <1627766274@qq.com> Date: Tue, 15 Jun 2021 18:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=8C=E7=AB=99=E7=B3=BB=E7=BB=9F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=B8=93=E4=B8=9A=E6=96=B0=E5=A2=9E=E4=B8=8E?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StaffProfessionalArchitectureController.java | 4 ++-- .../mapper/StaffProfessionalArchitectureMapper.java | 9 +++------ .../service/StaffProfessionalArchitectureService.java | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java b/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java index df1f825..1e3b0b3 100644 --- a/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java +++ b/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java @@ -151,13 +151,13 @@ public class StaffProfessionalArchitectureController { * 查询员工专业架构名称 */ @GetMapping("/queryStaffPAN") - Response queryStaffPAN(@RequestParam String name) { + Response queryStaffPAN(@RequestParam("name") String name,@RequestParam("schoolId") Integer schoolId) { Response resp = new Response(); if (name == null) { resp.setStatus(300); resp.setMessage("专业组织架构名称为空!"); }else { - HashMap ret = staffProfessionalArchitectureService.queryStaffPAN(name); + HashMap ret = staffProfessionalArchitectureService.queryStaffPAN(name,schoolId); int status = (int) ret.get("retcode"); if (200 == status) { resp.setStatus(status); diff --git a/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java b/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java index 88f7d35..f862f83 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java @@ -2,10 +2,7 @@ package com.yipin.liuwanr.mapper; import java.util.List; -import org.apache.ibatis.annotations.Insert; -import org.apache.ibatis.annotations.Options; -import org.apache.ibatis.annotations.Select; -import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.*; import com.yipin.liuwanr.entity.StaffProfessionalArchitecture; @@ -21,8 +18,8 @@ public interface StaffProfessionalArchitectureMapper { " "}) List queryStaffProfessionalArchitecture(Integer schoolId); - @Select("SELECT staffProfessionalArchitectureId,staffProfessionalArchitectureName,schoolId from staff_professional_architecture where isdel = 0 and staffProfessionalArchitectureName = #{staffProfessionalArchitectureName}") - List queryStaffPAN(String staffProfessionalArchitectureName); + @Select("SELECT staffProfessionalArchitectureId,staffProfessionalArchitectureName,schoolId from staff_professional_architecture where isdel = 0 and staffProfessionalArchitectureName = #{staffProfessionalArchitectureName} and schoolId=#{schoolId}") + List queryStaffPAN(@Param("staffProfessionalArchitectureName") String staffProfessionalArchitectureName, @Param("schoolId") Integer schoolId); @Update("UPDATE staff_professional_architecture SET isdel = 1 where staffProfessionalArchitectureId = #{staffProfessionalArchitectureId}") diff --git a/src/main/java/com/yipin/liuwanr/service/StaffProfessionalArchitectureService.java b/src/main/java/com/yipin/liuwanr/service/StaffProfessionalArchitectureService.java index 893954a..1e0a5bf 100644 --- a/src/main/java/com/yipin/liuwanr/service/StaffProfessionalArchitectureService.java +++ b/src/main/java/com/yipin/liuwanr/service/StaffProfessionalArchitectureService.java @@ -69,10 +69,10 @@ public class StaffProfessionalArchitectureService { return resp; } - public HashMap queryStaffPAN(String name){ + public HashMap queryStaffPAN(String name,Integer schoolId){ HashMap resp = new HashMap(); try { - resp.put("retvalue", staffProfessionalArchitectureMapper.queryStaffPAN(name)); + resp.put("retvalue", staffProfessionalArchitectureMapper.queryStaffPAN(name,schoolId)); resp.put("retcode", 200); } catch (RuntimeException e) { logger.error(e.getMessage());