feat:兼容开发
parent
bcfaa2a983
commit
54ac69e11a
|
@ -8,8 +8,8 @@ use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||||
use Hyperf\HttpServer\Annotation\Middleware;
|
use Hyperf\HttpServer\Annotation\Middleware;
|
||||||
use App\Middleware\JWTAuthMiddleware;
|
use App\Middleware\JWTAuthMiddleware;
|
||||||
use App\Constants\ResponseCode;
|
use App\Constants\ResponseCode;
|
||||||
use App\Model\Emoticon;
|
use App\Model\Emoticon\Emoticon;
|
||||||
use App\Model\EmoticonItem;
|
use App\Model\Emoticon\EmoticonItem;
|
||||||
use App\Service\EmoticonService;
|
use App\Service\EmoticonService;
|
||||||
use League\Flysystem\Filesystem;
|
use League\Flysystem\Filesystem;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
@ -189,12 +189,13 @@ class EmoticonController extends CController
|
||||||
public function delCollectEmoticon(): ResponseInterface
|
public function delCollectEmoticon(): ResponseInterface
|
||||||
{
|
{
|
||||||
$params = $this->request->inputs(['ids']);
|
$params = $this->request->inputs(['ids']);
|
||||||
|
|
||||||
$this->validate($params, [
|
$this->validate($params, [
|
||||||
'ids' => 'required|ids'
|
'ids' => 'required|ids'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $this->emoticonService->deleteCollect($this->uid(), parse_ids($params['ids'])) ?
|
$isTrue = $this->emoticonService->deleteCollect($this->uid(), parse_ids($params['ids']));
|
||||||
$this->response->success([]) :
|
|
||||||
$this->response->fail();
|
return $isTrue ? $this->response->success() : $this->response->fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
|
|
||||||
namespace App\Model;
|
namespace App\Model\Emoticon;
|
||||||
|
|
||||||
|
use App\Model\BaseModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表情包分组数据表模型
|
* 表情包分组数据表模型
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
|
|
||||||
namespace App\Model;
|
namespace App\Model\Emoticon;
|
||||||
|
|
||||||
|
use App\Model\BaseModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表情包数据表模型
|
* 表情包数据表模型
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
|
|
||||||
namespace App\Model;
|
namespace App\Model\Emoticon;
|
||||||
|
|
||||||
|
use App\Model\BaseModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表情包收藏数据表模型
|
* 表情包收藏数据表模型
|
|
@ -19,11 +19,12 @@ use Hyperf\DbConnection\Model\Model;
|
||||||
* @property int $type 机器人类型
|
* @property int $type 机器人类型
|
||||||
* @property string $created_at 创建时间
|
* @property string $created_at 创建时间
|
||||||
* @property string $updated_at 更新时间
|
* @property string $updated_at 更新时间
|
||||||
|
*
|
||||||
* @package App\Model
|
* @package App\Model
|
||||||
*/
|
*/
|
||||||
class Robot extends Model
|
class Robot extends Model
|
||||||
{
|
{
|
||||||
protected $table = 'robots';
|
protected $table = 'robot';
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'user_id',
|
'user_id',
|
||||||
|
|
|
@ -5,7 +5,6 @@ namespace App\Model\Talk;
|
||||||
|
|
||||||
use App\Model\BaseModel;
|
use App\Model\BaseModel;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TalkRecordsVoteAnswer
|
* Class TalkRecordsVoteAnswer
|
||||||
*
|
*
|
||||||
|
@ -30,6 +29,6 @@ class TalkRecordsVoteAnswer extends BaseModel
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'vote_id' => 'integer',
|
'vote_id' => 'integer',
|
||||||
'user_id' => 'integer',
|
'user_id' => 'integer',
|
||||||
'created_at' => 'integer',
|
'created_at' => 'datetime',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,6 @@ class TalkSession extends BaseModel
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'id' => 'integer',
|
|
||||||
'talk_type' => 'integer',
|
'talk_type' => 'integer',
|
||||||
'user_id' => 'integer',
|
'user_id' => 'integer',
|
||||||
'receiver_id' => 'integer',
|
'receiver_id' => 'integer',
|
||||||
|
|
|
@ -7,8 +7,8 @@ use App\Constants\TalkMessageType;
|
||||||
use App\Constants\TalkModeConstant;
|
use App\Constants\TalkModeConstant;
|
||||||
use App\Model\Talk\TalkRecords;
|
use App\Model\Talk\TalkRecords;
|
||||||
use App\Model\Talk\TalkRecordsFile;
|
use App\Model\Talk\TalkRecordsFile;
|
||||||
use App\Model\EmoticonItem;
|
use App\Model\Emoticon\EmoticonItem;
|
||||||
use App\Model\UsersEmoticon;
|
use App\Model\Emoticon\UsersEmoticon;
|
||||||
use App\Service\Group\GroupMemberService;
|
use App\Service\Group\GroupMemberService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue