Commit 25c37be3 authored by Quxl's avatar Quxl

x

parent 6cd6b30f
...@@ -30,6 +30,7 @@ public class CartController { ...@@ -30,6 +30,7 @@ public class CartController {
@ApiOperation("购物车信息") @ApiOperation("购物车信息")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true),
@ApiImplicitParam(paramType = "query", name="shopNO", dataType = "String", required = true, value = "店铺编号", defaultValue = ""), @ApiImplicitParam(paramType = "query", name="shopNO", dataType = "String", required = true, value = "店铺编号", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = false, value = "终端标识", defaultValue = "wechat"), @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 = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"),
...@@ -38,8 +39,9 @@ public class CartController { ...@@ -38,8 +39,9 @@ public class CartController {
}) })
@RequestMapping(value = "/cartQuery",method=RequestMethod.GET) @RequestMapping(value = "/cartQuery",method=RequestMethod.GET)
public String cartQuery(HttpServletRequest request, HttpServletResponse response) { public String cartQuery(String orgNo, HttpServletRequest request, HttpServletResponse response) {
Map<String,Object> params = new HashMap<String,Object>(); Map<String,Object> params = new HashMap<String,Object>();
params.put("orgNo", orgNo);
params.put("shopNO",request.getParameter("shopNO")); params.put("shopNO",request.getParameter("shopNO"));
params.put("terminal",request.getParameter("terminal")); params.put("terminal",request.getParameter("terminal"));
params.put("langID",request.getParameter("langID")); params.put("langID",request.getParameter("langID"));
...@@ -71,15 +73,17 @@ public class CartController { ...@@ -71,15 +73,17 @@ public class CartController {
@ApiOperation("删除购物车(JSON格式)") @ApiOperation("删除购物车(JSON格式)")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true),
@ApiImplicitParam(paramType = "query",name = "data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\",\"terminal\": \"wechat\",\"langID\": \"936\",\"idxs\": [1,2,3]}"), @ApiImplicitParam(paramType = "query",name = "data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\",\"terminal\": \"wechat\",\"langID\": \"936\",\"idxs\": [1,2,3]}"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""), @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 = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
}) })
@RequestMapping(value = "/remove",method=RequestMethod.POST) @RequestMapping(value = "/remove",method=RequestMethod.POST)
public String remove(HttpServletRequest request, HttpServletResponse response) { public String remove(String orgNo, HttpServletRequest request, HttpServletResponse response) {
String reqJson = request.getParameter("data"); String reqJson = request.getParameter("data");
JSONObject jsonObj = JSONObject.parseObject(reqJson); JSONObject jsonObj = JSONObject.parseObject(reqJson);
jsonObj.put("orgNo", orgNo);
System.out.println("remove-------"+reqJson); System.out.println("remove-------"+reqJson);
String terminal = request.getParameter("terminal"); String terminal = request.getParameter("terminal");
return cartService.remove(jsonObj,terminal); return cartService.remove(jsonObj,terminal);
...@@ -87,15 +91,17 @@ public class CartController { ...@@ -87,15 +91,17 @@ public class CartController {
@ApiOperation("修改数量(JSON格式)") @ApiOperation("修改数量(JSON格式)")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true),
@ApiImplicitParam(paramType = "query", name = "data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\", \"idx\": 2,\"saleQty\": \"23\" }"), @ApiImplicitParam(paramType = "query", name = "data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\", \"idx\": 2,\"saleQty\": \"23\" }"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""), @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 = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
}) })
@RequestMapping(value = "/updateQty",method=RequestMethod.POST) @RequestMapping(value = "/updateQty",method=RequestMethod.POST)
public String updateQty(HttpServletRequest request, HttpServletResponse response) { public String updateQty(String orgNo, HttpServletRequest request, HttpServletResponse response) {
String reqJson = request.getParameter("data"); String reqJson = request.getParameter("data");
JSONObject jsonObj = JSONObject.parseObject(reqJson); JSONObject jsonObj = JSONObject.parseObject(reqJson);
jsonObj.put("orgNo", orgNo);
System.out.println("updateQty-------"+reqJson); System.out.println("updateQty-------"+reqJson);
String terminal = request.getParameter("terminal"); String terminal = request.getParameter("terminal");
return cartService.updateQty(jsonObj,terminal); return cartService.updateQty(jsonObj,terminal);
......
...@@ -3,8 +3,7 @@ package com.egolm.shop.service; ...@@ -3,8 +3,7 @@ package com.egolm.shop.service;
import java.util.Map; import java.util.Map;
public interface CartRedisService { public interface CartRedisService {
public void reCache(String shopNo, String terminal); public void reCache(String orgNo, String shopNo, String terminal);
public void changeQty(String shopNo, String terminal, Integer nIdx, Double nSaleQty); public void changeQty(String orgNo, String shopNo, String terminal, Integer nIdx, Double nSaleQty);
public Map<String, Object> querySync(String orgNo, String shopNo, String terminal) ;
public Map<String, Object> querySync(String shopNo, String terminal) ;
} }
...@@ -47,11 +47,11 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -47,11 +47,11 @@ public class CartRedisServiceImpl implements CartRedisService {
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
@Async @Async
public void changeQty(String shopNo, String terminal, Integer nIdx, Double nSaleQty) { public void changeQty(String orgNo, String shopNo, String terminal, Integer nIdx, Double nSaleQty) {
if (useCache) { if (useCache) {
String json = (String) redisTemplate.opsForHash().get("CART_" + shopNo, terminal); String json = (String) redisTemplate.opsForHash().get("CART_" + orgNo + "_" + shopNo, terminal);
if (json == null) { if (json == null) {
this.querySync(shopNo, terminal); this.querySync(orgNo, shopNo, terminal);
} else { } else {
Rjx rjx = Rjx.json(GsonUtil.toMap(json)); Rjx rjx = Rjx.json(GsonUtil.toMap(json));
Map<String, Object> shopGoodsObj = (Map) rjx.get("shopGoodsObj"); Map<String, Object> shopGoodsObj = (Map) rjx.get("shopGoodsObj");
...@@ -61,51 +61,51 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -61,51 +61,51 @@ public class CartRedisServiceImpl implements CartRedisService {
if (nIdx_.intValue() == nIdx.intValue()) { if (nIdx_.intValue() == nIdx.intValue()) {
obj.put("saleQty", nSaleQty); obj.put("saleQty", nSaleQty);
this.processPayAmount(rjx); this.processPayAmount(rjx);
this.cacheData(shopNo, terminal, rjx); this.cacheData(orgNo, shopNo, terminal, rjx);
} }
} }
} }
} }
} }
public void clearCache(String shopNo) { public void clearCache(String orgNo, String shopNo) {
redisTemplate.delete("CART_" + shopNo); redisTemplate.delete("CART_" + orgNo + "_" + shopNo);
} }
@Async @Async
public void reCache(String shopNo, String terminal) { public void reCache(String orgNo, String shopNo, String terminal) {
if (useCache) { if (useCache) {
redisTemplate.delete("CART_" + shopNo); redisTemplate.delete("CART_" + orgNo + "_" + shopNo);
this.querySync(shopNo, terminal); this.querySync(orgNo, shopNo, terminal);
logger.info("刷新购物车缓存全量缓存:sShopNO=" + shopNo + ",sTerminalType=" + terminal); logger.info("刷新购物车缓存全量缓存:sShopNO=" + shopNo + ",sTerminalType=" + terminal);
} }
} }
@Async @Async
public void queryAsync(String shopNo, String terminal) { public void queryAsync(String orgNo, String shopNo, String terminal) {
querySync(shopNo, terminal); querySync(orgNo, shopNo, terminal);
} }
public Map<String, Object> querySync(String shopNo, String terminal) { public Map<String, Object> querySync(String orgNo, String shopNo, String terminal) {
Integer queryCount = 0; Integer queryCount = 0;
System.out.println("useCache: " + useCache); System.out.println("useCache: " + useCache);
logger.info("useCache: " + useCache); logger.info("useCache: " + useCache);
while (useCache) { while (useCache) {
queryCount++; queryCount++;
String json = (String) this.redisTemplate.opsForHash().get("CART_" + shopNo, terminal); String json = (String) this.redisTemplate.opsForHash().get("CART_" + orgNo + "_" + shopNo, terminal);
if (json == null) { if (json == null) {
this.cacheTmpData(shopNo, terminal); this.cacheTmpData(orgNo, shopNo, terminal);
break; break;
} else { } else {
Map<String, Object> cache = GsonUtil.toMap(json); Map<String, Object> cache = GsonUtil.toMap(json);
Double nCacheStatus = (Double) cache.get("nCacheStatus"); Double nCacheStatus = (Double) cache.get("nCacheStatus");
if (nCacheStatus == null) { if (nCacheStatus == null) {
this.redisTemplate.expire("CART_" + shopNo, 5, TimeUnit.MINUTES); this.redisTemplate.expire("CART_" + orgNo + "_" + shopNo, 5, TimeUnit.MINUTES);
logger.info("购物车查询缓存命中:sShopNO=" + shopNo + ",sTerminalType=" +terminal); logger.info("购物车查询缓存命中:sShopNO=" + shopNo + ",sTerminalType=" +terminal);
return GsonUtil.toMap(json); return GsonUtil.toMap(json);
} else if (nCacheStatus == 1D) { } else if (nCacheStatus == 1D) {
if (queryCount >= 4) { if (queryCount >= 4) {
this.clearCache(shopNo); this.clearCache(orgNo, shopNo);
break; break;
} else { } else {
try { try {
...@@ -123,7 +123,7 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -123,7 +123,7 @@ public class CartRedisServiceImpl implements CartRedisService {
throw new ReflectException("Query the shopping cart parameter error:" throw new ReflectException("Query the shopping cart parameter error:"
+ Rjx.json().set("terminal", terminal).set("shopNo", shopNo).jsonValue()); + Rjx.json().set("terminal", terminal).set("shopNo", shopNo).jsonValue());
} }
List<Map<String, Object>> datas = this.getGoodsList(shopNo, terminal); List<Map<String, Object>> datas = this.getGoodsList(orgNo, shopNo, terminal);
System.out.println("datas: " + GsonUtil.toJson(datas)); System.out.println("datas: " + GsonUtil.toJson(datas));
Set<String> chooseGroups = new HashSet<String>(); Set<String> chooseGroups = new HashSet<String>();
Set<String> chooseGifts = new HashSet<String>(); Set<String> chooseGifts = new HashSet<String>();
...@@ -178,20 +178,20 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -178,20 +178,20 @@ public class CartRedisServiceImpl implements CartRedisService {
this.processPromoGoods(promos, shopNo); this.processPromoGoods(promos, shopNo);
rjx.set("promoData", Util.listToMM(promos, "promoNo")); rjx.set("promoData", Util.listToMM(promos, "promoNo"));
this.processPayAmount(rjx); this.processPayAmount(rjx);
this.cacheData(shopNo, terminal, rjx); this.cacheData(orgNo, shopNo, terminal, rjx);
return rjx; return rjx;
} }
private void cacheTmpData(String shopNo, String terminal) { private void cacheTmpData(String orgNo, String shopNo, String terminal) {
this.redisTemplate.opsForHash().put("CART_" + shopNo, terminal, this.redisTemplate.opsForHash().put("CART_" + orgNo + "_" + shopNo, terminal,
Rjx.json().set("nCacheStatus", 1).toJson()); Rjx.json().set("nCacheStatus", 1).toJson());
this.redisTemplate.expire("CART_" + shopNo, 5, TimeUnit.SECONDS); this.redisTemplate.expire("CART_" + orgNo + "_" + shopNo, 5, TimeUnit.SECONDS);
} }
private void cacheData(String shopNo, String terminal, Rjx rjx) { private void cacheData(String orgNo, String shopNo, String terminal, Rjx rjx) {
if (useCache) { if (useCache) {
this.redisTemplate.opsForHash().put("CART_" + shopNo, terminal, rjx); this.redisTemplate.opsForHash().put("CART_" + orgNo + "_" + shopNo, terminal, rjx);
this.redisTemplate.expire("CART_" + shopNo, 5, TimeUnit.MINUTES); this.redisTemplate.expire("CART_" + orgNo + "_" + shopNo, 5, TimeUnit.MINUTES);
logger.info("购物车查询数据缓存已完成,缓存有效期5分钟:sShopNO=" + shopNo + ",sTerminalType=" + terminal); logger.info("购物车查询数据缓存已完成,缓存有效期5分钟:sShopNO=" + shopNo + ",sTerminalType=" + terminal);
} }
} }
...@@ -838,7 +838,7 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -838,7 +838,7 @@ public class CartRedisServiceImpl implements CartRedisService {
return wmsList; return wmsList;
} }
private List<Map<String, Object>> getGoodsList(String shopNo, String terminal) { private List<Map<String, Object>> getGoodsList(String orgNo, String shopNo, String terminal) {
String sqlPromoTag = "" + "SELECT " + "c.sPromoPaperNO, " + "p.nTag, " + "p.dPromoBeginDate, " String sqlPromoTag = "" + "SELECT " + "c.sPromoPaperNO, " + "p.nTag, " + "p.dPromoBeginDate, "
+ "p.dPromoEndDate " + "FROM " + "tCart c " + "p.dPromoEndDate " + "FROM " + "tCart c "
+ "LEFT JOIN tYWPromoMain p ON p.sPromoPaperNO = c.sPromoPaperNO " + "WHERE " + "c.sShopNO = '" + shopNo + "LEFT JOIN tYWPromoMain p ON p.sPromoPaperNO = c.sPromoPaperNO " + "WHERE " + "c.sShopNO = '" + shopNo
...@@ -851,7 +851,7 @@ public class CartRedisServiceImpl implements CartRedisService { ...@@ -851,7 +851,7 @@ public class CartRedisServiceImpl implements CartRedisService {
+ "AND sPromoPaperNO IN (" + sqlClearPromoNo + ")" + Util.LINE_SEPARATOR + "UPDATE tCart SET " + "AND sPromoPaperNO IN (" + sqlClearPromoNo + ")" + Util.LINE_SEPARATOR + "UPDATE tCart SET "
+ "sPromoGroupNO = NULL, " + "sPromoPaperNO = NULL " + "WHERE " + "sShopNO = '" + shopNo + "' " + "sPromoGroupNO = NULL, " + "sPromoPaperNO = NULL " + "WHERE " + "sShopNO = '" + shopNo + "' "
+ "AND sPromoPaperNO IN (" + sqlClearPromoNo + ")"; + "AND sPromoPaperNO IN (" + sqlClearPromoNo + ")";
String sqlACart = "select * from V_Cart where sShopNO = '" + shopNo + "' order by nIdx"; String sqlACart = "select * from V_Cart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNo + "' order by nIdx";
String sqlp = "" String sqlp = ""
+ " SELECT " + " SELECT "
......
...@@ -32,7 +32,7 @@ public class CartServiceImpl implements CartService { ...@@ -32,7 +32,7 @@ public class CartServiceImpl implements CartService {
String orgNo = obj.getString("orgNo"); String orgNo = obj.getString("orgNo");
JSONArray cartList = obj.getJSONArray("cartList"); JSONArray cartList = obj.getJSONArray("cartList");
Integer nMaxIdx = jdbcTemplate.queryForInt("select max(nIdx) from tCart where sShopNO = '" + shopNO + "'"); Integer nMaxIdx = jdbcTemplate.queryForInt("select max(nIdx) from tCart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'");
if(nMaxIdx == null) { if(nMaxIdx == null) {
nMaxIdx = 0; nMaxIdx = 0;
} }
...@@ -52,6 +52,7 @@ public class CartServiceImpl implements CartService { ...@@ -52,6 +52,7 @@ public class CartServiceImpl implements CartService {
} else { } else {
List<String> strs = new ArrayList<String>(); List<String> strs = new ArrayList<String>();
strs.add("sOrgNO = '" + orgNo + "'");
strs.add("sShopNO = '" + shopNO + "'"); strs.add("sShopNO = '" + shopNO + "'");
strs.add("nTag = " + nGoodsTypeID); strs.add("nTag = " + nGoodsTypeID);
strs.add("sAgentContractNO = '" + sAgentContractNO + "'"); strs.add("sAgentContractNO = '" + sAgentContractNO + "'");
...@@ -73,13 +74,13 @@ public class CartServiceImpl implements CartService { ...@@ -73,13 +74,13 @@ public class CartServiceImpl implements CartService {
} else { } else {
Integer nIdx = Util.objTo(list.get(0).get("nIdx"), Integer.class); Integer nIdx = Util.objTo(list.get(0).get("nIdx"), Integer.class);
Double nQty = Util.objTo(list.get(0).get("nSaleQty"), Double.class); Double nQty = Util.objTo(list.get(0).get("nSaleQty"), Double.class);
jdbcTemplate.executeUpdate("update tCart set nSaleQty = " + (nSaleQty + nQty) + " where sShopNO = '" + shopNO + "' and nIdx = " + nIdx); jdbcTemplate.executeUpdate("update tCart set nSaleQty = " + (nSaleQty + nQty) + " where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "' and nIdx = " + nIdx);
} }
} }
} }
} }
cartRedisService.reCache(shopNO, terminal); cartRedisService.reCache(orgNo, shopNO, terminal);
return Rjx.jsonOk().set("count", count(shopNO)).toJson(); return Rjx.jsonOk().set("count", count(orgNo, shopNO)).toJson();
} }
/** /**
...@@ -91,8 +92,8 @@ public class CartServiceImpl implements CartService { ...@@ -91,8 +92,8 @@ public class CartServiceImpl implements CartService {
* @return: Integer * @return: Integer
* @throws * @throws
*/ */
public Integer count(String shopNO) { public Integer count(String orgNo, String shopNO) {
return jdbcTemplate.queryForInt("select count(1) from tCart where sShopNO = '" + shopNO + "'"); return jdbcTemplate.queryForInt("select count(1) from tCart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'");
} }
...@@ -108,6 +109,7 @@ public class CartServiceImpl implements CartService { ...@@ -108,6 +109,7 @@ public class CartServiceImpl implements CartService {
*/ */
@Override @Override
public String remove(JSONObject obj,String terminal) { public String remove(JSONObject obj,String terminal) {
String orgNo = obj.getString("orgNo");
String shopNO = obj.getString("shopNO"); String shopNO = obj.getString("shopNO");
JSONArray idxArray = obj.getJSONArray("idxs"); JSONArray idxArray = obj.getJSONArray("idxs");
System.out.println("idxArray----"+idxArray); System.out.println("idxArray----"+idxArray);
...@@ -120,13 +122,13 @@ public class CartServiceImpl implements CartService { ...@@ -120,13 +122,13 @@ public class CartServiceImpl implements CartService {
} }
} }
String sql = "select sPromoPaperNO from tCart where sShopNO = '" + shopNO + "' and nTag = 0" + StringUtil.join(", ", " and nIdx in (", ")", nIdx); String sql = "select sPromoPaperNO from tCart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "' and nTag = 0" + StringUtil.join(", ", " and nIdx in (", ")", nIdx);
sql = "delete from tCart where sShopNO = '" + shopNO + "' and nTag = 1 and sPromoPaperNO in (" + sql + ")"; sql = "delete from tCart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "' and nTag = 1 and sPromoPaperNO in (" + sql + ")";
jdbcTemplate.executeUpdate(sql); jdbcTemplate.executeUpdate(sql);
jdbcTemplate.executeUpdate("delete from tCart where sShopNO = '" + shopNO + "'" + StringUtil.join(", ", " and nIdx in (", ")", nIdx)); jdbcTemplate.executeUpdate("delete from tCart where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'" + StringUtil.join(", ", " and nIdx in (", ")", nIdx));
cartRedisService.reCache(shopNO, terminal); cartRedisService.reCache(orgNo, shopNO, terminal);
return Rjx.jsonOk().set("count", count(shopNO)).toJson(); return Rjx.jsonOk().set("count", count(orgNo, shopNO)).toJson();
} }
/** /**
...@@ -140,6 +142,7 @@ public class CartServiceImpl implements CartService { ...@@ -140,6 +142,7 @@ public class CartServiceImpl implements CartService {
* {"shopNO": "00029975","terminal": "wechat","langID": "936", "idx": 2,"saleQty": "23" } * {"shopNO": "00029975","terminal": "wechat","langID": "936", "idx": 2,"saleQty": "23" }
*/ */
public String updateQty (JSONObject obj,String terminal) { public String updateQty (JSONObject obj,String terminal) {
String orgNo = obj.getString("orgNo");
String shopNO = obj.getString("shopNO"); String shopNO = obj.getString("shopNO");
Integer idx = obj.getInteger("idx"); Integer idx = obj.getInteger("idx");
Double saleQty = obj.getDouble("saleQty"); Double saleQty = obj.getDouble("saleQty");
...@@ -157,10 +160,10 @@ public class CartServiceImpl implements CartService { ...@@ -157,10 +160,10 @@ public class CartServiceImpl implements CartService {
System.out.println(removeObj); System.out.println(removeObj);
this.remove(removeObj,terminal); this.remove(removeObj,terminal);
} else { } else {
jdbcTemplate.executeUpdate("update tCart set nSaleQty = " + saleQty + " where sShopNO = '" + shopNO + "' and nIdx = " + idx); jdbcTemplate.executeUpdate("update tCart set nSaleQty = " + saleQty + " where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "' and nIdx = " + idx);
} }
cartRedisService.changeQty(shopNO, terminal, idx, saleQty); cartRedisService.changeQty(orgNo, shopNO, terminal, idx, saleQty);
return Rjx.jsonOk().set("count", count(shopNO)).toJson(); return Rjx.jsonOk().set("count", count(orgNo, shopNO)).toJson();
} }
/** /**
...@@ -173,10 +176,11 @@ public class CartServiceImpl implements CartService { ...@@ -173,10 +176,11 @@ public class CartServiceImpl implements CartService {
*/ */
@Override @Override
public String query(Map<String, Object> params) { public String query(Map<String, Object> params) {
String orgNo = (String)params.get("orgNo");
String shopNO = params.get("shopNO")+""; String shopNO = params.get("shopNO")+"";
String terminal = params.get("terminal")+""; String terminal = params.get("terminal")+"";
Map<String, Object> queryMap = cartRedisService.querySync(shopNO, terminal); Map<String, Object> queryMap = cartRedisService.querySync(orgNo, shopNO, terminal);
return Rjx.jsonOk().setData(queryMap).toJson(); return Rjx.jsonOk().setData(queryMap).toJson();
} }
......
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