Commit 1c3e1c9e by 王召彬
parents ab76cf57 483776c9
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/7/16
* Time: 11:09
*/
$basePath = dirname(__DIR__,3);
/**
* 用于自建组件扫描路径配置(键值是方便开发人员理解,代码中无意义)
* [
* 'commonPath' => $basePath.'/Common',
* 'orderEnum' => $basePath.'/Order/Enum',
*
* ];
*/
return [
'commonPath' => $basePath.'/Common',
];
\ No newline at end of file
...@@ -5,19 +5,19 @@ ...@@ -5,19 +5,19 @@
* Date: 2018/7/16 * Date: 2018/7/16
* Time: 9:32 * Time: 9:32
*/ */
$basePath = dirname(__DIR__,3); $scanPaths = include __DIR__.'/PathConfig.php';
$data = [];
$files = \Swoft\Helper\DirHelper::glob($basePath,'*.php'); foreach ($scanPaths as $basePath) {
$files = \Swoft\Helper\DirHelper::glob($basePath,'*.php');
$baseNamespace = "Hdll\Services\\";
$baseNamespace = "Hdll\Services"; foreach ( $files as $file ) {
$data = []; $pathSpace = str_replace("/var/www/swoft/vendor/hdll/services/src/","",$file);
foreach ( $files as $file ) { $pathSpace = dirname($pathSpace);
$path = dirname($file); $pathSpace = str_replace("/","\\",$pathSpace);
$suffixNamespace = str_replace($basePath,"",$path);
$suffixNamespace = str_replace("/","\\",$suffixNamespace);
$namespace = $baseNamespace.$suffixNamespace; $namespace = $baseNamespace.$pathSpace;
$fileName = basename($file,'.php'); $fileName = basename($file,'.php');
...@@ -43,8 +43,7 @@ foreach ( $files as $file ) { ...@@ -43,8 +43,7 @@ foreach ( $files as $file ) {
} }
}
} }
......
...@@ -11,13 +11,6 @@ ...@@ -11,13 +11,6 @@
namespace Hdll\Services\Common\Entity; namespace Hdll\Services\Common\Entity;
use Swoft\Bean\Annotation\Bean; use Swoft\Bean\Annotation\Bean;
use Swoft\Db\Bean\Annotation\Id;
use Swoft\Db\Bean\Annotation\Required;
use Swoft\Db\Bean\Annotation\Table;
use Swoft\Db\Bean\Annotation\Column;
use Swoft\Db\Bean\Annotation\Entity;
use Swoft\Db\Model;
use Swoft\Db\Types;
/** /**
* 用户实体 * 用户实体
...@@ -32,14 +25,16 @@ class User ...@@ -32,14 +25,16 @@ class User
{ {
private $id; private $id;
private $nick_name; private $nickName;
private $store_id; private $storeId;
private $head_img; private $headImg;
private $token; private $token;
private $cmId;
public function __construct($token='') public function __construct($token='')
...@@ -59,17 +54,17 @@ class User ...@@ -59,17 +54,17 @@ class User
public function getNickName() public function getNickName()
{ {
return $this->nick_name; return $this->nickName;
} }
public function getStoreId() public function getStoreId()
{ {
return $this->store_id; return $this->storeId;
} }
public function getHeadImg() public function getHeadImg()
{ {
return $this->head_img; return $this->headImg;
} }
public function getToken() public function getToken()
...@@ -84,17 +79,17 @@ class User ...@@ -84,17 +79,17 @@ class User
public function setNickName($value) public function setNickName($value)
{ {
return $this->nick_name = $value; return $this->nickName = $value;
} }
public function setStoreId($value) public function setStoreId($value)
{ {
return $this->store_id = $value; return $this->storeId = $value;
} }
public function setHeadImg($value) public function setHeadImg($value)
{ {
return $this->head_img = $value; return $this->headImg = $value;
} }
public function setToken($value) public function setToken($value)
...@@ -102,5 +97,14 @@ class User ...@@ -102,5 +97,14 @@ class User
return $this->token = $value; return $this->token = $value;
} }
public function setCmId($value)
{
$this->cmId = $value;
}
public function getCmId()
{
return $this->cmId;
}
} }
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