|
@@ -601,6 +601,17 @@ class Cron
|
|
|
$start = Dever::maketime($start_time);
|
|
|
$end = Dever::maketime($end_time);
|
|
|
$shops = Dever::db('shop/info')->getguiAll(array('type'=>2));
|
|
|
+ if ($shops) {
|
|
|
+ $shop_data = array();
|
|
|
+ foreach ($shops as $k => $v) {
|
|
|
+ if ($v['agent_mid'] <1) {
|
|
|
+ $shop_data[$v['id']] = $v['name'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($shop_data) {
|
|
|
+ Dever::alert('以下门店没有绑定代理商:' . implode(',', $shop_data));
|
|
|
+ }
|
|
|
+ }
|
|
|
foreach ($shops as $k => $v) {
|
|
|
#业绩补贴:除了创V0.02,创V>=10个0.05,创V>=20个0.08
|
|
|
// $subsidy = 0;
|
|
@@ -746,14 +757,12 @@ class Cron
|
|
|
$insert['dl_subsidy'] = 0;
|
|
|
$insert['v_subsidy'] = 0;
|
|
|
$res = Dever::db('bill/shop_stat')->find(array('month'=>$insert['month'],'shop_id'=>$v['id']));
|
|
|
- // print_R($res);die;
|
|
|
if ($res) {
|
|
|
$insert['where_id'] = $res['id'];
|
|
|
Dever::db('bill/shop_stat')->update($insert);
|
|
|
} else {
|
|
|
Dever::db('bill/shop_stat')->insert($insert);
|
|
|
}
|
|
|
- // echo dever::sql();
|
|
|
}
|
|
|
|
|
|
}
|