Commit 1f16cebe by unknown

Merge branch 'f-6.6.6' of 192.168.10.6:caosy/fun-golf-service into f-6.6.6

parents 8dccdef1 fef6fa2f
......@@ -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";
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.vipFirstReduction = p.vipFirstReduction, t.vipMinRandom = p.vipMinRandom, t.vipMaxRandom = p.vipMaxRandom";
Session session = this.getSession();
Query query = session.createSQLQuery(sql);
query.setParameter("dataChangeLastTime", date);
......@@ -1107,7 +1107,7 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
public List<AsmCourseresourceBean> getMinPriceResourcesAtCommune(AsmCourseresourceQuery asmCourseresourceQuery) {
StringBuilder sql = new StringBuilder();
sql.append("SELECT a.PriceDate as priceDate,a.ProductType as productType,a.teeTime as teeTime,a.SponsorPrice as sponsorPrice,a.PriceStatus as priceStatus, p.communePrice - IFNULL(p.communeMinus,0) AS salePrice FROM `asm_courseresource` a INNER JOIN prd_resourceprice p ON a.ResourceId = p.ResourceID AND a.PriceDate = p.priceDate WHERE 1=1 ");
sql.append("SELECT a.PriceDate as priceDate,a.ProductType as productType,a.teeTime as teeTime,a.SponsorPrice as sponsorPrice,a.PriceStatus as priceStatus, p.communePrice - IFNULL(p.communeMinus,0) AS salePrice, a.vipFirstReduction, a.vipMaxRandom, a.vipMinRandom FROM `asm_courseresource` a INNER JOIN prd_resourceprice p ON a.ResourceId = p.ResourceID AND a.PriceDate = p.priceDate WHERE 1=1 ");
sql.append(" and a.resourceType = ").append(ResourceTypeEnum.EVENT_ACTIVITY.getValue());
sql.append(" and a.productType = ").append(ProductTypeEnum.EVENT_ACTIVITY.getValue());
......@@ -1373,6 +1373,9 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
sb.append("fairwayLength,");
sb.append("teeTime,");
sb.append("salePrice,");
sb.append("vipFirstReduction,");
sb.append("vipMaxRandom,");
sb.append("vipMinRandom,");
sb.append("marketPrice,");
sb.append("service,");
......@@ -1482,6 +1485,9 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
.append("lng,")
.append("feature,")
.append("salePrice,")
.append("vipFirstReduction,")
.append("vipMaxRandom,")
.append("vipMinRandom,")
.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 ");
......@@ -1554,6 +1560,7 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
for (Map map : queryResult) {
AsmCourseresourceBean asmCourseresourceBean = new AsmCourseresourceBean();
BeanConverter.populate(asmCourseresourceBean, map);
asmCourseresourceBean.setVipSaveAmount((Double)map.get("vipFirstReduction"));
result.add(asmCourseresourceBean);
courseIds.add(asmCourseresourceBean.getCourseId());
}
......
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