|
|
|
@ -61,9 +61,32 @@ public class GoodsController extends BaseController { |
|
|
|
String timestamp = request.getParameter("timestamp"); |
|
|
|
//
|
|
|
|
Map<String, Object> retmap =goodsService.getShoppingCar(userIsli); |
|
|
|
long end = System.currentTimeMillis(); |
|
|
|
long howUse = (end-start)/1000l; |
|
|
|
jsonObject.put("code",200); |
|
|
|
jsonObject.put("msg","成功"); |
|
|
|
jsonObject.put("data",retmap); |
|
|
|
jsonObject.put("useTime",howUse); |
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* delelete user's shop car from redis |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@RequestMapping("/delShoppingCar") |
|
|
|
public JSONObject delShoppingCar(HttpServletRequest request){ |
|
|
|
long start =System.currentTimeMillis(); |
|
|
|
String userIsli = request.getParameter("user_isli"); |
|
|
|
String goodsIsli = request.getParameter("goods_isli"); |
|
|
|
goodsService.delShoppingCar(userIsli,goodsIsli); |
|
|
|
long end =System.currentTimeMillis(); |
|
|
|
long howuse =(end-start)/1000l; |
|
|
|
|
|
|
|
jsonObject.put("code",200); |
|
|
|
jsonObject.put("msg","成功"); |
|
|
|
jsonObject.put("usetime",howuse); |
|
|
|
|
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|
|
|
|
|