新增老板专属私域运营概况与订单新老客户统计

This commit is contained in:
summer committed 2026-12-04 02:03:31 +08:00
1 parent 000a80af3c
commit d18089aaf6
21 files changed
+248 -79

No files matched your search

+4 -6
View File
@@ -123,13 +123,11 @@ test('锁价、独立售后、私有同名模板、人数和审批列表都只
assert.equal((await f.call(self,'/api/'+resource+'/'+requests[other])).status,404);assert.equal((await f.call(self,'/api/'+resource+'/'+requests[self]+'/approve',{verified:true})).status,403);
assert.equal((await f.call('owner','/api/'+resource)).body.requests.length,2);
}
const ownKey=self==='assistant'?'assistant1Count':'assistant2Count',otherKey=self==='assistant'?'assistant2Count':'assistant1Count',people=(await f.call(self,'/api/people-count?date='+d)).body;
assert.ok(!Object.hasOwn(people,otherKey));assert.ok(!Object.hasOwn(people,'count'));
assert.equal((await f.call(self,'/api/people-count',{date:d,revision:people.revision,[ownKey]:'3'})).status,200);
const next=(await f.call(self,'/api/people-count?date='+d)).body;assert.equal(next[ownKey],3);assert.ok(!Object.hasOwn(next,otherKey));assert.equal((await f.call(self,'/api/people-count',{date:d,revision:next.revision,[otherKey]:'999'})).status,403);
assert.ok(!JSON.stringify((await f.call(self,'/api/people-count-history?date='+d+'&from='+d)).body).includes(otherKey));
assert.equal((await f.call(self,'/api/people-count?date='+d)).status,403);
assert.equal((await f.call(self,'/api/people-count',{date:d,revision:0,assistant1Count:'3'})).status,403);
assert.equal((await f.call(self,'/api/people-count-history?date='+d+'&from='+d)).status,403);
}
const people=(await f.call('owner','/api/people-count?date='+d)).body;assert.equal(people.assistant1Count,3);assert.equal(people.assistant2Count,3);
const people=(await f.call('owner','/api/people-count?date='+d)).body;assert.equal(people.assistant1Count,null);assert.equal(people.assistant2Count,null);
});
test('新助理没有默认可登录密码;只有老板可设置并使旧会话失效,旧助理登录别名及ID保持',async t=>{