Commit ae336c9e by chongli

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

parents 9fd327d8 4a298647
......@@ -1248,6 +1248,11 @@ public class UserExtDao extends GenericHibernateDao<UserExt, Integer> {
return rankingBeanList;
}
/**
* 11月19日开始的续费送券活动
* 送 旭宝 150*2 协和 110*2 博尔地 100*2, 另外到期时间小于2018年的再送300元旭宝券一张
* @return
*/
public List<RecommendRankBean> getRanking980() {
StringBuffer sql = new StringBuffer("");
sql.append(" SELECT DISTINCT q.uid inviterUid,q.username inviterUserName,");
......@@ -1255,17 +1260,17 @@ public class UserExtDao extends GenericHibernateDao<UserExt, Integer> {
sql.append(" COUNT(CASE WHEN p.productName='360.00' THEN p.customerMobile END) AS myNum2");
sql.append(" FROM(");
sql.append(" SELECT a.saleMobile,a.customerMobile ,CONCAT(a.productName,'.00') AS productName");
sql.append(" FROM active_customer a");
sql.append(" FROM active_customer a WHERE a.createTime>'2018-11-19 12:59:59' ");
sql.append(" UNION ");
sql.append(" SELECT d.bindedMobilePhone AS customerMobile,c.bindedMobilePhone AS saleMobile,CONCAT(a.amount) AS productName");
sql.append(" SELECT d.bindedMobilePhone AS saleMobile ,c.bindedMobilePhone AS customerMobile,CONCAT(a.amount) AS productName");
sql.append(" FROM ord_order a LEFT JOIN ord_communeitem b ON a.orderId = b.orderId");
sql.append(" LEFT JOIN bsc_userext c ON a.uid = c.uid");
sql.append(" LEFT JOIN bsc_userext d ON b.recommendUid = d.uid");
sql.append(" WHERE a.orderDate >'2018-10-10 23:59:59' AND OrderCategory = 13 AND ProcessStatus & 16=16 AND platform = 'MP'");
sql.append(" WHERE a.orderDate >'2018-11-19 12:59:59' AND OrderCategory = 13 AND ProcessStatus & 16=16 AND platform = 'MP'");
sql.append(" ) p ");
sql.append(" LEFT JOIN bsc_userext q ON p.saleMobile = q.bindedMobilePhone");
sql.append(" GROUP BY p.saleMobile");
sql.append(" ORDER BY myNum1 DESC");
sql.append(" ORDER BY myNum2 DESC");
sql.append(" ");
......
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