Commit 344f9909 authored by 张永's avatar 张永

需求 #16076

parent e6639bc2
...@@ -42,7 +42,7 @@ public class CartController { ...@@ -42,7 +42,7 @@ public class CartController {
@RequestMapping(value = "/getCartCount",method=RequestMethod.GET) @RequestMapping(value = "/getCartCount",method=RequestMethod.GET)
@IDCLogResource(name="购物车商品种类数量") @IDCLogResource(name="购物车商品种类数量")
public String cartQuery(String orgNo, String shopNo) { public String getCartCount(String orgNo, String shopNo) {
Map<String, Object> map = cartService.count(orgNo, shopNo); Map<String, Object> map = cartService.count(orgNo, shopNo);
return Rjx.jsonOk().set("count", map.get("totalCount")).set("qty", map.get("totalSaleQty")).toJson(); return Rjx.jsonOk().set("count", map.get("totalCount")).set("qty", map.get("totalSaleQty")).toJson();
} }
...@@ -136,6 +136,10 @@ public class CartController { ...@@ -136,6 +136,10 @@ public class CartController {
String reqJson = request.getParameter("data"); String reqJson = request.getParameter("data");
JSONObject jsonObj = JSONObject.parseObject(reqJson); JSONObject jsonObj = JSONObject.parseObject(reqJson);
jsonObj.put("orgNo", orgNo); jsonObj.put("orgNo", orgNo);
Integer saleQty = jsonObj.getInteger("saleQty");
if(saleQty <0 ) {
return Rjx.jsonErr().setMessage("数量不能小于0").toJson();
}
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);
......
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