|  |  |  | 
|---|
|  |  |  | .last("limit 1") | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | if(happyActivityOrderItem == null){ | 
|---|
|  |  |  | throw new FebsException("票号异常!"); | 
|---|
|  |  |  | throw new FebsException("票号不存在!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | HappyActivity happyActivity = this.baseMapper.selectById(happyActivityOrderItem.getActivityId()); | 
|---|
|  |  |  | 
|---|
|  |  |  | .eq(HappyActivityOrderItem::getCode, orderItemCode) | 
|---|
|  |  |  | .last("limit 1") | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | if(happyActivityOrderItem != null){ | 
|---|
|  |  |  | if(happyActivityOrderItem == null){ | 
|---|
|  |  |  | throw new FebsException("票号不存在!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(StateUpDownEnum.UP.getCode() == happyActivityOrderItem.getState()){ | 
|---|
|  |  |  | throw new FebsException("票号已核销!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | happyActivityOrderItem.setTransferItemId(memberId); | 
|---|
|  |  |  | happyActivityOrderItemMapper.updateById(happyActivityOrderItem); | 
|---|
|  |  |  | agentProducer.sendCheckActivityItem(happyActivityOrderItem.getOrderId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new FebsResponse().success().message("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|