Merge branch 'master' of https://codeup.aliyun.com/bsdtec/biz-api-cloud
This commit is contained in:
commit
3c6a93e8e9
12 files changed
+275
-23
No files matched your search
+18
-4
@@ -18,6 +18,7 @@
|
||||
package com.bsd.pjcloud.app.controller;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.admin.api.dto.UserDTO;
|
||||
import com.bsd.pjcloud.admin.api.dto.UserTokenDTO;
|
||||
import com.bsd.pjcloud.admin.api.entity.SysUser;
|
||||
@@ -25,9 +26,12 @@ import com.bsd.pjcloud.admin.api.feign.RemoteTokenService;
|
||||
import com.bsd.pjcloud.admin.api.feign.RemoteUserService;
|
||||
import com.bsd.pjcloud.app.service.AppUserService;
|
||||
import com.bsd.pjcloud.canteen.api.feign.RemoteCanteenSpuService;
|
||||
import com.bsd.pjcloud.canteen.api.feign.RemoteDailyMenuService;
|
||||
import com.bsd.pjcloud.canteen.api.feign.RemoteOnlineCanteenSpuService;
|
||||
import com.bsd.pjcloud.canteen.dto.app.DailyMenuDTO;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenSpuEntity;
|
||||
import com.bsd.pjcloud.canteen.vo.app.CanteenOnlineSpuAppVO;
|
||||
import com.bsd.pjcloud.canteen.vo.app.DailyMenuAppVO;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.thirdparty.api.feign.RemoterThirdPartyAuthService;
|
||||
@@ -51,6 +55,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -81,6 +86,7 @@ public class AppUserAutoLoginController {
|
||||
private final RemoteCanteenSpuService remoteCanteenSpuService;
|
||||
|
||||
private final RemoteOnlineCanteenSpuService remoteOnlineCanteenSpuService;
|
||||
private final RemoteDailyMenuService remoteDailyMenuService;
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -256,13 +262,21 @@ public class AppUserAutoLoginController {
|
||||
@Inner(value = false)
|
||||
public R info() {
|
||||
|
||||
R<List<CanteenOnlineSpuAppVO>> spuListByIds = remoteOnlineCanteenSpuService.getSpuListByIds(Arrays.asList(1876870696924069890L));
|
||||
//
|
||||
// R<List<CanteenOnlineSpuAppVO>> spuListByIds = remoteOnlineCanteenSpuService.getSpuListByIds(Arrays.asList(1876870696924069890L));
|
||||
|
||||
// R<List<CanteenSpuEntity>> spuListByIds = remoteCanteenSpuService.getSpuListByIds(Arrays.asList(1876517188510273537L, 1866411313032441857L));
|
||||
|
||||
List<CanteenOnlineSpuAppVO> data = spuListByIds.getData();
|
||||
// List<CanteenOnlineSpuAppVO> data = spuListByIds.getData();
|
||||
|
||||
return R.ok(data);
|
||||
Page<Object> objectPage = new Page<>();
|
||||
objectPage.setCurrent(1);
|
||||
objectPage.setSize(10);
|
||||
DailyMenuDTO dailyMenuDTO = new DailyMenuDTO();
|
||||
dailyMenuDTO.setMerchantId(16L);
|
||||
dailyMenuDTO.setStartTime(LocalDate.of(2024,12,16));
|
||||
R<Page> pageR = remoteDailyMenuService.selectTimeFoodPage(objectPage, dailyMenuDTO);
|
||||
|
||||
return R.ok(pageR);
|
||||
}
|
||||
//
|
||||
// /**
|
||||
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2018-2025, pjcloud All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: pjcloud
|
||||
*
|
||||
*/
|
||||
|
||||
package com.bsd.pjcloud.canteen.api.feign;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.canteen.dto.CanteenSpuUpdateStockReqDTO;
|
||||
import com.bsd.pjcloud.canteen.dto.DailyMenuAll;
|
||||
import com.bsd.pjcloud.canteen.dto.app.DailyMenuDTO;
|
||||
import com.bsd.pjcloud.canteen.vo.APPOnlineSpuVO;
|
||||
import com.bsd.pjcloud.canteen.vo.app.CanteenOnlineSpuAppVO;
|
||||
import com.bsd.pjcloud.common.core.constant.ServiceNameConstants;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zjf
|
||||
* @date 2018/6/22
|
||||
*/
|
||||
@FeignClient(contextId = "remoteDailyMenuService", value = ServiceNameConstants.CANTEEN_SERVICE)
|
||||
public interface RemoteDailyMenuService {
|
||||
|
||||
|
||||
/**
|
||||
* app每日菜谱分页查询
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/canteenDailyMenu/app/page")
|
||||
R<Page> selectTimeFoodPage(@RequestParam Page page, @RequestBody @Validated DailyMenuDTO dailyMenuDTO);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 取当天指定菜品
|
||||
* @return ids
|
||||
*/
|
||||
@GetMapping("/canteenDailyMenu/app/selectTimeFood")
|
||||
R<List<DailyMenuAll>> selectTimeFoodAPP(@RequestParam("time") String time,
|
||||
@RequestParam("merchantId") Long merchantId,
|
||||
@RequestParam("categoryId") Long categoryId);
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.bsd.pjcloud.canteen.dto.app;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Schema(description = "app 每日菜谱分页列表")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class DailyMenuDTO {
|
||||
|
||||
@Schema(description = "开始时间")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull
|
||||
private LocalDate startTime;
|
||||
|
||||
@Schema(description = "商品 SPU 编号", example = "21292")
|
||||
private Long spuId;
|
||||
|
||||
/**
|
||||
* 商户
|
||||
*/
|
||||
@NotNull
|
||||
private Long merchantId;
|
||||
/**
|
||||
* 商品分类编号
|
||||
*
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 时间类型
|
||||
*/
|
||||
@Schema(description = "时间类型")
|
||||
private Integer hourType;
|
||||
|
||||
}
|
||||
+4
-4
@@ -87,16 +87,16 @@ public class CanteenOnlineSpuEntity extends Model<CanteenOnlineSpuEntity> {
|
||||
* 商品价格,单位使用:分
|
||||
*/
|
||||
@Schema(description="商品价格,单位使用:分")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
// @JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
// @JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 市场价,单位使用:分
|
||||
*/
|
||||
@Schema(description="市场价,单位使用:分")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
// @JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
// @JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer marketPrice;
|
||||
|
||||
/**
|
||||
|
||||
+6
-6
@@ -93,24 +93,24 @@ public class CanteenSpuEntity extends Model<CanteenSpuEntity> {
|
||||
* 商品价格,单位使用:分
|
||||
*/
|
||||
@Schema(description="商品价格,单位使用:分")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
// @JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
// @JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 市场价,单位使用:分
|
||||
*/
|
||||
@Schema(description="市场价,单位使用:分")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
// @JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
// @JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer marketPrice;
|
||||
|
||||
/**
|
||||
* 成本价,单位: 分
|
||||
*/
|
||||
@Schema(description="成本价,单位: 分")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
// @JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
// @JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer costPrice;
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -74,16 +74,16 @@ public class CanteenOnlineSpuAppVO {
|
||||
* 商品价格,单位使用:分
|
||||
*/
|
||||
@Schema(description="商品价格,单位使用:分")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
// @JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
// @JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer price;
|
||||
|
||||
/**
|
||||
* 市场价,单位使用:分
|
||||
*/
|
||||
@Schema(description="市场价,单位使用:分")
|
||||
@JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
@JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
// @JsonSerialize(using = MoneySerializer.class) // 分 -> 元
|
||||
// @JsonDeserialize(using = MoneyDeserializer.class) // 元 -> 分
|
||||
private Integer marketPrice;
|
||||
|
||||
/**
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.bsd.pjcloud.canteen.vo.app;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DailyMenuAppVO {
|
||||
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 菜品id
|
||||
*/
|
||||
private Long spuId;
|
||||
|
||||
/**
|
||||
* 菜品名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 商品价格,单位使用:分
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* 菜品分类编号
|
||||
*/
|
||||
private Long categoryId;
|
||||
/**
|
||||
* 菜品封面图
|
||||
*/
|
||||
private String picUrl;
|
||||
/**
|
||||
* 库存
|
||||
*/
|
||||
private Integer stock;
|
||||
|
||||
/**
|
||||
* 时间类型
|
||||
*/
|
||||
private Integer hourType;
|
||||
}
|
||||
+1
@@ -2,4 +2,5 @@ com.bsd.pjcloud.canteen.api.feign.RemoteCanteenCategoryService
|
||||
com.bsd.pjcloud.canteen.api.feign.RemoteCanteenOnlineCategoryService
|
||||
com.bsd.pjcloud.canteen.api.feign.RemoteCanteenSpuService
|
||||
com.bsd.pjcloud.canteen.api.feign.RemoteOnlineCanteenSpuService
|
||||
com.bsd.pjcloud.canteen.api.feign.RemoteDailyMenuService
|
||||
|
||||
+29
-2
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.canteen.dto.DailyMenuAll;
|
||||
import com.bsd.pjcloud.canteen.dto.app.DailyMenuDTO;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenSpuEntity;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenSpuService;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
@@ -24,6 +25,7 @@ import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
@@ -170,14 +172,39 @@ public class CanteenDailyMenuController {
|
||||
}
|
||||
|
||||
|
||||
// ---------APP------------
|
||||
// ---------AD------------
|
||||
@GetMapping("/ad/getCanteenList")
|
||||
@SysLog("查询每日菜品列表")
|
||||
public R getCanteenList(@RequestParam("day") String day,
|
||||
@RequestParam(value = "hourType", required = false) Integer hourType,
|
||||
@RequestParam(value = "categoryId", required = false) Long categoryId) {
|
||||
|
||||
return R.ok(canteenDailyMenuService.getCanteenMenuList(day,hourType,categoryId));
|
||||
return R.ok(canteenDailyMenuService.getCanteenMenuListScope(day,hourType,categoryId));
|
||||
}
|
||||
|
||||
// --------------APP---------------
|
||||
|
||||
|
||||
/**
|
||||
* 获取分页菜品
|
||||
*/
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@PostMapping("/app/page")
|
||||
public R<Page> selectTimeFoodPage(@ParameterObject Page page, @RequestBody @Validated DailyMenuDTO dailyMenuDTO) {
|
||||
return R.ok(canteenDailyMenuService.selectTimeFoodPage(page,dailyMenuDTO));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当天指定菜品
|
||||
*/
|
||||
@GetMapping("/app/selectTimeFood")
|
||||
public R<List<DailyMenuAll>> selectTimeFoodAPP(@RequestParam("time") String time,
|
||||
@RequestParam("merchantId") Long merchantId,
|
||||
@RequestParam("categoryId") Long categoryId) {
|
||||
if (ObjectUtil.isEmpty(time)) {
|
||||
time = DateUtil.today();
|
||||
}
|
||||
return R.ok(canteenDailyMenuService.selectTimeFood(time, merchantId, categoryId));
|
||||
}
|
||||
}
|
||||
+5
-1
@@ -1,7 +1,9 @@
|
||||
package com.bsd.pjcloud.canteen.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.canteen.dto.DailyMenuAll;
|
||||
import com.bsd.pjcloud.canteen.dto.app.DailyMenuDTO;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenDailyMenuEntity;
|
||||
|
||||
import java.util.List;
|
||||
@@ -37,5 +39,7 @@ public interface CanteenDailyMenuService extends IService<CanteenDailyMenuEntity
|
||||
* @param categoryId
|
||||
* @return
|
||||
*/
|
||||
Object getCanteenMenuList(String day, Integer hourType, Long categoryId);
|
||||
Object getCanteenMenuListScope(String day, Integer hourType, Long categoryId);
|
||||
|
||||
Page selectTimeFoodPage(Page page, DailyMenuDTO dailyMenuDTO);
|
||||
}
|
||||
+54
-1
@@ -1,12 +1,20 @@
|
||||
package com.bsd.pjcloud.canteen.service.impl;
|
||||
|
||||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.canteen.dto.DailyMenuAll;
|
||||
import com.bsd.pjcloud.canteen.dto.app.DailyMenuDTO;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenSpuEntity;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenSpuService;
|
||||
import com.bsd.pjcloud.canteen.vo.DailyMenuVO;
|
||||
import com.bsd.pjcloud.canteen.entity.CanteenDailyMenuEntity;
|
||||
import com.bsd.pjcloud.canteen.mapper.CanteenDailyMenuMapper;
|
||||
import com.bsd.pjcloud.canteen.service.CanteenDailyMenuService;
|
||||
import com.bsd.pjcloud.canteen.vo.app.DailyMenuAppVO;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -24,8 +32,11 @@ import java.util.stream.Collectors;
|
||||
* @date 2024-12-11 14:44:13
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class CanteenDailyMenuServiceImpl extends ServiceImpl<CanteenDailyMenuMapper, CanteenDailyMenuEntity> implements CanteenDailyMenuService {
|
||||
|
||||
|
||||
private final CanteenSpuService canteenSpuService;
|
||||
@Override
|
||||
public List<DailyMenuAll> selectTimeFood(String time, Long merchantId, Long categoryId) {
|
||||
List<DailyMenuAll> dailyMenuAllES = new ArrayList<>();
|
||||
@@ -92,7 +103,49 @@ public class CanteenDailyMenuServiceImpl extends ServiceImpl<CanteenDailyMenuMap
|
||||
|
||||
|
||||
@Override
|
||||
public Object getCanteenMenuList(String day, Integer hourType, Long categoryId) {
|
||||
public Object getCanteenMenuListScope(String day, Integer hourType, Long categoryId) {
|
||||
return baseMapper.getCanteenMenuList(day, hourType, categoryId,DataScope.of());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page selectTimeFoodPage(Page page, DailyMenuDTO dailyMenuDTO) {
|
||||
LambdaQueryWrapper<CanteenDailyMenuEntity> canteenDailyMenuEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
canteenDailyMenuEntityLambdaQueryWrapper.eq(CanteenDailyMenuEntity::getMerchantId, dailyMenuDTO.getMerchantId());
|
||||
canteenDailyMenuEntityLambdaQueryWrapper.eq(CanteenDailyMenuEntity::getStartTime, dailyMenuDTO.getStartTime());
|
||||
canteenDailyMenuEntityLambdaQueryWrapper.eq(dailyMenuDTO.getHourType() != null,
|
||||
CanteenDailyMenuEntity::getHourType, dailyMenuDTO.getHourType());
|
||||
Page pageData = baseMapper.selectPage(page, canteenDailyMenuEntityLambdaQueryWrapper);
|
||||
List<CanteenDailyMenuEntity> canteenDailyMenuEntities = pageData.getRecords();
|
||||
if (CollectionUtils.isNotEmpty(canteenDailyMenuEntities)) {
|
||||
List<Long> spuIds = canteenDailyMenuEntities.stream().map(CanteenDailyMenuEntity::getSpuId).distinct().collect(Collectors.toList());
|
||||
LambdaQueryWrapper<CanteenSpuEntity> onlineFoodSpuDOLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
onlineFoodSpuDOLambdaQueryWrapper.eq(null!=dailyMenuDTO.getCategoryId(),CanteenSpuEntity::getCategoryId, dailyMenuDTO.getCategoryId());
|
||||
onlineFoodSpuDOLambdaQueryWrapper.in(CanteenSpuEntity::getId, spuIds);
|
||||
List<CanteenSpuEntity> canteenSpuEntities = canteenSpuService.list(onlineFoodSpuDOLambdaQueryWrapper);
|
||||
// 按 id 分组成 Map
|
||||
Map<Long, CanteenSpuEntity> spuEntityMap = canteenSpuEntities.stream()
|
||||
.collect(Collectors.toMap(CanteenSpuEntity::getId, spu -> spu));
|
||||
// 构造新的 VO 列表
|
||||
List<DailyMenuAppVO> dailyMenuVOList = canteenDailyMenuEntities.stream()
|
||||
.map(menu -> {
|
||||
DailyMenuAppVO vo = new DailyMenuAppVO();
|
||||
BeanUtils.copyProperties(menu, vo); // 拷贝通用属性
|
||||
CanteenSpuEntity spuEntity = spuEntityMap.get(menu.getSpuId());
|
||||
if (spuEntity != null) {
|
||||
vo.setSpuId(spuEntity.getId());
|
||||
vo.setStock(spuEntity.getStock());
|
||||
vo.setPrice(spuEntity.getPrice());
|
||||
vo.setPicUrl(spuEntity.getPicUrl());
|
||||
vo.setName(spuEntity.getName());
|
||||
// 其他需要的字段
|
||||
}
|
||||
return vo;
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
pageData.setRecords(dailyMenuVOList);
|
||||
return pageData;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
-1
@@ -28,7 +28,6 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
public class CanteenSpuServiceImpl extends ServiceImpl<CanteenSpuMapper, CanteenSpuEntity> implements CanteenSpuService {
|
||||
|
||||
private final CanteenDailyMenuService coupleDailyMenuService;
|
||||
@Override
|
||||
public Object selectFoodList(LambdaQueryWrapper<CanteenSpuEntity> wrapper) {
|
||||
return baseMapper.selectListByScope(wrapper, DataScope.of());
|
||||
|
||||
Reference in new issue
Block a user