fixed 修改购物车的添加条件
This commit is contained in:
parent
ceb1ca4419
commit
77d3a673d1
@ -78,7 +78,7 @@ namespace ARW.Service.Business.BusinessService.Carts
|
||||
}
|
||||
else
|
||||
{
|
||||
var cart = await _CartRepository.GetFirstAsync(s => s.GoodsGuid == model.GoodsGuid && s.GoodsSkuId == model.GoodsSkuId);
|
||||
var cart = await _CartRepository.GetFirstAsync(s => s.CustomerGuid == model.CustomerGuid && s.GoodsGuid == model.GoodsGuid && s.GoodsSkuId == model.GoodsSkuId && s.IsDelete == false);
|
||||
if (cart != null)
|
||||
{
|
||||
cart.CartGoodsNum += model.CartGoodsNum;
|
||||
|
@ -77,9 +77,12 @@ namespace ARW.WebApi.Controllers.Api.GoodsManager.Goodss
|
||||
public async Task<IActionResult> GetGoodsDetails([FromQuery] GoodsDtoApi parm)
|
||||
{
|
||||
//if (parm == null) throw new CustomException("参数错误!");
|
||||
long userId = 0;
|
||||
var user = JwtUtil.GetLoginUser(App.HttpContext);
|
||||
if (user != null)
|
||||
userId = user.UserId;
|
||||
|
||||
var res = await _GoodsServiceApi.GetGoodsDetails(parm, user.UserId);
|
||||
var res = await _GoodsServiceApi.GetGoodsDetails(parm, userId);
|
||||
|
||||
if (res != "[]")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user