|
|
@ -16,7 +16,9 @@ import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.util.StringUtils; |
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Service |
|
|
@Service |
|
|
@ -87,6 +89,13 @@ public class ShopOrderServiceImpl extends ServiceImpl<ShopOrderMapper, ShopOrder |
|
|
if (!list.isEmpty()){ |
|
|
if (!list.isEmpty()){ |
|
|
throw new RuntimeException("订单号已存在"); |
|
|
throw new RuntimeException("订单号已存在"); |
|
|
} |
|
|
} |
|
|
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
|
|
params.add(shopOrder.getSite()); |
|
|
|
|
|
params.add(shopOrder.getPartNo()); |
|
|
|
|
|
List<Map<String, Object>> map = baseMapper.checkShopOrder("checkShopOrderPart",params); |
|
|
|
|
|
if (String.valueOf(map.get(0).get("resultCode")).equals("400")){ |
|
|
|
|
|
throw new RuntimeException(String.valueOf(map.get(0).get("resultMessage"))); |
|
|
|
|
|
} |
|
|
List<PartInformationEntity> partList = partService.lambdaQuery() |
|
|
List<PartInformationEntity> partList = partService.lambdaQuery() |
|
|
.eq(PartInformationEntity::getPartNo, shopOrder.getPartNo()) |
|
|
.eq(PartInformationEntity::getPartNo, shopOrder.getPartNo()) |
|
|
.eq(PartInformationEntity::getSite, shopOrder.getSite()).list(); |
|
|
.eq(PartInformationEntity::getSite, shopOrder.getSite()).list(); |
|
|
|