Skip to content

Commit

Permalink
Merge branch 'accounts' into UAT
Browse files Browse the repository at this point in the history
  • Loading branch information
daifangli committed Jul 14, 2018
2 parents ccefb4c + b61ad62 commit 1d1e538
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
12 changes: 12 additions & 0 deletions application/controllers/City.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,16 @@ public function getConfCityFunc()
$city = $L->getConfCity();
return $city;
}

/**
* 获取所有县参数
* @author Alan
*/

public function getConfAreaFunc()
{
$L = new CityModel(Yaf_Registry::get("db"));
$city = $L->getArea();
return $city;
}
}
25 changes: 0 additions & 25 deletions application/models/Cargo/Goods.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,17 +576,6 @@ public function searchGoods($params){
$where .= ' AND '.implode(" AND ", $filter);
}

/* add 将所有未接单并且时间已过期的修改为过期状态*/
$sql = "SELECT g.id,g.reach_starttime,g.status FROM gl_goods g WHERE g.`is_del` = 0 AND g.`status` = 1 AND g.`source` = 0 AND g.`reach_starttime`!= '0000-00-00 00:00:00'";
$list= $this->dbh->select($sql);
foreach ($list as $key=>$value){
$date = substr($value['reach_starttime'],0,10) .' 23:59:59';
if(time()>strtotime($date)){
$this->updata(array('status'=>3),$value['id']);
}
}


$sql = "SELECT count(1) FROM gl_goods g WHERE {$where}";

$result['totalRow'] = $this->dbh->select_one($sql);
Expand All @@ -596,25 +585,11 @@ public function searchGoods($params){

$sql = "SELECT
g.id,
g.start_provice_id,
g.start_city_id,
g.start_area_id,
g.end_provice_id,
g.end_city_id,
g.end_area_id,
g.cate_id,
g.cate_id_two,
g.product_id,
g.weights,
g.price,
g.companies_name,
g.off_starttime,
g.off_endtime,
g.reach_starttime,
g.reach_endtime,
g.cars_type,
g.pay_type,
g.qq,
g.loss,
g.off_address,
g.off_user,
Expand Down
10 changes: 10 additions & 0 deletions application/models/City.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,14 @@ public function getConfCity()
$sql = "SELECT * FROM conf_city ORDER BY zm";
return $this->dbh->select($sql);
}

/**
* 获取全部县的参数
*/
public function getArea()
{
$sql = "SELECT * FROM conf_area";
$data = $this->dbh->select($sql);
return $data;
}
}
2 changes: 2 additions & 0 deletions application/models/Transmanage/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public function searchOrder($params){
g.reach_endtime,
g.companies_name,
g.weights_done,
g.reach_address,
g.off_address,
o.status,
o.id,
o.created_at,
Expand Down

0 comments on commit 1d1e538

Please sign in to comment.