From 94ce2b6349f3dcfa182b851bc0d9d139752efe00 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Wed, 10 May 2023 10:47:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=907.6.0=E3=80=91=E3=80=90stat=E3=80=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BD=BF=E7=94=A8=E6=96=B9=E6=B3=95=E4=BB=8B?= =?UTF-8?q?=E7=BB=8Dreadme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel-s-stat/README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/kernel-s-stat/README.md b/kernel-s-stat/README.md index 729c8b0d1..36fe48e66 100644 --- a/kernel-s-stat/README.md +++ b/kernel-s-stat/README.md @@ -1 +1,27 @@ -# 点击统计 \ No newline at end of file +# 点击统计 + +如需让业务实现点击状态统计,需要在实体上实现两个接口,如下所示: + +```java + +public class BusinessEntity implements ClickStatusCallback, ClickCountCallback { + + // ... + +} +``` + +在业务的详情接口: + +```java +// 增加一次点击次数 +Long clickCount = clickCountCalcApi.addOneClickCount(entity); +clickStatusCalcApi.addClickStatus(entity); +``` + +在业务的列表接口: + +```java +// 统计点击状态 +clickStatusCalcApi.calcClickStatus(records); +```