Commit c9311750 by feixiang

分表 表号设置

parent 338127f7
......@@ -63,7 +63,13 @@ class Split
$splitCollector = SplitCollector::getCollector();
$splitNum = $splitCollector[$className]['num'];
$data = RequestContext::getContextData();
$dbNum = $data['dbNum'];
if ( ! empty($dbNum) ) {//若手动设置的分表信息则直接返回设置的表号
return $dbNum;
}
$storeId = $data['userInfo']['storeId'];
if ( empty($storeId) ) {
throw new CommonException(["msg" => "参数异常,获取店铺信息失败。"]);
}
......
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