Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tencent
services
Commits
fdbea49d
Commit
fdbea49d
authored
Nov 20, 2018
by
xmy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ab6a3029
ca20cab5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
6 deletions
+108
-6
UPGRADE.md
+4
-1
src/Auth/Enum/AuthEnum.php
+1
-0
src/Buyer/Lib/BuyerInterface.php
+11
-0
src/Commands/ClassTemplate/Data/ClassTemplate
+86
-1
src/Goods/Lib/GoodsInterface.php
+6
-4
No files found.
UPGRADE.md
View file @
fdbea49d
# 1.0.11
-
商品服务:修改服务参数
# 1.0.10
-
买家服务:增加获取上级信息接口
# 1.0.9
# 1.0.9
-
添加访客统计的RPC接口
-
添加访客统计的RPC接口
# 1.0.8
# 1.0.8
-
分表逻辑判断处理
-
分表逻辑判断处理
# 1.0.7
# 1.0.7
...
...
src/Auth/Enum/AuthEnum.php
View file @
fdbea49d
...
@@ -16,6 +16,7 @@ class AuthEnum
...
@@ -16,6 +16,7 @@ class AuthEnum
const
SCOPE_SELLER
=
3
;
//卖家
const
SCOPE_SELLER
=
3
;
//卖家
const
SCOPE_ADMIN
=
4
;
//管理员
const
SCOPE_ADMIN
=
4
;
//管理员
const
SCOPE_SUPER_ADMIN
=
5
;
//超级管理员
const
AUTH_BACKEND
=
100
;
const
AUTH_BACKEND
=
100
;
...
...
src/Buyer/Lib/BuyerInterface.php
View file @
fdbea49d
...
@@ -13,6 +13,7 @@ use Swoft\Core\ResultInterface;
...
@@ -13,6 +13,7 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGetUser(string $token)
* @method ResultInterface deferGetUser(string $token)
* @method ResultInterface deferUpdateProfile(string $token, array $data)
* @method ResultInterface deferUpdateProfile(string $token, array $data)
* @method ResultInterface deferSelectUser(int $storeId, array $buyerIds, array $fields= ['*'])
* @method ResultInterface deferSelectUser(int $storeId, array $buyerIds, array $fields= ['*'])
* @method ResultInterface deferGetRefereeInfo($storeId,$buyerId)
* Interface BuyerInterface
* Interface BuyerInterface
* @package App\Lib
* @package App\Lib
*/
*/
...
@@ -80,4 +81,13 @@ interface BuyerInterface
...
@@ -80,4 +81,13 @@ interface BuyerInterface
public
function
hasUser
(
$storeId
,
$unionid
);
public
function
hasUser
(
$storeId
,
$unionid
);
public
function
selectUser
(
int
$storeId
,
array
$buyerIds
,
array
$fields
=
[
'*'
]);
public
function
selectUser
(
int
$storeId
,
array
$buyerIds
,
array
$fields
=
[
'*'
]);
/**
* 根据买家id获取其上级信息
*
* @param $storeId
* @param $buyerId
* @return mixed
*/
public
function
getRefereeInfo
(
$storeId
,
$buyerId
);
}
}
\ No newline at end of file
src/Commands/ClassTemplate/Data/ClassTemplate
View file @
fdbea49d
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* Date: 2018/9/29
* Date: 2018/9/29
* Time: 11:35
* Time: 11:35
*/
*/
namespace App\Models\Data;
namespace App\Models\Data;
use App\Models\Dao\{daoName};
use App\Models\Dao\{daoName};
use Swoft\Bean\Annotation\Bean;
use Swoft\Bean\Annotation\Bean;
...
@@ -25,4 +25,88 @@ class {dataName}
...
@@ -25,4 +25,88 @@ class {dataName}
*/
*/
private ${varDaoName};
private ${varDaoName};
/**
* 查询一条数据
*
* @param array $condition
* @param array $option
* @return array|mixed
*/
public function getByCondition(array $condition, array $option)
{
$Info = $this->{varDaoName}->getInfoByCondition($condition, $option);
return empty($Info)?[]:$Info;
}
/**
* 查询多条数据
*
* @param array $condition
* @param array $option
* @return mixed
*/
public function selectByCondition(array $condition, array $option)
{
return $this->{varDaoName}->selectInfoByCondition($condition, $option);
}
/**
* 更新一条数据
*
* @param array $condition
* @param array $updateInfo
* @return mixed
*/
public function updateOne(array $condition, array $updateInfo)
{
return $this->{varDaoName}->updateOne($condition, $updateInfo);
}
/**
* 更新多条数据
*
* @param array $condition
* @param array $updateInfo
* @return mixed
*/
public function updateAll(array $condition, array $updateInfo)
{
return $this->{varDaoName}->updateByCondition($condition, $updateInfo);
}
/**
* 删除满足条件的一条信息
*
* @param array $condition
* @param bool $isReal
* @return mixed
*/
public function delOne(array $condition, $isReal = false)
{
if ( $isReal ) {
return $this->{varDaoName}->delOne($condition);
} else {
return $this->{varDaoName}->updateOne($condition, ['deleteTime' => time()]);
}
}
/**
* 删除满足条件的所有条目
*
* @param array $condition
* @param bool $isReal
* @return mixed
*/
public function delAll(array $condition, $isReal = false)
{
if ( $isReal ) {
return $this->{varDaoName}->delAll($condition);
} else {
return $this->{varDaoName}->updateByCondition($condition, ['deleteTime' => time()]);
}
}
}
}
\ No newline at end of file
src/Goods/Lib/GoodsInterface.php
View file @
fdbea49d
...
@@ -14,8 +14,8 @@ use Swoft\Core\ResultInterface;
...
@@ -14,8 +14,8 @@ use Swoft\Core\ResultInterface;
* @method ResultInterface deferGet($storeId, $id)
* @method ResultInterface deferGet($storeId, $id)
* @method ResultInterface deferIncSales($storeId, $goodsId)
* @method ResultInterface deferIncSales($storeId, $goodsId)
* @method ResultInterface deferDecSales($storeId, $goodsId)
* @method ResultInterface deferDecSales($storeId, $goodsId)
* @method ResultInterface deferGetServiceByGoodsId($storeId, $goodsId)
* @method ResultInterface deferGetServiceByGoodsId($storeId, $goodsId
,$type
)
* @method ResultInterface deferGetReturnVisitByGoodsId($storeId, $goodsId)
* @method ResultInterface deferGetReturnVisitByGoodsId($storeId, $goodsId
,$type
)
* @method ResultInterface deferListByIds($ids, $storeId)
* @method ResultInterface deferListByIds($ids, $storeId)
* Interface GoodsInterface
* Interface GoodsInterface
* @package Hdll\Services\Goods\Lib
* @package Hdll\Services\Goods\Lib
...
@@ -70,20 +70,22 @@ interface GoodsInterface
...
@@ -70,20 +70,22 @@ interface GoodsInterface
* 获取商品服务
* 获取商品服务
* @param $storeId
* @param $storeId
* @param $goodsId
* @param $goodsId
* @param $type 1 之前 2 之后
* @return mixed
* @return mixed
* @author Administrator
* @author Administrator
*/
*/
public
function
getServiceByGoodsId
(
$storeId
,
$goodsId
);
public
function
getServiceByGoodsId
(
$storeId
,
$goodsId
,
$type
);
/**
/**
* 获取用户回访
* 获取用户回访
* @param $storeId
* @param $storeId
* @param $goodsId
* @param $goodsId
* @param $type 1 之前 2 之后
* @return mixed
* @return mixed
* @author Administrator
* @author Administrator
*/
*/
public
function
getReturnVisitByGoodsId
(
$storeId
,
$goodsId
);
public
function
getReturnVisitByGoodsId
(
$storeId
,
$goodsId
,
$type
);
/**
/**
* 获取商品列表 ids
* 获取商品列表 ids
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment