Commit df591790 authored by 张永's avatar 张永

sSaleUnit

parent 53b7ff74
......@@ -84,7 +84,7 @@ public class CartController {
@ApiOperation("加入购物车(JSON格式)")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "orgNo", dataType = "String", required = true),
@ApiImplicitParam(paramType = "query", name = "data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"idx\": \"1\",\"shopNO\": \"00029975\",\"cartList\": [{\"goodsID\": \"30771\",\"goodsTypeID\": 0,\"saleQty\": \"24\",\"saleUnit\": \"单位\", \"setPrice\": \"10.5\",\"agentContractNO\": \"600327002\",\"promoGroupNO\":\"\",\"promoPaperNO\":\"00001810100007\"}]}"),
@ApiImplicitParam(paramType = "query", name = "data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\",\"cartList\": [{\"goodsID\": \"30771\",\"goodsTypeID\": 0,\"saleQty\": \"24\",\"saleUnit\": \"单位\", \"setPrice\": \"10.5\",\"agentContractNO\": \"600327002\",\"promoGroupNO\":\"\",\"promoPaperNO\":\"00001810100007\"}]}"),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = true, value = "终端标识", defaultValue = "wechat"),
@ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = true, value = "语言", defaultValue = "936"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""),
......
......@@ -71,7 +71,7 @@ public class CartServiceImpl implements CartService {
if(cartList != null && cartList.size() > 0) {
for(int i = 0; i<cartList.size();i++) {
JSONObject cartObj = cartList.getJSONObject(i);
Integer idx = Util.objTo(cartObj.get("idx"), Integer.class, 0);
String saleUnit = Util.objTo(cartObj.get("saleUnit"), String.class, null);
Integer nGoodsTypeID = Util.objTo(cartObj.get("goodsTypeID"), Integer.class, 0);
Integer nSaleQty = Util.objTo(cartObj.get("saleQty"), Integer.class, null);
BigDecimal nSetPrice = Util.objTo(cartObj.get("setPrice"), BigDecimal.class, null);
......@@ -81,10 +81,10 @@ public class CartServiceImpl implements CartService {
String sPromoGroupNO = Util.objTo(cartObj.get("promoGroupNO"), String.class, null);
String sSaleUnit = Util.objTo(cartObj.get("saleUnit"),String.class,null);
if(StringUtil.isNotBlank(sPromoPaperNO)) {
jdbcTemplate.executeUpdate("update tCart set sPromoPaperNO = ?, sPromoGroupNO = ? where sOrgNO = ? and sShopNO = ? and sAgentContractNO = ? and nGoodsID = ? and nTag = ? and nIdx = ? and (sPromoPaperNO is null or sPromoPaperNO = '')",sPromoPaperNO, sPromoGroupNO, orgNo, shopNO, sAgentContractNO, nGoodsID, nGoodsTypeID,idx);
jdbcTemplate.executeUpdate("update tCart set sPromoPaperNO = ?, sPromoGroupNO = ? where sOrgNO = ? and sShopNO = ? and sAgentContractNO = ? and nGoodsID = ? and nTag = ? and sSaleUnit = ? and (sPromoPaperNO is null or sPromoPaperNO = '')",sPromoPaperNO, sPromoGroupNO, orgNo, shopNO, sAgentContractNO, nGoodsID, nGoodsTypeID,saleUnit);
}
List<String> strs = new ArrayList<String>();
strs.add("nIdx = '" + idx + "'");
strs.add("sSaleUnit = '" + saleUnit + "'");
strs.add("sOrgNO = '" + orgNo + "'");
strs.add("sShopNO = '" + shopNO + "'");
strs.add("nTag = " + nGoodsTypeID);
......
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