feat:兼容开发

main
gzydong 2022-01-20 21:20:58 +08:00
parent bcfaa2a983
commit 54ac69e11a
8 changed files with 20 additions and 14 deletions

View File

@ -8,8 +8,8 @@ use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Annotation\Middleware;
use App\Middleware\JWTAuthMiddleware;
use App\Constants\ResponseCode;
use App\Model\Emoticon;
use App\Model\EmoticonItem;
use App\Model\Emoticon\Emoticon;
use App\Model\Emoticon\EmoticonItem;
use App\Service\EmoticonService;
use League\Flysystem\Filesystem;
use Psr\Http\Message\ResponseInterface;
@ -189,12 +189,13 @@ class EmoticonController extends CController
public function delCollectEmoticon(): ResponseInterface
{
$params = $this->request->inputs(['ids']);
$this->validate($params, [
'ids' => 'required|ids'
]);
return $this->emoticonService->deleteCollect($this->uid(), parse_ids($params['ids'])) ?
$this->response->success([]) :
$this->response->fail();
$isTrue = $this->emoticonService->deleteCollect($this->uid(), parse_ids($params['ids']));
return $isTrue ? $this->response->success() : $this->response->fail();
}
}

View File

@ -2,7 +2,9 @@
declare (strict_types=1);
namespace App\Model;
namespace App\Model\Emoticon;
use App\Model\BaseModel;
/**
* 表情包分组数据表模型

View File

@ -2,7 +2,9 @@
declare (strict_types=1);
namespace App\Model;
namespace App\Model\Emoticon;
use App\Model\BaseModel;
/**
* 表情包数据表模型

View File

@ -2,7 +2,9 @@
declare (strict_types=1);
namespace App\Model;
namespace App\Model\Emoticon;
use App\Model\BaseModel;
/**
* 表情包收藏数据表模型

View File

@ -19,11 +19,12 @@ use Hyperf\DbConnection\Model\Model;
* @property int $type 机器人类型
* @property string $created_at 创建时间
* @property string $updated_at 更新时间
*
* @package App\Model
*/
class Robot extends Model
{
protected $table = 'robots';
protected $table = 'robot';
protected $fillable = [
'user_id',

View File

@ -5,7 +5,6 @@ namespace App\Model\Talk;
use App\Model\BaseModel;
/**
* Class TalkRecordsVoteAnswer
*
@ -30,6 +29,6 @@ class TalkRecordsVoteAnswer extends BaseModel
protected $casts = [
'vote_id' => 'integer',
'user_id' => 'integer',
'created_at' => 'integer',
'created_at' => 'datetime',
];
}

View File

@ -41,7 +41,6 @@ class TalkSession extends BaseModel
];
protected $casts = [
'id' => 'integer',
'talk_type' => 'integer',
'user_id' => 'integer',
'receiver_id' => 'integer',

View File

@ -7,8 +7,8 @@ use App\Constants\TalkMessageType;
use App\Constants\TalkModeConstant;
use App\Model\Talk\TalkRecords;
use App\Model\Talk\TalkRecordsFile;
use App\Model\EmoticonItem;
use App\Model\UsersEmoticon;
use App\Model\Emoticon\EmoticonItem;
use App\Model\Emoticon\UsersEmoticon;
use App\Service\Group\GroupMemberService;
/**