|
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
+import com.zhongzheng.modules.course.mapper.CourseChapterMapper;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsAddBo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsEditBo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
|
|
@@ -11,6 +12,7 @@ import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
import com.zhongzheng.modules.goods.mapper.GoodsMapper;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -31,12 +33,20 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private GoodsMapper goodsMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public GoodsVo queryById(Long goodsId){
|
|
|
Goods db = this.baseMapper.selectById(goodsId);
|
|
|
return BeanUtil.toBean(db, GoodsVo.class);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<Goods> selectList(GoodsQueryBo bo) {
|
|
|
+ return goodsMapper.selectList(bo);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public List<GoodsVo> queryList(GoodsQueryBo bo) {
|
|
|
LambdaQueryWrapper<Goods> lqw = Wrappers.lambdaQuery();
|