Commit daa14e7d authored by 张永's avatar 张永

1

parent d067b57b
package com.egolm.shop.api.service; package com.egolm.shop.api.service;
import java.util.Map; import java.util.Map;
public interface CartQueryService { public interface CartQueryService {
public Map<String, Object> query(String orgNo, String shopNo, String terminal) ; public Map<String, Object> query(String orgNo, String shopNo, String terminal,String isCalcPromo) ;
} }
...@@ -43,7 +43,7 @@ public class CartQueryServiceImpl implements CartQueryService { ...@@ -43,7 +43,7 @@ public class CartQueryServiceImpl implements CartQueryService {
@Autowired @Autowired
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
public Map<String, Object> query(String orgNo, String shopNo, String terminal) { public Map<String, Object> query(String orgNo, String shopNo, String terminal,String isCalcPromo) {
Rjx rjx = Rjx.json().set("IsValid", true); Rjx rjx = Rjx.json().set("IsValid", true);
if (!StringUtil.isNotUndefinedAndNull(shopNo, terminal)) { if (!StringUtil.isNotUndefinedAndNull(shopNo, terminal)) {
throw new ReflectException("Query the shopping cart parameter error:" throw new ReflectException("Query the shopping cart parameter error:"
...@@ -71,7 +71,13 @@ public class CartQueryServiceImpl implements CartQueryService { ...@@ -71,7 +71,13 @@ public class CartQueryServiceImpl implements CartQueryService {
} catch (Exception e1) { } catch (Exception e1) {
e1.printStackTrace(); e1.printStackTrace();
} }
try {
String sql1 = "exec up_B2BCartToCartTempItem '" + shopNo + "', '"+isCalcPromo+"' "; //是否计算促销
jdbcTemplate.executeUpdate(sql1);
} catch (Exception e1) {
e1.printStackTrace();
}
List<Map<String, Object>> datas = this.getGoodsList(orgNo, shopNo, terminal); List<Map<String, Object>> datas = this.getGoodsList(orgNo, shopNo, terminal);
......
...@@ -216,7 +216,8 @@ public class CartServiceImpl implements CartService { ...@@ -216,7 +216,8 @@ public class CartServiceImpl implements CartService {
String orgNo = (String)params.get("orgNo"); 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.query(orgNo, shopNO, terminal); String isCalcPromo = params.get("isCalcPromo")+""; //"是否计算汇总 0为不计算,1为计算"
Map<String, Object> queryMap = cartRedisService.query(orgNo, shopNO, terminal,isCalcPromo);
/*Map<String, Object> countMap = this.count(orgNo, shopNO); /*Map<String, Object> countMap = this.count(orgNo, shopNO);
queryMap.putAll(countMap);*/ queryMap.putAll(countMap);*/
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