fix:11
This commit is contained in:
1 parent
13c36b570d
commit
ab5d7bb4dd
4 files changed
+37
-19
No files matched your search
+18
@@ -0,0 +1,18 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.order;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HardChartLatitudeVo {
|
||||
|
||||
/**
|
||||
* 每天的交易量
|
||||
*/
|
||||
private Long dayCount;
|
||||
|
||||
/**
|
||||
* 每天的交易金额
|
||||
*/
|
||||
private Long dayPrice;
|
||||
|
||||
}
|
||||
+7
@@ -37,6 +37,7 @@ public class HardApiController {
|
||||
private final HardOrderService hardwareOrderService;
|
||||
private final HardOrderSyncService hardOrderSyncService;
|
||||
private final HardApiService hardApiService;
|
||||
private final HardOrderTotalService hardOrderTotalService;
|
||||
|
||||
@PostMapping("/bind")
|
||||
@Operation(summary = "绑定服务端设备")
|
||||
@@ -114,5 +115,11 @@ public class HardApiController {
|
||||
return R.ok(hardApiService.getUserByCard(card));
|
||||
}
|
||||
|
||||
@GetMapping("/chart-latitude")
|
||||
@Operation(summary = "统计每天、每周、每月、每年")
|
||||
public R<HardChartLatitudeVo> totalChart(@RequestParam String card) {
|
||||
return R.ok(hardApiService.totalChart(card));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+6
-9
@@ -141,15 +141,12 @@ public class HardOrderController {
|
||||
MchManageVo mch = mchService.getFirstMchByDeptId(user.getDeptId()).getData();
|
||||
if (ObjectUtil.isEmpty(mch)) throw new RuntimeException("该用户下不存在商户");
|
||||
// 查询商户和下面的子商户
|
||||
List<Long> mchDtoIds = List.of(mch.getId());
|
||||
if (ObjectUtil.isNotEmpty(mchDtoIds)) {
|
||||
Long mchId = mchDtoIds.get(0);
|
||||
List<MchManageVo> mchList = mchService.getByParentId(mchId).getData();
|
||||
if (ObjectUtil.isNotEmpty(mchList)) {
|
||||
List<Long> mchIds = mchList.stream().map(MchManageVo::getId).toList();
|
||||
mchDtoIds.addAll(mchIds);
|
||||
dto.setMchIds(mchDtoIds);
|
||||
}
|
||||
List<Long> mchDtoIds = new java.util.ArrayList<>(List.of(mch.getId()));
|
||||
List<MchManageVo> mchList = mchService.getByParentId(mch.getId()).getData();
|
||||
if (ObjectUtil.isNotEmpty(mchList)) {
|
||||
List<Long> mchIds = mchList.stream().map(MchManageVo::getId).toList();
|
||||
mchDtoIds.addAll(mchIds);
|
||||
dto.setMchIds(mchDtoIds);
|
||||
}
|
||||
return R.ok(hardwareOrderService.appMchPageJoin(page, dto, user));
|
||||
}
|
||||
|
||||
+6
-10
@@ -60,7 +60,6 @@ public class HardOrderTotalController {
|
||||
|
||||
/* ************************************* end 远程调用 end ************************************* */
|
||||
|
||||
|
||||
/* ************************************* start app start ************************************* */
|
||||
@Operation(summary = "app查询商户每天流水记录", description = "app查询订单列表根据权限")
|
||||
@GetMapping("/app/mch-water-day")
|
||||
@@ -72,16 +71,13 @@ public class HardOrderTotalController {
|
||||
// 查询用户属于的商户
|
||||
MchManageVo mch = mchService.getFirstMchByDeptId(user.getDeptId()).getData();
|
||||
if (ObjectUtil.isEmpty(mch)) throw new RuntimeException("该用户下不存在商户");
|
||||
List<Long> mchDtoIds = List.of(mch.getId());
|
||||
List<Long> mchDtoIds = new ArrayList<>(List.of(mch.getId()));
|
||||
// 查询商户和下面的子商户
|
||||
if (ObjectUtil.isNotEmpty(mchDtoIds)) {
|
||||
Long mchId = mchDtoIds.get(0);
|
||||
List<MchManageVo> mchList = mchService.getByParentId(mchId).getData();
|
||||
if (ObjectUtil.isNotEmpty(mchList)) {
|
||||
List<Long> mchIds = mchList.stream().map(MchManageVo::getId).toList();
|
||||
mchDtoIds.addAll(mchIds);
|
||||
dto.setMchIds(mchDtoIds);
|
||||
}
|
||||
List<MchManageVo> mchList = mchService.getByParentId(mch.getId()).getData();
|
||||
if (ObjectUtil.isNotEmpty(mchList)) {
|
||||
List<Long> mchIds = mchList.stream().map(MchManageVo::getId).toList();
|
||||
mchDtoIds.addAll(mchIds);
|
||||
dto.setMchIds(mchDtoIds);
|
||||
}
|
||||
return R.ok(hardOrderTotalService.listCsByDay(page, dto, user));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user