更新审核转售委托商品状态
This commit is contained in:
parent
514b2feab1
commit
d1aa9ec280
@ -43,6 +43,7 @@ class Product extends BaseModel
|
||||
|
||||
const TYPE_NORMAL = 0; //普通商品
|
||||
const TYPE_PURCHASE = 98; //采购商品
|
||||
const TYPE_ENTRUST = 99; //委托商品
|
||||
|
||||
/**
|
||||
* @Author:Qinii
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user