GetTamplate.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. /*
  8. * @Author: 凯
  9. * @Date: 2021-04-21 10:02:14
  10. * @LastEditTime: 2021-04-23 15:29:21
  11. * @LastEditors: Please set LastEditors
  12. * @Description: In User Settings Edit
  13. * @FilePath: \admin_php\utils\GetTamplate.php
  14. */
  15. namespace app\utils\Notice;
  16. /**
  17. * 获取小程序模板
  18. */
  19. class GetTamplate
  20. {
  21. /**
  22. * @description: 订单提交通知 订单号、待付金额、商品信息、下单时间
  23. * @return {*}
  24. */
  25. public static function order_submit($type, $template_id)
  26. {
  27. if (1 || $type == 'miapp') {
  28. $res = NoticeAction::getTamplateId(585, [2, 1, 4, 7], '订单提交通知', $template_id, $type);
  29. if ($res['code'] == 0) {
  30. $res['kid_list'] = ['character_string2', 'amount1', 'thing4', 'thing7'];
  31. }
  32. } else {
  33. $res = [
  34. 'code' => 1,
  35. 'msg' => '公众号模板消息未完成'
  36. ];
  37. }
  38. return $res;
  39. }
  40. /**
  41. * @description: 订单支付通知 订单编号、支付金额、支付时间、商品名称
  42. * @return {*}
  43. */
  44. public static function order_pay($type, $template_id)
  45. {
  46. if ($type == 'miapp') {
  47. $res = NoticeAction::getTamplateId(516, [1, 5, 15, 3], '订单支付通知', $template_id, $type);
  48. if ($res['code'] == 0) {
  49. $res['kid_list'] = ['character_string1', 'amount5', 'time15', 'thing3'];
  50. }
  51. } else {
  52. $res = NoticeAction::getTamplateId(1142, [1, 2, 7, 6], '订单支付通知', $template_id, $type);
  53. if ($res['code'] == 0) {
  54. $res['kid_list'] = ['character_string1', 'amount2', 'date7', 'thing6'];
  55. }
  56. }
  57. return $res;
  58. }
  59. /**
  60. * @description: 订单取消通知 订单编号、订单金额、商品名称、取消时间
  61. * @return {*}
  62. */
  63. public static function order_cancel($type, $template_id)
  64. {
  65. if ($type == 'miapp') {
  66. $res = NoticeAction::getTamplateId(1190, [2, 3, 1, 7], '订单取消通知', $template_id, $type);
  67. if ($res['code'] == 0) {
  68. $res['kid_list'] = ['character_string2', 'amount3', 'thing1', 'time7'];
  69. }
  70. } else {
  71. $res = NoticeAction::getTamplateId(7456, [4, 9, 8, 3], '订单取消通知', $template_id, $type);
  72. if ($res['code'] == 0) {
  73. $res['kid_list'] = ['character_string4', 'amount9', 'thing8', 'time3'];
  74. }
  75. }
  76. return $res;
  77. }
  78. /**
  79. * @description: 订单退款通知 订单编号、退款金额、退货商品、备注
  80. * @return {*}
  81. */
  82. public static function order_refund($type, $template_id)
  83. {
  84. if (1 || $type == 'miapp') {
  85. $res = NoticeAction::getTamplateId(9244, [4, 3, 6, 5], '订单退款通知', $template_id, $type);
  86. if ($res['code'] == 0) {
  87. $res['kid_list'] = ['character_string4', 'amount3', 'thing6', 'thing5'];
  88. }
  89. } else {
  90. $res = [
  91. 'code' => 1,
  92. 'msg' => '公众号模板消息未完成'
  93. ];
  94. }
  95. return $res;
  96. }
  97. /**
  98. * @description: 订单发货通知 订单编号、商品详情、快递公司、快递单号
  99. * @return {*}
  100. */
  101. public static function order_send($type, $template_id)
  102. {
  103. if ($type == 'miapp') {
  104. $res = NoticeAction::getTamplateId(467, [1, 2, 3, 4], '订单发货通知', $template_id, $type);
  105. if ($res['code'] == 0) {
  106. $res['kid_list'] = ['character_string1', 'thing2', 'name3', 'character_string4'];
  107. }
  108. } else {
  109. $res = NoticeAction::getTamplateId(4231, [1, 13, 7, 8], '订单发货通知', $template_id, $type);
  110. if ($res['code'] == 0) {
  111. $res['kid_list'] = ['character_string1', 'thing13', 'thing7', 'character_string8'];
  112. }
  113. }
  114. return $res;
  115. }
  116. /**
  117. * @description: 门店到货通知 商品名称、温馨提示、到货时间、取货地址
  118. * @return {*}
  119. */
  120. public static function shop_arrive($type, $template_id)
  121. {
  122. if (1 || $type == 'miapp') {
  123. $res = NoticeAction::getTamplateId(5019, [1, 2, 6, 7], '门店到货通知', $template_id, $type);
  124. if ($res['code'] == 0) {
  125. $res['kid_list'] = ['thing1', 'thing2', 'date6', 'thing7'];
  126. }
  127. } else {
  128. $res = [
  129. 'code' => 1,
  130. 'msg' => '公众号模板消息未完成'
  131. ];
  132. }
  133. return $res;
  134. }
  135. /**
  136. * @description: 订单自提通知 自提门店、门店地址、订单编号、联系电话
  137. * @return {*}
  138. */
  139. public static function shop_offline($type, $template_id)
  140. {
  141. if (1 || $type == 'miapp') {
  142. $res = NoticeAction::getTamplateId(1093, [2, 3, 7, 5], '订单自提通知', $template_id, $type);
  143. if ($res['code'] == 0) {
  144. $res['kid_list'] = ['thing2', 'thing3', 'character_string7', 'phone_number5'];
  145. }
  146. } else {
  147. $res = [
  148. 'code' => 1,
  149. 'msg' => '公众号模板消息未完成'
  150. ];
  151. }
  152. return $res;
  153. }
  154. /**
  155. * @description: 账户变动通知 变动金额、时间、备注、账户余额
  156. * @return {*}
  157. */
  158. public static function user_chang($type, $template_id)
  159. {
  160. if (1 || $type == 'miapp') {
  161. $res = NoticeAction::getTamplateId(4148, [1, 4, 5, 2], '账户变动通知', $template_id, $type);
  162. if ($res['code'] == 0) {
  163. $res['kid_list'] = ['amount1', 'date4', 'thing5', 'amount2'];
  164. }
  165. } else {
  166. $res = [
  167. 'code' => 1,
  168. 'msg' => '公众号模板消息未完成'
  169. ];
  170. }
  171. return $res;
  172. }
  173. /**
  174. * @description: 提现成功通知 提现金额、提现状态、提现方式、手续费
  175. * @return {*}
  176. */
  177. public static function cash_success($type, $template_id)
  178. {
  179. if ($type == 'miapp') {
  180. $res = NoticeAction::getTamplateId(7712, [1, 2, 4, 5], '提现成功通知', $template_id, $type);
  181. if ($res['code'] == 0) {
  182. $res['kid_list'] = ['amount1', 'phrase2', 'phrase4', 'amount5'];
  183. }
  184. } else {
  185. $res = NoticeAction::getTamplateId(1470, [2, 1, 11, 7], '提现成功通知', $template_id, $type);
  186. if ($res['code'] == 0) {
  187. $res['kid_list'] = ['amount2', 'thing1', 'thing11', 'amount7'];
  188. }
  189. }
  190. return $res;
  191. }
  192. /**
  193. * @description: 提现失败通知 提现金额、原因、提现方式
  194. * @return {*}
  195. */
  196. public static function cash_fail($type, $template_id)
  197. {
  198. if ($type == 'miapp') {
  199. $res = NoticeAction::getTamplateId(5834, [1, 2, 3], '提现失败通知', $template_id, $type);
  200. if ($res['code'] == 0) {
  201. $res['kid_list'] = ['amount1', 'phrase2', 'phrase3'];
  202. }
  203. } else {
  204. $res = NoticeAction::getTamplateId(1470, [1, 12, 2, 11], '提现失败通知', $template_id, $type);
  205. if ($res['code'] == 0) {
  206. $res['kid_list'] = ['thing1', 'thing12', 'amount2', 'thing11'];
  207. }
  208. }
  209. return $res;
  210. }
  211. /**
  212. * @description: 审核结果通知 分销商名称、审核时间、申请状态、备注信息
  213. * @return {*}
  214. */
  215. public static function share_examine($type, $template_id)
  216. {
  217. if ($type == 'miapp') {
  218. $res = NoticeAction::getTamplateId(6682, [5, 3, 2, 4], '审核结果通知', $template_id, $type);
  219. if ($res['code'] == 0) {
  220. $res['kid_list'] = ['thing5', 'date3', 'phrase2', 'thing4'];
  221. }
  222. } else {
  223. $res = NoticeAction::getTamplateId(4082, [10, 3, 1, 5], '审核结果通知', $template_id, $type);
  224. if ($res['code'] == 0) {
  225. $res['kid_list'] = ['thing10', 'date3', 'phrase1', 'thing5'];
  226. }
  227. }
  228. return $res;
  229. }
  230. /**
  231. * @description: 拼团成功通知 订单号、商品名称、成团时间、备注
  232. * @return {*}
  233. */
  234. public static function pt_success($type, $template_id)
  235. {
  236. if (1 || $type == 'miapp') {
  237. $res = NoticeAction::getTamplateId(3098, [10, 7, 8, 9], '拼团成功通知', $template_id, $type);
  238. if ($res['code'] == 0) {
  239. $res['kid_list'] = ['character_string10', 'thing7', 'date8', 'thing9'];
  240. }
  241. } else {
  242. $res = [
  243. 'code' => 1,
  244. 'msg' => '公众号模板消息未完成'
  245. ];
  246. }
  247. return $res;
  248. }
  249. /**
  250. * @description: 拼团失败通知 订单号、商品金额、商品名称、失败原因
  251. * @return {*}
  252. */
  253. public static function pt_fail($type, $template_id)
  254. {
  255. if (1 || $type == 'miapp') {
  256. $res = NoticeAction::getTamplateId(4534, [7, 8, 1, 6], '拼团失败通知', $template_id, $type);
  257. if ($res['code'] == 0) {
  258. $res['kid_list'] = ['character_string7', 'amount8', 'thing1', 'thing6'];
  259. }
  260. } else {
  261. $res = [
  262. 'code' => 1,
  263. 'msg' => '公众号模板消息未完成'
  264. ];
  265. }
  266. return $res;
  267. }
  268. /**
  269. * @description: 入驻商申请通知 商户名称、审核结果、入驻时间、备注
  270. * @return {*}
  271. */
  272. public static function mch_examine($type, $template_id)
  273. {
  274. if (1 || $type == 'miapp') {
  275. $res = NoticeAction::getTamplateId(9840, [1, 2, 3, 4], '入驻商申请通知', $template_id, $type);
  276. if ($res['code'] == 0) {
  277. $res['kid_list'] = ['thing1', 'phrase2', 'time3', 'thing4'];
  278. }
  279. } else {
  280. $res = [
  281. 'code' => 1,
  282. 'msg' => '公众号模板消息未完成'
  283. ];
  284. }
  285. return $res;
  286. }
  287. public static function adopt_mature($type, $template_id)
  288. {
  289. if (1 || $type == 'miapp') {
  290. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '未选择采摘超时提示通知', $template_id, $type);
  291. if ($res['code'] == 0) {
  292. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  293. }
  294. } else {
  295. $res = [
  296. 'code' => 1,
  297. 'msg' => '公众号模板消息未完成'
  298. ];
  299. }
  300. return $res;
  301. }
  302. public static function adopt_storage($type, $template_id)
  303. {
  304. if (1 || $type == 'miapp') {
  305. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '未选择保管超时提示通知', $template_id, $type);
  306. if ($res['code'] == 0) {
  307. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  308. }
  309. } else {
  310. $res = [
  311. 'code' => 1,
  312. 'msg' => '公众号模板消息未完成'
  313. ];
  314. }
  315. return $res;
  316. }
  317. public static function adopt_preserve($type, $template_id)
  318. {
  319. if (1 || $type == 'miapp') {
  320. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '免费保管到期提示通知', $template_id, $type);
  321. if ($res['code'] == 0) {
  322. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  323. }
  324. } else {
  325. $res = [
  326. 'code' => 1,
  327. 'msg' => '公众号模板消息未完成'
  328. ];
  329. }
  330. return $res;
  331. }
  332. public static function adopt_order_confirm_mature($type, $template_id)
  333. {
  334. if (1 || $type == 'miapp') {
  335. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '确认成熟提示通知', $template_id, $type);
  336. if ($res['code'] == 0) {
  337. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  338. }
  339. } else {
  340. $res = [
  341. 'code' => 1,
  342. 'msg' => '公众号模板消息未完成'
  343. ];
  344. }
  345. return $res;
  346. }
  347. public static function adopt_order_self_pick($type, $template_id)
  348. {
  349. if (1 || $type == 'miapp') {
  350. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '自采提示通知', $template_id, $type);
  351. if ($res['code'] == 0) {
  352. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  353. }
  354. } else {
  355. $res = [
  356. 'code' => 1,
  357. 'msg' => '公众号模板消息未完成'
  358. ];
  359. }
  360. return $res;
  361. }
  362. public static function adopt_order_other_pick($type, $template_id)
  363. {
  364. if (1 || $type == 'miapp') {
  365. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '代采提示通知', $template_id, $type);
  366. if ($res['code'] == 0) {
  367. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  368. }
  369. } else {
  370. $res = [
  371. 'code' => 1,
  372. 'msg' => '公众号模板消息未完成'
  373. ];
  374. }
  375. return $res;
  376. }
  377. public static function adopt_order_confirm_self_pick_book($type, $template_id)
  378. {
  379. if (1 || $type == 'miapp') {
  380. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '确认自采预约提示通知', $template_id, $type);
  381. if ($res['code'] == 0) {
  382. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  383. }
  384. } else {
  385. $res = [
  386. 'code' => 1,
  387. 'msg' => '公众号模板消息未完成'
  388. ];
  389. }
  390. return $res;
  391. }
  392. public static function adopt_order_start_self_pick($type, $template_id)
  393. {
  394. if (1 || $type == 'miapp') {
  395. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '开始自采提示通知', $template_id, $type);
  396. if ($res['code'] == 0) {
  397. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  398. }
  399. } else {
  400. $res = [
  401. 'code' => 1,
  402. 'msg' => '公众号模板消息未完成'
  403. ];
  404. }
  405. return $res;
  406. }
  407. public static function adopt_order_end_self_pick($type, $template_id)
  408. {
  409. if (1 || $type == 'miapp') {
  410. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '自采结束提示通知', $template_id, $type);
  411. if ($res['code'] == 0) {
  412. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  413. }
  414. } else {
  415. $res = [
  416. 'code' => 1,
  417. 'msg' => '公众号模板消息未完成'
  418. ];
  419. }
  420. return $res;
  421. }
  422. public static function adopt_order_confirm_self_pick_finish($type, $template_id)
  423. {
  424. if (1 || $type == 'miapp') {
  425. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '确认自采完成提示通知', $template_id, $type);
  426. if ($res['code'] == 0) {
  427. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  428. }
  429. } else {
  430. $res = [
  431. 'code' => 1,
  432. 'msg' => '公众号模板消息未完成'
  433. ];
  434. }
  435. return $res;
  436. }
  437. public static function adopt_order_pick_take($type, $template_id)
  438. {
  439. if (1 || $type == 'miapp') {
  440. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '带走提示通知', $template_id, $type);
  441. if ($res['code'] == 0) {
  442. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  443. }
  444. } else {
  445. $res = [
  446. 'code' => 1,
  447. 'msg' => '公众号模板消息未完成'
  448. ];
  449. }
  450. return $res;
  451. }
  452. public static function adopt_order_storage($type, $template_id)
  453. {
  454. if (1 || $type == 'miapp') {
  455. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '入库提示通知', $template_id, $type);
  456. if ($res['code'] == 0) {
  457. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  458. }
  459. } else {
  460. $res = [
  461. 'code' => 1,
  462. 'msg' => '公众号模板消息未完成'
  463. ];
  464. }
  465. return $res;
  466. }
  467. public static function adopt_order_confirm_storage($type, $template_id)
  468. {
  469. if (1 || $type == 'miapp') {
  470. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '确认入库提示通知', $template_id, $type);
  471. if ($res['code'] == 0) {
  472. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  473. }
  474. } else {
  475. $res = [
  476. 'code' => 1,
  477. 'msg' => '公众号模板消息未完成'
  478. ];
  479. }
  480. return $res;
  481. }
  482. public static function adopt_order_preserve($type, $template_id)
  483. {
  484. if (1 || $type == 'miapp') {
  485. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '保管提示通知', $template_id, $type);
  486. if ($res['code'] == 0) {
  487. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  488. }
  489. } else {
  490. $res = [
  491. 'code' => 1,
  492. 'msg' => '公众号模板消息未完成'
  493. ];
  494. }
  495. return $res;
  496. }
  497. public static function adopt_order_no_preserve($type, $template_id)
  498. {
  499. if (1 || $type == 'miapp') {
  500. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '不保管提示通知', $template_id, $type);
  501. if ($res['code'] == 0) {
  502. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  503. }
  504. } else {
  505. $res = [
  506. 'code' => 1,
  507. 'msg' => '公众号模板消息未完成'
  508. ];
  509. }
  510. return $res;
  511. }
  512. public static function adopt_order_finish($type, $template_id)
  513. {
  514. if (1 || $type == 'miapp') {
  515. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '认养完成提示通知', $template_id, $type);
  516. if ($res['code'] == 0) {
  517. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  518. }
  519. } else {
  520. $res = [
  521. 'code' => 1,
  522. 'msg' => '公众号模板消息未完成'
  523. ];
  524. }
  525. return $res;
  526. }
  527. public static function adopt_order_other_pick_pay($type, $template_id)
  528. {
  529. if (1 || $type == 'miapp') {
  530. $res = NoticeAction::getTamplateId(3115, [4, 3, 15, 5], '支付代采费用提示通知', $template_id, $type);
  531. if ($res['code'] == 0) {
  532. $res['kid_list'] = ['character_string4', 'thing3', 'thing15', 'time5'];
  533. }
  534. } else {
  535. $res = [
  536. 'code' => 1,
  537. 'msg' => '公众号模板消息未完成'
  538. ];
  539. }
  540. return $res;
  541. }
  542. /**
  543. * @description: 收到客户新订单通知 订单号、金额、商品信息、下单时间
  544. * @return {*}
  545. */
  546. public static function place_order($type, $template_id)
  547. {
  548. if ($type == 'miapp') {
  549. $res = [
  550. 'code' => 1,
  551. 'msg' => '小程序模板消息未完成'
  552. ];
  553. }elseif ($type == 'wxaapi') {
  554. $res = NoticeAction::getTamplateId(48089, [1, 15, 7, 2], '收到客户新订单通知', $template_id, $type);
  555. if ($res['code'] == 0) {
  556. $res['kid_list'] = ['character_string1', 'amount15', 'thing7', 'time2'];
  557. }
  558. } else {
  559. $res = [
  560. 'code' => 1,
  561. 'msg' => '模板消息未完成'
  562. ];
  563. }
  564. return $res;
  565. }
  566. /**
  567. * @description: 直播开播提醒 直播主题、直播方、开播时间
  568. * @return {*}
  569. */
  570. public static function live_begin($type, $template_id)
  571. {
  572. if (1 || $type == 'miapp') {
  573. $res = NoticeAction::getTamplateId(9169, [1, 5, 2], '直播开播提醒', $template_id, $type);
  574. if ($res['code'] == 0) {
  575. $res['kid_list'] = ['thing1', 'thing5', 'time2'];
  576. }
  577. } else {
  578. $res = [
  579. 'code' => 1,
  580. 'msg' => '公众号模板消息未完成'
  581. ];
  582. }
  583. return $res;
  584. }
  585. /**
  586. * @description: 产品降价提醒 产品名称、下降金额、降后价格
  587. * @return {*}
  588. */
  589. public static function lowering_price($type, $template_id)
  590. {
  591. if (1 || $type == 'miapp') {
  592. $res = NoticeAction::getTamplateId(40919, [1, 2, 3], '产品降价提醒', $template_id, $type);
  593. if ($res['code'] == 0) {
  594. $res['kid_list'] = ['thing1', 'amount2', 'amount3'];
  595. }
  596. } else {
  597. $res = [
  598. 'code' => 1,
  599. 'msg' => '公众号模板消息未完成'
  600. ];
  601. }
  602. return $res;
  603. }
  604. /* begin 2025/07/10 19:52:44 WPing丶 */
  605. /**
  606. * @description: 服务人员抢单通知 订单号、下单时间、收货地址、订单金额
  607. * @return {*}
  608. */
  609. public static function service_new_order($type, $template_id)
  610. {
  611. if ($type == 'miapp') {
  612. $res = [
  613. 'code' => 1,
  614. 'msg' => '小程序模板消息未完成'
  615. ];
  616. }elseif ($type == 'wxaapi') {
  617. $res = NoticeAction::getTamplateId(44298, [2, 6, 5], '收到客户新订单通知', $template_id, $type);
  618. if ($res['code'] == 0) {
  619. $res['kid_list'] = ['character_string2', 'time6', 'amount5'];
  620. }
  621. } else {
  622. $res = [
  623. 'code' => 1,
  624. 'msg' => '模板消息未完成'
  625. ];
  626. }
  627. return $res;
  628. }
  629. /**
  630. * @description: 服务人员接到新订单通知 订单号、金额、商品信息、下单时间
  631. * @return {*}
  632. */
  633. public static function service_receive_order($type, $template_id)
  634. {
  635. if ($type == 'miapp') {
  636. $res = [
  637. 'code' => 1,
  638. 'msg' => '小程序模板消息未完成'
  639. ];
  640. }elseif ($type == 'wxaapi') {
  641. $res = NoticeAction::getTamplateId(48089, [1, 15, 7, 2], '收到客户新订单通知', $template_id, $type);
  642. if ($res['code'] == 0) {
  643. $res['kid_list'] = ['character_string1', 'amount15', 'thing7', 'time2'];
  644. }
  645. } else {
  646. $res = [
  647. 'code' => 1,
  648. 'msg' => '模板消息未完成'
  649. ];
  650. }
  651. return $res;
  652. }
  653. /* end */
  654. }