/** * @title 修复数据 * * @method get */ public function fix_loan_tag() { $start = I('start', 0); $size = 100; $xg = new \Common\Util\XgPush(); $mobiles = M('loan_order')->where(['status' => 11, 'loan_money' => ['gt', 0]])->distinct('mobile')->order('mobile')->limit($start, $size)->getField('mobile', true) or die('done'); foreach ($mobiles as $mobile) { $xg->updateTagByAccount($mobile, 'loan_order_finish'); } echo '<script>location.href="?start=' . ($start + $size) . '";</script>'; }
/** * 设置app标签 * * @param int $uid 用户编号 * @param string $tag 标签 */ function app_tag($uid, $tag, $app = 'zjdx') { $user = get_user($uid); if ($user) { $xg = new \Common\Util\XgPush($app); $xg->updateTagByAccount($user['mobile'], $tag); } }
public function _userMyResumeSave($data) { if (M('job_user_resume')->where(['uid' => $this->user->self('uid')])->count() == 0) { M('job_user_resume')->add(array_merge(['uid' => $this->user->self('uid'), 'mobile' => $this->user->self('mobile')], $data)); // 给此用户打上推送标签,表明其参与过兼职业务 $xg = new \Common\Util\XgPush(); $xg->updateTagByAccount(get_user()['mobile'], 'job_resume'); } else { M('job_user_resume')->where(['uid' => $this->user->self('uid')])->save($data); } }