Commit e3c6eec2 authored by zhangyong's avatar zhangyong

1

parent 86ee7456
......@@ -31,11 +31,24 @@ public class CommonController {
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
})
@RequestMapping(value = "/queryDistrictByOrgNO",method=RequestMethod.GET)
public String detail(HttpServletRequest request) {
public String queryDistrictByOrgNO(HttpServletRequest request) {
String orgNO = request.getParameter("orgNO");
String langID = request.getParameter("langID");
return commonService.queryDistrictByOrgNO(orgNO, langID);
}
@ApiOperation("获取已开通的城市")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = false, value = "终端标识", defaultValue = "wechat"),
@ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
})
@RequestMapping(value = "/getOpenCity",method=RequestMethod.GET)
public String getOpenCity(HttpServletRequest request) {
String orgNO = request.getParameter("orgNO");
String langID = request.getParameter("langID");
return commonService.queryDistrictByOrgNO(orgNO, langID);
}
}
......@@ -151,11 +151,12 @@ public class GoodsController {
public String hotSearchKey(HttpServletRequest request, HttpServletResponse response) {
List<Map<String,Object>> listMap;
Map<String,Object> params=new HashMap<>();
params.put("OrgNO", request.getParameter("OrgNO"));
params.put("ShopNO", request.getParameter("ShopNO")==null?"":request.getParameter("ShopNO"));
params.put("orgNO", request.getParameter("orgNO"));
params.put("shopNO", request.getParameter("shopNO")==null?"":request.getParameter("shopNO"));
Page page=new Page();
page.setIndex(Long.valueOf(request.getParameter("index")==null?"1":request.getParameter("index")));
page.setLimit(Long.valueOf(request.getParameter("limit")==null?"10":request.getParameter("limit")));
page.setLimitKey(" searchCount desc ");
listMap=goodsService.hotSearchKey(params,page);
return Rjx.jsonOk().set("list", listMap).set("page",page).toJson();
}
......
......@@ -18,4 +18,6 @@ public interface CommonService {
public List<TCommon> getTCommon(String commonNO,String comID);
public String queryDistrictByOrgNO(String orgNO,String langID) ;
public String getOpenCity() ;
}
......@@ -130,4 +130,12 @@ public class CommonServiceImpl implements CommonService{
}
return Rjx.jsonErr().setCode(-100).setMessage(I18NUtils.getMessage(langID, "Msg_Province_getfailure")).toJson();
}
@Override
public String getOpenCity() {
String psql="select provinceID=sRegionNO,province=sRegionDesc from tRegion where sRegionNO IN (SELECT DISTINCT sUpRegionNO from tRegion where sRegionNO IN (select DISTINCT sRegionNO from tOrg where nTag&1=0) and nTag&1=0 ) and nTag&1=0 ";
String csql="select cityID=sRegionNO,city=sRegionDesc from tRegion r where sRegionNO IN (SELECT DISTINCT sRegionNO from tOrg where nTag&1=0) and r.nTag&1=0 ";
return null;
}
}
......@@ -140,7 +140,7 @@ public class GoodsServiceImpl implements GoodsService {
*/
@Override
public List<Map<String, Object>> hotSearchKey(Map<String, Object> map, Page page) {
String OrgNO=(String) map.get("OrgNO");
String orgNO=(String) map.get("orgNO");
String sql="SELECT "
+ " searchCount = COUNT (sKeyword), "
......@@ -149,7 +149,7 @@ public class GoodsServiceImpl implements GoodsService {
+ " tShopSearchLog slog LEFT JOIN tShop s on(s.sShopNO=slog.sShopNO) "
+ "WHERE "
+ " s.sShopNO=slog.sShopNO "
+ " AND s.sOrgNO='"+OrgNO+"' "
+ " AND s.sOrgNO='"+orgNO+"' "
+ " GROUP BY "
+ " s.sOrgNO, "
+ " sKeyword ";
......
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