diff --git a/docs/issues-0327-1.md b/docs/issues-0327-1.md new file mode 100644 index 00000000..d4605464 --- /dev/null +++ b/docs/issues-0327-1.md @@ -0,0 +1,37 @@ +# 核心功能测试结果 + +- 分销员直推没有获得返现佣金,测试数据:uid=20升级为创客分销等级后,下级用户下报单商品订单支付后,uid=20并没有eb_user_brokerage返现佣金记录。 +- 分销海报页面, pages/users/user_spread_code/index, 获取不到二维码 + fetch("https://www.fsgx.cn/api/user/routine_code", { + "headers": { + "accept": "*/*", + "accept-language": "zh-CN,zh;q=0.9", + "authori-zation": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdXRoIjoiMTRlMWI2MDBiMWZkNTc5ZjQ3NDMzYjg4ZThkODUyOTEiLCJpc3MiOiJ3d3cuZnNneC5jbiIsImF1ZCI6Ind3dy5mc2d4LmNuIiwiaWF0IjoxNzc0NjY2NzA1LCJuYmYiOjE3NzQ2NjY3MDUsImV4cCI6MTc3NTI3MTUwNSwianRpIjp7ImlkIjoyMCwidHlwZSI6InJvdXRpbmUifX0.lbxfmmPVMNFpZmx9EXcb_7viz-YeMC_QymX6tiuCkD4", + "cache-control": "no-cache", + "content-type": "application/json", + "form-type": "routine", + "pragma": "no-cache", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "x-source": "370474988fa2275c" + }, + "referrer": "https://servicewechat.com/wx998d9e0a925a1a13/devtools/page-frame.html", + "referrerPolicy": "strict-origin-when-cross-origin", + "body": null, + "method": "GET", + "mode": "cors", + "credentials": "omit" +}); +{"status":200,"msg":"ok","data":{"url":false}} + +- `pro_v3.5.1/.cursor/plans/fix_issues_0325-1_f8488785.plan.md`对文档中“B7. e2e 测试验收分销员等级配置(测试问题 #7)”执行e2e测试 + + +--- + +# 测试 + +# 相关文件 +1. **相关文件**:`docs/PRD_fsgx_V1.0.md` `docs/page-dev-specs-fsgx.md`,`pro_v3.5.1/.cursor/plans/fix_issues_0325-1_f8488785.plan.md` + diff --git a/pro_v3.5.1/app/controller/api/v1/user/UserBill.php b/pro_v3.5.1/app/controller/api/v1/user/UserBill.php index 56392c1f..7d427f04 100644 --- a/pro_v3.5.1/app/controller/api/v1/user/UserBill.php +++ b/pro_v3.5.1/app/controller/api/v1/user/UserBill.php @@ -96,6 +96,10 @@ class UserBill $urlCode = $imageInfo['att_dir']; if ($imageInfo['image_type'] == 1) $urlCode = sys_config('site_url') . $urlCode; } + if (!$urlCode) { + $siteUrl = sys_config('site_url', ''); + $urlCode = $siteUrl . '?spread=' . $uid; + } return app('json')->success(['url' => $urlCode]); } diff --git a/pro_v3.5.1/app/services/order/StoreOrderCreateServices.php b/pro_v3.5.1/app/services/order/StoreOrderCreateServices.php index bd461417..2efb9a78 100644 --- a/pro_v3.5.1/app/services/order/StoreOrderCreateServices.php +++ b/pro_v3.5.1/app/services/order/StoreOrderCreateServices.php @@ -1007,7 +1007,7 @@ class StoreOrderCreateServices extends BaseServices // 锁定推荐人行,确保同一推荐人同时只有一个事务在计算位次 \think\facade\Db::name('user') ->where('uid', $spread_uid) - ->lockWrite() + ->lock(true) ->value('uid'); // fsgx B1:推荐人自己必须有报单商品订单,才能获得推荐返现佣金 diff --git a/pro_v3.5.1/app/services/other/QrcodeServices.php b/pro_v3.5.1/app/services/other/QrcodeServices.php index 6da38462..2c180e83 100644 --- a/pro_v3.5.1/app/services/other/QrcodeServices.php +++ b/pro_v3.5.1/app/services/other/QrcodeServices.php @@ -23,6 +23,7 @@ use crmeb\services\wechat\MiniProgram; use crmeb\services\wechat\OfficialAccount; use GuzzleHttp\Psr7\Utils; use think\annotation\Inject; +use think\facade\Log; use think\exception\ValidateException; @@ -282,10 +283,12 @@ class QrcodeServices extends BaseServices } } $siteUrl = sys_config('site_url'); - $imageInfo = ''; if (!$imageInfo) { $res = MiniProgram::appCodeUnlimit($data, $page, 280); - if (!$res) return false; + if (!$res) { + Log::error('[getRoutineQrcodePath] appCodeUnlimit 返回空, scene=' . $data . ', page=' . $page); + return false; + } $uploadType = (int)sys_config('upload_type', 1); $upload = UploadService::init($uploadType); $res = (string)Utils::streamFor($res); @@ -317,6 +320,7 @@ class QrcodeServices extends BaseServices if ($imageInfo['image_type'] == 1) $url = $siteUrl . $url; return $url; } catch (\Throwable $e) { + Log::error('[getRoutineQrcodePath] 生成小程序码异常: ' . $e->getMessage()); return false; } }