
package com.wzy.text;import com.baomidou.mybatisplus.plugins.Page;import com.wzy.mapper.EmployeeMapper;import com.wzy.pojo.Employee;import org.junit.Test;import org.springframework.context.ApplicationContext;import org.springframework.context.support.ClassPathXmlApplicationContext;import java.sql.SQLException;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;public class TestS { ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml"); EmployeeMapper employeeMapper = applicationContext.getBean("employeeMapper",EmployeeMapper.class); @Test public void test12() throws SQLException { //根据Map集合删除数据 Map<String,Object> map = new HashMap<>(); map.put("id",20); map.put("gender",2); Integer result = employeeMapper.deleteByMap(map); System.out.println(result); }}