- 下单页新增「指定大神 / 平台派单」模式:平台派单填品类、预算、地点/选点,expertId=0 - 服务端:平台派单单据支付后进入待接单池(余额支付即时入池,微信支付确认后入池),预算由买家出价但受 1~2000 元/小时约束 - 抢单由认领大神写入 expert_id 并转履约中;30 分钟无人接单沿用自动全额退款 - 修复订单 INSERT 占位符少一个导致下单报 Column count doesn't match 的问题,并新增列数/占位符一致性护栏 - 111 套件/737 用例全绿;线上 1 元实测:下单→待接单→池内 640m,测试数据已回滚
26 行
995 B
TypeScript
26 行
995 B
TypeScript
// 已读取AGENTS.md
|
|
import * as fs from 'fs';
|
|
import * as path from 'path';
|
|
|
|
/**
|
|
* 第二十三批回归闸门:订单初始状态与结算状态闸门
|
|
*/
|
|
describe('第二十三批结算状态闸门', () => {
|
|
const rootDir = path.resolve(__dirname, '../../');
|
|
const repoCode = fs.readFileSync(path.join(rootDir, 'server/src/db/repository.ts'), 'utf-8');
|
|
|
|
it('结算闸门必须拦截未付款(待付款)订单', () => {
|
|
const start = repoCode.indexOf('async completeOrderWithSettlement(');
|
|
const block = repoCode.slice(start, start + 900);
|
|
expect(block).toContain("'待付款'");
|
|
expect(block).toContain("'待支付'");
|
|
});
|
|
|
|
it('订单初始状态必须由服务端按支付方式决定', () => {
|
|
const start = repoCode.indexOf('async createOrder(');
|
|
const block = repoCode.slice(start, start + 5200);
|
|
expect(block).toContain("? (isMarketplace ? '待接单' : '履约中')");
|
|
expect(block).not.toContain('const status = data.status ||');
|
|
});
|
|
});
|