diff --git a/app/common/model/store/product/Product.php b/app/common/model/store/product/Product.php index 52dac139..c1a46889 100644 --- a/app/common/model/store/product/Product.php +++ b/app/common/model/store/product/Product.php @@ -43,6 +43,7 @@ class Product extends BaseModel const TYPE_NORMAL = 0; //普通商品 const TYPE_PURCHASE = 98; //采购商品 + const TYPE_ENTRUST = 99; //委托商品 /** * @Author:Qinii diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 4c059b04..b2a69935 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -585,7 +585,7 @@ class StoreOrderRepository extends BaseRepository */ public function userOrderNumber(int $uid, $product_type=0) { - //activity_type:0普通订单 98 采购订单 + //activity_type:0普通订单 98采购订单 99委托商品 //$noPay = app()->make(StoreGroupOrderRepository::class)->orderNumber($uid, $product_type); $isUser = 1; if ($product_type == 98) { diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 9cd53615..8e91b7e8 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -559,7 +559,7 @@ class Community extends BaseController Db::name('store_product_attr_value')->where('product_id', $prod['product_id'])->where('unique', $prod['product_attr_unique'])->inc('stock', $prod['number'])->update(); } Db::name('resale')->where('community_id', $id)->where('status', 0)->update(['is_del' => 1]); - Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->update(['is_del' => 1, 'status' => -1, 'mer_status' => 2]); + Db::name('community')->where('uid', $this->request->uid())->where('community_id', $id)->where('is_del', 0)->update(['status' => -1, 'mer_status' => 2]); Db::commit(); } catch (\Exception $e) { Db::rollback(); @@ -667,7 +667,7 @@ class Community extends BaseController Db::name('store_product_attr_value')->where('product_id', $prod['product_id'])->where('unique', $prod['product_attr_unique'])->inc('stock', $prod['number'])->update(); } Db::name('entrust')->where('community_id', $id)->where('status', 0)->update(['is_del' => 1]); - Db::name('community')->where('community_id', $id)->where('is_del', 0)->update(['is_del' => 1, 'refusal' => $refusal, 'status' => -1, 'mer_status' => 2]); + Db::name('community')->where('community_id', $id)->where('is_del', 0)->update(['refusal' => $refusal, 'status' => -1, 'mer_status' => 2]); Db::commit(); } catch (\Exception $e) { Db::rollback(); @@ -714,6 +714,7 @@ class Community extends BaseController // type:1发起的委托 2收到的委托 if ($type == 2) { $merchantInfo = Db::name('merchant')->where('uid', $v['uid'])->find(); + // 这个地方可能需要变更 $list[$k]['credit_buy'] = $merchantInfo['credit_buy'] ?? 0; $list[$k]['settle_cycle'] = $merchantInfo['settle_cycle'] ?? 0; $list[$k]['interest_rate'] = $merchantInfo['interest_rate'] ?? 0;