Commit 567d7904 authored by 张永's avatar 张永

1

parent 87647a66
......@@ -36,22 +36,22 @@ public class PageController {
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "orgNO", dataType = "String", required = true, value = "组织机构", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "typeID", dataType = "String", required = true, value = "类型", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "adTypeID", dataType = "String", required = true, value = "类型", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "index", dataType = "int", required = true, value = "页码", defaultValue = "1"),
@ApiImplicitParam(paramType = "query", name = "limit", dataType = "int", required = true, value = "每页显示数", defaultValue = "10"),
})
@RequestMapping(value = "/queryBanner",method=RequestMethod.GET)
public String queryBanner(HttpServletRequest request) {
String orgNO = request.getParameter("orgNO");
String typeID = request.getParameter("typeID");
String adTypeID = request.getParameter("adTypeID");
String index = request.getParameter("index");
String limit = request.getParameter("limit");
if(!StringUtil.isNotEmpty(orgNO,typeID,index,limit)) {
return Rjx.json().setCode(-1).setMessage(I18NUtils.getMessage(orgNO,typeID, "Msg_Parameter_empty")).toJson();
if(!StringUtil.isNotEmpty(orgNO,adTypeID,index,limit)) {
return Rjx.json().setCode(-1).setMessage(I18NUtils.getMessage(orgNO,adTypeID, "Msg_Parameter_empty")).toJson();
}
Map<String,Object> params = new HashMap<String,Object>();
params.put("orgNO", orgNO);
params.put("typeID", typeID);
params.put("adTypeID", adTypeID);
Page page = new Page();
page.setIndex(Long.valueOf(index));
......
......@@ -63,7 +63,7 @@ public class PageServiceImpl implements PageService {
*/
public List<Map<String, Object>> queryBanner(Map<String, Object> params, Page page) {
String orgNO = params.get("orgNO")+"";
String typeID = params.get("typeID")+"";
String adTypeID = params.get("adTypeID")+"";
jdbcTemplate.setDialect(new SqlServerDialect());
String sql = "SELECT BannerAdNO = b.sBannerAdNO, BannerAdTitle = b.sBannerAdTitle,OrgNO = b.sOrgNO,AdPostionTypeID = b.sAdPositionTypeID,AdPostionType = b.sAdPositionType,"
......@@ -72,7 +72,7 @@ public class PageServiceImpl implements PageService {
+ " from tBannerAd b "
+ " WHERE sOrgNO = ? AND sAdPositionTypeID =? AND b.dStartTime <=getdate() AND b.dEndTime >= getdate() AND b.nTag&2 = 2 ";
return jdbcTemplate.limit(sql, page, orgNO,typeID);
return jdbcTemplate.limit(sql, page, orgNO,adTypeID);
}
/**
......
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