|
@@ -564,7 +564,7 @@ class Cron
|
|
|
$audit = '';
|
|
|
}
|
|
|
|
|
|
- $manage['info'] = date('Y年m月', $month) . $audit;
|
|
|
+ $manage['info'] = '代理商总数=创V数+代理商数量,创V数包含名额外创V数,创V数减去名额外创V就是名额内创V数,代理商数量包含创客数'. $audit;
|
|
|
|
|
|
}
|
|
|
|
|
@@ -801,23 +801,24 @@ class Cron
|
|
|
foreach ($data as $k => $v) {
|
|
|
if ($v['shop_id']) {
|
|
|
$shop = Dever::db('shop/info')->find($v['shop_id']);
|
|
|
- if (isset($shop) && $shop && isset($shop['mobile']) && $shop['mobile']) {
|
|
|
- $member = Dever::db('agent/member')->find(array('mobile'=>$shop['mobile']));
|
|
|
+ if (isset($shop) && $shop && isset($shop['agent_mid']) && $shop['agent_mid']) {
|
|
|
+ $member = Dever::db('agent/member')->find($shop['agent_mid']);
|
|
|
$cash = $v['dl_subsidy'] + $v['v_subsidy'];
|
|
|
if ($member && $member['status'] == 2) {
|
|
|
if ($v['dl_subsidy'] > 0) {
|
|
|
$desc = $shop['name'].$date.'区域招商补贴';
|
|
|
$state = Dever::load('bill/lib/cash')->up($member['id'], 13, $v['dl_subsidy'], $member['role'], $v['id'], $desc, 2, true);
|
|
|
- } elseif ($v['v_subsidy'] >0) {
|
|
|
+ }
|
|
|
+ if ($v['v_subsidy'] >0) {
|
|
|
$desc = $shop['name'].$date.'名额外创V补贴';
|
|
|
$state = Dever::load('bill/lib/cash')->up($member['id'], 14, $v['v_subsidy'], $member['role'], $v['id'], $desc, 2, true);
|
|
|
}
|
|
|
if (isset($state) && $state) {
|
|
|
- $where = array();
|
|
|
- $where['where_id'] = $shop['id'];
|
|
|
- $where['price'] = $shop['price'] + $cash;
|
|
|
- $where['clear'] = true;
|
|
|
- Dever::db('shop/info')->upCash($where);
|
|
|
+ // $where = array();
|
|
|
+ // $where['where_id'] = $shop['id'];
|
|
|
+ // $where['price'] = $shop['price'] + $cash;
|
|
|
+ // $where['clear'] = true;
|
|
|
+ // Dever::db('shop/info')->upCash($where);
|
|
|
Dever::db('bill/shop_stat')->update(array('where_id' => $v['id'], 'cash_status' => 1));
|
|
|
}
|
|
|
}
|