mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 22:40:48 +00:00
Merge branch 'v5.1.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.1.0dev
This commit is contained in:
commit
d0597896ca
@ -688,7 +688,7 @@ class StoreOrderRefundServices extends BaseServices
|
||||
|
||||
$storeOrderServices->update($oid, ['refund_status' => 0, 'refund_type' => 3]);
|
||||
//处理订单商品cart_info
|
||||
$this->cancelOrderRefundCartInfo($id, $oid, $orderRefundInfo);
|
||||
$this->cancelOrderRefundCartInfo($id, $oid, $orderRefundInfo, '不退款原因:' . ($data['refund_reason'] ?? ''));
|
||||
//记录
|
||||
/** @var StoreOrderStatusServices $statusService */
|
||||
$statusService = app()->make(StoreOrderStatusServices::class);
|
||||
@ -1277,7 +1277,7 @@ class StoreOrderRefundServices extends BaseServices
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
*/
|
||||
public function cancelOrderRefundCartInfo(int $id, int $oid, $orderRefundInfo = [])
|
||||
public function cancelOrderRefundCartInfo(int $id, int $oid, $orderRefundInfo = [], string $title = '')
|
||||
{
|
||||
if (!$orderRefundInfo) {
|
||||
$orderRefundInfo = $this->dao->get(['id' => $id, 'is_cancel' => 0]);
|
||||
@ -1306,7 +1306,7 @@ class StoreOrderRefundServices extends BaseServices
|
||||
$statusService->save([
|
||||
'oid' => $oid,
|
||||
'change_type' => 'cancel_refund_order',
|
||||
'change_message' => '取消退款',
|
||||
'change_message' => $title ?: '取消退款',
|
||||
'change_time' => time()
|
||||
]);
|
||||
|
||||
|
||||
@ -127,6 +127,9 @@ class StoreProductServices extends BaseServices
|
||||
/** @var StoreCategoryServices $categoryService */
|
||||
$categoryService = app()->make(StoreCategoryServices::class);
|
||||
$cateList = $categoryService->getCateParentAndChildName($cateIds);
|
||||
$preantCateList = $categoryService->getColumn([
|
||||
['id', 'in', $cateIds]
|
||||
], 'cate_name', 'id');
|
||||
foreach ($list as &$item) {
|
||||
$cateName = array_filter($cateList, function ($val) use ($item) {
|
||||
if (in_array($val['id'], explode(',', $item['cate_id']))) {
|
||||
@ -137,6 +140,9 @@ class StoreProductServices extends BaseServices
|
||||
foreach ($cateName as $k => $v) {
|
||||
$item['cate_name'][] = $v['one'] . '/' . $v['two'];
|
||||
}
|
||||
if (!count($item['cate_name']) && isset($preantCateList[$item['cate_id']])) {
|
||||
$item['cate_name'][] = $preantCateList[$item['cate_id']];
|
||||
}
|
||||
$item['cate_name'] = is_array($item['cate_name']) ? implode(',', $item['cate_name']) : '';
|
||||
$item['stock_attr'] = $item['stock'] > 0;//库存
|
||||
$item['product_type'] = $this->productType[$item['virtual_type']];
|
||||
|
||||
@ -49,7 +49,7 @@ class Crmeb extends BaseStorage
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->accessToken->httpRequest('user/info');
|
||||
return $this->accessToken->httpRequest('v2/user/info');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user