|
@@ -3,12 +3,19 @@ package com.dt.child.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.dt.child.domain.LzyShiwu;
|
|
import com.dt.child.domain.LzyShiwu;
|
|
|
|
+import com.dt.child.domain.LzyShiwuXiangqing;
|
|
|
|
+import com.dt.child.dto.LzyShiwuXiangqingDto;
|
|
import com.dt.child.dto.SelShiWuDto;
|
|
import com.dt.child.dto.SelShiWuDto;
|
|
|
|
+import com.dt.child.mapper.LzyShiwuXiangqingMapper;
|
|
import com.dt.child.service.LzyShiwuService;
|
|
import com.dt.child.service.LzyShiwuService;
|
|
import com.dt.child.mapper.LzyShiwuMapper;
|
|
import com.dt.child.mapper.LzyShiwuMapper;
|
|
|
|
+import com.dt.child.vo.LzyShiwuXiangqingVo;
|
|
|
|
+import com.dt.child.vo.UserVo;
|
|
|
|
+import com.dt.user.pojo.User;
|
|
import com.dt.vo.Result;
|
|
import com.dt.vo.Result;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -20,6 +27,9 @@ import java.util.List;
|
|
public class LzyShiwuServiceImpl extends ServiceImpl<LzyShiwuMapper, LzyShiwu>
|
|
public class LzyShiwuServiceImpl extends ServiceImpl<LzyShiwuMapper, LzyShiwu>
|
|
implements LzyShiwuService{
|
|
implements LzyShiwuService{
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private LzyShiwuXiangqingMapper lzyShiwuXiangqingMapper;
|
|
|
|
+
|
|
// 查询食物
|
|
// 查询食物
|
|
@Override
|
|
@Override
|
|
public Result selshiwu(SelShiWuDto selShiWuDto) {
|
|
public Result selshiwu(SelShiWuDto selShiWuDto) {
|
|
@@ -51,6 +61,23 @@ public class LzyShiwuServiceImpl extends ServiceImpl<LzyShiwuMapper, LzyShiwu>
|
|
}
|
|
}
|
|
return Result.Err(null,"查询失败");
|
|
return Result.Err(null,"查询失败");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 食物详情
|
|
|
|
+ @Override
|
|
|
|
+ public Result selshiwuxiangqing(LzyShiwuXiangqingDto selShiWuDto) {
|
|
|
|
+ LzyShiwuXiangqing lzyShiwuXiangqing = lzyShiwuXiangqingMapper.selectOne(new LambdaQueryWrapper<LzyShiwuXiangqing>().eq(LzyShiwuXiangqing::getFoodId, selShiWuDto.getId()));
|
|
|
|
+ LzyShiwuXiangqingVo lzyShiwuXiangqingVo=new LzyShiwuXiangqingVo();
|
|
|
|
+ lzyShiwuXiangqingVo.setName(lzyShiwuXiangqing.getName());
|
|
|
|
+ lzyShiwuXiangqingVo.setImg(lzyShiwuXiangqing.getImg());
|
|
|
|
+ lzyShiwuXiangqingVo.setTitle(lzyShiwuXiangqing.getTitle());
|
|
|
|
+ lzyShiwuXiangqingVo.setXiangxi(lzyShiwuXiangqing.getXiangxi());
|
|
|
|
+ UserVo userVo=new UserVo();
|
|
|
|
+ lzyShiwuXiangqingVo.setUserVo(userVo);
|
|
|
|
+ return Result.ok(lzyShiwuXiangqingVo,"查询成功");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|