InformAdminClass.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace biz\message\classes;
  3. use Yii;
  4. use biz\base\classes\BaseClass;
  5. class InformAdminClass extends BaseClass
  6. {
  7. public static $baseFile = '\biz\message\models\InformAdmin';
  8. //宝贝售出通知 shish 2019.12.24
  9. public static function goodsSoldInformAdmin($params, $informWay = 0, $TMList = [])
  10. {
  11. if ($informWay == 0) {
  12. //收入提醒
  13. $shortTempId = 'OPENTM207422813';
  14. $tempId = isset($TMList[$shortTempId]) ? $TMList[$shortTempId] : '';
  15. $tmData = ["touser" => $openId, "template_id" => $tempId, "url" => Yii::$app->params['adminUrl'] . '/order/detail?id=' . $orderId, "data" => [
  16. "first" => ["value" => '您有宝贝售出哦!', "color" => "#173177"],
  17. "keyword1" => ["value" => (string)$orderId, "color" => "#173177"],
  18. "keyword2" => ["value" => $orderName, "color" => "#173177"],
  19. "keyword3" => ["value" => number_format($totalFee, 2) . '元', "color" => "#173177"],
  20. "keyword4" => ["value" => number_format($totalFee, 2) . '元', "color" => "#173177"],
  21. "keyword5" => ["value" => $userName, "color" => "#173177"],
  22. "remark" => ["value" => '点此查看详细、编辑收花人信息。', "color" => "#173177"]]];
  23. return $tmData;
  24. } else {
  25. return "客户" . $userName . "付款" . $totalFee . '元';
  26. }
  27. }
  28. //宝贝售出通知 shish 2019.12.24
  29. public static function inform($params, $type, $informWay = 0, $TMList = [])
  30. {
  31. switch ($type) {
  32. case 'goodsSoldInformAdmin':
  33. $respond = self::goodsSoldInformAdmin($params, $informWay, $TMList);
  34. break;
  35. default:
  36. }
  37. return $respond;
  38. }
  39. }