Commit 5e413177 by liwotianname

Merge branch 'master' of http://139.199.22.180/tencent/services

parents 6138c71e bc90980a
......@@ -7,6 +7,7 @@
*/
namespace Hdll\Services\Common\Entity;
use Hdll\Services\Common\Bean\Collector\SplitCollector;
use Swoft\App;
use Swoft\Core\RequestContext;
use Swoft\Db\Bean\Collector\EntityCollector;
......@@ -78,7 +79,7 @@ class CommonEntity extends Model
/**
* 获取分库表名
*
* @return string|void
* @return string
* @throws Exception
* @throws \ReflectionException
*/
......@@ -89,8 +90,6 @@ class CommonEntity extends Model
return;
}
$request = RequestContext::getRequest();
//获取注解里的table
$res = new \ReflectionClass(static::class);
$commentString = $res->getDocComment();
......@@ -127,7 +126,10 @@ class CommonEntity extends Model
throw new Exception("店铺id获取失败");
}
return $store % 100;
$splitCollector = SplitCollector::getCollector();
$splitNum = $splitCollector[static::class]['num'];
return $store % $splitNum;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment