Commit d70d0a7b authored by liuyuzhen's avatar liuyuzhen

Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz

parents 7884f0c8 b12d5e0d
......@@ -148,7 +148,7 @@ class StoreServiceModel extends \Business\AbstractModel{
//处理新店铺信息
$where = 'store_id not in (select ss.store_id from han_stat_store ss) and is_own_shop=0';
$field = 'store_id,store_state,store_time,store_end_time,province_id,city_id,area_id,(select se.cashed_deposit from han_store_extend se where se.store_id=han_store.store_id) cashed_deposit';
$field = 'store_id, store_name, store_state,store_time,store_end_time,province_id,city_id,area_id,(select se.cashed_deposit from han_store_extend se where se.store_id=han_store.store_id) cashed_deposit';
$field .= ',(select count(qs.store_id) from han_qm_store_class qs where qs.is_charged<>0 and qs.store_id=han_store.store_id) class_style1_count, (select count(qs.store_id) from han_qm_store_class qs where qs.is_charged<>0 and qs.class_style=2 and qs.store_id=han_store.store_id) class_style2_count, if((store_state=1 and store_end_time>=0), ifnull((select sum(qs.service_fee) from han_qm_store_class qs where qs.is_charged<>0 and qs.class_style=2 and qs.store_id=han_store.store_id), 0), ifnull((select sum(qs.service_fee) from han_qm_store_class qs where qs.is_charged<>0 and qs.class_style=2 and qs.store_id=han_store.store_id and qs.deadline>=0), 0)) service_fee';
$field .= ',(select count(fs.store_id) from han_favorites_store fs where fs.fav_type=1 and fs.store_id=han_store.store_id) fav_total,(select count(fs.store_id) from han_favorites_store fs where fs.fav_type=1 and fs.fav_from=3 and fs.store_id=han_store.store_id) fav3_total';
$field .= ',(select t.order_count from han_store_statistics t where t.store_id=han_store.store_id limit 1) order_count,(select t.order_total from han_store_statistics t where t.store_id=han_store.store_id limit 1) order_total';
......
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 to comment