用户登录
用户注册

分享至

hibernate 分页 重复数据

  • 作者: ZLW55243015
  • 来源: 51数据库
  • 2020-10-14

参考如下:


/**

* 功能:根据品牌查询

* @param pageSize

* 每页大小

* @param currentLPagem

* 当前第几页

* @param productBlack

* 产品品牌

* @param productBlackItem

* 产品分类

* @param productSize

* 产品尺码

* @param keyWord

* 搜索关键字

* @return

*/

public pageBean seachProductByBrank(int pageSize, int currentLPage,

String product_Brank, String product_itemName) {

// final String hql = "from " + OgrilProducts.class.getName()

// + " where product_Brank='" + product_Brank

// + "' and product_itemName='" + product_itemName

// + "' order by product_registerDate desc";

final String hql = " from "

+ OgrilProducts.class.getName()

+ " as product where product.productItemName='"

+ product_itemName

+ "' and productBrank='"

+ product_Brank

+ "' and not exists( from "

+ OgrilProducts.class.getName()

+ " where productItemName='"

+ product_itemName

+ "' and productBrank='"

+ product_Brank

+ "' and productItemNumber=product.productItemNumber and productId


软件
前端设计
程序设计
Java相关