From ae7507393f27de51b5bb56f40f8398f5a21fdce6 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 23 Mar 2023 14:23:38 +0800
Subject: [PATCH 1/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=B2=E7=BB=93?=
=?UTF-8?q?=E6=9D=9F=E7=9A=84=E7=9B=B4=E6=92=AD=E4=B8=8D=E8=83=BD=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E5=95=86=E5=93=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
template/admin/src/pages/marketing/live/index.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/template/admin/src/pages/marketing/live/index.vue b/template/admin/src/pages/marketing/live/index.vue
index 97cb694f7..322a78f4b 100644
--- a/template/admin/src/pages/marketing/live/index.vue
+++ b/template/admin/src/pages/marketing/live/index.vue
@@ -79,8 +79,8 @@
详情
删除
-
- 添加商品
+
+ 添加商品
From 3f26b3dae72739cab9abc5151b4667f6a0bc1101 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 23 Mar 2023 14:45:02 +0800
Subject: [PATCH 2/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=80=E6=AC=BE?=
=?UTF-8?q?=E6=97=B6=E6=98=AF=E5=90=A6=E8=83=BD=E9=80=89=E6=8B=A9=E9=80=80?=
=?UTF-8?q?=E6=AC=BE=E7=B1=BB=E5=9E=8B=EF=BC=8C=E7=94=A8=E6=88=B7=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/adminapi/controller/v1/user/User.php | 2 +-
crmeb/app/model/user/User.php | 10 ++++++++++
crmeb/app/services/order/StoreOrderServices.php | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/crmeb/app/adminapi/controller/v1/user/User.php b/crmeb/app/adminapi/controller/v1/user/User.php
index 3767ce9d1..6f3795d0b 100644
--- a/crmeb/app/adminapi/controller/v1/user/User.php
+++ b/crmeb/app/adminapi/controller/v1/user/User.php
@@ -387,7 +387,7 @@ class User extends AuthController
if ($data['phone']) {
if (!preg_match("/^1[3456789]\d{9}$/", $data['phone'])) return app('json')->fail(400252);
}
- if ($this->services->count(['phone' => $data['phone'], 'is_del' => 0])) {
+ if ($this->services->count(['phone' => $data['phone'], 'is_del' => 0, 'not_uid' => $id])) {
return app('json')->fail(400314);
}
if ($data['card_id']) {
diff --git a/crmeb/app/model/user/User.php b/crmeb/app/model/user/User.php
index a7d4e99d4..4cfb748d5 100644
--- a/crmeb/app/model/user/User.php
+++ b/crmeb/app/model/user/User.php
@@ -440,4 +440,14 @@ class User extends BaseModel
{
if ($value !== '') $query->where('is_del', $value);
}
+
+ /**
+ * 不等于uid搜索器
+ * @param $query
+ * @param $value
+ */
+ public function searchNotUidAttr($query, $value)
+ {
+ if ($value !== '') $query->where('uid', '<>', $value);
+ }
}
diff --git a/crmeb/app/services/order/StoreOrderServices.php b/crmeb/app/services/order/StoreOrderServices.php
index 1d653a599..d9671914c 100644
--- a/crmeb/app/services/order/StoreOrderServices.php
+++ b/crmeb/app/services/order/StoreOrderServices.php
@@ -2351,6 +2351,7 @@ HTML;
}
}
$data['_status'] = $orderInfo['_status'] ?? [];
+ $data['_status']['is_back'] = $orderInfo['delivery_type'] == 'fictitious' || $orderInfo['virtual_type'] > 0;
$data['cartInfo'] = $data['cartInfo'] ?? $cartInfo;
return $data;
}
From 1eb3752b40dcc7117691bc55c95114fb95a6a4c7 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 23 Mar 2023 14:49:38 +0800
Subject: [PATCH 3/9] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E9=97=B4=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E6=96=87=E5=AD=97=E4=BC=98=E5=8C=96=EF=BC=8Cpc?=
=?UTF-8?q?=E9=80=80=E6=AC=BE=E8=AE=A2=E5=8D=95=E6=97=A5=E6=9C=9F=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/services/order/StoreOrderRefundServices.php | 2 +-
.../src/pages/marketing/live/components/live_detail.vue | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/crmeb/app/services/order/StoreOrderRefundServices.php b/crmeb/app/services/order/StoreOrderRefundServices.php
index d850b6cb8..3fd06be86 100644
--- a/crmeb/app/services/order/StoreOrderRefundServices.php
+++ b/crmeb/app/services/order/StoreOrderRefundServices.php
@@ -1064,7 +1064,7 @@ class StoreOrderRefundServices extends BaseServices
if ($list) {
foreach ($list as &$item) {
$item['paid'] = 1;
- $item['add_time'] = $item['_add_time'] = isset($item['add_time']) ? date('Y-m-d H:i', (int)$item['add_time']) : '';
+ $item['add_time'] = $item['_add_time'] = isset($item['add_time']) ? date('Y-m-d H:i:s', (int)$item['add_time']) : '';
$item['cartInfo'] = $item['cart_info'];
if (in_array($item['refund_type'], [1, 2, 4, 5])) {
$item['refund_status'] = 1;
diff --git a/template/admin/src/pages/marketing/live/components/live_detail.vue b/template/admin/src/pages/marketing/live/components/live_detail.vue
index 267362404..8c44c64ec 100644
--- a/template/admin/src/pages/marketing/live/components/live_detail.vue
+++ b/template/admin/src/pages/marketing/live/components/live_detail.vue
@@ -12,7 +12,8 @@
- {{ FormData.room_id }}
+ {{ FormData.id }}
+ (微信直播间ID:{{ FormData.room_id }})
@@ -51,15 +52,15 @@
-
+
{{ FormData.close_like | filterClose }}
-
+
{{ FormData.close_goods | filterClose }}
-
+
{{ FormData.close_comment | filterClose }}
From 89e88e443de1653b93d00ebdc0068a70ab02c90c Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 23 Mar 2023 15:18:10 +0800
Subject: [PATCH 4/9] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=BB=E6=92=AD?=
=?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=BC=B9=E7=AA=97=E9=97=AE=E9=A2=98=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
template/admin/src/pages/marketing/live/anchor.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/template/admin/src/pages/marketing/live/anchor.vue b/template/admin/src/pages/marketing/live/anchor.vue
index bf4f63891..61e164a3c 100644
--- a/template/admin/src/pages/marketing/live/anchor.vue
+++ b/template/admin/src/pages/marketing/live/anchor.vue
@@ -26,7 +26,7 @@
修改
- 删除
+ 删除
From b5c489f0f223aaaf48eb28e31e19cd07256b3e09 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 23 Mar 2023 15:18:41 +0800
Subject: [PATCH 5/9] =?UTF-8?q?=E9=80=80=E6=AC=BE=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E9=80=80=E6=AC=BE=E7=B1=BB=E5=9E=8B=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/services/order/StoreOrderServices.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crmeb/app/services/order/StoreOrderServices.php b/crmeb/app/services/order/StoreOrderServices.php
index d9671914c..8d87b1811 100644
--- a/crmeb/app/services/order/StoreOrderServices.php
+++ b/crmeb/app/services/order/StoreOrderServices.php
@@ -2351,7 +2351,7 @@ HTML;
}
}
$data['_status'] = $orderInfo['_status'] ?? [];
- $data['_status']['is_back'] = $orderInfo['delivery_type'] == 'fictitious' || $orderInfo['virtual_type'] > 0;
+ $data['_status']['is_back'] = $orderInfo['delivery_type'] != 'fictitious' && $orderInfo['virtual_type'] == 0;
$data['cartInfo'] = $data['cartInfo'] ?? $cartInfo;
return $data;
}
From 3c6a182c505b416d3bbac18d327bd7e415878f8f Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 23 Mar 2023 15:19:43 +0800
Subject: [PATCH 6/9] =?UTF-8?q?=E9=80=80=E6=AC=BE=E9=80=89=E6=8B=A9?=
=?UTF-8?q?=E9=80=80=E6=AC=BE=E7=B1=BB=E5=9E=8B=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/services/order/StoreOrderServices.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crmeb/app/services/order/StoreOrderServices.php b/crmeb/app/services/order/StoreOrderServices.php
index 8d87b1811..0933c9aa6 100644
--- a/crmeb/app/services/order/StoreOrderServices.php
+++ b/crmeb/app/services/order/StoreOrderServices.php
@@ -2351,7 +2351,7 @@ HTML;
}
}
$data['_status'] = $orderInfo['_status'] ?? [];
- $data['_status']['is_back'] = $orderInfo['delivery_type'] != 'fictitious' && $orderInfo['virtual_type'] == 0;
+ $data['_status']['_is_back'] = $orderInfo['delivery_type'] != 'fictitious' && $orderInfo['virtual_type'] == 0;
$data['cartInfo'] = $data['cartInfo'] ?? $cartInfo;
return $data;
}
From a60bfd6c1f745be26e97348379727264e4670a43 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 23 Mar 2023 15:26:57 +0800
Subject: [PATCH 7/9] =?UTF-8?q?=E9=80=80=E6=AC=BE=E9=80=80=E8=B4=A7?=
=?UTF-8?q?=E7=9A=84=E8=AE=A2=E5=8D=95=E7=A1=AE=E8=AE=A4=E9=80=80=E6=AC=BE?=
=?UTF-8?q?=E6=97=B6=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/adminapi/controller/v1/order/RefundOrder.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crmeb/app/adminapi/controller/v1/order/RefundOrder.php b/crmeb/app/adminapi/controller/v1/order/RefundOrder.php
index 0c4cd2936..dd2c64fe6 100644
--- a/crmeb/app/adminapi/controller/v1/order/RefundOrder.php
+++ b/crmeb/app/adminapi/controller/v1/order/RefundOrder.php
@@ -146,7 +146,7 @@ class RefundOrder extends AuthController
return app('json')->fail(400144);
}
- if ($data['type'] == 1) {
+ if ($data['type'] == 1 || $data['type'] == 5) {
$data['refund_type'] = 6;
} else if ($data['type'] == 2) {
$data['refund_type'] = 3;
From 62bc7e6d1cc45eb516baafabc1f37230535682eb Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 23 Mar 2023 16:09:54 +0800
Subject: [PATCH 8/9] =?UTF-8?q?=E6=9B=B4=E5=85=B7=E5=95=86=E5=93=81?=
=?UTF-8?q?=E5=AE=9E=E9=99=85=E6=94=AF=E4=BB=98=E9=87=91=E9=A2=9D=E8=BF=94?=
=?UTF-8?q?=E4=BD=A3=E5=A2=9E=E5=8A=A0=E8=BF=90=E8=B4=B9=E8=AE=A1=E7=AE=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/services/order/StoreOrderCreateServices.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crmeb/app/services/order/StoreOrderCreateServices.php b/crmeb/app/services/order/StoreOrderCreateServices.php
index 8686d5f38..f10d15c2e 100644
--- a/crmeb/app/services/order/StoreOrderCreateServices.php
+++ b/crmeb/app/services/order/StoreOrderCreateServices.php
@@ -798,7 +798,7 @@ class StoreOrderCreateServices extends BaseServices
//计算商品金额
if (sys_config('user_brokerage_type') == 1) {
//按照实际支付价格返佣
- $price = bcmul((string)$cart['truePrice'], $cartNum, 4);
+ $price = bcmul((string)bcadd((string)$cart['truePrice'], (string)$cart['postage_price'], 2), $cartNum, 4);
} else {
//按照商品价格返佣
if (isset($productInfo['attrInfo'])) {
From e52fe14678ad038cb7b4ea5158c7c3e48ebc6d99 Mon Sep 17 00:00:00 2001
From: evoxwht <442384644@qq.com>
Date: Thu, 23 Mar 2023 18:21:36 +0800
Subject: [PATCH 9/9] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BD=A3=E9=87=91?=
=?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=95=B0=E6=8D=AE=E6=98=BE=E7=A4=BA=E4=B8=BA?=
=?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=97=B6=E9=97=B4=E5=86=85=E7=9A=84=E7=B4=AF?=
=?UTF-8?q?=E8=AE=A1=E4=BD=A3=E9=87=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
crmeb/app/dao/user/UserBrokerageDao.php | 9 ++++++++-
.../app/services/user/UserBrokerageServices.php | 17 +++++++++++++++--
2 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/crmeb/app/dao/user/UserBrokerageDao.php b/crmeb/app/dao/user/UserBrokerageDao.php
index 54d688d2c..224677302 100644
--- a/crmeb/app/dao/user/UserBrokerageDao.php
+++ b/crmeb/app/dao/user/UserBrokerageDao.php
@@ -33,6 +33,10 @@ class UserBrokerageDao extends BaseDao
* @param int $limit
* @param array $typeWhere
* @return array
+ * @throws \ReflectionException
+ * @throws \think\db\exception\DataNotFoundException
+ * @throws \think\db\exception\DbException
+ * @throws \think\db\exception\ModelNotFoundException
*/
public function getList(array $where, string $field = '*', int $page = 0, int $limit = 0, array $typeWhere = [])
{
@@ -68,7 +72,8 @@ class UserBrokerageDao extends BaseDao
*/
public function brokerageRankList(array $where, int $page = 0, int $limit = 0)
{
- return $this->search($where)->field('uid,SUM(IF(pm=1,`number`,-`number`)) as brokerage_price')->with(['user' => function ($query) {
+ //SUM(IF(pm=1,`number`,-`number`))
+ return $this->search($where)->field('uid,SUM(number) as brokerage_price')->with(['user' => function ($query) {
$query->field('uid,avatar,nickname');
}])->order('brokerage_price desc')->group('uid')->when($page && $limit, function ($query) use ($page, $limit) {
$query->page($page, $limit);
@@ -79,6 +84,7 @@ class UserBrokerageDao extends BaseDao
* 获取某些条件的佣金总数
* @param array $where
* @return mixed
+ * @throws \ReflectionException
*/
public function getBrokerageSumColumn(array $where)
{
@@ -92,6 +98,7 @@ class UserBrokerageDao extends BaseDao
* 获取某个账户下的冻结佣金
* @param int $uid
* @return float
+ * @throws \ReflectionException
*/
public function getUserFrozenPrice(int $uid)
{
diff --git a/crmeb/app/services/user/UserBrokerageServices.php b/crmeb/app/services/user/UserBrokerageServices.php
index 36e15e6d1..ff4a9bad7 100644
--- a/crmeb/app/services/user/UserBrokerageServices.php
+++ b/crmeb/app/services/user/UserBrokerageServices.php
@@ -187,6 +187,7 @@ class UserBrokerageServices extends BaseServices
* @param array|string[] $type
* @param string $time
* @return float
+ * @throws \ReflectionException
*/
public function getUserBrokerageSum(int $uid, array $type = ['one_brokerage', 'two_brokerage', 'brokerage_user'], $time = '')
{
@@ -271,7 +272,7 @@ class UserBrokerageServices extends BaseServices
*/
public function brokerageRankList(string $time = 'week')
{
- $where = [];
+ $where = ['pm' => 1];
if ($time) {
$where['time'] = $time;
}
@@ -296,10 +297,14 @@ class UserBrokerageServices extends BaseServices
* 获取用户排名
* @param int $uid
* @param string $time
+ * @return false|int|string
+ * @throws \think\db\exception\DataNotFoundException
+ * @throws \think\db\exception\DbException
+ * @throws \think\db\exception\ModelNotFoundException
*/
public function getUserBrokerageRank(int $uid, string $time = 'week')
{
- $where = [];
+ $where = ['pm' => 1];
if ($time) {
$where['time'] = $time;
}
@@ -327,6 +332,9 @@ class UserBrokerageServices extends BaseServices
* 推广数据 昨天的佣金 累计提现金额 当前佣金
* @param int $uid
* @return mixed
+ * @throws \think\db\exception\DataNotFoundException
+ * @throws \think\db\exception\DbException
+ * @throws \think\db\exception\ModelNotFoundException
*/
public function commission(int $uid)
{
@@ -354,6 +362,7 @@ class UserBrokerageServices extends BaseServices
* @param array $where
* @param int $time
* @return mixed
+ * @throws \ReflectionException
*/
public function getUsersBokerageSum(array $where, $time = 0)
{
@@ -372,6 +381,10 @@ class UserBrokerageServices extends BaseServices
* @param $uid
* @param $type
* @return array
+ * @throws \ReflectionException
+ * @throws \think\db\exception\DataNotFoundException
+ * @throws \think\db\exception\DbException
+ * @throws \think\db\exception\ModelNotFoundException
*/
public function getBrokerageList($uid, $type)
{