v1.0.17 #26

Merged
timi merged 7 commits from dev into master 2026-08-19 17:30:36 +00:00
6 changed files with 58 additions and 0 deletions
Showing only changes of commit 17d88fc338 - Show all commits
@@ -7,6 +7,7 @@ import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateView;
import com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView;
import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq;
import com.imyeyu.spring.annotation.AOPLog;
import com.imyeyu.spring.annotation.RequestRateLimit;
@@ -57,6 +58,15 @@ public class GaoStoreChartController {
return service.eventRecordDailyStat(req);
}
/// 查询登记事件每日数值合计
@AOPLog
@RequestRateLimit
@RequireGaoPermission(GaoPermissionCode.STAT_READ)
@PostMapping("/event/record/number-value/daily")
public List<GaoEventRecordNumberValueDailyStatView> eventRecordNumberValueDaily(@RequestBody GaoStoreChartReq req) {
return service.eventRecordNumberValueDailyStat(req);
}
/// 查询登记事件日历记录
@AOPLog
@RequestRateLimit
@@ -5,6 +5,7 @@ import com.imyeyu.api.modules.gao.vo.GaoCustomerChartReq;
import com.imyeyu.api.modules.gao.vo.GaoCustomerEventRankView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordPage;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordRankPage;
import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq;
@@ -88,6 +89,9 @@ public interface GaoEventRecordMapper extends BaseMapper<GaoEventRecord, String>
/// @return 每日登记数
List<GaoEventRecordDailyStatView> stateDailyByRange(GaoStoreChartReq req);
/// 按时间范围和事件统计每日登记数值合计
List<GaoEventRecordNumberValueDailyStatView> stateNumberValueDailyByRange(GaoStoreChartReq req);
/// 按时间范围查询登记日历记录
///
/// @param req 门店报表查询请求
@@ -4,6 +4,7 @@ import com.imyeyu.api.modules.gao.vo.GaoCustomerDailyStateView;
import com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView;
import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq;
import java.util.List;
@@ -23,6 +24,9 @@ public interface GaoStoreChartService {
/// 查询登记事件每日统计
List<GaoEventRecordDailyStatView> eventRecordDailyStat(GaoStoreChartReq req);
/// 查询登记事件每日数值合计
List<GaoEventRecordNumberValueDailyStatView> eventRecordNumberValueDailyStat(GaoStoreChartReq req);
/// 查询登记事件日历记录
List<GaoEventRecordCalendarView> eventRecordCalendar(GaoStoreChartReq req);
}
@@ -8,6 +8,7 @@ import com.imyeyu.api.modules.gao.vo.GaoCustomerGenderStatView;
import com.imyeyu.api.modules.gao.vo.GaoCustomerTrendStateReq;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordDailyStatView;
import com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView;
import com.imyeyu.api.modules.gao.vo.GaoStoreChartReq;
import com.imyeyu.java.bean.timi.TimiException;
import lombok.RequiredArgsConstructor;
@@ -48,6 +49,12 @@ public class GaoStoreChartServiceImplement implements GaoStoreChartService {
return eventRecordMapper.stateDailyByRange(req);
}
@Override
public List<GaoEventRecordNumberValueDailyStatView> eventRecordNumberValueDailyStat(GaoStoreChartReq req) {
checkRangeReq(req);
return eventRecordMapper.stateNumberValueDailyByRange(req);
}
@Override
public List<GaoEventRecordCalendarView> eventRecordCalendar(GaoStoreChartReq req) {
checkRangeReq(req);
@@ -0,0 +1,17 @@
package com.imyeyu.api.modules.gao.vo;
import lombok.Data;
/// 登记事件数值每日统计视图
@Data
public class GaoEventRecordNumberValueDailyStatView {
/// 登记事件 ID
private String eventId;
/// 日期值,格式为 yyyyMMdd
private Integer dateValue;
/// 当日登记数值合计
private Long dailyNumberValue;
}
@@ -350,6 +350,22 @@
r.`registered_date_value` ASC,
r.`event_id` ASC
</select>
<select id="stateNumberValueDailyByRange" resultType="com.imyeyu.api.modules.gao.vo.GaoEventRecordNumberValueDailyStatView">
SELECT
r.`event_id` AS `eventId`,
r.`registered_date_value` AS `dateValue`,
SUM(r.`number_value`) AS `dailyNumberValue`
FROM `gao_event_record` r
WHERE
<include refid="storeChartRangeWhere"/>
AND r.`number_value` IS NOT NULL
GROUP BY
r.`event_id`,
r.`registered_date_value`
ORDER BY
r.`registered_date_value` ASC,
r.`event_id` ASC
</select>
<select id="selectCalendarByRange" resultType="com.imyeyu.api.modules.gao.vo.GaoEventRecordCalendarView">
SELECT
r.`id`,