更新
This commit is contained in:
parent
2f86f37838
commit
8c8c2d6852
@ -141,7 +141,8 @@ class MerchantIntentionRepository extends BaseRepository
|
|||||||
'margin' => $margin['margin'] ?? 0,
|
'margin' => $margin['margin'] ?? 0,
|
||||||
'uid' => $intention['uid'],
|
'uid' => $intention['uid'],
|
||||||
'reg_admin_id' => $autoCreate ? 0: request()->adminId(),
|
'reg_admin_id' => $autoCreate ? 0: request()->adminId(),
|
||||||
'mer_intention_id' => $id
|
'mer_intention_id' => $id,
|
||||||
|
'is_company'=>$intention['is_company'],
|
||||||
];
|
];
|
||||||
$data['fail_msg'] = '';
|
$data['fail_msg'] = '';
|
||||||
$smsData = [
|
$smsData = [
|
||||||
|
@ -30,6 +30,61 @@ class Demo extends BaseController
|
|||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
$data=[
|
||||||
|
|
||||||
|
6923644264192,
|
||||||
|
6923644210151,
|
||||||
|
6921665735042,
|
||||||
|
6921665731693,
|
||||||
|
6921665731679,
|
||||||
|
6921665730825,
|
||||||
|
6921665707940,
|
||||||
|
6921665701054,
|
||||||
|
6920208995349,
|
||||||
|
6920208986163,
|
||||||
|
6920208960866,
|
||||||
|
6920208960064,
|
||||||
|
6920208924394,
|
||||||
|
6920208924035,
|
||||||
|
6920208924011,
|
||||||
|
6919188019961,
|
||||||
|
6919188019961,
|
||||||
|
6908791503943,
|
||||||
|
6908791006024,
|
||||||
|
6907992507385,
|
||||||
|
];
|
||||||
|
$mer_id=167;
|
||||||
|
foreach ($data as $item) {
|
||||||
|
$store_product_attr_value=Db::name('store_product_attr_value')->alias('a')
|
||||||
|
->join('store_product b','a.product_id=b.product_id and b.product_type=98')
|
||||||
|
->where('a.bar_code',$item)->value('a.product_id');
|
||||||
|
if($store_product_attr_value){
|
||||||
|
$find=Db::name('store_product_attr_value')->alias('a')
|
||||||
|
->join('store_product b','a.product_id=b.product_id and b.product_type=0 and b.mer_id='.$mer_id)
|
||||||
|
->where('a.bar_code',$item)->field('a.product_id,b.cate_id')->find();
|
||||||
|
if($find){
|
||||||
|
$cloud_product=Db::name('cloud_product')->where('product_id',$find['product_id'])->where('mer_id',$mer_id)->value('product_id');
|
||||||
|
if(!$cloud_product){
|
||||||
|
$source_mer_id = Db::name('store_product')->where('product_id', $store_product_attr_value)->value('mer_id');
|
||||||
|
$datas = [
|
||||||
|
'product_id' => $find['product_id'],
|
||||||
|
'cate_id' => $find['cate_id'],
|
||||||
|
'mer_id' => $mer_id,
|
||||||
|
'source_mer_id' => $source_mer_id,
|
||||||
|
'street_code' => 510521107,
|
||||||
|
'type_id' => 17,
|
||||||
|
'category_id' => 2566,
|
||||||
|
'weight' => 1,
|
||||||
|
'status' => 1,
|
||||||
|
'create_time' => date('Y-m-d H:i:s'),
|
||||||
|
'mer_labels' =>'',
|
||||||
|
];
|
||||||
|
Db::name('cloud_product')->insert($datas);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
halt(1);
|
||||||
$mer_id = 104;
|
$mer_id = 104;
|
||||||
$file = request()->file('file');
|
$file = request()->file('file');
|
||||||
$zip_name = explode('.', $file->getOriginalName())[0];
|
$zip_name = explode('.', $file->getOriginalName())[0];
|
||||||
|
@ -41,6 +41,9 @@ class MerchantIntention extends BaseController
|
|||||||
$this->userInfo = $this->request->isLogin() ? $this->request->userInfo() : null;
|
$this->userInfo = $this->request->isLogin() ? $this->request->userInfo() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交入驻申请
|
||||||
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$data = $this->checkParams();
|
$data = $this->checkParams();
|
||||||
@ -359,7 +362,8 @@ class MerchantIntention extends BaseController
|
|||||||
'area_id',
|
'area_id',
|
||||||
'street_id',
|
'street_id',
|
||||||
'village_id',
|
'village_id',
|
||||||
'is_nmsc'
|
'is_nmsc',
|
||||||
|
'is_company'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
app()->make(MerchantIntentionValidate::class)->check($data);
|
app()->make(MerchantIntentionValidate::class)->check($data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user