|
@@ -736,14 +736,19 @@ class Import
|
|
|
|
|
|
|
|
|
|
|
|
- $data = $this->db->fetchAll('select * from ims_ewei_shop_member where status = 1 and prestatus = 1 and isagent = 1 and allcommission > 0 order by id asc ');
|
|
|
+ $data = $this->db->fetchAll('select a.*,b.credit3 as bcredit3 from ims_ewei_shop_member as a left join ims_mc_members as b on b.uid = a.uid where a.status = 1 and a.prestatus = 1 and a.isagent = 1 and (b.credit3 > 0 || a.credit3 > 0) order by a.id asc ');
|
|
|
|
|
|
if (!$data) {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
foreach ($data as $k => $v) {
|
|
|
- $this->cash_log($v['id'], 2, $v['allcommission']);
|
|
|
+ if ($v['bcredit3'] > 0) {
|
|
|
+ $num = $v['bcredit3'];
|
|
|
+ } else {
|
|
|
+ $num = $v['credit3'];
|
|
|
+ }
|
|
|
+ $this->cash_log($v['id'], 1, $num);
|
|
|
echo $v['id'];
|
|
|
echo "\r\n";
|
|
|
}
|