修改创建订单,判断购物车为空处理
This commit is contained in:
parent
b96a251fd8
commit
130d3259cc
|
|
@ -25,6 +25,8 @@ import java.math.BigDecimal;
|
|||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import static com.chaozhanggui.system.cashierservice.sign.CodeEnum.CARTEXIST;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class OrderService {
|
||||
|
|
@ -248,6 +250,10 @@ public class OrderService {
|
|||
if (list.size() < 1) {
|
||||
list = cashierCartMapper.selectAllCreateOrder(orderVo.getMasterId(), orderVo.getShopId(), day, "create", orderVo.getUuid());
|
||||
}
|
||||
|
||||
if(ObjectUtil.isEmpty(list)||ObjectUtil.isNull(list)||list.size()<=0){
|
||||
return Result.fail(CARTEXIST);
|
||||
}
|
||||
BigDecimal totalAmount = BigDecimal.ZERO;
|
||||
BigDecimal packAMount = BigDecimal.ZERO;
|
||||
BigDecimal feeAmount = BigDecimal.ZERO;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ public enum CodeEnum {
|
|||
printmachinenoexsit("100019",false,"打印设备不存在","fail"),
|
||||
|
||||
|
||||
CARTEXIST("100020",false,"购物车信息不存在","fail"),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue