更新了写真预约特殊产品处理

This commit is contained in:
chen-xin-zhi 2025-03-11 10:23:15 +08:00
parent edbdf7ae11
commit ca5d4849b2

View File

@ -13,6 +13,7 @@ import com.cultural.heritage.model.entity.Order;
import com.cultural.heritage.service.book.AdvanceOrderService; import com.cultural.heritage.service.book.AdvanceOrderService;
import com.cultural.heritage.service.good.GoodService; import com.cultural.heritage.service.good.GoodService;
import com.cultural.heritage.service.order.OrderService; import com.cultural.heritage.service.order.OrderService;
import com.google.gson.Gson;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource; import jakarta.annotation.Resource;
@ -54,7 +55,7 @@ public class GlobalController {
@PostMapping("/queryAll") @PostMapping("/queryAll")
@Operation(summary = "Web端管理员查看全局数据", description = "参数:无,权限:管理员(admin, boss)方法名delAppointmentDateById") @Operation(summary = "Web端管理员查看全局数据", description = "参数:无,权限:管理员(admin, boss)方法名delAppointmentDateById")
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE) @AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
public BaseResponse<Map<String, Object>> getDashboardData() { public BaseResponse<Object> getDashboardData() {
List<String> orderStatusList = List.of(OrderStatusConstant.PENDING_SHIPMENT, OrderStatusConstant.PENDING_DELIVERY, OrderStatusConstant.TRANSACTION_SUCCESSFUL); List<String> orderStatusList = List.of(OrderStatusConstant.PENDING_SHIPMENT, OrderStatusConstant.PENDING_DELIVERY, OrderStatusConstant.TRANSACTION_SUCCESSFUL);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
@ -129,7 +130,10 @@ public class GlobalController {
map.put("全部已上架商品数量", isShelvesGoodList.size()); map.put("全部已上架商品数量", isShelvesGoodList.size());
map.put("全部已下架商品数量", isNoShelvesGoodList.size()); map.put("全部已下架商品数量", isNoShelvesGoodList.size());
return ResultUtils.success(map); Gson gson = new Gson();
String json = gson.toJson(map);
Object obj = gson.fromJson(json, Object.class);
return ResultUtils.success(obj);
} }