...
|
...
|
@@ -77,16 +77,16 @@ class LogisticsController extends AdminBaseController |
|
|
Db::startTrans();
|
|
|
foreach ($array as $k=>$v) {
|
|
|
// if(!$this->logistics_model->check($v[1])) {
|
|
|
$insert['mobile'] = $v[0];
|
|
|
$insert['send_time'] = $v[1];
|
|
|
$insert['version'] = $v[2];
|
|
|
$insert['express'] = $v[3];
|
|
|
$insert['is_del'] = $v[4];
|
|
|
$insert['mobile'] = $update['mobile'] = $v[0];
|
|
|
$insert['send_time'] = $update['send_time'] = $v[1];
|
|
|
$insert['version'] = $update['version'] = $v[2];
|
|
|
$insert['express'] = $update['express'] = $v[3];
|
|
|
$insert['is_del'] = $update['is_del'] = $v[4];
|
|
|
$info = $this->logistics_model->where(['express'=>$insert['express']])->find();
|
|
|
if($info) {
|
|
|
$insert['id'] = $info['id'];
|
|
|
$insert['update_time'] = time();
|
|
|
if(!$this->logistics_model->editLogistics($insert)) {
|
|
|
$update['id'] = $info['id'];
|
|
|
$update['update_time'] = time();
|
|
|
if(!$this->logistics_model->editLogistics($update)) {
|
|
|
Db::rollback();
|
|
|
$this->error('数据导入中出错,请重试');
|
|
|
}
|
...
|
...
|
|