mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
【程序目录】优化消息同步和推送
This commit is contained in:
parent
fb75164cdc
commit
49be6bc5cb
@ -108,5 +108,6 @@ class SyncMessageJob extends BaseJobs
|
||||
if(!$res->errcode && $res->template_id){
|
||||
$templateMessageServices->update($template['id'],['tempid'=>$res->template_id]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -249,6 +249,7 @@ class Notice implements ListenerInterface
|
||||
//模板消息公众号模版消息
|
||||
$WechatTemplateList->sendBargainSuccess($uid, $bargainInfo, $bargainUserInfo, $uid);
|
||||
//模板消息小程序订阅消息
|
||||
$bargainInfo['title'] = Str::substrUTf8($bargainInfo['title'], 20, 'UTF-8', '');
|
||||
$RoutineTemplateList->sendBargainSuccess($uid, $bargainInfo, $bargainUserInfo, $uid);
|
||||
break;
|
||||
//开团成功
|
||||
@ -283,6 +284,7 @@ class Notice implements ListenerInterface
|
||||
//模板消息公众号模版消息
|
||||
$WechatTemplateList->sendOrderPinkSuccess($list['uid'], $list, $title);
|
||||
//模板消息小程序订阅消息
|
||||
$title = Str::substrUTf8($title, 20, 'UTF-8', '');
|
||||
$RoutineTemplateList->sendPinkSuccess($list['uid'], $title, $list['nickname'], $list['add_time'], $list['people'], $url);
|
||||
break;
|
||||
//取消拼团
|
||||
|
||||
@ -501,6 +501,7 @@ class StoreBargainServices extends BaseServices
|
||||
$userBargainInfo['bargainType'] = 1; //立即支付
|
||||
}
|
||||
$data['userBargainInfo'] = $userBargainInfo;
|
||||
$data['bargain']['price'] = bcsub($data['bargain']['price'], $userBargainInfo['alreadyPrice'], 2);
|
||||
|
||||
//用户访问事件
|
||||
event('user.userVisit', [$user['uid'], $id, 'bargain', $bargain['product_id'], 'view']);
|
||||
|
||||
@ -286,7 +286,7 @@ class RoutineTemplateListService extends NoticeService
|
||||
{
|
||||
return $this->sendTemplate((int)$uid, [
|
||||
'thing1' => $pinkTitle,
|
||||
'name3' => $nickname,
|
||||
'thing12' => $nickname,
|
||||
'date5' => date('Y-m-d H:i:s', $pinkTime),
|
||||
'number2' => $count
|
||||
], $link);
|
||||
|
||||
@ -442,7 +442,7 @@ class StoreOrderComputedServices extends BaseServices
|
||||
}
|
||||
}
|
||||
if (count($storePostage_arr)) {
|
||||
$maxStorePostage = max($storePostage_arr);
|
||||
$maxStorePostage = max($storePostage_arr);
|
||||
//获取运费计算中的最大值
|
||||
$storePostage = bcadd((string)$storePostage, (string)$maxStorePostage, 2);
|
||||
}
|
||||
|
||||
@ -84,8 +84,6 @@ class LoginServices extends BaseServices
|
||||
public function updateUserInfo($user, $userInfo, $is_new = false)
|
||||
{
|
||||
$data = [];
|
||||
$data['nickname'] = !isset($user['nickname']) || !$user['nickname'] ? $userInfo->nickname : $user['nickname'];
|
||||
$data['avatar'] = !isset($user['headimgurl']) || !$user['headimgurl'] ? $userInfo->avatar : $user['headimgurl'];
|
||||
$data['phone'] = !isset($user['phone']) || !$user['phone'] ? $userInfo->phone : $user['phone'];
|
||||
$data['last_time'] = time();
|
||||
$data['last_ip'] = app()->request->ip();
|
||||
|
||||
@ -1193,7 +1193,7 @@ class UserBillServices extends BaseServices
|
||||
$storeOrderServices = app()->make(StoreOrderServices::class);
|
||||
[$page, $limit] = $this->getPageValue();
|
||||
$time = [];
|
||||
$where = ['paid' => 1, 'type' => 6, 'spread_or_uid' => $uid, 'pid' => 0];
|
||||
$where = ['paid' => 1, 'type' => 6, 'spread_or_uid' => $uid, 'pid' => 0, 'refund_status' => 0];
|
||||
$list = $storeOrderServices->getlist($where, ['id,order_id,uid,add_time,spread_uid,status,spread_two_uid,one_brokerage,two_brokerage,pay_price,pid'], $page, $limit, ['split']);
|
||||
$result['count'] = $storeOrderServices->count($where);
|
||||
$time_data = [];
|
||||
|
||||
@ -280,6 +280,7 @@ class RoutineServices extends BaseServices
|
||||
} else
|
||||
throw new ApiException(410019);
|
||||
} else {
|
||||
if (!$user['status']) throw new ApiException(410027);
|
||||
//更新用户信息
|
||||
$wechatUserServices->wechatUpdata([$user['uid'], ['code' => $spid]]);
|
||||
$token = $this->createToken((int)$user['uid'], 'routine');
|
||||
|
||||
@ -125,6 +125,7 @@ class WechatServices extends BaseServices
|
||||
if (!$user) {
|
||||
$user = $wechatUserServices->wechatOauthAfter($createData);
|
||||
} else {
|
||||
if (!$user['status']) throw new ApiException(410027);
|
||||
//更新用户信息
|
||||
$wechatUserServices->wechatUpdata([$user['uid'], $wechatInfo]);
|
||||
}
|
||||
@ -175,6 +176,7 @@ class WechatServices extends BaseServices
|
||||
} else if (!$user) {
|
||||
$user = $wechatUserServices->wechatOauthAfter($createData);
|
||||
} else {
|
||||
if (!$user['status']) throw new ApiException(410027);
|
||||
//更新用户信息
|
||||
$wechatUserServices->wechatUpdata([$user['uid'], $wechatInfo]);
|
||||
}
|
||||
|
||||
@ -34429,7 +34429,7 @@ INSERT INTO `eb_system_notification` (`id`, `mark`, `name`, `title`, `is_system`
|
||||
(13, 'open_pink_success', '开团成功提醒发送', '开团成功给用户提醒发送', 1, 0, 1, 0, 0, 0, '开团成功通知', '亲,您已成功参与拼团,活动名称{title}', 0, '0', '', 28, 6, '0', '{title}活动名称,{nickname}团长,{count}拼团人数,{pink_time}开团时间', '', 1, 0),
|
||||
(14, 'user_extract', '提现成功提醒发送', '提现成功给用户提醒发送', 1, 0, 1, 1, 0, 0, '提现成功通知', '亲,您成功提现佣金{extract_number}元', 0, '0', '', 38, 2, '0', '{extract_number}提现金额,{nickname}用户昵称,{date}提现时间', '', 1, 0),
|
||||
(15, 'user_balance_change', '提现失败提醒发送', '提现失败给用户提醒发送', 1, 0, 1, 1, 0, 0, '提现失败通知', '亲,您发起的提现被驳回,返回佣金{extract_number}元', 0, '0', '', 39, 2, '0', '{extract_number}提现金额,{nickname}用户昵称,{date}提现时间,{message}失败原因', '', 1, 0),
|
||||
(16, 'recharge_order_refund_status', '充值退款提醒发送', '充值退款给用户提醒发送', 1, 0, 1, 1, 0, 0, '充值退款通知', '亲,您充值的金额已退款,本次退款{refund_price}元', 0, '0', '', 18, 11, '0', '{refund_price}退款金额,{order_id}充值订单,{price}充值金额', '', 1, 0),
|
||||
(16, 'recharge_order_refund_status', '充值退款提醒发送', '充值退款给用户提醒发送', 1, 0, 1, 0, 0, 0, '充值退款通知', '亲,您充值的金额已退款,本次退款{refund_price}元', 0, '0', '', 18, 0, '0', '{refund_price}退款金额,{order_id}充值订单,{price}充值金额', '', 1, 0),
|
||||
(17, 'send_order_refund_no_status', '退款申请未通过提醒发送', '退款申请未通过给用户提醒发送', 1, 0, 1, 1, 0, 0, '退款申请拒绝通知', '您好!您的订单{order_id}已拒绝退款。', 0, '0', '', 18, 10, '0', '{order_id}订单号,{store_name}商品名称,{pay_price}订单金额', '', 1, 0),
|
||||
(18, 'send_order_apply_refund', '申请退款给客服发消息', '申请退款给客服发消息', 1, 0, 1, 0, 2, 1, '您有新的退款待处理', '您有一笔退款订单待处理,订单号{order_id}!', 0, '520274', '{$admin_name}管理员,您有一笔退款订单待处理,订单号{$order_id}!', 0, 0, '您有个订单退款请注意查收\\n订单号:{order_id}', '{admin_name}管理员,{order_id}订单号', '', 2, 0),
|
||||
(19, 'admin_pay_success_code', '下单给客服发消息', '下单支付给客服发消息', 1, 0, 1, 0, 2, 1, '您有新的订单待处理', '您有一笔支付成功的订单待处理,订单号{order_id}!', 0, '520273', '{$admin_name}管理员,您有一笔支付成功的订单待处理,订单号{$order_id}!', 0, 0, '您有个新订单请注意查收\\n订单号:{order_id}', '{admin_name}管理员,{order_id}订单号', '', 2, 0),
|
||||
@ -34597,7 +34597,7 @@ INSERT INTO `eb_template_message` (`id`, `notification_id`, `type`, `tempkey`, `
|
||||
(3, 3, 0, '1481', '收货结果通知', '', '订单类型{{thing1.DATA}}\n订单商品{{thing2.DATA}}\n收货时间{{date5.DATA}}', '', '', '1636623097', 1),
|
||||
(4, 1, 0, '3801', '绑定下级推广人成功提醒', '', '会员姓名{{name3.DATA}}\n邀请时间{{date4.DATA}}', '', '', '1636623097', 1),
|
||||
(5, 21, 0, '1458', '发货通知', '', '快递单号{{character_string2.DATA}}\n快递公司{{thing1.DATA}}\n发货时间{{time3.DATA}}\n订单商品{{thing5.DATA}}', '', '', '1636623097', 1),
|
||||
(6, 11, 0, '3098', '拼团成功通知', '', '活动名称{{thing1.DATA}}\n团长{{name3.DATA}}\n开团时间{{date5.DATA}}\n成团人数{{number2.DATA}}', '', '', '1637554360', 1),
|
||||
(6, 11, 0, '3098', '拼团成功通知', '', '活动名称{{thing1.DATA}}\n团长昵称{{thing12.DATA}}\n开团时间{{date5.DATA}}\n成团人数{{number2.DATA}}', '', '', '1637554360', 1),
|
||||
(7, 10, 0, '2727', '砍价成功通知', '', '商品名称{{thing1.DATA}}\n底价{{amount2.DATA}}\n备注{{thing3.DATA}}', '', '', '1637554360', 1),
|
||||
(9, 20, 0, '1128', '送货通知', '', '商品信息{{thing8.DATA}}\r\n订单编号{{character_string1.DATA}}\r\n配送人{{name4.DATA}}\r\n配送员电话{{phone_number10.DATA}}', '', '', '1637554360', 1),
|
||||
(10, 5, 0, '1451', ' 退款通知', '', '退款状态{{thing1.DATA}}\n退款商品{{thing2.DATA}}\n退款金额{{amount3.DATA}}\n退款单号{{character_string6.DATA}}', '', '', '1637554360', 1),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user