mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-11 01:52:49 +00:00
修复已知bug
This commit is contained in:
parent
4c2371d325
commit
3711c96dcc
@ -1,2 +1,2 @@
|
||||
version=CRMEB-KY v4.4.0
|
||||
version_code=440
|
||||
version=CRMEB-KY v4.4.1
|
||||
version_code=441
|
||||
|
||||
@ -40,7 +40,6 @@ class RefundOrder extends AuthController
|
||||
['refund_type', 0]
|
||||
]);
|
||||
$where['is_cancel'] = 0;
|
||||
$where['is_del'] = 0;
|
||||
return app('json')->success($this->services->refundList($where));
|
||||
}
|
||||
|
||||
|
||||
@ -87,7 +87,6 @@ class StoreOrderController
|
||||
['field_key', ''],
|
||||
['field_value', ''],
|
||||
]);
|
||||
$where['shipping_type'] = 1;
|
||||
$where['is_system_del'] = 0;
|
||||
if (!in_array($where['status'], [-1, -2, -3])) {
|
||||
$where['pid'] = 0;
|
||||
|
||||
@ -393,26 +393,27 @@ class StoreOrderController
|
||||
if ($order['pink_id'] && $services->isPinkStatus($order['pink_id'])) {
|
||||
return app('json')->fail('该订单已失效!');
|
||||
}
|
||||
if (!Cache::get('pay_' . $order['order_id'])) {
|
||||
$isChannel = $this->getChennel[$from];
|
||||
//缓存不存在 || 切换另一端支付
|
||||
if (!Cache::get('pay_' . $order['order_id']) || $isChannel != $order['is_channel']) {
|
||||
switch ($from) {
|
||||
case 'weixin':
|
||||
if ($type == 1) {
|
||||
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
|
||||
} elseif (in_array($order->is_channel, [1, 2, 3])) {//0
|
||||
if ($type == 1 || in_array($order['is_channel'], [1, 2, 3, 4])) {//0
|
||||
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
|
||||
}
|
||||
break;
|
||||
case 'weixinh5':
|
||||
if ($type == 1) {
|
||||
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
|
||||
} elseif (in_array($order->is_channel, [0, 1, 3])) {
|
||||
if ($type == 1 || in_array($order['is_channel'], [0, 1, 3, 4])) {
|
||||
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
|
||||
}
|
||||
break;
|
||||
case 'routine':
|
||||
if ($type == 1) {
|
||||
if ($type == 1 || in_array($order['is_channel'], [0, 2, 3, 4])) {
|
||||
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
|
||||
} elseif (in_array($order->is_channel, [0, 2, 3])) {
|
||||
}
|
||||
break;
|
||||
case 'app':
|
||||
if ($type == 1 || in_array($order['is_channel'], [0, 1, 2, 3])) {
|
||||
$order['order_id'] = mt_rand(100, 999) . '_' . $order['order_id'];
|
||||
}
|
||||
break;
|
||||
|
||||
@ -4,6 +4,7 @@ namespace app\api\controller\v1\order;
|
||||
|
||||
use app\Request;
|
||||
use app\services\order\StoreOrderRefundServices;
|
||||
use app\services\order\StoreOrderServices;
|
||||
|
||||
class StoreOrderRefundController
|
||||
{
|
||||
@ -102,7 +103,11 @@ class StoreOrderRefundController
|
||||
*/
|
||||
public function delRefund(Request $request, $uni)
|
||||
{
|
||||
$oid = $this->services->value(['order_id' => $uni, 'uid' => $request->uid()], 'store_order_id');
|
||||
$res = $this->services->update(['order_id' => $uni, 'uid' => $request->uid()], ['is_del' => 1]);
|
||||
/** @var StoreOrderServices $orderServices */
|
||||
$orderServices = app()->make(StoreOrderServices::class);
|
||||
$orderServices->update($oid, ['is_del' => 1], 'id');
|
||||
if ($res)
|
||||
return app('json')->successful('删除成功');
|
||||
else
|
||||
|
||||
@ -158,8 +158,9 @@ class StoreOrderServices extends BaseServices
|
||||
$refund_where = ['is_cancel' => 0];
|
||||
if ($uid) $refund_where['uid'] = $uid;
|
||||
$data['refunding_count'] = (string)$storeOrderRefundServices->count($refund_where + ['refund_type' => [1, 2, 4, 5]]);
|
||||
$data['no_refund_count'] = (string)$storeOrderRefundServices->count($refund_where + ['refund_type' => 3]);
|
||||
$data['refunded_count'] = (string)$storeOrderRefundServices->count($refund_where + ['refund_type' => 6]);
|
||||
$data['refund_count'] = (string)bcadd($data['refunding_count'], $data['refunded_count'], 0);
|
||||
$data['refund_count'] = bcadd(bcadd($data['refunding_count'], $data['refunded_count'], 0), $data['no_refund_count'], 0);
|
||||
$data['yue_pay_status'] = (int)sys_config('balance_func_status') && (int)sys_config('yue_pay_status') == 1 ? (int)1 : (int)2;//余额支付 1 开启 2 关闭
|
||||
$data['pay_weixin_open'] = (int)sys_config('pay_weixin_open') ?? 0;//微信支付 1 开启 0 关闭
|
||||
$data['ali_pay_status'] = (bool)sys_config('ali_pay_status');//支付包支付 1 开启 0 关闭
|
||||
|
||||
@ -2,7 +2,7 @@ module.exports = {
|
||||
// 小程序配置
|
||||
// #ifdef MP || APP-PLUS
|
||||
// 请求域名 格式: https://您的域名
|
||||
HTTP_REQUEST_URL: `https://demo26.crmeb.net`,
|
||||
HTTP_REQUEST_URL: `https://demo.crmeb.com`,
|
||||
// #endif
|
||||
|
||||
// H5配置
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user