Update OmsCartItemServiceImpl.java

This commit is contained in:
macro
2022-08-20 16:55:13 +08:00
parent 93e19621c8
commit d40a2215cb

View File

@@ -14,7 +14,6 @@ import com.macro.mall.portal.service.UmsMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.Date;
@@ -62,7 +61,7 @@ public class OmsCartItemServiceImpl implements OmsCartItemService {
OmsCartItemExample example = new OmsCartItemExample();
OmsCartItemExample.Criteria criteria = example.createCriteria().andMemberIdEqualTo(cartItem.getMemberId())
.andProductIdEqualTo(cartItem.getProductId()).andDeleteStatusEqualTo(0);
if (!StringUtils.isEmpty(cartItem.getProductSkuId())) {
if (cartItem.getProductSkuId()!=null) {
criteria.andProductSkuIdEqualTo(cartItem.getProductSkuId());
}
List<OmsCartItem> cartItemList = cartItemMapper.selectByExample(example);