职站系统设置,专业新增与修改接口限制

master
yuqin 3 years ago
parent 327715a9a4
commit 7e4b8cef42
  1. 4
      src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java
  2. 9
      src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java
  3. 4
      src/main/java/com/yipin/liuwanr/service/StaffProfessionalArchitectureService.java

@ -151,13 +151,13 @@ public class StaffProfessionalArchitectureController {
* 查询员工专业架构名称 * 查询员工专业架构名称
*/ */
@GetMapping("/queryStaffPAN") @GetMapping("/queryStaffPAN")
Response queryStaffPAN(@RequestParam String name) { Response queryStaffPAN(@RequestParam("name") String name,@RequestParam("schoolId") Integer schoolId) {
Response resp = new Response(); Response resp = new Response();
if (name == null) { if (name == null) {
resp.setStatus(300); resp.setStatus(300);
resp.setMessage("专业组织架构名称为空!"); resp.setMessage("专业组织架构名称为空!");
}else { }else {
HashMap<String, Object> ret = staffProfessionalArchitectureService.queryStaffPAN(name); HashMap<String, Object> ret = staffProfessionalArchitectureService.queryStaffPAN(name,schoolId);
int status = (int) ret.get("retcode"); int status = (int) ret.get("retcode");
if (200 == status) { if (200 == status) {
resp.setStatus(status); resp.setStatus(status);

@ -2,10 +2,7 @@ package com.yipin.liuwanr.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.yipin.liuwanr.entity.StaffProfessionalArchitecture; import com.yipin.liuwanr.entity.StaffProfessionalArchitecture;
@ -21,8 +18,8 @@ public interface StaffProfessionalArchitectureMapper {
"</script> "}) "</script> "})
List<StaffProfessionalArchitecture> queryStaffProfessionalArchitecture(Integer schoolId); List<StaffProfessionalArchitecture> queryStaffProfessionalArchitecture(Integer schoolId);
@Select("SELECT staffProfessionalArchitectureId,staffProfessionalArchitectureName,schoolId from staff_professional_architecture where isdel = 0 and staffProfessionalArchitectureName = #{staffProfessionalArchitectureName}") @Select("SELECT staffProfessionalArchitectureId,staffProfessionalArchitectureName,schoolId from staff_professional_architecture where isdel = 0 and staffProfessionalArchitectureName = #{staffProfessionalArchitectureName} and schoolId=#{schoolId}")
List<StaffProfessionalArchitecture> queryStaffPAN(String staffProfessionalArchitectureName); List<StaffProfessionalArchitecture> queryStaffPAN(@Param("staffProfessionalArchitectureName") String staffProfessionalArchitectureName, @Param("schoolId") Integer schoolId);
@Update("UPDATE staff_professional_architecture SET isdel = 1 where staffProfessionalArchitectureId = #{staffProfessionalArchitectureId}") @Update("UPDATE staff_professional_architecture SET isdel = 1 where staffProfessionalArchitectureId = #{staffProfessionalArchitectureId}")

@ -69,10 +69,10 @@ public class StaffProfessionalArchitectureService {
return resp; return resp;
} }
public HashMap<String, Object> queryStaffPAN(String name){ public HashMap<String, Object> queryStaffPAN(String name,Integer schoolId){
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
try { try {
resp.put("retvalue", staffProfessionalArchitectureMapper.queryStaffPAN(name)); resp.put("retvalue", staffProfessionalArchitectureMapper.queryStaffPAN(name,schoolId));
resp.put("retcode", 200); resp.put("retcode", 200);
} catch (RuntimeException e) { } catch (RuntimeException e) {
logger.error(e.getMessage()); logger.error(e.getMessage());

Loading…
Cancel
Save