Administrator
3 days ago 267c06a5864bb617b1ff0ea82210346bf5573f5f
src/main/java/cc/mrbird/febs/mall/service/impl/HappyActivityServiceImpl.java
@@ -582,6 +582,7 @@
        HashMap<String, Object> stringObjectHashMap = new HashMap<>();
        stringObjectHashMap.put("orderId",happyActivityOrder.getId());
        stringObjectHashMap.put("amount",amount);
        stringObjectHashMap.put("payType",happyActivityOrder.getPayType());
        stringObjectHashMap.put("failTime",failTime);
        return new FebsResponse().success().data(stringObjectHashMap);
@@ -907,7 +908,7 @@
                .last("limit 1")
        );
        if(happyActivityOrderItem == null){
            throw new FebsException("票号异常!");
            throw new FebsException("票号不存在!");
        }
        HappyActivity happyActivity = this.baseMapper.selectById(happyActivityOrderItem.getActivityId());
@@ -943,16 +944,17 @@
                        .eq(HappyActivityOrderItem::getCode, orderItemCode)
                        .last("limit 1")
        );
        if(happyActivityOrderItem != null){
            if(StateUpDownEnum.UP.getCode() == happyActivityOrderItem.getState()){
                throw new FebsException("票号已核销!");
            }
            happyActivityOrderItem.setState(StateUpDownEnum.UP.getCode());
            happyActivityOrderItem.setTransferItemId(memberId);
            happyActivityOrderItemMapper.updateById(happyActivityOrderItem);
            agentProducer.sendCheckActivityItem(happyActivityOrderItem.getOrderId());
        if(happyActivityOrderItem == null){
            throw new FebsException("票号不存在!");
        }
        if(StateUpDownEnum.UP.getCode() == happyActivityOrderItem.getState()){
            throw new FebsException("票号已核销!");
        }
        happyActivityOrderItem.setState(StateUpDownEnum.UP.getCode());
        happyActivityOrderItem.setTransferItemId(memberId);
        happyActivityOrderItemMapper.updateById(happyActivityOrderItem);
        agentProducer.sendCheckActivityItem(happyActivityOrderItem.getOrderId());
        return new FebsResponse().success().message("操作成功");
    }