添加绑定商品排序

This commit is contained in:
wuchunlei
2024-12-04 09:56:54 +08:00
parent f0e331eaf1
commit d91aa4c7ce
2 changed files with 2 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ public class MedicalLabelAndMarketController {
if (params.containsKey("medicineMarketId")&&!"".equals(params.get("medicineMarketId").toString())){
wrapper.eq(ShopProductToMedicineMarket::getMedicineMarketId,params.get("medicineMarketId").toString());
}
wrapper.orderByAsc(ShopProductToMedicineMarket::getSort);
Page<ShopProduct> page = productService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
return R.ok().put("result", page);

View File

@@ -203,6 +203,7 @@ public class VisitorController {
if (params.containsKey("medicineMarketId")&&!"".equals(params.get("medicineMarketId").toString())){
wrapper.eq(ShopProductToMedicineMarket::getMedicineMarketId,params.get("medicineMarketId").toString());
}
wrapper.orderByAsc(ShopProductToMedicineMarket::getSort);
Page<ShopProduct> page = productService.page(new Page<>(
Long.parseLong(params.get("current").toString()), Long.parseLong(params.get("limit").toString())),wrapper);
return R.ok().put("result", page);