luoyb
2021-04-23 860514b61a0edc0bc38b1b2e8d6f59c5a5aeba26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package cc.mrbird.febs.server.system.mapper;
 
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);
}