Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
goods
Commits
aeeb83f7
Commit
aeeb83f7
authored
Jun 24, 2021
by
jianghaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:修改
parent
4a42c6bb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
66 deletions
+96
-66
MarketingException.php
application/exception/custom/MarketingException.php
+2
-0
Distributor.php
application/modules/Marketing/controllers/Distributor.php
+12
-0
Marketing.php
application/modules/Marketing/controllers/Marketing.php
+6
-2
Shop.php
application/modules/Shop/controllers/Shop.php
+2
-2
DistributorService.php
application/services/marketing/DistributorService.php
+39
-32
MarketingGoodsService.php
application/services/marketing/MarketingGoodsService.php
+9
-7
ShopService.php
application/services/shop/ShopService.php
+26
-23
No files found.
application/exception/custom/MarketingException.php
View file @
aeeb83f7
...
...
@@ -17,5 +17,7 @@ class MarketingException extends BaseException
3
=>
'(一级)佣金率不能为空'
,
4
=>
'(二级)佣金率不能为空'
,
5
=>
'创建失败'
,
6
=>
'活动id不能为空'
,
7
=>
'更新失败'
,
];
}
\ No newline at end of file
application/modules/Marketing/controllers/Distributor.php
View file @
aeeb83f7
...
...
@@ -84,6 +84,18 @@ class DistributorController extends Base
$info
=
DistributorService
::
distributor
(
$params
);
$this
->
success
([
'result'
=>
$info
]);
}
/**
* 获取待审核的团长列表
* 后台管理
*
*/
public
function
distributor_listAction
()
{
$params
=
$this
->
params
;
$distributionList
=
DistributorService
::
distributorList
(
$params
);
$this
->
success
(
$distributionList
);
}
/**
* 获取团长列表
...
...
application/modules/Marketing/controllers/Marketing.php
View file @
aeeb83f7
...
...
@@ -43,7 +43,11 @@ class MarketingController extends Base
{
$params
=
$this
->
params
;
$where
[
'marketing_id'
]
=
$params
[
'marketing_id'
];
$where
[
'marketing_id'
]
=
!
empty
(
$params
[
'marketing_id'
])
?
$params
[
'marketing_id'
]
:
''
;
$param
=
[];
if
(
empty
(
$where
[
'marketing_id'
]))
{
throw
new
MarketingException
([
'cus'
=>
6
]);
}
if
(
!
empty
(
$params
[
'audit_status'
]))
{
$param
[
'audit_status'
]
=
$params
[
'audit_status'
];
...
...
@@ -58,7 +62,7 @@ class MarketingController extends Base
if
(
!
empty
(
$srt
))
{
$this
->
success
();
}
else
{
throw
new
DistributorException
([
'cus'
=>
1
]);
throw
new
MarketingException
([
'cus'
=>
7
]);
}
}
...
...
application/modules/Shop/controllers/Shop.php
View file @
aeeb83f7
...
...
@@ -39,7 +39,7 @@ class ShopController extends Base
public
function
update_shopAction
()
{
$params
=
$this
->
params
;
$where
[
's
tores_id'
]
=
!
empty
(
$params
[
'stores_id'
])
?
$params
[
'stores
_id'
]
:
''
;
$where
[
's
ub_shop_id'
]
=
!
empty
(
$params
[
'sub_shop_id'
])
?
$params
[
'sub_shop
_id'
]
:
''
;
$subShopList
=
ShopService
::
updateShop
(
$params
,
$where
);
}
...
...
@@ -50,7 +50,7 @@ class ShopController extends Base
public
function
get_shop_infoAction
(
$value
=
''
)
{
$params
=
$this
->
params
;
$param
[
's
tores_id'
]
=
!
empty
(
$params
[
'stores_id'
])
?
$params
[
'stores
_id'
]
:
''
;
$param
[
's
ub_shop_id'
]
=
!
empty
(
$params
[
'sub_shop_id'
])
?
$params
[
'sub_shop
_id'
]
:
''
;
$subShopList
=
ShopService
::
getShopInfo
(
$param
);
}
...
...
application/services/marketing/DistributorService.php
View file @
aeeb83f7
...
...
@@ -21,19 +21,23 @@ class DistributorService
*/
public
static
function
secondDistributor
(
$params
)
{
$params
[
'page'
]
=
!
empty
(
$params
[
'page'
])
?
$params
[
'page'
]
:
1
;
$limit
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
$page
=
(
$params
[
'page'
]
-
1
)
*
$limit
;
//$params['page'] = !empty($params['page']) ? $params['page'] : 1;
$limit
=
!
empty
(
$params
[
'num'
])
?
$params
[
'num'
]
:
20
;
//$page = ($params['page'] - 1) * $limit;
// if (!empty($params['user_id'])) {
// $where['user_id'] = $params['user_id'];
// }
if
(
!
empty
(
$params
[
'user_id'
]))
{
$where
[
'user_id'
]
=
$params
[
'user_id'
];
$where
[
'
parent_
user_id'
]
=
$params
[
'user_id'
];
}
if
(
!
empty
(
$params
[
'
higher_user
_id'
]))
{
$where
[
'higher_user_id'
]
=
$params
[
'higher_user
_id'
];
if
(
!
empty
(
$params
[
'
last
_id'
]))
{
$where
[
'id[<]'
]
=
$params
[
'last
_id'
];
}
$where
[
'LIMIT'
]
=
[
$page
,
$limit
]
;
$where
[
'LIMIT'
]
=
$limit
;
$where
[
'ORDER'
]
=
[
"create_time"
=>
"DESC"
];
$list
=
Distributor
::
getRecords
(
$where
);
$last
=
end
(
$list
);
...
...
@@ -51,8 +55,8 @@ class DistributorService
{
$userId
=
!
empty
(
$params
[
'user_id'
])
?
$params
[
'user_id'
]
:
''
;
$userName
=
!
empty
(
$params
[
'user_name'
])
?
$params
[
'user_name'
]
:
''
;
$
type
=
!
empty
(
$params
[
'type'
])
?
$params
[
'
type'
]
:
''
;
$info
=
Distributor
::
getRecord
([
'user_id'
=>
$userId
,
'
type'
=>
$t
ype
]);
$
distributorType
=
!
empty
(
$params
[
'distributor_type'
])
?
$params
[
'distributor_
type'
]
:
''
;
$info
=
Distributor
::
getRecord
([
'user_id'
=>
$userId
,
'
distributor_type'
=>
$distributorT
ype
]);
if
(
!
empty
(
$info
))
{
throw
new
DistributorException
([
'cus'
=>
2
]);
}
...
...
@@ -86,8 +90,8 @@ class DistributorService
'user_name'
=>
$userName
,
'update_time'
=>
date
(
"Y-m-d H:i:s"
),
'create_time'
=>
date
(
"Y-m-d H:i:s"
),
'code'
=>
$userCode
,
'
type'
=>
$t
ype
'
distributor_
code'
=>
$userCode
,
'
distributor_type'
=>
$distributorT
ype
];
$id
=
Distributor
::
insertRecord
(
$data
);
...
...
@@ -100,11 +104,11 @@ class DistributorService
$auditData
=
[
'user_id'
=>
$userId
,
'user_name'
=>
$userName
,
'
type'
=>
$t
ype
,
'
distributor_type'
=>
$distributorT
ype
,
'status'
=>
2
,
'update_time'
=>
date
(
"Y-m-d H:i:s"
),
'create_time'
=>
date
(
"Y-m-d H:i:s"
),
'code'
=>
$userCode
,
'
distributor_
code'
=>
$userCode
,
];
$auditId
=
DistributorAuditRecord
::
insertRecord
(
$auditData
);
if
(
!
empty
(
$auditId
))
{
...
...
@@ -125,24 +129,24 @@ class DistributorService
$userId
=
!
empty
(
$params
[
'user_id'
])
?
$params
[
'user_id'
]
:
''
;
$userName
=
!
empty
(
$params
[
'user_name'
])
?
$params
[
'user_name'
]
:
''
;
$mobile
=
!
empty
(
$params
[
'mobile'
])
?
$params
[
'mobile'
]
:
''
;
$
code
=
!
empty
(
$params
[
'code'
])
?
$params
[
'
code'
]
:
''
;
$
distributorCode
=
!
empty
(
$params
[
'distributor_code'
])
?
$params
[
'distributor_
code'
]
:
''
;
$smsCode
=
!
empty
(
$params
[
'sms_code'
])
?
$params
[
'sms_code'
]
:
''
;
if
(
empty
(
$smsCode
))
{
throw
new
DistributorException
([
'cus'
=>
11
]);
}
$jwUserId
=
''
;
if
(
empty
(
$
c
ode
))
{
if
(
empty
(
$
distributorC
ode
))
{
throw
new
DistributorException
([
'cus'
=>
9
]);
}
$info
=
Distributor
::
getRecord
([
'
code'
=>
$c
ode
]);
$info
=
Distributor
::
getRecord
([
'
distributor_code'
=>
$distributorC
ode
]);
if
(
empty
(
$info
))
{
throw
new
DistributorException
([
'cus'
=>
10
]);
}
$
higher
UserId
=
!
empty
(
$info
[
'user_id'
])
?
$info
[
'user_id'
]
:
''
;
$
type
=
!
empty
(
$info
[
'type'
])
?
$info
[
'
type'
]
:
''
;
$
parent
UserId
=
!
empty
(
$info
[
'user_id'
])
?
$info
[
'user_id'
]
:
''
;
$
distributorType
=
!
empty
(
$info
[
'distributor_type'
])
?
$info
[
'distributor_
type'
]
:
''
;
if
(
empty
(
$mobile
))
{
throw
new
DistributorException
([
'cus'
=>
6
]);
}
...
...
@@ -162,7 +166,7 @@ class DistributorService
}
$info
=
Distributor
::
getRecord
([
'user_id'
=>
$jwUserId
]);
if
(
!
empty
(
$info
)
&&
$info
[
'
higher
_user_id'
]
>
0
)
{
if
(
!
empty
(
$info
)
&&
$info
[
'
parent
_user_id'
]
>
0
)
{
throw
new
DistributorException
([
'cus'
=>
8
]);
}
...
...
@@ -186,19 +190,19 @@ class DistributorService
}
Distributor
::
beginTransaction
();
$userCode
=
$jwUserId
.
'_'
.
$
t
ype
;
$userCode
=
$jwUserId
.
'_'
.
$
distributorT
ype
;
if
(
empty
(
$info
))
{
// $res = self::getIdgenId(1, 'goods', $count = 1);
// $userCode = !empty($res[0]) ? $res[0] : '';
//新增
$data
=
[
'
higher_user_id'
=>
$higher
UserId
,
'
parent_user_id'
=>
$parent
UserId
,
'user_id'
=>
$jwUserId
,
'user_name'
=>
$userName
,
'update_time'
=>
date
(
"Y-m-d H:i:s"
),
'create_time'
=>
date
(
"Y-m-d H:i:s"
),
'code'
=>
$userCode
,
'
type'
=>
$t
ype
'
distributor_
code'
=>
$userCode
,
'
distributor_type'
=>
$distributorT
ype
];
$id
=
Distributor
::
insertRecord
(
$data
);
if
(
empty
(
$id
))
{
...
...
@@ -208,12 +212,12 @@ class DistributorService
}
else
{
//编辑二级团长
$data
=
[
'
higher_user_id'
=>
$higher
UserId
,
'
parent_user_id'
=>
$parent
UserId
,
'user_name'
=>
$userName
,
'update_time'
=>
date
(
"Y-m-d H:i:s"
),
'create_time'
=>
date
(
"Y-m-d H:i:s"
),
];
$id
=
Distributor
::
updateRecord
(
$data
,
[
'user_id'
=>
$jwUserId
,
'
type'
=>
$t
ype
]);
$id
=
Distributor
::
updateRecord
(
$data
,
[
'user_id'
=>
$jwUserId
,
'
distributor_type'
=>
$distributorT
ype
]);
if
(
empty
(
$id
))
{
Distributor
::
rollback
();
throw
new
DistributorException
([
'cus'
=>
5
]);
...
...
@@ -222,14 +226,14 @@ class DistributorService
//暂时默认通过,
$auditData
=
[
'
higher_user_id'
=>
$higher
UserId
,
'
parent_user_id'
=>
$parent
UserId
,
'user_id'
=>
$jwUserId
,
'user_name'
=>
$userName
,
'
type'
=>
$t
ype
,
'
distributor_type'
=>
$distributorT
ype
,
'status'
=>
2
,
'update_time'
=>
date
(
"Y-m-d H:i:s"
),
'create_time'
=>
date
(
"Y-m-d H:i:s"
),
'code'
=>
$userCode
,
'
distributor_
code'
=>
$userCode
,
];
$auditId
=
DistributorAuditRecord
::
insertRecord
(
$auditData
);
if
(
!
empty
(
$auditId
))
{
...
...
@@ -293,10 +297,10 @@ class DistributorService
$info
=
Distributor
::
getRecord
(
$where
);
if
(
!
empty
(
$info
))
{
$data
[
'
code'
]
=
$info
[
'
code'
];
$data
[
'
distributor_code'
]
=
$info
[
'distributor_
code'
];
$data
[
'is_distributor'
]
=
1
;
}
else
{
$data
[
'
code'
]
=
$info
[
'
code'
];
$data
[
'
distributor_code'
]
=
$info
[
'distributor_
code'
];
$data
[
'is_distributor'
]
=
0
;
}
return
$data
;
...
...
@@ -352,8 +356,10 @@ class DistributorService
}
/**
*判断长度
*
判断长度
*
* @param $string
* @return array|mixed
*/
public
static
function
utf8Strlen
(
$string
=
null
)
{
// 将字符串分解为单元
...
...
@@ -365,6 +371,7 @@ class DistributorService
/**
* 通过发号器拿 id (非雪花)
* number,获取店铺shop_id用生活号id后两位,商品相关的这里是shop_id的后两位
*
* @param $number
* @param $type
* @param int $count
...
...
application/services/marketing/MarketingGoodsService.php
View file @
aeeb83f7
...
...
@@ -15,12 +15,14 @@ class MarketingGoodsService
{
public
static
function
marketingGoodsList
(
$params
)
{
$params
[
'page'
]
=
!
empty
(
$params
[
'page'
])
?
$params
[
'page'
]
:
1
;
$limit
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
$page
=
(
$params
[
'page'
]
-
1
)
*
$limit
;
$limit
=
!
empty
(
$params
[
'num'
])
?
$params
[
'num'
]
:
20
;
if
(
!
empty
(
$params
[
'last_id'
]))
{
$where
[
'id[<]'
]
=
$params
[
'last_id'
];
}
$where
[
'LIMIT'
]
=
[
$page
,
$limit
]
;
$where
[
'LIMIT'
]
=
$limit
;
$where
[
'ORDER'
]
=
[
"create_time"
=>
"DESC"
];
$marketingWhere
=
[
...
...
@@ -52,15 +54,15 @@ class MarketingGoodsService
$list
[
$i
]
=
$value
;
$list
[
$i
][
'life_account_id'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'life_account_id'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'life_account_id'
]
:
''
;
$list
[
$i
][
'shop_id'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'shop_id'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'shop_id'
]
:
''
;
$list
[
$i
][
'goods_name'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'
name'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'
name'
]
:
''
;
$list
[
$i
][
'goods_name'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'
goods_name'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'goods_
name'
]
:
''
;
$list
[
$i
][
'goods_desc'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'desc'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'desc'
]
:
''
;
$list
[
$i
][
'goods_spu_id'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'goods_spu_id'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'goods_spu_id'
]
:
''
;
$list
[
$i
][
'original_price'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'original_price'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'original_price'
]
:
''
;
$list
[
$i
][
'price'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'price'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'price'
]
:
''
;
$list
[
$i
][
'total_amount_order'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'total_amount_order'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'total_amount_order'
]
:
''
;
$list
[
$i
][
'
url'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'url'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'
url'
]
:
''
;
$list
[
$i
][
'
desc_pic_url'
]
=
!
empty
(
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'desc_pic_url'
])
?
$goodsSkuList
[
$value
[
'goods_sku_id'
]][
'desc_pic_
url'
]
:
''
;
$shopId
=
!
empty
(
$list
[
$i
][
'shop_id'
])
?
$list
[
$i
][
'shop_id'
]
:
''
;
$list
[
$i
][
'shop_name'
]
=
!
empty
(
$subShopList
[
$shopId
][
'
name'
])
?
$subShopList
[
$shopId
][
'
name'
]
:
''
;
$list
[
$i
][
'shop_name'
]
=
!
empty
(
$subShopList
[
$shopId
][
'
shop_name'
])
?
$subShopList
[
$shopId
][
'shop_
name'
]
:
''
;
$i
++
;
}
...
...
application/services/shop/ShopService.php
View file @
aeeb83f7
...
...
@@ -25,9 +25,9 @@ class ShopService
$lifeAccountId
=
!
empty
(
$params
[
'life_account_id'
])
?
$params
[
'life_account_id'
]
:
''
;
$phone
=
!
empty
(
$params
[
'phone'
])
?
$params
[
'phone'
]
:
''
;
$name
=
!
empty
(
$params
[
'
name'
])
?
$params
[
'
name'
]
:
''
;
$
addressLng
=
!
empty
(
$params
[
'address_lng'
])
?
$params
[
'address_lng
'
]
:
''
;
$
addressLat
=
!
empty
(
$params
[
'address_lat'
])
?
$params
[
'address_lat
'
]
:
''
;
$name
=
!
empty
(
$params
[
'
shop_name'
])
?
$params
[
'shop_
name'
]
:
''
;
$
longitude
=
!
empty
(
$params
[
'longitude'
])
?
$params
[
'longitude
'
]
:
''
;
$
latitude
=
!
empty
(
$params
[
'latitude'
])
?
$params
[
'latitude
'
]
:
''
;
$address
=
!
empty
(
$params
[
'address'
])
?
$params
[
'address'
]
:
''
;
if
(
empty
(
$lifeAccountId
))
{
...
...
@@ -38,11 +38,6 @@ class ShopService
throw
new
ShopException
([
'cus'
=>
1
]);
}
// $is_mobile = ( new Validate)->isMobile($phone);
// if (empty($is_mobile)) {
// throw new ShopException(['cus'=>2]);
// }
if
(
empty
(
$name
))
{
throw
new
ShopException
([
'cus'
=>
3
]);
}
...
...
@@ -51,6 +46,7 @@ class ShopService
throw
new
ShopException
([
'cus'
=>
8
]);
}
$detectParams
=
[
'businessId'
=>
1
,
'text'
=>
!
empty
(
$name
)
?
$name
:
''
,
...
...
@@ -60,7 +56,6 @@ class ShopService
if
(
!
empty
(
$sensitive
[
'data'
]))
{
throw
new
ShopException
([
'cus'
=>
4
]);
}
//判断店铺重复
if
(
!
self
::
isName
(
$name
))
{
throw
new
ShopException
([
'cus'
=>
6
]);
...
...
@@ -80,9 +75,9 @@ class ShopService
'sub_shop_id'
=>
$subShopId
,
'life_account_id'
=>
$lifeAccountId
,
'shop_id'
=>
$shopId
,
'name'
=>
$name
,
'
address_lng'
=>
$addressLng
,
'
address_lat'
=>
$addressLat
,
'
shop_
name'
=>
$name
,
'
longitude'
=>
$longitude
,
'
latitude'
=>
$latitude
,
'address'
=>
$address
,
'phone'
=>
$phone
,
'create_time'
=>
date
(
"Y-m-d H:i:s"
),
...
...
@@ -96,9 +91,9 @@ class ShopService
$lifeAccountId
=
!
empty
(
$params
[
'life_account_id'
])
?
$params
[
'life_account_id'
]
:
11
;
$phone
=
!
empty
(
$params
[
'phone'
])
?
$params
[
'phone'
]
:
''
;
$shopId
=
!
empty
(
$params
[
'shop_id'
])
?
$params
[
'shop_id'
]
:
''
;
$
name
=
!
empty
(
$params
[
'name'
])
?
$params
[
'
name'
]
:
''
;
$
addressLng
=
!
empty
(
$params
[
'address_lng'
])
?
$params
[
'address_lng
'
]
:
''
;
$
addressLat
=
!
empty
(
$params
[
'address_lat'
])
?
$params
[
'address_lat
'
]
:
''
;
$
shop_name
=
!
empty
(
$params
[
'shop_name'
])
?
$params
[
'shop_
name'
]
:
''
;
$
longitude
=
!
empty
(
$params
[
'longitude'
])
?
$params
[
'longitude
'
]
:
''
;
$
latitude
=
!
empty
(
$params
[
'latitude'
])
?
$params
[
'latitude
'
]
:
''
;
$address
=
!
empty
(
$params
[
'address'
])
?
$params
[
'address'
]
:
''
;
$where
[
'life_account_id'
]
=
$lifeAccountId
;
...
...
@@ -133,9 +128,9 @@ class ShopService
*/
public
static
function
updateShop
(
$params
,
$where
)
{
$name
=
!
empty
(
$params
[
'
name'
])
?
$params
[
'
name'
]
:
''
;
$
addressLng
=
!
empty
(
$params
[
'address_lng'
])
?
$params
[
'address_lng
'
]
:
''
;
$
addressLat
=
!
empty
(
$params
[
'address_lat'
])
?
$params
[
'address_lat
'
]
:
''
;
$name
=
!
empty
(
$params
[
'
shop_name'
])
?
$params
[
'shop_
name'
]
:
''
;
$
longitude
=
!
empty
(
$params
[
'longitude'
])
?
$params
[
'longitude
'
]
:
''
;
$
latitude
=
!
empty
(
$params
[
'latitude'
])
?
$params
[
'latitude
'
]
:
''
;
$address
=
!
empty
(
$params
[
'address'
])
?
$params
[
'address'
]
:
''
;
$phone
=
!
empty
(
$params
[
'phone'
])
?
$params
[
'phone'
]
:
''
;
...
...
@@ -151,13 +146,21 @@ class ShopService
}
$colums
[
'name'
]
=
$name
;
}
$subShopInfo
=
SubShop
::
getRecord
([
'shop_name'
=>
$name
]);
if
(
!
empty
(
$subShopInfo
)
&&
$subShopInfo
[
'sub_shop_id'
]
!=
$where
[
'sub_shop_id'
])
{
throw
new
ShopException
([
'cus'
=>
6
]);
}
if
(
!
empty
(
$
addressLng
))
{
$colums
[
'
address_lng'
]
=
$addressLng
;
if
(
!
empty
(
$
longitude
))
{
$colums
[
'
longitude'
]
=
$longitude
;
}
if
(
!
empty
(
$
addressLat
))
{
$colums
[
'
address_lat'
]
=
$addressLat
;
if
(
!
empty
(
$
latitude
))
{
$colums
[
'
latitude'
]
=
$latitude
;
}
if
(
!
empty
(
$address
))
{
...
...
@@ -190,7 +193,7 @@ class ShopService
return
false
;
}
$colums
=
[
'name'
=>
$name
'
shop_
name'
=>
$name
];
$subShop
=
SubShop
::
getRecord
(
$colums
);
if
(
!
empty
(
$subShop
))
{
...
...
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