luoyb
2021-03-11 6edba268da4799fa3ebea904dfb21e6bef88ee6d
febs-server/febs-server-system/src/main/java/cc/mrbird/febs/server/system/mapper/DeptMapper.java
@@ -2,10 +2,17 @@
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);
}