同步数据
Showing
1 changed file
with
10 additions
and
1 deletions
... | @@ -75,6 +75,11 @@ class StakeholderIncomeSyncJob implements ShouldQueue | ... | @@ -75,6 +75,11 @@ class StakeholderIncomeSyncJob implements ShouldQueue |
75 | 'title'=>"{$bills->bill_section_start}-{$bills->bill_section_end}账单/{$channel}", | 75 | 'title'=>"{$bills->bill_section_start}-{$bills->bill_section_end}账单/{$channel}", |
76 | ]; | 76 | ]; |
77 | 77 | ||
78 | if ($res = StakeholderIncomeByPayer::query()->where(['serial_no'=>$income_item['serial_no']])->first()) { | ||
79 | |||
80 | if ($res['sync_status'] == 0) { | ||
81 | |||
82 | //直接未同步的数据才请求api | ||
78 | $http_res = ApiService::walletAddIncome($http_data); | 83 | $http_res = ApiService::walletAddIncome($http_data); |
79 | 84 | ||
80 | if (empty($http_res)) { | 85 | if (empty($http_res)) { |
... | @@ -98,8 +103,12 @@ class StakeholderIncomeSyncJob implements ShouldQueue | ... | @@ -98,8 +103,12 @@ class StakeholderIncomeSyncJob implements ShouldQueue |
98 | $redis->xdel($key, [$id]); | 103 | $redis->xdel($key, [$id]); |
99 | } | 104 | } |
100 | } | 105 | } |
101 | } | ||
102 | 106 | ||
107 | } else { | ||
108 | $redis->xdel($key, [$id]); | ||
109 | } | ||
110 | } | ||
111 | } | ||
103 | } | 112 | } |
104 | } | 113 | } |
105 | } | 114 | } | ... | ... |
-
Please register or sign in to post a comment