This commit is contained in:
luofei 2024-03-20 15:29:52 +08:00
commit e51561a7cb
18 changed files with 23 additions and 22 deletions

View File

@ -300,7 +300,7 @@ class ProductRepository extends BaseRepository
* @param int $id
* @param array $data
*/
public function edit(int $id, array $data, int $merId, int $productType, $conType = 0)
public function edit(int $id, array $data, int $merId, int $productType, $conType = 1)
{
if (!$data['spec_type']) {
$data['attr'] = [];
@ -825,7 +825,7 @@ class ProductRepository extends BaseRepository
* @author Qinii
* @day 2020-11-24
*/
public function getAdminOneProduct(int $id, ?int $activeId, $conType = 0)
public function getAdminOneProduct(int $id, ?int $activeId, $conType = 1)
{
$with = ['attr', 'attrValue.productCdkey', 'oldAttrValue', 'merCateId.category', 'storeCategory', 'brand', 'temp', 'seckillActive',
'content' => function ($query) use ($conType) {

View File

@ -311,20 +311,21 @@ class MerchantIntention extends BaseController
public function changeIdentity()
{
$data = $this->request->params([
'phone',
'mer_name',
'mer_type_id',
'merchant_category_id',
'type',
'name'
'type','mer_id'
]);
if(empty($data['phone'])||empty($data['mer_name'])||empty($data['mer_type_id'])||empty($data['merchant_category_id'])||empty($data['type'])||empty($data['name'])){
if(empty($data['type'])){
return app('json')->fail('参数缺失请检查');
}
if ($this->userInfo) $data['uid'] = $this->userInfo->uid;
$merchantInfo = Merchant::getDB()->where('mer_id',$data['mer_id'])->find();
if(empty($merchantInfo)) return app('json')->fail('没有该商户');
$data['uid'] = $merchantInfo->uid;
$data['phone'] = $merchantInfo->mer_phone;
$data['mer_name'] = $merchantInfo->mer_name;
$data['name'] = $merchantInfo->real_name;
$data['merchant_category_id'] = $merchantInfo->category_id;
$data['mer_type_id'] = $data['type'];
$data['status'] = 0;
$data['create_time'] = date('Y-m-d H:i:s',time());
$intention = $this->repository->create($data);
if ($intention) {
return app('json')->success('申请更改商户身份成功');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long