Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
edfeccf5df
@ -99,11 +99,13 @@ class RechargeLogic extends BaseLogic
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// 更新用户余额及累计充值金额
|
// 更新用户余额及累计充值金额
|
||||||
User::where(['id' => $order['user_id']])
|
$userInfo = User::where(['id' => $order['user_id']])->findOrEmpty();
|
||||||
->dec('total_recharge_amount', $order['order_amount'])
|
if ($userInfo['total_recharge_amount'] >= $order['order_amount']) {
|
||||||
->dec('user_money', $order['order_amount'])
|
User::where(['id' => $order['user_id']])
|
||||||
->update();
|
->dec('total_recharge_amount', $order['order_amount'])
|
||||||
|
->dec('user_money', $order['order_amount'])
|
||||||
|
->update();
|
||||||
|
}
|
||||||
// 记录日志
|
// 记录日志
|
||||||
AccountLogLogic::add(
|
AccountLogLogic::add(
|
||||||
$order['user_id'],
|
$order['user_id'],
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
$params=$this->request->post(['page_no','page_size','company_name','area_name','street_name','area_manager','company_type','is_contract']);
|
$params=$this->request->post(['page_no','page_size','company_name','area_name','street_name','area_manager','company_type','is_contract']);
|
||||||
$where = [];
|
$where = [];
|
||||||
if(!empty($params['company_name'])){
|
if(!empty($params['company_name'])){
|
||||||
$where[] = ['company','like','%'.$params['company_name'].'%'];
|
$where[] = ['company_name','like','%'.$params['company_name'].'%'];
|
||||||
}
|
}
|
||||||
if(!empty($params['area_name'])){
|
if(!empty($params['area_name'])){
|
||||||
$arr= Db::name('geo_area')->where('area_name','like','%'.$params['area_name'].'%')->column('area_code');
|
$arr= Db::name('geo_area')->where('area_name','like','%'.$params['area_name'].'%')->column('area_code');
|
||||||
@ -415,4 +415,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPartyA()
|
||||||
|
{
|
||||||
|
if(!$this->request->isPost()){
|
||||||
|
return $this->fail('请求方式错误');
|
||||||
|
}
|
||||||
|
$companyId = $this->request->param('company_id');
|
||||||
|
if(empty($companyId)){
|
||||||
|
return $this->fail('缺少公司id');
|
||||||
|
}
|
||||||
|
$re = CompanyLogic::getPartyA($companyId);
|
||||||
|
if ($re === false) {
|
||||||
|
return $this->fail(CompanyLogic::getError());
|
||||||
|
}
|
||||||
|
return $this->success('成功', $re);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user