Commit 0ec9e1a6 by caosy

销售码

parent 64caf07d
......@@ -93,6 +93,11 @@ public class CommuneOrderItem implements java.io.Serializable {
@Column(name = "userWorkerId")
private Integer userWorkerId;
@Column(name = "isSend")
private Integer isSend;
public Integer getId() {
return id;
}
......@@ -197,5 +202,12 @@ public class CommuneOrderItem implements java.io.Serializable {
this.userWorkerId = userWorkerId;
}
public Integer getIsSend() {
return isSend;
}
public void setIsSend(Integer isSend) {
this.isSend = isSend;
}
}
......@@ -216,6 +216,9 @@ public class Order extends AbstractOrder implements java.io.Serializable {
private String mobilePhone;
private String salesUid;
public Order() {
}
......@@ -1483,6 +1486,13 @@ public class Order extends AbstractOrder implements java.io.Serializable {
this.mobilePhone = mobilePhone;
}
public String getSalesUid() {
return salesUid;
}
public void setSalesUid(String salesUid) {
this.salesUid = salesUid;
}
}
......@@ -41,6 +41,7 @@ import com.ctrip.fun.common.vo.product.ProductPaymentTypeEnum;
import com.ctrip.fun.golf.dao.client.ClientConfigDao;
import com.ctrip.fun.golf.dao.order.CommuneOrderItemDao;
import com.ctrip.fun.golf.dao.product.BuyVoucherActivityDao;
import com.ctrip.fun.golf.dao.user.UserWorkerDao;
import com.ctrip.fun.golf.domain.basic.Voucher;
import com.ctrip.fun.golf.domain.client.ClientConfig;
import com.ctrip.fun.golf.domain.order.CommuneOrderItem;
......@@ -48,6 +49,7 @@ import com.ctrip.fun.golf.domain.order.Order;
import com.ctrip.fun.golf.domain.payment.WeiXinAtcion;
import com.ctrip.fun.golf.domain.product.BuyVoucherActivity;
import com.ctrip.fun.golf.domain.user.UserExt;
import com.ctrip.fun.golf.domain.user.UserWorker;
import com.ctrip.fun.golf.exceptions.OrderException;
import com.ctrip.fun.golf.service.basic.OperationMessageService;
import com.ctrip.fun.golf.service.market.CommuneInviteActivityService;
......@@ -87,7 +89,8 @@ public class CommuneOrderService extends AbstractOrderService<CommuneOrderBean,
@Autowired
private BuyVoucherActivityDao buyVoucherActivityDao;
@Autowired
private UserWorkerDao userWorkerDao;
......@@ -167,6 +170,14 @@ public class CommuneOrderService extends AbstractOrderService<CommuneOrderBean,
if(count1>=buyoucherActivity.getBuyLimitTimes()){
throw new OrderException(-6666, "限购一张");
}
// 体验卷活动
if((communeOrderBean.getSalesUid() != null && !("").equals(communeOrderBean.getSalesUid()))||(communeOrderBean.getMobilePhone()!=null && !("").equals(communeOrderBean.getMobilePhone()))){
UserWorker userWorker = userWorkerDao.getUserWorkerByUid(communeOrderBean.getSalesUid());
if(userWorker == null ){
throw new OrderException(-66, "体验劵销售码错误!");
}
}
}
@Override
......
......@@ -116,9 +116,8 @@ public class CommuneNotifyService extends AbstractNotifyService {
//执行发券
String uid = order.getUid();//下单人id
if(!"".equals(order.getRealName()) && !"".equals(order.getIdCard()) && order.getIdCard()!=null &&order.getRealName()!=null){
voucherService.sendVoucherForPlaceOrderByConfig(uid, order.getOrderId()+"", true, buyVoucherActivity.getVoucherConfig(),order.getRealName(),order.getIdCard(),order.getMobilePhone());
// voucherService.sendVoucherForPlaceOrderByConfig(uid, order.getOrderId()+"", true, buyVoucherActivity.getVoucherConfig(),order.getRealName(),order.getIdCard(),order.getMobilePhone());
}else{
voucherService.sendVoucherForPlaceOrderByConfig(uid, order.getOrderId()+"", true, buyVoucherActivity.getVoucherConfig(),"","","");
}
......
......@@ -1802,9 +1802,6 @@ public class UserService {
userBean.setConstellation(userExt.getConstellation());
userBean.setOccupation(userExt.getOccupation());
userBean.setHobby(userExt.getHobby());
UserWorker userWorker = userWorkerDao.getUserWorkerByUid(userExt.getUid());
if(userWorker != null){
userBean.setUserWorkerId(userWorker.getId());
......
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