541469799@qq.com 1 år sedan
förälder
incheckning
7af82e32eb
2 ändrade filer med 13 tillägg och 1 borttagningar
  1. 2 1
      app/index/controller/User.php
  2. 11 0
      public/install/data/install_struct.sql

+ 2 - 1
app/index/controller/User.php

@@ -155,7 +155,8 @@ class User extends Controller
 
         $MailCaptchaService = new MailCaptchaService;
         if ($MailCaptchaService->sendText($mailbox, 'From Your Friend', $url)) {
-            ShareKey::save(["key_string" => $encryptUserId, 'user_id' => $userId, 'create_time' => time(), 'is_delete' => 0, 'update_time' => time()]);
+            $shareKeyModel = new ShareKey();
+            $shareKeyModel->save(['key_string' => $encryptUserId, 'user_id' => $userId, 'create_time' => time(), 'is_delete' => 0, 'update_time' => time()]);
             return $this->renderSuccess('Sent Successful!Please check your new mails.');
         }
 

+ 11 - 0
public/install/data/install_struct.sql

@@ -966,3 +966,14 @@ CREATE TABLE `yoshop_h5_setting` (
 ALTER TABLE `yoshop_goods`
 ADD COLUMN `video_id`  int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '主图视频ID' AFTER `goods_no`,
 ADD COLUMN `video_cover_id`  int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '主图视频ID' AFTER `video_id`;
+
+DROP TABLE IF EXISTS `yoshop_share_key`;
+CREATE TABLE `yoshop_share_key` (
+ `key_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+ `key_string` varchar(255) NOT NULL DEFAULT '' COMMENT '分享链接key',
+ `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
+ `is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
+ `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
+ `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
+ PRIMARY KEY (`key_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户分享商品记录key表';