OrderPlan.php 849 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. *
  4. * @copyright ©2020 点小铺
  5. * @author hanj
  6. * @link: https://dyuit.com
  7. * Created by VSCode
  8. */
  9. namespace app\api\model\recharge;
  10. use app\common\model\recharge\OrderPlan as OrderPlanModel;
  11. /**
  12. * 用户充值订单套餐快照模型
  13. * Class OrderPlan
  14. * @package app\api\model\recharge
  15. */
  16. class OrderPlan extends OrderPlanModel
  17. {
  18. /**
  19. * 新增记录
  20. * @param $orderId
  21. * @param $data
  22. * @return false|int
  23. */
  24. public function add($orderId, $data)
  25. {
  26. return $this->save([
  27. 'order_id' => $orderId,
  28. 'plan_id' => $data['plan_id'],
  29. 'plan_name' => $data['plan_name'],
  30. 'money' => $data['money'],
  31. 'gift_money' => $data['gift_money'],
  32. 'wxapp_id' => self::$wxapp_id
  33. ]);
  34. }
  35. }