Commit 5b865f75 authored by 黄毅's avatar 黄毅

1

parent fa19dff2
...@@ -57,7 +57,7 @@ public class BrandController { ...@@ -57,7 +57,7 @@ public class BrandController {
Page page = new Page(); Page page = new Page();
page.setIndex(Long.valueOf(index)); page.setIndex(Long.valueOf(index));
page.setLimit(Long.valueOf(limit)); page.setLimit(Long.valueOf(limit));
page.setLimitKey("Idx asc"); page.setLimitKey("BannerID asc");
List<Map<String, Object>> detailList = brandService.listBanner(param, page); List<Map<String, Object>> detailList = brandService.listBanner(param, page);
return Rjx.jsonOk().set("list", detailList).setPage(page).toString(); return Rjx.jsonOk().set("list", detailList).setPage(page).toString();
......
...@@ -28,7 +28,8 @@ public class BrandServiceImpl implements BrandService { ...@@ -28,7 +28,8 @@ public class BrandServiceImpl implements BrandService {
public List<Map<String,Object>> listBanner(Map<String,Object> params, Page page){ public List<Map<String,Object>> listBanner(Map<String,Object> params, Page page){
String orgNO = params.get("orgNO")+""; String orgNO = params.get("orgNO")+"";
String sql = "select nItem BannerID, nIdx Idx, sTitle Title, sLinkType LinkType, sLinkPath LinkUrl, sImagePath ImgPath from tBanner where sOrgList like '%" + orgNO + "%'"; String sql = "select nItem BannerID, nIdx Idx, sTitle Title, sLinkType LinkType, sLinkPath LinkUrl, sImagePath ImgPath from tBanner where sOrgList like '%" + orgNO + "%'";
return jdbcTemplate.limit(sql, page); return jdbcTemplate.queryForList(sql);
//return jdbcTemplate.limit(sql, page);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment