Commit 53ef8f1f by caosy

调用voucherDao

parent 48a199c5
......@@ -51,7 +51,7 @@ public class OperationMessageService extends GenericService<OperationMessageDao,
private UserExtDao userExtDao = null;
private MallOrderConnectDao mallOrderConnectDao = null;
private MallMerchantDao mallMerchantDao = null;
private VoucherDao voucherDao = null;
private VoucherService voucherService = null;
/**
* 发送球场订单的短信
......@@ -238,18 +238,18 @@ public class OperationMessageService extends GenericService<OperationMessageDao,
}else{
// 发球场
System.out.println("发球场 ================>"+ "发球场");
String[] split = order.getVoucherIDList().split(",");
for (int i = 0; i < split.length; i++) {
System.out.println("split[i] ================>"+ split[i]);
Voucher voucher = voucherDao.findById(Integer.parseInt(split[i]));
System.out.println("voucher ================>"+ voucher);
if(voucher.getVoucherType() == 2){
for(String usedVoucherId: order.getVoucherIDList().split(",")){
System.out.println("usedVoucherId ================>"+ usedVoucherId);
Voucher voucher = this.voucherService.getVoucherById(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()));
message = message.replace("[PlayTime]", orderItems.get(0).getStartTime());
message = message.replace("[ProductName]", orderItems.get(0).getProductName());
System.out.println("message ================>"+ message);
}
}
}
}
}
......@@ -399,5 +399,11 @@ public class OperationMessageService extends GenericService<OperationMessageDao,
public void setEventActivityOrderItemDao(EventActivityOrderItemDao eventActivityOrderItemDao) {
this.eventActivityOrderItemDao = eventActivityOrderItemDao;
}
public VoucherService getVoucherService() {
return voucherService;
}
public void setVoucherService(VoucherService voucherService) {
this.voucherService = voucherService;
}
}
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