调整确认收货
This commit is contained in:
parent
c044855072
commit
358906854c
@ -800,18 +800,19 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
->field('user_id,number')
|
->field('user_id,number')
|
||||||
->find();
|
->find();
|
||||||
if (!empty($promoterCommission)) {
|
if (!empty($promoterCommission)) {
|
||||||
$userBillRepository->incBill($promoterCommission['user_id'], 'brokerage', 'order_one', [
|
|
||||||
'link_id' => $order['order_id'],
|
|
||||||
'status' => 1,
|
|
||||||
'title' => '获得推广佣金',
|
|
||||||
'number' => $promoterCommission['number'],
|
|
||||||
'mark' => $order->merchant['mer_name'] . '成功销售' . floatval($order['pay_price']) . '元,奖励推广佣金' . floatval($promoterCommission['number']),
|
|
||||||
'balance' => 0
|
|
||||||
]);
|
|
||||||
|
|
||||||
$promoter = User::where('uid', $promoterCommission['user_id'])->find();
|
$promoter = User::where('uid', $promoterCommission['user_id'])->find();
|
||||||
$balance = bcadd($promoter->now_money, $promoterCommission['number'], 2);
|
if (!empty($promoter)) {
|
||||||
$promoter->save(['now_money' => $balance]);
|
$balance = bcadd($promoter->now_money, $promoterCommission['number'], 2);
|
||||||
|
$promoter->save(['now_money' => $balance]);
|
||||||
|
$userBillRepository->incBill($promoterCommission['user_id'], 'brokerage', 'order_one', [
|
||||||
|
'link_id' => $order['order_id'],
|
||||||
|
'status' => 1,
|
||||||
|
'title' => '获得推广佣金',
|
||||||
|
'number' => $promoterCommission['number'],
|
||||||
|
'mark' => $order->merchant['mer_name'] . '成功销售' . floatval($order['pay_price']) . '元,奖励推广佣金' . floatval($promoterCommission['number']),
|
||||||
|
'balance' => 0
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,7 +490,14 @@ class Common extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
//区县数据
|
//区县数据
|
||||||
public function get_area($city_code)
|
public function getCity($code = 510000)
|
||||||
|
{
|
||||||
|
$select = Db::name('geo_city')->where('province_code', $code)->field('city_id id,city_code code,city_name name')->select();
|
||||||
|
return app('json')->success($select);
|
||||||
|
}
|
||||||
|
|
||||||
|
//区县数据
|
||||||
|
public function get_area($city_code = 510500)
|
||||||
{
|
{
|
||||||
$select = Db::name('geo_area')->where('city_code', $city_code)->field('area_id id,area_code code,area_name name')->select();
|
$select = Db::name('geo_area')->where('city_code', $city_code)->field('area_id id,area_code code,area_name name')->select();
|
||||||
return app('json')->success($select);
|
return app('json')->success($select);
|
||||||
|
@ -707,6 +707,7 @@ Route::group('api/', function () {
|
|||||||
//首页数据
|
//首页数据
|
||||||
Route::get('common/home', 'api.Common/home');
|
Route::get('common/home', 'api.Common/home');
|
||||||
|
|
||||||
|
Route::get('city/get_city', 'api.Common/getCity');
|
||||||
Route::get('city/get_area', 'api.Common/get_area');
|
Route::get('city/get_area', 'api.Common/get_area');
|
||||||
Route::get('city/get_street', 'api.Common/get_street');
|
Route::get('city/get_street', 'api.Common/get_street');
|
||||||
Route::get('city/get_village', 'api.Common/get_village');
|
Route::get('city/get_village', 'api.Common/get_village');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user