|
@@ -46,10 +46,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.time.LocalDate;
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
-import java.util.HashMap;
|
|
|
|
|
-import java.util.List;
|
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
@@ -115,6 +112,9 @@ public class LhbOrderServiceImpl extends MPJBaseServiceImpl<LhbOrderMapper, LhbO
|
|
|
LhbUser user = userService.getById(SecurityUtils.getUser().getId());
|
|
LhbUser user = userService.getById(SecurityUtils.getUser().getId());
|
|
|
|
|
|
|
|
LhbGoods goods = goodsService.getById(order.getGoodsId());
|
|
LhbGoods goods = goodsService.getById(order.getGoodsId());
|
|
|
|
|
+ if(goods == null || Objects.equals(goods.getStatus(), CommonConstants.FAIL)){
|
|
|
|
|
+ throw new GlobalCustomerException("该商品已下架");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
String ageSection = goods.getAgeSection();
|
|
String ageSection = goods.getAgeSection();
|
|
|
String[] split = ageSection.split(StrUtil.DASHED);
|
|
String[] split = ageSection.split(StrUtil.DASHED);
|