Stringsql="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";
Stringsql="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";
Sessionsession=this.getSession();
Sessionsession=this.getSession();
Queryquery=session.createSQLQuery(sql);
Queryquery=session.createSQLQuery(sql);
query.setParameter("dataChangeLastTime",date);
query.setParameter("dataChangeLastTime",date);
...
@@ -1107,7 +1107,7 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
...
@@ -1107,7 +1107,7 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
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.resourceType = ").append(ResourceTypeEnum.EVENT_ACTIVITY.getValue());
sql.append(" and a.productType = ").append(ProductTypeEnum.EVENT_ACTIVITY.getValue());
sql.append(" and a.productType = ").append(ProductTypeEnum.EVENT_ACTIVITY.getValue());
...
@@ -1373,6 +1373,9 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
...
@@ -1373,6 +1373,9 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
sb.append("fairwayLength,");
sb.append("fairwayLength,");
sb.append("teeTime,");
sb.append("teeTime,");
sb.append("salePrice,");
sb.append("salePrice,");
sb.append("vipFirstReduction,");
sb.append("vipMaxRandom,");
sb.append("vipMinRandom,");
sb.append("marketPrice,");
sb.append("marketPrice,");
sb.append("service,");
sb.append("service,");
...
@@ -1482,6 +1485,9 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
...
@@ -1482,6 +1485,9 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
.append("lng,")
.append("lng,")
.append("feature,")
.append("feature,")
.append("salePrice,")
.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("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 ");
.append("inventoryType").append(" from asm_courseresource b where minPrice = true ");
...
@@ -1554,6 +1560,7 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,
...
@@ -1554,6 +1560,7 @@ public class AsmCourseResourceDao extends GenericHibernateDao<AsmCourseresource,