1234567891011121314151617181920212223242526272829 |
- <?php
- namespace ln\jobs;
- use app\common\repositories\store\product\ProductRepository;
- use ln\interfaces\JobInterface;
- use think\facade\Log;
- class ClearMerchantStoreJob implements JobInterface
- {
- public function fire($job, $data)
- {
- try{
- app()->make(ProductRepository::class)->clearMerchantProduct($data['mer_id']);
- }catch (\Exception $e){
- Log::info('商户ID:'.$data['mer_id'].'清除出错');
- }
- $job->delete();
- }
- public function failed($data)
- {
- // TODO: Implement failed() method.
- }
- }
|