本项目采用的是 Spring+Mybatis 的架构。

1. 在项目中引入如下jar.

  mybatis.jar     mapper-4.1.2.jar

2. 在写 Dao 类时需要添加 如下注解。

import com.i7colors.bean.customer.CustomerBill;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 客户账户信息DAO
 * @author 
 *
 */
@Mapper
@Component
public interface CustomerBillDao extends tk.mybatis.mapper.common.Mapper<CustomerBill>, tk.mybatis.mapper.common.MySqlMapper<CustomerBill> {

    List<CustomerBill> queryList(@Param("customerBill") CustomerBill customerBill, @Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize);

    int count(CustomerBill customerBill);
}

  

3. 编写xml 后注意在 mybatis 的配置文件中引入此xml。

 

相关文章:

  • 2021-10-04
  • 2021-04-27
  • 2021-05-01
  • 2022-12-23
  • 2021-11-30
  • 2021-12-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-04
  • 2021-04-08
  • 2021-07-14
  • 2021-04-12
  • 2022-12-23
  • 2021-08-04
相关资源
相似解决方案