Commit 0cfb804b by caosy

球场短信

parent 48a5dcd7
......@@ -134,8 +134,7 @@ public class EventActivityOrderService extends
private EventCustomerInfoService eventCustomerInfoService = null;
@Autowired
private VoucherService voucherService = null;
public Order findByResourceId(String uid, int resourceId, Date playDate) {
......@@ -314,19 +313,7 @@ public class EventActivityOrderService extends
List<EventActivityOrderItem> eventActivityOrderItemList = this
.getEventActivityOrderItemDao().getOrderItemByOrderId(order.getOrderId());
if (null != eventActivityOrderItemList && eventActivityOrderItemList.size() > 0) {
this.sendMessage(order, 5);
if(order.getVoucherIDList() != null){
System.out.println("order.getVoucherIDList() ================>"+ order.getVoucherIDList());
String[] split = order.getVoucherIDList().split(",");
for (int i = 0; i < split.length; i++) {
System.out.println("split[i] ================>"+ split[i]);
Voucher voucher = voucherService.getVoucherById(Integer.valueOf(split[i]));
System.out.println("voucher1 ================>"+ voucher);
if(voucher.getVoucherType() == 2){
this.sendMessage(order, 120);
}
}
}
this.sendMessage(order, 5);
}
}
startCancelOrderJob(order);
......
......@@ -8,17 +8,20 @@ import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.ctrip.fun.common.vo.operation.ResourceConfirmTypeEnum;
import com.ctrip.fun.common.vo.payment.NotifyRequestBean;
import com.ctrip.fun.common.vo.product.ResourceCategoryEnum;
import com.ctrip.fun.common.vo.product.ResourceInventoryQuery;
import com.ctrip.fun.golf.dao.order.EventActivityOrderItemDao;
import com.ctrip.fun.golf.domain.basic.Voucher;
import com.ctrip.fun.golf.domain.order.EventActivityOrderItem;
import com.ctrip.fun.golf.domain.order.Order;
import com.ctrip.fun.golf.exceptions.InventoryException;
import com.ctrip.fun.golf.exceptions.OrderException;
import com.ctrip.fun.golf.service.basic.OperationMessageService;
import com.ctrip.fun.golf.service.basic.VoucherService;
import com.ctrip.fun.golf.service.order.EventCustomerInfoService;
import com.ctrip.fun.golf.service.product.CourseResourceService;
......@@ -38,7 +41,7 @@ public class EventActivityNotifyService extends AbstractNotifyService {
private OperationMessageService operationMessageService;
private VoucherService voucherService = null;
/**
* 支付调用方法
......@@ -79,6 +82,18 @@ public class EventActivityNotifyService extends AbstractNotifyService {
protected void doPaySuccess(Order order) {
eventCustomerInfoService.updateEventCustomerInfosByOrderId(order.getOrderId(), true);
this.sendMessage(order, 100);
if(order.getVoucherIDList() != null){
System.out.println("order.getVoucherIDList() ================>"+ order.getVoucherIDList());
String[] split = order.getVoucherIDList().split(",");
for (int i = 0; i < split.length; i++) {
System.out.println("split[i] ================>"+ split[i]);
Voucher voucher = voucherService.getVoucherById(Integer.valueOf(split[i]));
System.out.println("voucher1 ================>"+ voucher);
if(voucher.getVoucherType() == 2){
this.sendMessage(order, 120);
}
}
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment