|
@@ -30,7 +30,7 @@ class retailControl extends vbaseControl
|
|
$params = [
|
|
$params = [
|
|
'channel_code' => $channel_code, 'province' => $province, 'city' => $city, 'area' => $area,
|
|
'channel_code' => $channel_code, 'province' => $province, 'city' => $city, 'area' => $area,
|
|
'address' => $address, 'applicant_name' => $applicant_name, 'contact_phone' => $contact_phone,
|
|
'address' => $address, 'applicant_name' => $applicant_name, 'contact_phone' => $contact_phone,
|
|
- 'create_time' => time()
|
|
|
|
|
|
+ 'create_time' => time(), 'retail_sn' => $this->make_sn()
|
|
];
|
|
];
|
|
|
|
|
|
$resp = Model('')->table('retail')->insert($params);
|
|
$resp = Model('')->table('retail')->insert($params);
|
|
@@ -40,4 +40,11 @@ class retailControl extends vbaseControl
|
|
return self::outerr(301, "录入信息失败.");
|
|
return self::outerr(301, "录入信息失败.");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private function make_sn()
|
|
|
|
+ {
|
|
|
|
+ return 'CARD' . mt_rand(1000, 9999)
|
|
|
|
+ . sprintf('%010d', time())
|
|
|
|
+ . sprintf('%06d', (float)microtime() * 1000000);
|
|
|
|
+ }
|
|
}
|
|
}
|