Commit 18793ada by 张富康

fix(pe-analysis): 修正周期类型枚举及日期类型设置

- 将多个请求对象中周期类型的枚举调整为从0开始,修正文档注释及@ApiModelProperty说明
- 修改日期计算工具中对应的日期类型case值,确保与周期类型枚举一致
- 修正UsedCarDataStatsService中DataBizQueryParamsDTO的日期类型设置,
  使用请求中的cycleType替代固定数字4,保证业务逻辑正确传递周期类型参数
1 parent 10fb89a3
......@@ -41,9 +41,9 @@ public class CycleDataReq implements Serializable {
* 选择「自定义」时,需触发日期区间选择组件,可点击日期范围重新选择对应的日期区间;不能选择当天后的 日期,开始日期必须等于或早于结束日期;
*/
/**
* 1-天 2-周 3-月 4-自定义
* 0-天 1-周 2-月 4-自定义
*/
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义")
@ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull
private Integer cycleType;
......
......@@ -22,9 +22,9 @@ public class FlowContributionRankingReq implements Serializable {
private Integer merchantId;
/**
* 1-天 2-周 3-月 4-自定义
* 0-天 1-周 2-月 4-自定义
*/
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义")
@ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull
private Integer cycleType;
......
......@@ -29,9 +29,9 @@ public class RegionDistributionReq implements Serializable {
private Integer brandId;
/**
* 1-天 2-周 3-月 4-自定义
* 0-天 1-周 2-月 4-自定义
*/
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义")
@ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull
private Integer cycleType;
......
......@@ -34,9 +34,9 @@ public class StockStoreAnalysisReq implements Serializable {
private Integer provinceId;
/**
* 1-天 2-周 3-月 4-自定义
* 0-天 1-周 2-月 4-自定义
*/
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义")
@ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull
private Integer cycleType;
......
......@@ -42,9 +42,9 @@ public class StoreListCountReq implements Serializable {
*/
/**
* 1-天 2-周 3-月 4-自定义
* 0-天 1-周 2-月 4-自定义
*/
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义")
@ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull
private Integer cycleType;
......
......@@ -42,9 +42,9 @@ public class StoreListReq implements Serializable {
*/
/**
* 1-天 2-周 3-月 4-自定义
* 0-天 1-周 2-月 4-自定义
*/
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义")
@ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull
private Integer cycleType;
......
......@@ -49,9 +49,9 @@ public class TrendChartReq implements Serializable {
*/
/**
* 1-天 2-周 3-月 4-自定义
* 0-天 1-周 2-月 4-自定义
*/
@ApiModelProperty(notes = "1-天 2-周 3-月 4-自定义")
@ApiModelProperty(notes = "0-天 1-周 2-月 4-自定义")
@NotNull
private Integer cycleType;
......
......@@ -17,7 +17,7 @@ public class MerchantDubboConfig {
@Bean
public MerchantRemote rpcApiMethodRemote(){
return factory.builder(MerchantRemote.class)
.version("2.0.0").url("dubbo://192.168.3.188:22889")
.version("2.0.0")
.check(false).timeout(30000).build();
}
......
......@@ -312,7 +312,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4);
queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts(null);
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(merchantIds) ? StrUtil.join(",", merchantIds) : null);
queryDataBiz.setStartDate(request.getStartTime());
......@@ -489,7 +489,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4);
queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts(null);
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(merchantIds) ? StrUtil.join(",", merchantIds) : null);
// 二手车产值(当期卖车总产值、环比)-A0001 二手车毛利(当期毛利、环比)-A0002
......@@ -728,7 +728,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4);
queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts("merchantId");
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(merchantIds) ? StrUtil.join(",", merchantIds) : null);
queryDataBiz.setStartDate(request.getStartTime());
......@@ -815,7 +815,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4);
queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts(null);
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(finalMerchantIds) ? StrUtil.join(",", finalMerchantIds) : null);
queryDataBiz.setStartDate(request.getStartTime());
......@@ -900,7 +900,7 @@ public class UsedCarDataStatsService {
DataBizQueryParamsDTO queryDataBiz = new DataBizQueryParamsDTO();
queryDataBiz.setBizs(4);
queryDataBiz.setBrandIds(null);
queryDataBiz.setDateType(4);
queryDataBiz.setDateType(request.getCycleType());
queryDataBiz.setExts("merchantId");
queryDataBiz.setMerchantIds(CollUtil.isNotEmpty(finalMerchantIds) ? StrUtil.join(",", finalMerchantIds) : null);
queryDataBiz.setStartDate(request.getStartTime());
......
......@@ -138,16 +138,16 @@ public class DateUtils {
}
switch (dateType) {
case 1: // 日
case 0: // 日
lastStart = DateUtil.offsetDay(start, -1);
lastEnd = DateUtil.offsetDay(end, -1);
break;
case 2: // 周
case 1: // 周
lastStart = DateUtil.offsetWeek(start, -1);
lastEnd = DateUtil.offsetWeek(end, -1);
break;
case 3: // 月
case 2: // 月
lastStart = DateUtil.offsetMonth(start, -1);
Date nextMonthStart = DateUtil.offsetMonth(lastStart, 1);
lastEnd = DateUtil.offsetDay(nextMonthStart, -1);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!