| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- /**
- * @package merchant
- *
- * @author xaboy
- * @day 2020/6/22
- *
- *
- */
- namespace crmeb\jobs;
- use app\common\repositories\user\UserRepository;
- use crmeb\interfaces\JobInterface;
- class AutoUserPosterJob implements JobInterface
- {
- public function fire($job, $uid)
- {
- $userRepository = app()->make(UserRepository::class);
- $user = $userRepository->get($uid);
- if (!$user)
- $job->delete();
- try {
- $userRepository->routineSpreadImage($user);
- } catch (\Exception $e) {
- };
- try {
- $userRepository->wxSpreadImage($user);
- } catch (\Exception $e) {
- };
- $job->delete();
- }
- public function failed($data)
- {
- // TODO: Implement failed() method.
- }
- }
|