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