UserShare.php 477 B

12345678910111213141516171819
  1. <?php
  2. namespace app\common\Service\User;
  3. use app\common\model\user\Share as ShareModel;
  4. class UserShare
  5. {
  6. // 增加分享记录
  7. public static function addShare($userId = 0, $shareId = 0, $from = '', $platform = '')
  8. {
  9. $shareModel = new ShareModel();
  10. $shareModel->user_id = $userId;
  11. $shareModel->share_id = $shareId;
  12. $shareModel->from = $from;
  13. $shareModel->platform = $platform;
  14. $shareModel->save();
  15. }
  16. }