autumnal_wind@yeah.net
2024-04-18 89ba4125856330a78425bc921530bde9dc6d8606
febs-server/febs-server-system/src/main/java/cc/mrbird/febs/server/system/mapper/DeptMapper.java
@@ -2,10 +2,31 @@
import cc.mrbird.febs.common.core.entity.system.Dept;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
/**
 * @author MrBird
 */
public interface DeptMapper extends BaseMapper<Dept> {
    @Update("<script>" +
            " update t_dept\n" +
            " set allDeptName = replace(allDeptName, #{fromName}, #{toName})" +
            " where allDeptName like #{queryParam}" +
            "</script>")
    public void changeAllDeptName(@Param("fromName") String fromName, @Param("toName") String toName,@Param("queryParam") String queryParam);
    @Update("<script>" +
            " update t_emp_baseinfo\n" +
            " set allDeptName = replace(allDeptName, #{fromName}, #{toName})" +
            " where allDeptName like #{queryParam}" +
            "</script>")
    public void updateEmpAllDeptName(@Param("fromName") String fromName, @Param("toName") String toName,@Param("queryParam") String queryParam);
    @Update("<script>" +
            " update t_emp_baseinfo \n" +
            " set deptName = #{newDeptName} \n" +
            " where deptId = #{queryParam} \n" +
            "</script>")
    public void updateEmpDeptName(@Param("newDeptName") String newDeptName,@Param("queryParam") String queryParam);
}