多店铺需求
This commit is contained in:
parent
80537e4bcd
commit
5c06756678
|
|
@ -44,7 +44,9 @@ public class DataSummaryController {
|
||||||
public CzgResult<ShopOrderStatistic> getTradeData(DataSummaryTradeParam param) {
|
public CzgResult<ShopOrderStatistic> getTradeData(DataSummaryTradeParam param) {
|
||||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId(0L);
|
||||||
param.setShopId(shopId);
|
if (param.getShopId() == null) {
|
||||||
|
param.setShopId(shopId);
|
||||||
|
}
|
||||||
ShopOrderStatistic data = dataSummaryService.getTradeData(param);
|
ShopOrderStatistic data = dataSummaryService.getTradeData(param);
|
||||||
return CzgResult.success(data);
|
return CzgResult.success(data);
|
||||||
}
|
}
|
||||||
|
|
@ -59,7 +61,9 @@ public class DataSummaryController {
|
||||||
public CzgResult<Page<DataSummaryProductSaleRankingVo>> getProductSaleData(DataSummaryProductSaleParam param) {
|
public CzgResult<Page<DataSummaryProductSaleRankingVo>> getProductSaleData(DataSummaryProductSaleParam param) {
|
||||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId(0L);
|
||||||
param.setShopId(shopId);
|
if (param.getShopId() == null) {
|
||||||
|
param.setShopId(shopId);
|
||||||
|
}
|
||||||
Page<DataSummaryProductSaleRankingVo> data = dataSummaryService.getProductSaleRankingPage(param);
|
Page<DataSummaryProductSaleRankingVo> data = dataSummaryService.getProductSaleRankingPage(param);
|
||||||
return CzgResult.success(data);
|
return CzgResult.success(data);
|
||||||
}
|
}
|
||||||
|
|
@ -67,15 +71,18 @@ public class DataSummaryController {
|
||||||
/**
|
/**
|
||||||
* 销售趋势柱状图 左下
|
* 销售趋势柱状图 左下
|
||||||
*
|
*
|
||||||
* @param day 天数
|
* @param day 天数
|
||||||
|
* @param shopId 店铺id
|
||||||
*/
|
*/
|
||||||
@GetMapping("dateAmount")
|
@GetMapping("dateAmount")
|
||||||
@OperationLog("销售趋势柱状图 左下")
|
@OperationLog("销售趋势柱状图 左下")
|
||||||
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||||
//@SaAdminCheckPermission("dataSummary:dateAmount")
|
//@SaAdminCheckPermission("dataSummary:dateAmount")
|
||||||
public CzgResult<DataSummaryDateAmountVo> getDateAmount(@RequestParam Integer day) {
|
public CzgResult<DataSummaryDateAmountVo> getDateAmount(@RequestParam Integer day, @RequestParam Long shopId) {
|
||||||
AssertUtil.isNull(day, "天数不能为空");
|
AssertUtil.isNull(day, "天数不能为空");
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
if (shopId == null) {
|
||||||
|
shopId = StpKit.USER.getShopId(0L);
|
||||||
|
}
|
||||||
DataSummaryDateAmountVo data = dataSummaryService.getSummaryAmountData(shopId, day);
|
DataSummaryDateAmountVo data = dataSummaryService.getSummaryAmountData(shopId, day);
|
||||||
return CzgResult.success(data);
|
return CzgResult.success(data);
|
||||||
}
|
}
|
||||||
|
|
@ -84,13 +91,16 @@ public class DataSummaryController {
|
||||||
* 支付占比饼图 左下
|
* 支付占比饼图 左下
|
||||||
*
|
*
|
||||||
* @param day 天数
|
* @param day 天数
|
||||||
|
* @param shopId 店铺id
|
||||||
*/
|
*/
|
||||||
@GetMapping("datePayType")
|
@GetMapping("datePayType")
|
||||||
@OperationLog("支付占比饼图 左下")
|
@OperationLog("支付占比饼图 左下")
|
||||||
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
@SaStaffCheckPermission("yun_xu_cha_kan_jing_ying_shu_ju")
|
||||||
//@SaAdminCheckPermission("dataSummary:datePayType")
|
//@SaAdminCheckPermission("dataSummary:datePayType")
|
||||||
public CzgResult<DataSummaryPayTypeVo> shopSummaryPayType(@RequestParam Integer day) {
|
public CzgResult<DataSummaryPayTypeVo> shopSummaryPayType(@RequestParam Integer day, @RequestParam Long shopId) {
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
if (shopId == null) {
|
||||||
|
shopId = StpKit.USER.getShopId(0L);
|
||||||
|
}
|
||||||
DataSummaryPayTypeVo data = dataSummaryService.getSummaryPayTypeData(shopId, day);
|
DataSummaryPayTypeVo data = dataSummaryService.getSummaryPayTypeData(shopId, day);
|
||||||
return CzgResult.success(data);
|
return CzgResult.success(data);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,9 @@ public class SaleSummaryController {
|
||||||
//@SaAdminCheckPermission("saleSummary:count")
|
//@SaAdminCheckPermission("saleSummary:count")
|
||||||
public CzgResult<SaleSummaryCountVo> summaryCount(SaleSummaryCountParam param) {
|
public CzgResult<SaleSummaryCountVo> summaryCount(SaleSummaryCountParam param) {
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId(0L);
|
||||||
param.setShopId(shopId);
|
if (param.getShopId() == null) {
|
||||||
|
param.setShopId(shopId);
|
||||||
|
}
|
||||||
SaleSummaryCountVo data = saleSummaryService.summaryCount(param);
|
SaleSummaryCountVo data = saleSummaryService.summaryCount(param);
|
||||||
return CzgResult.success(data);
|
return CzgResult.success(data);
|
||||||
}
|
}
|
||||||
|
|
@ -51,7 +53,9 @@ public class SaleSummaryController {
|
||||||
//@SaAdminCheckPermission("saleSummary:page")
|
//@SaAdminCheckPermission("saleSummary:page")
|
||||||
public CzgResult<Page<SaleSummaryInfoVo>> summaryPage(SaleSummaryCountParam param) {
|
public CzgResult<Page<SaleSummaryInfoVo>> summaryPage(SaleSummaryCountParam param) {
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId(0L);
|
||||||
param.setShopId(shopId);
|
if (param.getShopId() == null) {
|
||||||
|
param.setShopId(shopId);
|
||||||
|
}
|
||||||
Page<SaleSummaryInfoVo> page = saleSummaryService.summaryPage(param);
|
Page<SaleSummaryInfoVo> page = saleSummaryService.summaryPage(param);
|
||||||
return CzgResult.success(page);
|
return CzgResult.success(page);
|
||||||
}
|
}
|
||||||
|
|
@ -65,7 +69,9 @@ public class SaleSummaryController {
|
||||||
//@SaAdminCheckPermission("saleSummary:export")
|
//@SaAdminCheckPermission("saleSummary:export")
|
||||||
public List<SaleSummaryInfoVo> summaryExport(SaleSummaryCountParam param) {
|
public List<SaleSummaryInfoVo> summaryExport(SaleSummaryCountParam param) {
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId(0L);
|
||||||
param.setShopId(shopId);
|
if (param.getShopId() == null) {
|
||||||
|
param.setShopId(shopId);
|
||||||
|
}
|
||||||
return saleSummaryService.summaryList(param);
|
return saleSummaryService.summaryList(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,9 @@ public class TableSummaryController {
|
||||||
//@SaAdminCheckPermission("tableSummary:list")
|
//@SaAdminCheckPermission("tableSummary:list")
|
||||||
public CzgResult<List<TableSummaryInfoVo>> summaryList(TableSummaryParam param) {
|
public CzgResult<List<TableSummaryInfoVo>> summaryList(TableSummaryParam param) {
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId(0L);
|
||||||
param.setShopId(shopId);
|
if (param.getShopId() == null) {
|
||||||
|
param.setShopId(shopId);
|
||||||
|
}
|
||||||
List<TableSummaryInfoVo> data = tableSummaryService.summaryList(param);
|
List<TableSummaryInfoVo> data = tableSummaryService.summaryList(param);
|
||||||
return CzgResult.success(data);
|
return CzgResult.success(data);
|
||||||
}
|
}
|
||||||
|
|
@ -51,7 +53,9 @@ public class TableSummaryController {
|
||||||
//@SaAdminCheckPermission("tableSummary:export")
|
//@SaAdminCheckPermission("tableSummary:export")
|
||||||
public List<TableSummaryExportVo> summaryExport(TableSummaryParam param) {
|
public List<TableSummaryExportVo> summaryExport(TableSummaryParam param) {
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId(0L);
|
||||||
param.setShopId(shopId);
|
if (param.getShopId() == null) {
|
||||||
|
param.setShopId(shopId);
|
||||||
|
}
|
||||||
return tableSummaryService.summaryExportList(param);
|
return tableSummaryService.summaryExportList(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ public class DataSummaryProductSaleParam implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 店铺id
|
* 店铺id
|
||||||
*/
|
*/
|
||||||
@JSONField(serialize = false)
|
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
/**
|
/**
|
||||||
* 开始日期
|
* 开始日期
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.czg.order.param;
|
package com.czg.order.param;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
|
||||||
import com.czg.validator.group.DefaultGroup;
|
import com.czg.validator.group.DefaultGroup;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
@ -33,7 +32,6 @@ public class DataSummaryTradeParam implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 店铺id
|
* 店铺id
|
||||||
*/
|
*/
|
||||||
@JSONField(serialize = false)
|
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.czg.order.param;
|
package com.czg.order.param;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
@ -20,7 +19,6 @@ public class SaleSummaryCountParam implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 店铺id
|
* 店铺id
|
||||||
*/
|
*/
|
||||||
@JSONField(serialize = false)
|
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
/**
|
/**
|
||||||
* 商品名称
|
* 商品名称
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.czg.order.param;
|
package com.czg.order.param;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
@ -29,7 +28,6 @@ public class TableSummaryParam implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 店铺id
|
* 店铺id
|
||||||
*/
|
*/
|
||||||
@JSONField(serialize = false)
|
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue