Commit 14c61009 authored by jiatao's avatar jiatao

提交初始化配置

parent f900f0e4
package com.ruoyi.cas;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysRole;
......@@ -26,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
......@@ -78,7 +80,6 @@ public class CasAuthService {
private static final String DEFAULT_PASSWORD = "";
/**
......@@ -109,10 +110,10 @@ public class CasAuthService {
logger.info("CAS验证URL: {}", validateUrl);
// 发送验证请求
// RestTemplate restTemplate = new RestTemplate();
// String xmlResponse = restTemplate.getForObject(validateUrl, String.class);
RestTemplate restTemplate = new RestTemplate();
String xmlResponse = restTemplate.getForObject(validateUrl, String.class);
String xmlResponse = readXmlFile("cas_success_response.xml");
// String xmlResponse = readXmlFile("cas_success_response.xml");
logger.info("CAS验证响应: {}", xmlResponse);
......@@ -276,7 +277,7 @@ public class CasAuthService {
SysUser user = new SysUser();
user.setUserName(userInfo.getUsername());
user.setNickName(userInfo.getName());
user.setPassword((SecurityUtils.encryptPassword("gwyy@xjtu.")));
user.setPassword((SecurityUtils.encryptPassword(RuoYiConfig.getDefaultPassword())));
user.setStatus("0");
user.setCreateBy(userInfo.getUsername());
user.setCreateTime(new Date());
......
package com.ruoyi.web.controller.system;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
......@@ -49,6 +48,8 @@ public class ReservationApprovalController extends BaseController {
.eq(StringUtils.isNotEmpty(reservationApproval.getSeatCode()),ReservationApproval::getSeatCode,reservationApproval.getSeatCode())
.eq(StringUtils.isNotEmpty(reservationApproval.getSubmitBy()),ReservationApproval::getSubmitBy,reservationApproval.getSubmitBy())
.eq(StringUtils.isNotEmpty(reservationApproval.getStatus()),ReservationApproval::getStatus,reservationApproval.getStatus())
.lt(StringUtils.isNotNull(reservationApproval.getEndAt()),ReservationApproval::getEndAt,reservationApproval.getEndAt())
.ge(StringUtils.isNotNull(reservationApproval.getStartAt()),ReservationApproval::getStartAt,reservationApproval.getStartAt())
.orderByDesc(ReservationApproval::getSubmitAt));
......@@ -67,15 +68,17 @@ public class ReservationApprovalController extends BaseController {
submitPersonNos.add("default");
Map<String,String> personNameMap = userService.selectUsersByUserName(submitPersonNos)
.stream().collect(Collectors.toMap(SysUser::getUserName,SysUser::getNickName));
SysUser sysUser = new SysUser();
sysUser.setUserNames(submitPersonNos);
Map<String,SysUser> personMap = userService.selectUserList(sysUser)
.stream().collect(Collectors.toMap(SysUser::getUserName,Function.identity()));
for (ReservationApproval approval : list) {
approval.setSpaceSeat(spaceSeatMap.getOrDefault(approval.getSeatCode(),new SpaceSeat()));
approval.setSubmitByName(personNameMap.getOrDefault(approval.getSubmitBy(),""));
approval.setApprovedByName(personNameMap.getOrDefault(approval.getApprovedBy(),""));
approval.setSubmitByUser(personMap.getOrDefault(approval.getSubmitBy(),new SysUser()));
approval.setSubmitByName(personMap.getOrDefault(approval.getSubmitBy(),new SysUser()).getNickName());
approval.setApprovedByName(personMap.getOrDefault(approval.getApprovedBy(),new SysUser()).getNickName());
}
......@@ -98,7 +101,8 @@ public class ReservationApprovalController extends BaseController {
List<ReservationApproval> list = reservationApprovalService.list(new LambdaQueryWrapper<ReservationApproval>()
.eq(ReservationApproval::getSubmitBy,SecurityUtils.getUsername())
.in(ReservationApproval::getStatus, ApprovalStatus.PASS.getCode(),ApprovalStatus.WAITING.getCode())
.ge(ReservationApproval::getStartAt,new Date()));
.ge(ReservationApproval::getStartAt,new Date())
.last("limit 0,3"));
List<String> seatCodes = list.stream().map(ReservationApproval::getSeatCode).collect(Collectors.toList());
......
......@@ -100,6 +100,12 @@ public class ReservationBlacklistController extends BaseController
public AjaxResult add(@RequestBody ReservationBlacklist reservationBlacklist)
{
SysUser user = userService.selectUserByUserName(reservationBlacklist.getPersonNo());
if (StringUtils.isNull(user)){
throw new ServiceException("暂无用户信息,请先添加用户信息");
}
long count = reservationBlacklistService.count(new LambdaQueryWrapper<ReservationBlacklist>()
.eq(ReservationBlacklist::getPersonNo,reservationBlacklist.getPersonNo()));
......
package com.ruoyi.web.controller.system;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.SchoolStudentInfo;
import com.ruoyi.system.service.ISchoolStudentInfoService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 【请填写功能名称】Controller
*
* @author ruoyi
* @date 2025-11-10
*/
@RestController
@RequestMapping("/system/student")
public class SchoolStudentInfoController extends BaseController
{
@Autowired
private ISchoolStudentInfoService schoolStudentInfoService;
/**
* 查询【请填写功能名称】列表
*/
@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(SchoolStudentInfo schoolStudentInfo)
{
startPage();
List<SchoolStudentInfo> list = schoolStudentInfoService.selectSchoolStudentInfoList(schoolStudentInfo);
return getDataTable(list);
}
/**
* 导出【请填写功能名称】列表
*/
@PreAuthorize("@ss.hasPermi('system:info:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolStudentInfo schoolStudentInfo)
{
List<SchoolStudentInfo> list = schoolStudentInfoService.selectSchoolStudentInfoList(schoolStudentInfo);
ExcelUtil<SchoolStudentInfo> util = new ExcelUtil<SchoolStudentInfo>(SchoolStudentInfo.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
}
package com.ruoyi.web.controller.system;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.SchoolTeacherInfo;
import com.ruoyi.system.service.ISchoolTeacherInfoService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 【请填写功能名称】Controller
*
* @author ruoyi
* @date 2025-11-10
*/
@RestController
@RequestMapping("/system/teacher")
public class SchoolTeacherInfoController extends BaseController
{
@Autowired
private ISchoolTeacherInfoService schoolTeacherInfoService;
/**
* 查询【请填写功能名称】列表
*/
@PreAuthorize("@ss.hasPermi('system:info:list')")
@GetMapping("/list")
public TableDataInfo list(SchoolTeacherInfo schoolTeacherInfo)
{
startPage();
List<SchoolTeacherInfo> list = schoolTeacherInfoService.selectSchoolTeacherInfoList(schoolTeacherInfo);
return getDataTable(list);
}
/**
* 导出【请填写功能名称】列表
*/
@PreAuthorize("@ss.hasPermi('system:info:export')")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SchoolTeacherInfo schoolTeacherInfo)
{
List<SchoolTeacherInfo> list = schoolTeacherInfoService.selectSchoolTeacherInfoList(schoolTeacherInfo);
ExcelUtil<SchoolTeacherInfo> util = new ExcelUtil<SchoolTeacherInfo>(SchoolTeacherInfo.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
* 获取【请填写功能名称】详细信息
*/
@PreAuthorize("@ss.hasPermi('system:info:query')")
@GetMapping(value = "/{teacherId}")
public AjaxResult getInfo(@PathVariable("teacherId") Long teacherId)
{
return success(schoolTeacherInfoService.selectSchoolTeacherInfoByTeacherId(teacherId));
}
}
package com.ruoyi.web.controller.system;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.*;
import com.ruoyi.common.core.domain.entity.SysMenu;
import com.ruoyi.common.core.domain.entity.SysUser;
......@@ -91,6 +89,22 @@ public class SysLoginController
ajax.put("permissions", permissions);
ajax.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
ajax.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
List<String> restrictionDepts =
Arrays.asList(Optional.ofNullable(configService.selectConfigByKey("restriction.depts")).orElse(new String(""))
.split(","));
if (StringUtils.isNull(user.getDeptId())){
ajax.put("isRestrictionDept",false);
}else {
if (StringUtils.isNotEmpty(restrictionDepts)) {
ajax.put("isRestrictionDept", restrictionDepts.contains(String.valueOf(user.getDeptId())));
} else {
ajax.put("isRestrictionDept", true);
}
}
return ajax;
}
......
......@@ -3,6 +3,10 @@ package com.ruoyi.web.controller.system;
import java.util.List;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.service.*;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -27,10 +31,6 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
/**
* 用户信息
......@@ -53,6 +53,7 @@ public class SysUserController extends BaseController
@Autowired
private ISysPostService postService;
/**
* 获取用户列表
*/
......@@ -139,6 +140,10 @@ public class SysUserController extends BaseController
return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setCreateBy(getUsername());
if (StringUtils.isEmpty(user.getPassword())){
user.setPassword(RuoYiConfig.getDefaultPassword());
}
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
return toAjax(userService.insertUser(user));
}
......@@ -253,4 +258,8 @@ public class SysUserController extends BaseController
{
return success(deptService.selectDeptTreeList(dept));
}
}
......@@ -37,10 +37,9 @@ spring:
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
url: jdbc:mysql://10.184.203.56:3306/lms-laboratory?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: rs_service
password: ezGkNdezsZJE
# 初始连接数
initialSize: 5
# 最小连接池数量
......
......@@ -12,7 +12,8 @@ ruoyi:
addressEnabled: false
# 验证码类型 math 数字计算 char 字符验证
captchaType: math
# 默认账号密码
defaultPassword: xjtugwyy@.
# 开发环境配置
server:
# 服务器的HTTP端口,默认为8080
......
......@@ -25,4 +25,8 @@ public @interface DataSource
* 切换数据源名称
*/
public DataSourceType value() default DataSourceType.MASTER;
}
......@@ -30,6 +30,11 @@ public class RuoYiConfig
/** 验证码类型 */
private static String captchaType;
private static String defaultPassword;
public String getName()
{
return name;
......@@ -88,6 +93,15 @@ public class RuoYiConfig
RuoYiConfig.captchaType = captchaType;
}
public static String getDefaultPassword() {
return defaultPassword;
}
public static void setDefaultPassword(String defaultPassword) {
RuoYiConfig.defaultPassword = defaultPassword;
}
/**
* 获取导入上传路径
*/
......
......@@ -5,6 +5,7 @@ import java.util.List;
import javax.validation.constraints.*;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
......@@ -19,6 +20,7 @@ import com.ruoyi.common.xss.Xss;
*
* @author ruoyi
*/
@Data
public class SysUser extends BaseEntity
{
private static final long serialVersionUID = 1L;
......@@ -75,6 +77,10 @@ public class SysUser extends BaseEntity
/** 密码最后更新时间 */
private Date pwdUpdateDate;
/** 部门对象 */
@Excels({
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
......@@ -99,6 +105,9 @@ public class SysUser extends BaseEntity
@TableField(exist = false)
private Long roleId;
@TableField(exist = false)
private String userType;
public SysUser()
{
......
......@@ -3,6 +3,7 @@ package com.ruoyi.system.domain;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.SysUser;
import lombok.Data;
import java.util.Date;
......@@ -32,6 +33,9 @@ public class ReservationApproval extends BaseEntity {
@TableField(exist = false)
private String submitByName;
@TableField(exist = false)
private SysUser submitByUser;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startAt;
......
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 【请填写功能名称】对象 school_student_info
*
* @author ruoyi
* @date 2025-11-10
*/
public class SchoolStudentInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long studentId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String typeCode;
/** 部门ID */
@Excel(name = "部门ID")
private String deptId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String studentNumber;
/** 上一个历史学生编码 */
@Excel(name = "上一个历史学生编码")
private String prevStudentNumber;
/** 临时列 */
@Excel(name = "临时列")
private String tempNumber;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String name;
/** 班级名称 */
@Excel(name = "班级名称")
private String className;
/** 学生年级 */
@Excel(name = "学生年级")
private String grade;
/** 专业 */
@Excel(name = "专业")
private String speciality;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Date enrollDate;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Date finishschoolDate;
/** 是否在校 */
@Excel(name = "是否在校")
private String whetherAtSchool;
/** 是否在籍 */
@Excel(name = "是否在籍")
private String whetherBeRegistered;
/** 是非在编人员 */
@Excel(name = "是非在编人员")
private String permanentStaff;
/** 0 1 */
@Excel(name = "0 1")
private String accountAllocation;
/** 0 2 */
private String delFlag;
public void setStudentId(Long studentId)
{
this.studentId = studentId;
}
public Long getStudentId()
{
return studentId;
}
public void setTypeCode(String typeCode)
{
this.typeCode = typeCode;
}
public String getTypeCode()
{
return typeCode;
}
public void setDeptId(String deptId)
{
this.deptId = deptId;
}
public String getDeptId()
{
return deptId;
}
public void setStudentNumber(String studentNumber)
{
this.studentNumber = studentNumber;
}
public String getStudentNumber()
{
return studentNumber;
}
public void setPrevStudentNumber(String prevStudentNumber)
{
this.prevStudentNumber = prevStudentNumber;
}
public String getPrevStudentNumber()
{
return prevStudentNumber;
}
public void setTempNumber(String tempNumber)
{
this.tempNumber = tempNumber;
}
public String getTempNumber()
{
return tempNumber;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setClassName(String className)
{
this.className = className;
}
public String getClassName()
{
return className;
}
public void setGrade(String grade)
{
this.grade = grade;
}
public String getGrade()
{
return grade;
}
public void setSpeciality(String speciality)
{
this.speciality = speciality;
}
public String getSpeciality()
{
return speciality;
}
public void setEnrollDate(Date enrollDate)
{
this.enrollDate = enrollDate;
}
public Date getEnrollDate()
{
return enrollDate;
}
public void setFinishschoolDate(Date finishschoolDate)
{
this.finishschoolDate = finishschoolDate;
}
public Date getFinishschoolDate()
{
return finishschoolDate;
}
public void setWhetherAtSchool(String whetherAtSchool)
{
this.whetherAtSchool = whetherAtSchool;
}
public String getWhetherAtSchool()
{
return whetherAtSchool;
}
public void setWhetherBeRegistered(String whetherBeRegistered)
{
this.whetherBeRegistered = whetherBeRegistered;
}
public String getWhetherBeRegistered()
{
return whetherBeRegistered;
}
public void setPermanentStaff(String permanentStaff)
{
this.permanentStaff = permanentStaff;
}
public String getPermanentStaff()
{
return permanentStaff;
}
public void setAccountAllocation(String accountAllocation)
{
this.accountAllocation = accountAllocation;
}
public String getAccountAllocation()
{
return accountAllocation;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("studentId", getStudentId())
.append("typeCode", getTypeCode())
.append("deptId", getDeptId())
.append("studentNumber", getStudentNumber())
.append("prevStudentNumber", getPrevStudentNumber())
.append("tempNumber", getTempNumber())
.append("name", getName())
.append("className", getClassName())
.append("grade", getGrade())
.append("speciality", getSpeciality())
.append("enrollDate", getEnrollDate())
.append("finishschoolDate", getFinishschoolDate())
.append("whetherAtSchool", getWhetherAtSchool())
.append("whetherBeRegistered", getWhetherBeRegistered())
.append("permanentStaff", getPermanentStaff())
.append("accountAllocation", getAccountAllocation())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
package com.ruoyi.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 【请填写功能名称】对象 school_teacher_info
*
* @author ruoyi
* @date 2025-11-10
*/
public class SchoolTeacherInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** ID */
private Long teacherId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String workpostType;
/** 部门ID */
@Excel(name = "部门ID")
private String deptId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String employeeNumber;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String prevEmployeeNumber;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String name;
/** 性别(0男 1女 2未知) */
@Excel(name = "性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String email;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String phonenumber;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Date enrollDate;
/** 工作状态 */
@Excel(name = "工作状态")
private String workStatus;
/** 是否在编 (字段系统是否) */
@Excel(name = "是否在编 ", readConverterExp = "字=段系统是否")
private String staffing;
/** 0 1 */
@Excel(name = "0 1")
private String accountAllocation;
/** 0 2 */
private String delFlag;
public void setTeacherId(Long teacherId)
{
this.teacherId = teacherId;
}
public Long getTeacherId()
{
return teacherId;
}
public void setWorkpostType(String workpostType)
{
this.workpostType = workpostType;
}
public String getWorkpostType()
{
return workpostType;
}
public void setDeptId(String deptId)
{
this.deptId = deptId;
}
public String getDeptId()
{
return deptId;
}
public void setEmployeeNumber(String employeeNumber)
{
this.employeeNumber = employeeNumber;
}
public String getEmployeeNumber()
{
return employeeNumber;
}
public void setPrevEmployeeNumber(String prevEmployeeNumber)
{
this.prevEmployeeNumber = prevEmployeeNumber;
}
public String getPrevEmployeeNumber()
{
return prevEmployeeNumber;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setEmail(String email)
{
this.email = email;
}
public String getEmail()
{
return email;
}
public void setPhonenumber(String phonenumber)
{
this.phonenumber = phonenumber;
}
public String getPhonenumber()
{
return phonenumber;
}
public void setEnrollDate(Date enrollDate)
{
this.enrollDate = enrollDate;
}
public Date getEnrollDate()
{
return enrollDate;
}
public void setWorkStatus(String workStatus)
{
this.workStatus = workStatus;
}
public String getWorkStatus()
{
return workStatus;
}
public void setStaffing(String staffing)
{
this.staffing = staffing;
}
public String getStaffing()
{
return staffing;
}
public void setAccountAllocation(String accountAllocation)
{
this.accountAllocation = accountAllocation;
}
public String getAccountAllocation()
{
return accountAllocation;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("teacherId", getTeacherId())
.append("workpostType", getWorkpostType())
.append("deptId", getDeptId())
.append("employeeNumber", getEmployeeNumber())
.append("prevEmployeeNumber", getPrevEmployeeNumber())
.append("name", getName())
.append("sex", getSex())
.append("email", getEmail())
.append("phonenumber", getPhonenumber())
.append("enrollDate", getEnrollDate())
.append("workStatus", getWorkStatus())
.append("staffing", getStaffing())
.append("accountAllocation", getAccountAllocation())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SchoolStudentInfo;
/**
* 【请填写功能名称】Mapper接口
*
* @author ruoyi
* @date 2025-11-10
*/
public interface SchoolStudentInfoMapper
{
/**
* 查询【请填写功能名称】
*
* @param studentId 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
public SchoolStudentInfo selectSchoolStudentInfoByStudentId(Long studentId);
/**
* 查询【请填写功能名称】列表
*
* @param schoolStudentInfo 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
public List<SchoolStudentInfo> selectSchoolStudentInfoList(SchoolStudentInfo schoolStudentInfo);
/**
* 新增【请填写功能名称】
*
* @param schoolStudentInfo 【请填写功能名称】
* @return 结果
*/
public int insertSchoolStudentInfo(SchoolStudentInfo schoolStudentInfo);
/**
* 修改【请填写功能名称】
*
* @param schoolStudentInfo 【请填写功能名称】
* @return 结果
*/
public int updateSchoolStudentInfo(SchoolStudentInfo schoolStudentInfo);
/**
* 删除【请填写功能名称】
*
* @param studentId 【请填写功能名称】主键
* @return 结果
*/
public int deleteSchoolStudentInfoByStudentId(Long studentId);
/**
* 批量删除【请填写功能名称】
*
* @param studentIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolStudentInfoByStudentIds(Long[] studentIds);
}
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SchoolTeacherInfo;
/**
* 【请填写功能名称】Mapper接口
*
* @author ruoyi
* @date 2025-11-10
*/
public interface SchoolTeacherInfoMapper
{
/**
* 查询【请填写功能名称】
*
* @param teacherId 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
public SchoolTeacherInfo selectSchoolTeacherInfoByTeacherId(Long teacherId);
/**
* 查询【请填写功能名称】列表
*
* @param schoolTeacherInfo 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
public List<SchoolTeacherInfo> selectSchoolTeacherInfoList(SchoolTeacherInfo schoolTeacherInfo);
/**
* 新增【请填写功能名称】
*
* @param schoolTeacherInfo 【请填写功能名称】
* @return 结果
*/
public int insertSchoolTeacherInfo(SchoolTeacherInfo schoolTeacherInfo);
/**
* 修改【请填写功能名称】
*
* @param schoolTeacherInfo 【请填写功能名称】
* @return 结果
*/
public int updateSchoolTeacherInfo(SchoolTeacherInfo schoolTeacherInfo);
/**
* 删除【请填写功能名称】
*
* @param teacherId 【请填写功能名称】主键
* @return 结果
*/
public int deleteSchoolTeacherInfoByTeacherId(Long teacherId);
/**
* 批量删除【请填写功能名称】
*
* @param teacherIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSchoolTeacherInfoByTeacherIds(Long[] teacherIds);
}
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.SchoolStudentInfo;
/**
* 【请填写功能名称】Service接口
*
* @author ruoyi
* @date 2025-11-10
*/
public interface ISchoolStudentInfoService
{
/**
* 查询【请填写功能名称】
*
* @param studentId 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
public SchoolStudentInfo selectSchoolStudentInfoByStudentId(Long studentId);
/**
* 查询【请填写功能名称】列表
*
* @param schoolStudentInfo 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
public List<SchoolStudentInfo> selectSchoolStudentInfoList(SchoolStudentInfo schoolStudentInfo);
/**
* 新增【请填写功能名称】
*
* @param schoolStudentInfo 【请填写功能名称】
* @return 结果
*/
public int insertSchoolStudentInfo(SchoolStudentInfo schoolStudentInfo);
/**
* 修改【请填写功能名称】
*
* @param schoolStudentInfo 【请填写功能名称】
* @return 结果
*/
public int updateSchoolStudentInfo(SchoolStudentInfo schoolStudentInfo);
/**
* 批量删除【请填写功能名称】
*
* @param studentIds 需要删除的【请填写功能名称】主键集合
* @return 结果
*/
public int deleteSchoolStudentInfoByStudentIds(Long[] studentIds);
/**
* 删除【请填写功能名称】信息
*
* @param studentId 【请填写功能名称】主键
* @return 结果
*/
public int deleteSchoolStudentInfoByStudentId(Long studentId);
}
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.SchoolTeacherInfo;
/**
* 【请填写功能名称】Service接口
*
* @author ruoyi
* @date 2025-11-10
*/
public interface ISchoolTeacherInfoService
{
/**
* 查询【请填写功能名称】
*
* @param teacherId 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
public SchoolTeacherInfo selectSchoolTeacherInfoByTeacherId(Long teacherId);
/**
* 查询【请填写功能名称】列表
*
* @param schoolTeacherInfo 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
public List<SchoolTeacherInfo> selectSchoolTeacherInfoList(SchoolTeacherInfo schoolTeacherInfo);
/**
* 新增【请填写功能名称】
*
* @param schoolTeacherInfo 【请填写功能名称】
* @return 结果
*/
public int insertSchoolTeacherInfo(SchoolTeacherInfo schoolTeacherInfo);
/**
* 修改【请填写功能名称】
*
* @param schoolTeacherInfo 【请填写功能名称】
* @return 结果
*/
public int updateSchoolTeacherInfo(SchoolTeacherInfo schoolTeacherInfo);
/**
* 批量删除【请填写功能名称】
*
* @param teacherIds 需要删除的【请填写功能名称】主键集合
* @return 结果
*/
public int deleteSchoolTeacherInfoByTeacherIds(Long[] teacherIds);
/**
* 删除【请填写功能名称】信息
*
* @param teacherId 【请填写功能名称】主键
* @return 结果
*/
public int deleteSchoolTeacherInfoByTeacherId(Long teacherId);
}
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SchoolStudentInfoMapper;
import com.ruoyi.system.domain.SchoolStudentInfo;
import com.ruoyi.system.service.ISchoolStudentInfoService;
/**
* 【请填写功能名称】Service业务层处理
*
* @author ruoyi
* @date 2025-11-10
*/
@Service
@DataSource(DataSourceType.SLAVE)
public class SchoolStudentInfoServiceImpl implements ISchoolStudentInfoService
{
@Autowired
private SchoolStudentInfoMapper schoolStudentInfoMapper;
/**
* 查询【请填写功能名称】
*
* @param studentId 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
@Override
public SchoolStudentInfo selectSchoolStudentInfoByStudentId(Long studentId)
{
return schoolStudentInfoMapper.selectSchoolStudentInfoByStudentId(studentId);
}
/**
* 查询【请填写功能名称】列表
*
* @param schoolStudentInfo 【请填写功能名称】
* @return 【请填写功能名称】
*/
@Override
public List<SchoolStudentInfo> selectSchoolStudentInfoList(SchoolStudentInfo schoolStudentInfo)
{
return schoolStudentInfoMapper.selectSchoolStudentInfoList(schoolStudentInfo);
}
/**
* 新增【请填写功能名称】
*
* @param schoolStudentInfo 【请填写功能名称】
* @return 结果
*/
@Override
public int insertSchoolStudentInfo(SchoolStudentInfo schoolStudentInfo)
{
schoolStudentInfo.setCreateTime(DateUtils.getNowDate());
return schoolStudentInfoMapper.insertSchoolStudentInfo(schoolStudentInfo);
}
/**
* 修改【请填写功能名称】
*
* @param schoolStudentInfo 【请填写功能名称】
* @return 结果
*/
@Override
public int updateSchoolStudentInfo(SchoolStudentInfo schoolStudentInfo)
{
schoolStudentInfo.setUpdateTime(DateUtils.getNowDate());
return schoolStudentInfoMapper.updateSchoolStudentInfo(schoolStudentInfo);
}
/**
* 批量删除【请填写功能名称】
*
* @param studentIds 需要删除的【请填写功能名称】主键
* @return 结果
*/
@Override
public int deleteSchoolStudentInfoByStudentIds(Long[] studentIds)
{
return schoolStudentInfoMapper.deleteSchoolStudentInfoByStudentIds(studentIds);
}
/**
* 删除【请填写功能名称】信息
*
* @param studentId 【请填写功能名称】主键
* @return 结果
*/
@Override
public int deleteSchoolStudentInfoByStudentId(Long studentId)
{
return schoolStudentInfoMapper.deleteSchoolStudentInfoByStudentId(studentId);
}
}
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SchoolTeacherInfoMapper;
import com.ruoyi.system.domain.SchoolTeacherInfo;
import com.ruoyi.system.service.ISchoolTeacherInfoService;
/**
* 【请填写功能名称】Service业务层处理
*
* @author ruoyi
* @date 2025-11-10
*/
@Service
@DataSource(DataSourceType.SLAVE)
public class SchoolTeacherInfoServiceImpl implements ISchoolTeacherInfoService
{
@Autowired
private SchoolTeacherInfoMapper schoolTeacherInfoMapper;
/**
* 查询【请填写功能名称】
*
* @param teacherId 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
@Override
public SchoolTeacherInfo selectSchoolTeacherInfoByTeacherId(Long teacherId)
{
return schoolTeacherInfoMapper.selectSchoolTeacherInfoByTeacherId(teacherId);
}
/**
* 查询【请填写功能名称】列表
*
* @param schoolTeacherInfo 【请填写功能名称】
* @return 【请填写功能名称】
*/
@Override
public List<SchoolTeacherInfo> selectSchoolTeacherInfoList(SchoolTeacherInfo schoolTeacherInfo)
{
return schoolTeacherInfoMapper.selectSchoolTeacherInfoList(schoolTeacherInfo);
}
/**
* 新增【请填写功能名称】
*
* @param schoolTeacherInfo 【请填写功能名称】
* @return 结果
*/
@Override
public int insertSchoolTeacherInfo(SchoolTeacherInfo schoolTeacherInfo)
{
schoolTeacherInfo.setCreateTime(DateUtils.getNowDate());
return schoolTeacherInfoMapper.insertSchoolTeacherInfo(schoolTeacherInfo);
}
/**
* 修改【请填写功能名称】
*
* @param schoolTeacherInfo 【请填写功能名称】
* @return 结果
*/
@Override
public int updateSchoolTeacherInfo(SchoolTeacherInfo schoolTeacherInfo)
{
schoolTeacherInfo.setUpdateTime(DateUtils.getNowDate());
return schoolTeacherInfoMapper.updateSchoolTeacherInfo(schoolTeacherInfo);
}
/**
* 批量删除【请填写功能名称】
*
* @param teacherIds 需要删除的【请填写功能名称】主键
* @return 结果
*/
@Override
public int deleteSchoolTeacherInfoByTeacherIds(Long[] teacherIds)
{
return schoolTeacherInfoMapper.deleteSchoolTeacherInfoByTeacherIds(teacherIds);
}
/**
* 删除【请填写功能名称】信息
*
* @param teacherId 【请填写功能名称】主键
* @return 结果
*/
@Override
public int deleteSchoolTeacherInfoByTeacherId(Long teacherId)
{
return schoolTeacherInfoMapper.deleteSchoolTeacherInfoByTeacherId(teacherId);
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SchoolStudentInfoMapper">
<resultMap type="SchoolStudentInfo" id="SchoolStudentInfoResult">
<result property="studentId" column="student_id" />
<result property="typeCode" column="type_code" />
<result property="deptId" column="dept_id" />
<result property="studentNumber" column="student_number" />
<result property="prevStudentNumber" column="prev_student_number" />
<result property="tempNumber" column="temp_number" />
<result property="name" column="name" />
<result property="className" column="class_name" />
<result property="grade" column="grade" />
<result property="speciality" column="speciality" />
<result property="enrollDate" column="enroll_date" />
<result property="finishschoolDate" column="finishschool_date" />
<result property="whetherAtSchool" column="whether_at_school" />
<result property="whetherBeRegistered" column="whether_be_registered" />
<result property="permanentStaff" column="permanent_staff" />
<result property="accountAllocation" column="account_allocation" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectSchoolStudentInfoVo">
select student_id, type_code, dept_id, student_number, prev_student_number, temp_number, name, class_name, grade, speciality, enroll_date, finishschool_date, whether_at_school, whether_be_registered, permanent_staff, account_allocation, del_flag, create_by, create_time, update_by, update_time, remark from school_student_info
</sql>
<select id="selectSchoolStudentInfoList" parameterType="SchoolStudentInfo" resultMap="SchoolStudentInfoResult">
<include refid="selectSchoolStudentInfoVo"/>
<where>
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
<if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
<if test="studentNumber != null and studentNumber != ''"> and student_number like concat ('%',#{studentNumber},'%')</if>
<if test="prevStudentNumber != null and prevStudentNumber != ''"> and prev_student_number = #{prevStudentNumber}</if>
<if test="tempNumber != null and tempNumber != ''"> and temp_number = #{tempNumber}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="speciality != null and speciality != ''"> and speciality = #{speciality}</if>
<if test="enrollDate != null "> and enroll_date = #{enrollDate}</if>
<if test="finishschoolDate != null "> and finishschool_date = #{finishschoolDate}</if>
<if test="whetherAtSchool != null and whetherAtSchool != ''"> and whether_at_school = #{whetherAtSchool}</if>
<if test="whetherBeRegistered != null and whetherBeRegistered != ''"> and whether_be_registered = #{whetherBeRegistered}</if>
<if test="permanentStaff != null and permanentStaff != ''"> and permanent_staff = #{permanentStaff}</if>
<if test="accountAllocation != null and accountAllocation != ''"> and account_allocation = #{accountAllocation}</if>
</where>
</select>
<select id="selectSchoolStudentInfoByStudentId" parameterType="Long" resultMap="SchoolStudentInfoResult">
<include refid="selectSchoolStudentInfoVo"/>
where student_id = #{studentId}
</select>
<insert id="insertSchoolStudentInfo" parameterType="SchoolStudentInfo" useGeneratedKeys="true" keyProperty="studentId">
insert into school_student_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="typeCode != null">type_code,</if>
<if test="deptId != null">dept_id,</if>
<if test="studentNumber != null and studentNumber != ''">student_number,</if>
<if test="prevStudentNumber != null">prev_student_number,</if>
<if test="tempNumber != null">temp_number,</if>
<if test="name != null">name,</if>
<if test="className != null">class_name,</if>
<if test="grade != null">grade,</if>
<if test="speciality != null">speciality,</if>
<if test="enrollDate != null">enroll_date,</if>
<if test="finishschoolDate != null">finishschool_date,</if>
<if test="whetherAtSchool != null">whether_at_school,</if>
<if test="whetherBeRegistered != null">whether_be_registered,</if>
<if test="permanentStaff != null">permanent_staff,</if>
<if test="accountAllocation != null">account_allocation,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeCode != null">#{typeCode},</if>
<if test="deptId != null">#{deptId},</if>
<if test="studentNumber != null and studentNumber != ''">#{studentNumber},</if>
<if test="prevStudentNumber != null">#{prevStudentNumber},</if>
<if test="tempNumber != null">#{tempNumber},</if>
<if test="name != null">#{name},</if>
<if test="className != null">#{className},</if>
<if test="grade != null">#{grade},</if>
<if test="speciality != null">#{speciality},</if>
<if test="enrollDate != null">#{enrollDate},</if>
<if test="finishschoolDate != null">#{finishschoolDate},</if>
<if test="whetherAtSchool != null">#{whetherAtSchool},</if>
<if test="whetherBeRegistered != null">#{whetherBeRegistered},</if>
<if test="permanentStaff != null">#{permanentStaff},</if>
<if test="accountAllocation != null">#{accountAllocation},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSchoolStudentInfo" parameterType="SchoolStudentInfo">
update school_student_info
<trim prefix="SET" suffixOverrides=",">
<if test="typeCode != null">type_code = #{typeCode},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="studentNumber != null and studentNumber != ''">student_number = #{studentNumber},</if>
<if test="prevStudentNumber != null">prev_student_number = #{prevStudentNumber},</if>
<if test="tempNumber != null">temp_number = #{tempNumber},</if>
<if test="name != null">name = #{name},</if>
<if test="className != null">class_name = #{className},</if>
<if test="grade != null">grade = #{grade},</if>
<if test="speciality != null">speciality = #{speciality},</if>
<if test="enrollDate != null">enroll_date = #{enrollDate},</if>
<if test="finishschoolDate != null">finishschool_date = #{finishschoolDate},</if>
<if test="whetherAtSchool != null">whether_at_school = #{whetherAtSchool},</if>
<if test="whetherBeRegistered != null">whether_be_registered = #{whetherBeRegistered},</if>
<if test="permanentStaff != null">permanent_staff = #{permanentStaff},</if>
<if test="accountAllocation != null">account_allocation = #{accountAllocation},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where student_id = #{studentId}
</update>
<delete id="deleteSchoolStudentInfoByStudentId" parameterType="Long">
delete from school_student_info where student_id = #{studentId}
</delete>
<delete id="deleteSchoolStudentInfoByStudentIds" parameterType="String">
delete from school_student_info where student_id in
<foreach item="studentId" collection="array" open="(" separator="," close=")">
#{studentId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SchoolTeacherInfoMapper">
<resultMap type="SchoolTeacherInfo" id="SchoolTeacherInfoResult">
<result property="teacherId" column="teacher_id" />
<result property="workpostType" column="workpost_type" />
<result property="deptId" column="dept_id" />
<result property="employeeNumber" column="employee_number" />
<result property="prevEmployeeNumber" column="prev_employee_number" />
<result property="name" column="name" />
<result property="sex" column="sex" />
<result property="email" column="email" />
<result property="phonenumber" column="phonenumber" />
<result property="enrollDate" column="enroll_date" />
<result property="workStatus" column="work_status" />
<result property="staffing" column="staffing" />
<result property="accountAllocation" column="account_allocation" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectSchoolTeacherInfoVo">
select teacher_id, workpost_type, dept_id, employee_number, prev_employee_number, name, sex, email, phonenumber, enroll_date, work_status, staffing, account_allocation, del_flag, create_by, create_time, update_by, update_time, remark from school_teacher_info
</sql>
<select id="selectSchoolTeacherInfoList" parameterType="SchoolTeacherInfo" resultMap="SchoolTeacherInfoResult">
<include refid="selectSchoolTeacherInfoVo"/>
<where>
<if test="workpostType != null and workpostType != ''"> and workpost_type = #{workpostType}</if>
<if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
<if test="employeeNumber != null and employeeNumber != ''"> and employee_number like concat ('%',#{employeeNumber},'%') </if>
<if test="prevEmployeeNumber != null and prevEmployeeNumber != ''"> and prev_employee_number = #{prevEmployeeNumber}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
<if test="enrollDate != null "> and enroll_date = #{enrollDate}</if>
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
<if test="staffing != null and staffing != ''"> and staffing = #{staffing}</if>
<if test="accountAllocation != null and accountAllocation != ''"> and account_allocation = #{accountAllocation}</if>
</where>
</select>
<select id="selectSchoolTeacherInfoByTeacherId" parameterType="Long" resultMap="SchoolTeacherInfoResult">
<include refid="selectSchoolTeacherInfoVo"/>
where teacher_id = #{teacherId}
</select>
<insert id="insertSchoolTeacherInfo" parameterType="SchoolTeacherInfo" useGeneratedKeys="true" keyProperty="teacherId">
insert into school_teacher_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workpostType != null">workpost_type,</if>
<if test="deptId != null">dept_id,</if>
<if test="employeeNumber != null and employeeNumber != ''">employee_number,</if>
<if test="prevEmployeeNumber != null">prev_employee_number,</if>
<if test="name != null">name,</if>
<if test="sex != null">sex,</if>
<if test="email != null">email,</if>
<if test="phonenumber != null">phonenumber,</if>
<if test="enrollDate != null">enroll_date,</if>
<if test="workStatus != null">work_status,</if>
<if test="staffing != null">staffing,</if>
<if test="accountAllocation != null">account_allocation,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="workpostType != null">#{workpostType},</if>
<if test="deptId != null">#{deptId},</if>
<if test="employeeNumber != null and employeeNumber != ''">#{employeeNumber},</if>
<if test="prevEmployeeNumber != null">#{prevEmployeeNumber},</if>
<if test="name != null">#{name},</if>
<if test="sex != null">#{sex},</if>
<if test="email != null">#{email},</if>
<if test="phonenumber != null">#{phonenumber},</if>
<if test="enrollDate != null">#{enrollDate},</if>
<if test="workStatus != null">#{workStatus},</if>
<if test="staffing != null">#{staffing},</if>
<if test="accountAllocation != null">#{accountAllocation},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSchoolTeacherInfo" parameterType="SchoolTeacherInfo">
update school_teacher_info
<trim prefix="SET" suffixOverrides=",">
<if test="workpostType != null">workpost_type = #{workpostType},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="employeeNumber != null and employeeNumber != ''">employee_number = #{employeeNumber},</if>
<if test="prevEmployeeNumber != null">prev_employee_number = #{prevEmployeeNumber},</if>
<if test="name != null">name = #{name},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="email != null">email = #{email},</if>
<if test="phonenumber != null">phonenumber = #{phonenumber},</if>
<if test="enrollDate != null">enroll_date = #{enrollDate},</if>
<if test="workStatus != null">work_status = #{workStatus},</if>
<if test="staffing != null">staffing = #{staffing},</if>
<if test="accountAllocation != null">account_allocation = #{accountAllocation},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where teacher_id = #{teacherId}
</update>
<delete id="deleteSchoolTeacherInfoByTeacherId" parameterType="Long">
delete from school_teacher_info where teacher_id = #{teacherId}
</delete>
<delete id="deleteSchoolTeacherInfoByTeacherIds" parameterType="String">
delete from school_teacher_info where teacher_id in
<foreach item="teacherId" collection="array" open="(" separator="," close=")">
#{teacherId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment