Commit 8025924d by caosy

调用VoucherDao

parent 53ef8f1f
...@@ -43,6 +43,7 @@ import com.ctrip.fun.common.vo.order.VourcherStatusEnum; ...@@ -43,6 +43,7 @@ import com.ctrip.fun.common.vo.order.VourcherStatusEnum;
import com.ctrip.fun.golf.dao.GenericHibernateDao; import com.ctrip.fun.golf.dao.GenericHibernateDao;
import com.ctrip.fun.golf.domain.basic.Voucher; import com.ctrip.fun.golf.domain.basic.Voucher;
import com.ctrip.fun.golf.domain.basic.VoucherRule; import com.ctrip.fun.golf.domain.basic.VoucherRule;
import com.ctrip.fun.golf.domain.order.EventActivityOrderItem;
import com.ctrip.fun.golf.vo.PagedEntityBean; import com.ctrip.fun.golf.vo.PagedEntityBean;
import com.ctrip.fun.mall.vo.LabelValueBean; import com.ctrip.fun.mall.vo.LabelValueBean;
...@@ -982,4 +983,6 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> { ...@@ -982,4 +983,6 @@ public class VoucherDao extends GenericHibernateDao<Voucher, Integer> {
query.executeUpdate(); query.executeUpdate();
} }
} }
...@@ -51,7 +51,7 @@ public class OperationMessageService extends GenericService<OperationMessageDao, ...@@ -51,7 +51,7 @@ public class OperationMessageService extends GenericService<OperationMessageDao,
private UserExtDao userExtDao = null; private UserExtDao userExtDao = null;
private MallOrderConnectDao mallOrderConnectDao = null; private MallOrderConnectDao mallOrderConnectDao = null;
private MallMerchantDao mallMerchantDao = null; private MallMerchantDao mallMerchantDao = null;
private VoucherService voucherService = null; private VoucherDao voucherDao = null;
/** /**
* 发送球场订单的短信 * 发送球场订单的短信
...@@ -236,11 +236,12 @@ public class OperationMessageService extends GenericService<OperationMessageDao, ...@@ -236,11 +236,12 @@ public class OperationMessageService extends GenericService<OperationMessageDao,
} }
} }
}else{ }else{
// 发球场 // 体验卷赛事下单 发球场信息
System.out.println("发球场 ================>"+ "发球场"); System.out.println("发球场 ================>"+ "发球场");
for(String usedVoucherId: order.getVoucherIDList().split(",")){ for(String usedVoucherId: order.getVoucherIDList().split(",")){
System.out.println("usedVoucherId ================>"+ usedVoucherId); System.out.println("usedVoucherId ================>"+ usedVoucherId);
Voucher voucher = this.voucherService.getVoucherById(Integer.parseInt(usedVoucherId)); System.out.println("voucherDao ================>"+ voucherDao.toString());
Voucher voucher = this.voucherDao.findById(Integer.parseInt(usedVoucherId));
System.out.println("voucher ================>"+ voucher); System.out.println("voucher ================>"+ voucher);
if(voucher.getVoucherType() == 2){ if(voucher.getVoucherType() == 2){
message = message.replace("[realName]", voucher.getRealName() + "").replace("[PlayDate]", DateUtil.getDateStrC(orderItems.get(0).getPlayDate())); message = message.replace("[realName]", voucher.getRealName() + "").replace("[PlayDate]", DateUtil.getDateStrC(orderItems.get(0).getPlayDate()));
...@@ -249,9 +250,7 @@ public class OperationMessageService extends GenericService<OperationMessageDao, ...@@ -249,9 +250,7 @@ public class OperationMessageService extends GenericService<OperationMessageDao,
System.out.println("message ================>"+ message); System.out.println("message ================>"+ message);
} }
} }
} }
} }
if (message != null) { if (message != null) {
Sms sms = new Sms(); Sms sms = new Sms();
...@@ -399,11 +398,11 @@ public class OperationMessageService extends GenericService<OperationMessageDao, ...@@ -399,11 +398,11 @@ public class OperationMessageService extends GenericService<OperationMessageDao,
public void setEventActivityOrderItemDao(EventActivityOrderItemDao eventActivityOrderItemDao) { public void setEventActivityOrderItemDao(EventActivityOrderItemDao eventActivityOrderItemDao) {
this.eventActivityOrderItemDao = eventActivityOrderItemDao; this.eventActivityOrderItemDao = eventActivityOrderItemDao;
} }
public VoucherService getVoucherService() { public VoucherDao getVoucherDao() {
return voucherService; return voucherDao;
} }
public void setVoucherService(VoucherService voucherService) { public void setVoucherDao(VoucherDao voucherDao) {
this.voucherService = voucherService; this.voucherDao = voucherDao;
} }
} }
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