Commit 02d1dd5e by Huang Linyu

remove vipPrice and add vipFirstReduction,vipMinRandom,vipMaxRandom

parent aac3c037
......@@ -189,7 +189,7 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
private void updateResourcePriceInfo(Date date, Date now) {
String sql = "update asm_courseresource t inner join prd_resourceprice p on t.priceId = p.id and p.dataChange_LastTime>=:dataChangeLastTime set t.cashRebate=p.cashRebate,t.salePrice=p.salePrice,t.floorPrice=p.floorPrice,t.marketPrice=p.marketPrice,t.commission=p.commission,t.prepaidPrice=p.prepaidPrice,t.currency=p.currency,t.priceStatus=p.Status,t.priceDate=p.priceDate,t.Update_LastTime=:updateLastTime,t.vipPrice=p.vipPrice";
String sql = "update asm_courseresource t inner join prd_resourceprice p on t.priceId = p.id and p.dataChange_LastTime>=:dataChangeLastTime set t.cashRebate=p.cashRebate,t.salePrice=p.salePrice,t.floorPrice=p.floorPrice,t.marketPrice=p.marketPrice,t.commission=p.commission,t.prepaidPrice=p.prepaidPrice,t.currency=p.currency,t.priceStatus=p.Status,t.priceDate=p.priceDate,t.Update_LastTime=:updateLastTime";
Session session = this.getSession();
Query query = session.createSQLQuery(sql);
query.setParameter("dataChangeLastTime", date);
......@@ -1373,7 +1373,6 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
sb.append("fairwayLength,");
sb.append("teeTime,");
sb.append("salePrice,");
sb.append("vipPrice,");
sb.append("marketPrice,");
sb.append("service,");
......@@ -1483,7 +1482,6 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
.append("lng,")
.append("feature,")
.append("salePrice,")
.append("vipPrice,")
.append("IFNULL((Select CONCAT(a.path,'/',a.`hash`,'.',a.ext) From bsc_entityimage a where a.EntityType='course' and a.EntityID=b.CourseID and CONCAT(a.path,'/',a.`hash`,'.',a.ext)!=b.ImagePath limit 0 , 1) , '') as imagePath,")
.append("inventoryType").append(" from asm_courseresource b where minPrice = true ");
......
......@@ -55,7 +55,7 @@ public class TourBasicDao extends GenericHibernateDao<TourBasic, Integer> {
*/
public PagedResponseBean<TourBean> search(TourBasicQuery tourBasicQuery) {
Map<String, Object> parameters = new HashMap<String, Object>();
String subSql = "select GROUP_CONCAT(DATE_FORMAT(priceDate,\"%c/%e\") ORDER BY priceDate ASC) as departureDays,min(adultPrice) as adultPrice,tourId from tur_price tp inner join tur_tourbasic tour1 on tp.tourId=tour1.id where tp.status=:priceStatus and priceDate>=DATE_ADD('"
String subSql = "select GROUP_CONCAT(DATE_FORMAT(priceDate,'%c/%e') ORDER BY priceDate ASC) as departureDays,min(adultPrice) as adultPrice,tourId from tur_price tp inner join tur_tourbasic tour1 on tp.tourId=tour1.id where tp.status=:priceStatus and priceDate>=DATE_ADD('"
+ DateUtil.getDateStr(new Date()) + "',INTERVAL advanceDays day)";
if (tourBasicQuery.getPriceDate() != null) {
subSql = subSql + " and priceDate=:priceDate";
......
......@@ -65,7 +65,6 @@ public class AsmCourseresource implements java.io.Serializable {
private Double floorPrice;
private Double marketPrice;
private Double prepaidPrice;
private Double vipPrice;
private Integer currency;
private Integer priceStatus;
......@@ -755,15 +754,6 @@ public class AsmCourseresource implements java.io.Serializable {
public void setCommission(Double commission) {
this.commission = commission;
}
@Column(name="vipPrice")
public Double getVipPrice() {
return vipPrice;
}
public void setVipPrice(Double vipPrice) {
this.vipPrice = vipPrice;
}
......
......@@ -99,10 +99,6 @@ public class ResourcePrice implements java.io.Serializable {
* 社员价
*/
private Double communePrice;
/**
* 社员价
*/
private Double vipPrice;
/**
* 社员立减金额
......@@ -119,6 +115,21 @@ public class ResourcePrice implements java.io.Serializable {
*/
private Double communeGuestMinus;
/**
* vip首单立减
*/
private Double vipFirstReduction;
/**
* vip随机立减最小值
*/
private Double vipMinRandom;
/**
* vip随机立减最大值
*/
private Double vipMaxRandom;
private String updateUser;
......@@ -304,7 +315,34 @@ public class ResourcePrice implements java.io.Serializable {
return communeGuestMinus;
}
public void setCommunePrice(Double communePrice) {
@Column(name="vipFirstReduction")
public Double getVipFirstReduction() {
return vipFirstReduction;
}
@Column(name="vipMinRandom")
public Double getVipMinRandom() {
return vipMinRandom;
}
@Column(name="vipMaxRandom")
public Double getVipMaxRandom() {
return vipMaxRandom;
}
public void setVipFirstReduction(Double vipFirstReduction) {
this.vipFirstReduction = vipFirstReduction;
}
public void setVipMinRandom(Double vipMinRandom) {
this.vipMinRandom = vipMinRandom;
}
public void setVipMaxRandom(Double vipMaxRandom) {
this.vipMaxRandom = vipMaxRandom;
}
public void setCommunePrice(Double communePrice) {
this.communePrice = communePrice;
}
......@@ -328,13 +366,4 @@ public class ResourcePrice implements java.io.Serializable {
this.updateUser = updateUser;
}
@Column(name="vipPrice")
public Double getVipPrice() {
return vipPrice;
}
public void setVipPrice(Double vipPrice) {
this.vipPrice = vipPrice;
}
}
......@@ -580,6 +580,7 @@ public abstract class AbstractOrderService<H extends AbstractOrderBean<T>, T> ex
protected abstract void returnInventory(Order order, boolean isForce);
/**
* 检查传入参数
* @param abstractOrderBean
*/
protected void checkParameters(H abstractOrderBean) {
......
......@@ -410,6 +410,8 @@ public class CourseOrderService extends AbstractOrderService<CourseOrderBean, Co
}
/**
* 赞助活动余额检查
* 会员价校验
* @param courseOrderBean
* @return
* @see com.ctrip.fun.golf.service.order.AbstractOrderService#beforePlaceOrder(com.ctrip.fun.common.vo.order2.courseOrderBean)
......@@ -425,7 +427,7 @@ public class CourseOrderService extends AbstractOrderService<CourseOrderBean, Co
if (courseOrderBean.getUseMemberPrice() != null && courseOrderBean.getUseMemberPrice()) {
this.checkMemberOrder(courseOrderBean);
}
// 闪购价格校验
FlashSaleCheckQuery flashSaleCheckQuery = new FlashSaleCheckQuery();
flashSaleCheckQuery.setPriceDate(DateUtil.getDateStr(courseOrderBean.getResourceList().get(0).getPlayDate()));
flashSaleCheckQuery.setResourceId(courseOrderBean.getResourceList().get(0).getResourceId());
......@@ -486,7 +488,7 @@ public class CourseOrderService extends AbstractOrderService<CourseOrderBean, Co
if (courseOrderBean.getResourceList() != null) {
for (CourseOrderResourceBean courseOrderResourceBean : courseOrderBean.getResourceList()) {
if (courseOrderResourceBean.getCashRebate() != null) {
totalCashRebate = totalCashRebate.add(courseOrderResourceBean.getCashRebate().multiply(BigDecimal.valueOf(courseOrderBean.getCustomerInfoList().size())));
totalCashRebate = totalCashRebate.add(courseOrderResourceBean.getCashRebate());
}
}
......@@ -608,6 +610,7 @@ public class CourseOrderService extends AbstractOrderService<CourseOrderBean, Co
}
/**
* 保存订单附属表信息
* @param courseOrderBean
* @see com.ctrip.fun.golf.service.order.AbstractOrderService#saveOrderItems(com.ctrip.fun.common.vo.order2.courseOrderBean)
*/
......
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