|
|
@@ -1548,13 +1548,8 @@ class PensionTasks extends Command
|
|
1548
|
1548
|
if($order_data) {
|
|
1549
|
1549
|
$order_data = $order_data->toArray();
|
|
1550
|
1550
|
foreach ($order_data as $online) {
|
|
1551
|
|
- $status = $StoreOrderStatusRepository->getWhere(['order_id' => $online['order_id'], 'change_type' => 'take']);
|
|
1552
|
|
- if(!$status) {
|
|
1553
|
|
- continue;
|
|
1554
|
|
- }else{
|
|
1555
|
|
- $date = date('Y-m-d H:i:s', strtotime('-' . $timeLimit . ' days'));
|
|
1556
|
|
- if($date < $status['change_time']) continue;
|
|
1557
|
|
- }
|
|
|
1551
|
+ $date = date('Y-m-d H:i:s', strtotime('-' . $timeLimit . ' days'));
|
|
|
1552
|
+ if($date < $online['create_time']) continue;
|
|
1558
|
1553
|
Db::transaction(function () use ($online) {
|
|
1559
|
1554
|
$this->settleAward($online);
|
|
1560
|
1555
|
Db::name('store_order')->where('order_id', $online['order_id'])->update(['is_settlement' => 1 ,'settlement_time' => date('Y-m-d H:i:s')]);
|
|
|
@@ -1767,7 +1762,7 @@ class PensionTasks extends Command
|
|
1767
|
1762
|
// 修改积分
|
|
1768
|
1763
|
Db::name('user')
|
|
1769
|
1764
|
->where('uid', $user_sign_score['uid'])
|
|
1770
|
|
- ->inc('score', (float)$user_sign_score['reward_socre'])
|
|
|
1765
|
+ ->inc('score', $user_sign_score['reward_socre'])
|
|
1771
|
1766
|
->update();
|
|
1772
|
1767
|
Db::name('user_sign_score')
|
|
1773
|
1768
|
->where('id', $user_sign_score['id'])
|
|
|
@@ -1790,7 +1785,7 @@ class PensionTasks extends Command
|
|
1790
|
1785
|
// 修改红包
|
|
1791
|
1786
|
Db::name('user')
|
|
1792
|
1787
|
->where('uid', $user_sign_hongbao['uid'])
|
|
1793
|
|
- ->inc('hongbao', (float)$user_sign_hongbao['number'])
|
|
|
1788
|
+ ->inc('hongbao', $user_sign_hongbao['number'])
|
|
1794
|
1789
|
->update();
|
|
1795
|
1790
|
Db::name('user_sign_hongbao')
|
|
1796
|
1791
|
->where('id', $user_sign_hongbao['id'])
|
|
|
@@ -1814,7 +1809,7 @@ class PensionTasks extends Command
|
|
1814
|
1809
|
// 修改京豆
|
|
1815
|
1810
|
Db::name('user')
|
|
1816
|
1811
|
->where('uid', $user_sign_jingdou['uid'])
|
|
1817
|
|
- ->inc('jingdou', (float)$user_sign_jingdou['number'])
|
|
|
1812
|
+ ->inc('jingdou', $user_sign_jingdou['number'])
|
|
1818
|
1813
|
->update();
|
|
1819
|
1814
|
Db::name('user_sign_jingdou')
|
|
1820
|
1815
|
->where('id', $user_sign_jingdou['id'])
|
|
|
@@ -1837,7 +1832,7 @@ class PensionTasks extends Command
|
|
1837
|
1832
|
// 修改复购金
|
|
1838
|
1833
|
Db::name('user')
|
|
1839
|
1834
|
->where('uid', $user_sign_fugou['uid'])
|
|
1840
|
|
- ->inc('fugou', (float)$user_sign_fugou['number'])
|
|
|
1835
|
+ ->inc('fugou', $user_sign_fugou['number'])
|
|
1841
|
1836
|
->update();
|
|
1842
|
1837
|
Db::name('user_sign_fugou')
|
|
1843
|
1838
|
->where('id', $user_sign_fugou['id'])
|
|
|
@@ -1861,7 +1856,7 @@ class PensionTasks extends Command
|
|
1861
|
1856
|
// 修改贡献值
|
|
1862
|
1857
|
Db::name('user')
|
|
1863
|
1858
|
->where('uid', $user_sign_gongxian['uid'])
|
|
1864
|
|
- ->inc('contribute', (float)$user_sign_gongxian['number'])
|
|
|
1859
|
+ ->inc('contribute', $user_sign_gongxian['number'])
|
|
1865
|
1860
|
->update();
|
|
1866
|
1861
|
Db::name('user_sign_gongxian')
|
|
1867
|
1862
|
->where('id', $user_sign_gongxian['id'])
|
|
|
@@ -1886,7 +1881,7 @@ class PensionTasks extends Command
|
|
1886
|
1881
|
// 修改pv
|
|
1887
|
1882
|
Db::name('user')
|
|
1888
|
1883
|
->where('uid', $user_pv['uid'])
|
|
1889
|
|
- ->inc('pv', (float)$user_pv['pv'])
|
|
|
1884
|
+ ->inc('pv', $user_pv['pv'])
|
|
1890
|
1885
|
->update();
|
|
1891
|
1886
|
Db::name('user_pv_log')
|
|
1892
|
1887
|
->where('id', $user_pv['id'])
|
|
|
@@ -1910,12 +1905,12 @@ class PensionTasks extends Command
|
|
1910
|
1905
|
if($user_bill['commission_type'] == 5){
|
|
1911
|
1906
|
Db::name('user')
|
|
1912
|
1907
|
->where('uid', $user_bill['uid'])
|
|
1913
|
|
- ->inc('annuity', (float)$user_bill['number'])
|
|
|
1908
|
+ ->inc('annuity', $user_bill['number'])
|
|
1914
|
1909
|
->update();
|
|
1915
|
1910
|
}else{
|
|
1916
|
1911
|
Db::name('user')
|
|
1917
|
1912
|
->where('uid', $user_bill['uid'])
|
|
1918
|
|
- ->inc('brokerage_price', (float)$user_bill['number'])
|
|
|
1913
|
+ ->inc('brokerage_price', $user_bill['number'])
|
|
1919
|
1914
|
->update();
|
|
1920
|
1915
|
}
|
|
1921
|
1916
|
|