|
|
@@ -1,4 +1,5 @@
|
|
|
<?php
|
|
|
+
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
namespace SixShop\Points\Entity;
|
|
|
@@ -8,6 +9,7 @@ use SixShop\Points\Enum\UserPointTypeEnum;
|
|
|
use SixShop\Points\Model\UserPointLogModel;
|
|
|
use think\db\Query;
|
|
|
use think\Paginator;
|
|
|
+
|
|
|
use function SixShop\Core\throw_logic_exception;
|
|
|
|
|
|
class UserPointEntity extends BaseEntity
|
|
|
@@ -20,8 +22,7 @@ class UserPointEntity extends BaseEntity
|
|
|
int $bizID,
|
|
|
string $remark,
|
|
|
int $freezePoint = 0,
|
|
|
- ): self
|
|
|
- {
|
|
|
+ ): self {
|
|
|
if ($point == 0 && $freezePoint == 0) {
|
|
|
throw_logic_exception('积分调整不能为0');
|
|
|
}
|
|
|
@@ -61,4 +62,4 @@ class UserPointEntity extends BaseEntity
|
|
|
->field(['u.id', 'u.avatar', 'u.nickname', 'u.mobile', 'l.point', 'l.update_time'])
|
|
|
->paginate($pageAndLimit);
|
|
|
}
|
|
|
-}
|
|
|
+}
|