Commit 8025924d by caosy

调用VoucherDao

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