Commit 1bbe447f authored by 张永's avatar 张永

1

parent 9ee89406
......@@ -139,7 +139,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 = "{\"shopNO\": \"00029975\",\"idxs\": [1,2,3]}"),
@ApiImplicitParam(paramType = "query", name = "data", dataType = "String", required = false, value = "JSON格式", defaultValue = "{\"shopNO\": \"00029975\",\"idxs\": [1,2,3],\"IsSelected\": \"1\"}"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
})
......
......@@ -207,6 +207,7 @@ public class CartServiceImpl implements CartService {
String orgNo = obj.getString("orgNo");
String shopNO = obj.getString("shopNO");
String IsSelected = obj.getString("IsSelected");
JSONArray idxArray = obj.getJSONArray("idxs");
System.out.println("idxArray----"+idxArray);
List<String> nIdx = new ArrayList<String>();
......@@ -218,8 +219,7 @@ public class CartServiceImpl implements CartService {
}
}
jdbcTemplate.executeUpdate("update tCart set nIsSelected= 0 where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'" );
jdbcTemplate.executeUpdate("update tCart set nIsSelected= 1 where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'" + StringUtil.join(", ", " and nIdx in (", ")", nIdx));
jdbcTemplate.executeUpdate("update tCart set nIsSelected= "+IsSelected+",dLastUpdateTime = getdate() where sOrgNO = '" + orgNo + "' and sShopNO = '" + shopNO + "'" + StringUtil.join(", ", " and nIdx in (", ")", nIdx));
return Rjx.jsonOk().set("count", count(orgNo, shopNO)).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