Merge remote-tracking branch 'origin/feature/main20240421' into feature/main20240421

feature/main20240421
lqmac 6 months ago
commit 1694b5b63b
  1. 7
      app/api/controller/Category.php
  2. 2
      app/api/service/order/PaySuccess.php
  3. 2
      app/common/model/Merchant.php

@ -55,6 +55,7 @@ class Category extends Controller
public function listmerchant(): Json
{
$list = [];
$merchantId = (int)$this->request->param('merchantId', 0);
$model = new CategoryModel;
$hasGoods = GoodsCategoryRel::getcategory($this->storeId,$merchantId);
@ -64,10 +65,14 @@ class Category extends Controller
foreach ($hasGoods as $v) {
$arr[] = $v['category_id'];
}
} else {
return $this->renderSuccess(compact('list'));
}
if (!empty($arr)) {
$arr1 = ['cataIds' => $arr];
} else {
return $this->renderSuccess(compact('list'));
}
$list = $model->getListPublic($this->request->param(), $arr1);

@ -360,7 +360,7 @@ class PaySuccess extends BaseService
if ($model['commission_ratio']) {
$precent = (1 - $model['commission_ratio'] / 1000);
}
$precentPrice = $precent * $orderInfo['pay_price'];
$precentPrice = round($precent * $orderInfo['pay_price'], 2);
(new merchantPayModel())->addDetail($orderInfo, $precentPrice);
//累计商户余额支付金额

@ -146,7 +146,7 @@ class Merchant extends BaseModel
* @param float $money
* @return mixed
*/
public static function setIncTotal(int $merchantId, float $money)
public static function setIncTotal(int $merchantId, $money)
{
(new static)->setInc($merchantId, 'total_amount', $money);
(new static)->setInc($merchantId, 'available_amount', $money);

Loading…
Cancel
Save