|
@@ -23,7 +23,8 @@ class Pay extends Base
|
|
|
$count =Db::name("pay")->where($where)->count();
|
|
|
$total =ceil($count/$param['size']);
|
|
|
$page = $total>=$param['page']? intval($param['page']) : intval($total);
|
|
|
- $list =Db::name("pay")->where($where)->page($page,intval($param['size']))->order("id desc")->select();
|
|
|
+ $list =Db::name("pay")->where($where)->page($page,intval($param['size']))
|
|
|
+ ->withAttr("rate",function ($v){return $v*100;})->order("id desc")->select()->toArray();
|
|
|
return app_show(0,"获取成功",["list"=>$list,'count'=>$count]);
|
|
|
}
|
|
|
|
|
@@ -60,7 +61,7 @@ class Pay extends Base
|
|
|
$temp['pay_id'] = $payadd;
|
|
|
$temp['companyNo'] = $item['companyNo'];
|
|
|
$temp['companyName'] = $item['companyName'];
|
|
|
- $temp['rate'] = $item['rate']??0;
|
|
|
+ $temp['rate'] = ($item['rate']??0)/100;
|
|
|
$temp['is_cgd'] = $item['is_cgd']??0;
|
|
|
$temp['is_qrd'] = $item['is_qrd']??0;
|
|
|
$temp['weight'] = $key;
|
|
@@ -108,7 +109,7 @@ class Pay extends Base
|
|
|
$temp['id'] = $item['id']??null;
|
|
|
$temp['companyNo'] = $item['companyNo'];
|
|
|
$temp['companyName'] = $item['companyName'];
|
|
|
- $temp['rate'] = $item['rate']??0;
|
|
|
+ $temp['rate'] = ($item['rate']??0)/100;
|
|
|
$temp['is_cgd'] = $item['is_cgd']??0;
|
|
|
$temp['is_qrd'] = $item['is_qrd']??0;
|
|
|
$temp['weight'] = $key;
|
|
@@ -137,8 +138,8 @@ class Pay extends Base
|
|
|
if($valid->check($param)==false) return error_show(1004,$valid->getError());
|
|
|
$isT =Db::name("pay")->where("id",$param['id'])->findOrEmpty();
|
|
|
if(empty($isT)) return error_show(1004,"未找到数据");
|
|
|
- $info =Db::name("pay_rate")->where(["pay_id"=>$param['id'],"is_del"=>0])->order("weight asc,id desc")->select()
|
|
|
- ->toArray();
|
|
|
+ $info =Db::name("pay_rate")->where(["pay_id"=>$param['id'],"is_del"=>0])->withAttr("rate",function ($v)
|
|
|
+ {return $v*100;})->order("weight asc,id desc")->select()->toArray();
|
|
|
$isT["pay_rate"] = $info;
|
|
|
return app_show(0,"获取成功",$isT);
|
|
|
}
|