Commit 04359fec authored by Quxl's avatar Quxl

x

parent ce43e26b
...@@ -102,4 +102,58 @@ public class PromoController { ...@@ -102,4 +102,58 @@ public class PromoController {
return Rjx.jsonOk().set("data", promoMap).set("list", list).set("DLPicList", DLPicList).set("BNPicList", BNPicList).toJson(); return Rjx.jsonOk().set("data", promoMap).set("list", list).set("DLPicList", DLPicList).set("BNPicList", BNPicList).toJson();
} }
@ApiOperation("获取秒杀促销列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "shopNo", dataType = "String", required = true, defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true, defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = true, 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 = "")
})
@GetMapping("getFlashSaleList")
public Object getFlashSaleList(String orgNo, String shopNo, Long index, Long limit) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit);
List<Map<String, Object>> list = service.getFlashSaleList(orgNo, shopNo, page);
return Rjx.jsonOk().set("list", list).set("page",page).toJson();
}
@ApiOperation("获取限时购促销列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "shopNo", dataType = "String", required = true, defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true, defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = true, 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 = "")
})
@GetMapping("getTimeLimitList")
public Object getTimeLimitList(String orgNo, String shopNo, Long index, Long limit) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit);
List<Map<String, Object>> list = null;
return Rjx.jsonOk().set("list", list).set("page",page).toJson();
}
@ApiOperation("获取砍价促销列表")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "shopNo", dataType = "String", required = true, defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true, defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = true, 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 = "")
})
@GetMapping("getBargainList")
public Object getBargainList(String orgNo, String shopNo, Long index, Long limit) {
index = index == null ? 1 : index;
limit = limit == null ? 20 : limit;
Page page = new Page(index, limit);
List<Map<String, Object>> list = null;
return Rjx.jsonOk().set("list", list).set("page",page).toJson();
}
} }
...@@ -14,5 +14,7 @@ public interface PromoService { ...@@ -14,5 +14,7 @@ public interface PromoService {
List<Map<String, Object>> getGroupPicList(String sPictureTypeID, String sPromoPaperNO, String sPromoGroupNO); List<Map<String, Object>> getGroupPicList(String sPictureTypeID, String sPromoPaperNO, String sPromoGroupNO);
Map<String, Object> getPromoDetail(String promoPaperNO); Map<String, Object> getPromoDetail(String promoPaperNO);
List<Map<String, Object>> getFlashSaleList(String orgNo, String shopNo, Page page);
} }
...@@ -332,7 +332,7 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -332,7 +332,7 @@ public class GoodsServiceImpl implements GoodsService {
List<Map<String, Object>> datas = jdbcTemplate.queryForList(sql); List<Map<String, Object>> datas = jdbcTemplate.queryForList(sql);
Map<String, Map<String, Object>> mm = Util.listToMM(datas, ":", "sAgentContractNO", "nGoodsID"); Map<String, Map<String, Object>> mm = Util.listToMM(datas, ":", "sAgentContractNO", "nGoodsID");
String sql1 = "select t.sAgentContractNO, t.nGoodsID, p.sPromoPaperNO, p.sPromoActionTypeID, t.sGroupNO sPromoGroupNO from tYWPromoDtl t, tYWPromoMain p where p.sPromoActionTypeID != '3' and t.sPromoPaperNO = p.sPromoPaperNO and p.nTag&3 = 2 and p.sOrgNO = '" + orgNo + "' " + StringUtil.join(" OR ", " and (", ")", " and (1 = 0) ", args) + " group by t.sAgentContractNO, t.nGoodsID, p.sPromoPaperNO, p.sPromoActionTypeID, t.sGroupNO"; String sql1 = "select t.sAgentContractNO, t.nGoodsID, p.sPromoTheme, p.sPromoName, p.sPromoPaperNO, p.sPromoActionTypeID, t.sGroupNO sPromoGroupNO from tYWPromoDtl t, tYWPromoMain p where p.sPromoActionTypeID != '3' and t.sPromoPaperNO = p.sPromoPaperNO and p.nTag&3 = 2 and p.sOrgNO = '" + orgNo + "' " + StringUtil.join(" OR ", " and (", ")", " and (1 = 0) ", args) + " group by t.sAgentContractNO, t.nGoodsID, p.sPromoPaperNO, p.sPromoActionTypeID, t.sGroupNO";
List<Map<String, Object>> plist = jdbcTemplate.queryForList(sql1); List<Map<String, Object>> plist = jdbcTemplate.queryForList(sql1);
Map<String, List<Map<String, Object>>> pmm = Util.listToML(plist, ":", "sAgentContractNO", "nGoodsID"); Map<String, List<Map<String, Object>>> pmm = Util.listToML(plist, ":", "sAgentContractNO", "nGoodsID");
for(String key : mm.keySet()) { for(String key : mm.keySet()) {
......
...@@ -113,4 +113,10 @@ public class PromoServiceImpl implements PromoService { ...@@ -113,4 +113,10 @@ public class PromoServiceImpl implements PromoService {
return jdbcTemplate.queryForMap("select * from tPromo where sPromoPaperNO = ? and nTag&3 = 2", promoPaperNO); return jdbcTemplate.queryForMap("select * from tPromo where sPromoPaperNO = ? and nTag&3 = 2", promoPaperNO);
} }
@Override
public List<Map<String, Object>> getFlashSaleList(String orgNo, String shopNo, Page page) {
return null;
}
} }
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