Commit 7b2cc458 authored by hujun's avatar hujun

审核图片

parent 8c15ad8a
...@@ -45,7 +45,7 @@ class ApplyForCost extends Basic ...@@ -45,7 +45,7 @@ class ApplyForCost extends Basic
if ($is_ok) { if ($is_ok) {
$is_check = 1; $is_check = 1;
} }
// $where['a.status'] = 0; $where['a.status'] = 0;
$where['a.agent_id'] = $this->agentId;break;//店长查看提交 $where['a.agent_id'] = $this->agentId;break;//店长查看提交
case 'broker/costListDistrict' : case 'broker/costListDistrict' :
$is_ok = $check_rule->checkRule($this->agentId, $check_url); $is_ok = $check_rule->checkRule($this->agentId, $check_url);
......
...@@ -6,16 +6,19 @@ namespace app\index\service; ...@@ -6,16 +6,19 @@ namespace app\index\service;
use app\model\FApplyForFee; use app\model\FApplyForFee;
use app\model\FApplyForFeeCheck; use app\model\FApplyForFeeCheck;
use app\model\FImg;
class CostService class CostService
{ {
private $apply_model; private $apply_model;
private $check_model; private $check_model;
private $f_img_model;
public function __construct() public function __construct()
{ {
$this->apply_model = new FApplyForFee(); $this->apply_model = new FApplyForFee();
$this->check_model = new FApplyForFeeCheck(); $this->check_model = new FApplyForFeeCheck();
$this->f_img_model = new FImg();
} }
/** /**
...@@ -64,6 +67,19 @@ class CostService ...@@ -64,6 +67,19 @@ class CostService
if ($num) { if ($num) {
try { try {
$id = $this->apply_model->updateData(['status'=>$params['status']], ['id'=>$cost_data['id']]); $id = $this->apply_model->updateData(['status'=>$params['status']], ['id'=>$cost_data['id']]);
if ($params['status'] == 4) {
foreach($params['img_name'] as $v) {
$img_arr = [
'img_id' => $id,
'img_type' => 2,
'img_name' => $v['img_name']
];
}
if (isset($img_arr)) {
$this->f_img_model->insertDataAll($img_arr);
}
}
} catch (\Exception $e) { } catch (\Exception $e) {
$result['msg'] = '修改申请记录失败'.$e->getMessage(); $result['msg'] = '修改申请记录失败'.$e->getMessage();
return $result; return $result;
......
...@@ -16,6 +16,13 @@ class FImg extends BaseModel ...@@ -16,6 +16,13 @@ class FImg extends BaseModel
$this->db_ = Db::name($this->table); $this->db_ = Db::name($this->table);
} }
/**
* @param $data
* @return int|string
*/
public function insertDataAll($data) {
return $this->db_->insertAll($data);
}
/** /**
* 新增数据 * 新增数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment