| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- /*
- * @Author: 凯
- * @Date: 2021-04-21 10:02:14
- * @LastEditTime: 2021-04-23 15:29:21
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \admin_php\utils\GetTamplate.php
- */
- namespace app\utils\Notice;
- /**
- * 获取小程序模板
- */
- class GetTamplate
- {
- /**
- * @description: 订单提交通知 订单号、待付金额、商品信息、下单时间
- * @return {*}
- */
- public static function order_submit($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(585, [2, 1, 4, 7], '订单提交通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string2', 'amount1', 'thing4', 'thing7'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 订单支付通知 订单编号、支付金额、支付时间、商品名称
- * @return {*}
- */
- public static function order_pay($type, $template_id)
- {
- if ($type == 'miapp') {
- $res = NoticeAction::getTamplateId(516, [1, 5, 15, 3], '订单支付通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string1', 'amount5', 'time15', 'thing3'];
- }
- } else {
- $res = NoticeAction::getTamplateId(1142, [1, 2, 7, 6], '订单支付通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string1', 'amount2', 'date7', 'thing6'];
- }
- }
- return $res;
- }
- /**
- * @description: 订单取消通知 订单编号、订单金额、商品名称、取消时间
- * @return {*}
- */
- public static function order_cancel($type, $template_id)
- {
- if ($type == 'miapp') {
- $res = NoticeAction::getTamplateId(1190, [2, 3, 1, 7], '订单取消通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string2', 'amount3', 'thing1', 'time7'];
- }
- } else {
- $res = NoticeAction::getTamplateId(7456, [4, 9, 8, 3], '订单取消通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'amount9', 'thing8', 'time3'];
- }
- }
- return $res;
- }
- /**
- * @description: 订单退款通知 订单编号、退款金额、退货商品、备注
- * @return {*}
- */
- public static function order_refund($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(9244, [4, 3, 6, 5], '订单退款通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'amount3', 'thing6', 'thing5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 订单发货通知 订单编号、商品详情、快递公司、快递单号
- * @return {*}
- */
- public static function order_send($type, $template_id)
- {
- if ($type == 'miapp') {
- $res = NoticeAction::getTamplateId(467, [1, 2, 3, 4], '订单发货通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string1', 'thing2', 'name3', 'character_string4'];
- }
- } else {
- $res = NoticeAction::getTamplateId(4231, [1, 13, 7, 8], '订单发货通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string1', 'thing13', 'thing7', 'character_string8'];
- }
- }
- return $res;
- }
- /**
- * @description: 门店到货通知 商品名称、温馨提示、到货时间、取货地址
- * @return {*}
- */
- public static function shop_arrive($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(5019, [1, 2, 6, 7], '门店到货通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['thing1', 'thing2', 'date6', 'thing7'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 订单自提通知 自提门店、门店地址、订单编号、联系电话
- * @return {*}
- */
- public static function shop_offline($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(1093, [2, 3, 7, 5], '订单自提通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['thing2', 'thing3', 'character_string7', 'phone_number5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 账户变动通知 变动金额、时间、备注、账户余额
- * @return {*}
- */
- public static function user_chang($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(4148, [1, 4, 5, 2], '账户变动通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['amount1', 'date4', 'thing5', 'amount2'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 提现成功通知 提现金额、提现状态、提现方式、手续费
- * @return {*}
- */
- public static function cash_success($type, $template_id)
- {
- if ($type == 'miapp') {
- $res = NoticeAction::getTamplateId(7712, [1, 2, 4, 5], '提现成功通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['amount1', 'phrase2', 'phrase4', 'amount5'];
- }
- } else {
- $res = NoticeAction::getTamplateId(1470, [2, 1, 11, 7], '提现成功通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['amount2', 'thing1', 'thing11', 'amount7'];
- }
- }
- return $res;
- }
- /**
- * @description: 提现失败通知 提现金额、原因、提现方式
- * @return {*}
- */
- public static function cash_fail($type, $template_id)
- {
- if ($type == 'miapp') {
- $res = NoticeAction::getTamplateId(5834, [1, 2, 3], '提现失败通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['amount1', 'phrase2', 'phrase3'];
- }
- } else {
- $res = NoticeAction::getTamplateId(1470, [1, 12, 2, 11], '提现失败通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['thing1', 'thing12', 'amount2', 'thing11'];
- }
- }
- return $res;
- }
- /**
- * @description: 审核结果通知 分销商名称、审核时间、申请状态、备注信息
- * @return {*}
- */
- public static function share_examine($type, $template_id)
- {
- if ($type == 'miapp') {
- $res = NoticeAction::getTamplateId(6682, [5, 3, 2, 4], '审核结果通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['thing5', 'date3', 'phrase2', 'thing4'];
- }
- } else {
- $res = NoticeAction::getTamplateId(4082, [10, 3, 1, 5], '审核结果通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['thing10', 'date3', 'phrase1', 'thing5'];
- }
- }
- return $res;
- }
- /**
- * @description: 拼团成功通知 订单号、商品名称、成团时间、备注
- * @return {*}
- */
- public static function pt_success($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3098, [10, 7, 8, 9], '拼团成功通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string10', 'thing7', 'date8', 'thing9'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 拼团失败通知 订单号、商品金额、商品名称、失败原因
- * @return {*}
- */
- public static function pt_fail($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(4534, [7, 8, 1, 6], '拼团失败通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string7', 'amount8', 'thing1', 'thing6'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 入驻商申请通知 商户名称、审核结果、入驻时间、备注
- * @return {*}
- */
- public static function mch_examine($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(9840, [1, 2, 3, 4], '入驻商申请通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['thing1', 'phrase2', 'time3', 'thing4'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_mature($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '未选择采摘超时提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_storage($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '未选择保管超时提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_preserve($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '免费保管到期提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_confirm_mature($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '确认成熟提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_self_pick($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '自采提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_other_pick($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '代采提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_confirm_self_pick_book($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '确认自采预约提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_start_self_pick($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '开始自采提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_end_self_pick($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '自采结束提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_confirm_self_pick_finish($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '确认自采完成提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_pick_take($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '带走提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_storage($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '入库提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_confirm_storage($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '确认入库提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_preserve($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '保管提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_no_preserve($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '不保管提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_finish($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '认养完成提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- public static function adopt_order_other_pick_pay($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '支付代采费用提示通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 收到客户新订单通知 订单号、金额、商品信息、下单时间
- * @return {*}
- */
- public static function place_order($type, $template_id)
- {
- if ($type == 'miapp') {
- $res = [
- 'code' => 1,
- 'msg' => '小程序模板消息未完成'
- ];
- }elseif ($type == 'wxaapi') {
- $res = NoticeAction::getTamplateId(48089, [1, 15, 7, 2], '收到客户新订单通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string1', 'amount15', 'thing7', 'time2'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 直播开播提醒 直播主题、直播方、开播时间
- * @return {*}
- */
- public static function live_begin($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(9169, [1, 5, 2], '直播开播提醒', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['thing1', 'thing5', 'time2'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 产品降价提醒 产品名称、下降金额、降后价格
- * @return {*}
- */
- public static function lowering_price($type, $template_id)
- {
- if (1 || $type == 'miapp') {
- $res = NoticeAction::getTamplateId(40919, [1, 2, 3], '产品降价提醒', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['thing1', 'amount2', 'amount3'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '公众号模板消息未完成'
- ];
- }
- return $res;
- }
- /* begin 2025/07/10 19:52:44 WPing丶 */
- /**
- * @description: 服务人员抢单通知 订单号、下单时间、收货地址、订单金额
- * @return {*}
- */
- public static function service_new_order($type, $template_id)
- {
- if ($type == 'miapp') {
- $res = [
- 'code' => 1,
- 'msg' => '小程序模板消息未完成'
- ];
- }elseif ($type == 'wxaapi') {
- $res = NoticeAction::getTamplateId(44298, [2, 6, 5], '收到客户新订单通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string2', 'time6', 'amount5'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '模板消息未完成'
- ];
- }
- return $res;
- }
- /**
- * @description: 服务人员接到新订单通知 订单号、金额、商品信息、下单时间
- * @return {*}
- */
- public static function service_receive_order($type, $template_id)
- {
- if ($type == 'miapp') {
- $res = [
- 'code' => 1,
- 'msg' => '小程序模板消息未完成'
- ];
- }elseif ($type == 'wxaapi') {
- $res = NoticeAction::getTamplateId(48089, [1, 15, 7, 2], '收到客户新订单通知', $template_id, $type);
- if ($res['code'] == 0) {
- $res['kid_list'] = ['character_string1', 'amount15', 'thing7', 'time2'];
- }
- } else {
- $res = [
- 'code' => 1,
- 'msg' => '模板消息未完成'
- ];
- }
- return $res;
- }
- /* end */
- }
|