mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-31 23:10:45 +00:00
Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev
This commit is contained in:
commit
f8447c4868
@ -211,9 +211,13 @@ class StoreOrderController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param $orderId
|
||||
* @param string $type
|
||||
* @return \think\Response
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 等风来
|
||||
* @email 136327134@qq.com
|
||||
* @date 2023/2/13
|
||||
@ -223,7 +227,6 @@ class StoreOrderController
|
||||
if (!$orderId) {
|
||||
return app('json')->fail(100100);
|
||||
}
|
||||
|
||||
return app('json')->success($this->services->getCashierInfo((int)$request->uid(), $orderId, $type));
|
||||
}
|
||||
|
||||
@ -247,6 +250,7 @@ class StoreOrderController
|
||||
if (!$uni) return app('json')->fail(100100);
|
||||
$orderInfo = $this->services->get(['order_id' => $uni]);
|
||||
$uid = $type == 1 ? (int)$request->uid() : $orderInfo->uid;
|
||||
$orderInfo->is_channel = $this->getChennel[$request->getFromType()] ?? ($request->isApp() ? 0 : 1);
|
||||
$orderInfo->pay_uid = $uid;
|
||||
$orderInfo->save();
|
||||
$orderInfo = $orderInfo->toArray();
|
||||
@ -260,7 +264,7 @@ class StoreOrderController
|
||||
}
|
||||
|
||||
//重新生成订单号去支付
|
||||
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
|
||||
// $order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
|
||||
|
||||
//0元支付
|
||||
if (bcsub((string)$orderInfo['pay_price'], '0', 2) <= 0) {
|
||||
|
||||
@ -73,7 +73,6 @@ class ArticleCategoryDao extends BaseDao
|
||||
->where('hidden', 0)
|
||||
->where('is_del', 0)
|
||||
->where('status', 1)
|
||||
->where('pid', '>', 0)
|
||||
->order('sort DESC')
|
||||
->field('id,pid,title')
|
||||
->select()->toArray();
|
||||
|
||||
@ -75,11 +75,11 @@ class StoreOrderCreateServices extends BaseServices
|
||||
$id = $snowflake->setStartTimeStamp(strtotime('2022-01-01') * 1000)->id();
|
||||
}
|
||||
$replace = '';
|
||||
$chars = 'abcdefghijklmnopqrstuvwxyz0123456789';
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
$chars = '0123456789';
|
||||
for ($i = 0; $i < 6; $i++) {
|
||||
$replace .= $chars[mt_rand(0, strlen($chars) - 1)];
|
||||
}
|
||||
$id = substr_replace($id, $replace, -3);
|
||||
$id = substr_replace($id, $replace, -6);
|
||||
} else {
|
||||
$is_callable = function ($currentTime) {
|
||||
$redis = Cache::store('redis');
|
||||
@ -281,10 +281,8 @@ class StoreOrderCreateServices extends BaseServices
|
||||
}
|
||||
/** @var StoreOrderCartInfoServices $cartServices */
|
||||
$cartServices = app()->make(StoreOrderCartInfoServices::class);
|
||||
/** @var StoreSeckillServices $seckillServices */
|
||||
$seckillServices = app()->make(StoreSeckillServices::class);
|
||||
$priceData['coupon_id'] = $couponId;
|
||||
$order = $this->transaction(function () use ($cartIds, $orderInfo, $cartInfo, $key, $userInfo, $useIntegral, $priceData, $combinationId, $seckillId, $bargainId, $cartServices, $seckillServices, $uid, $addressId, $advanceId) {
|
||||
$order = $this->transaction(function () use ($cartIds, $orderInfo, $cartInfo, $key, $userInfo, $useIntegral, $priceData, $combinationId, $seckillId, $bargainId, $cartServices, $uid, $addressId, $advanceId) {
|
||||
//创建订单
|
||||
$order = $this->dao->save($orderInfo);
|
||||
if (!$order) {
|
||||
|
||||
@ -768,7 +768,7 @@ HTML;
|
||||
}
|
||||
/** @var StoreOrderCreateServices $createServices */
|
||||
$createServices = app()->make(StoreOrderCreateServices::class);
|
||||
$data['order_id'] = $createServices->getNewOrderId();
|
||||
$data['order_id'] = $createServices->getNewOrderId('cp');
|
||||
/** @var StoreOrderStatusServices $services */
|
||||
$services = app()->make(StoreOrderStatusServices::class);
|
||||
return $this->transaction(function () use ($id, $data, $services) {
|
||||
@ -2599,6 +2599,7 @@ HTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $uid
|
||||
* @param string $orderId
|
||||
* @param string $type
|
||||
* @return array
|
||||
@ -2630,14 +2631,14 @@ HTML;
|
||||
if (!$info) {
|
||||
throw new PayException('您支付的订单不存在');
|
||||
}
|
||||
$orderCancelTime = (int)sys_config('order_cancel_time', 0);
|
||||
$orderActivityTime = (int)sys_config('order_activity_time', 0);
|
||||
$orderCancelTime = sys_config('order_cancel_time', 0);
|
||||
$orderActivityTime = sys_config('order_activity_time', 0);
|
||||
if ($info->combination_id) {
|
||||
$time = ((int)sys_config('order_pink_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
|
||||
$time = (sys_config('order_pink_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
|
||||
} else if ($info->seckill_id) {
|
||||
$time = ((int)sys_config('order_seckill_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
|
||||
$time = (sys_config('order_seckill_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
|
||||
} else if ($info->bargain_id) {
|
||||
$time = ((int)sys_config('order_bargain_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
|
||||
$time = (sys_config('order_bargain_time', 0) ?: $orderActivityTime) * 60 * 60 + ((int)$info->add_time);
|
||||
} else {
|
||||
$time = $orderCancelTime * 60 * 60 + ((int)$info->add_time);
|
||||
}
|
||||
|
||||
@ -654,7 +654,7 @@ class StoreProductServices extends BaseServices
|
||||
|
||||
//采集商品下载图片
|
||||
if ($type == -1) {
|
||||
$s_image_down = $d_image_down = [];
|
||||
$s_image_down = [];
|
||||
//下载商品轮播图
|
||||
foreach ($slider_image as $s_image) {
|
||||
if (sys_config('queue_open', 0) == 1) {
|
||||
@ -671,8 +671,7 @@ class StoreProductServices extends BaseServices
|
||||
if (sys_config('queue_open', 0) == 1) {
|
||||
ProductCopyJob::dispatch('copyDescriptionImage', [$res->id, $description, $d_image, count($match[1])]);
|
||||
} else {
|
||||
if (!is_int(strpos($d_image, 'http'))) $d_image = 'http://' . ltrim($d_image, '\//');
|
||||
$d_image_down[] = $d_img = app()->make(CopyTaobaoServices::class)->downloadCopyImage($d_image);
|
||||
$d_img = app()->make(CopyTaobaoServices::class)->downloadCopyImage(!is_int(strpos($d_image, 'http')) ? 'http://' . ltrim($d_image, '\//') : $d_image);
|
||||
$description = str_replace($d_image, $d_img, $description);
|
||||
}
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@
|
||||
hover-class='none' :url="'/pages/goods/goods_logistics/index?orderId='+ orderInfo.order_id">
|
||||
{{$t(`查看物流`)}}
|
||||
</navigator>
|
||||
<view class='bnt bg-color' v-if="orderInfo.type == 3 && orderInfo.refund_type == 0"
|
||||
<view class='bnt bg-color' v-if="orderInfo.type == 3 && orderInfo.refund_type == 0 && orderInfo.paid"
|
||||
@tap='goJoinPink'>
|
||||
{{$t(`查看拼团`)}}
|
||||
</view>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user