|
@@ -3,13 +3,16 @@ package com.zhongzheng.modules.goods.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
|
|
+import com.zhongzheng.modules.course.vo.CourseVo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsCourseAddBo;
|
|
import com.zhongzheng.modules.goods.bo.GoodsCourseAddBo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsCourseEditBo;
|
|
import com.zhongzheng.modules.goods.bo.GoodsCourseEditBo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsCourseQueryBo;
|
|
import com.zhongzheng.modules.goods.bo.GoodsCourseQueryBo;
|
|
|
import com.zhongzheng.modules.goods.domain.GoodsCourse;
|
|
import com.zhongzheng.modules.goods.domain.GoodsCourse;
|
|
|
import com.zhongzheng.modules.goods.mapper.GoodsCourseMapper;
|
|
import com.zhongzheng.modules.goods.mapper.GoodsCourseMapper;
|
|
|
|
|
+import com.zhongzheng.modules.goods.mapper.GoodsMapper;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsCourseService;
|
|
import com.zhongzheng.modules.goods.service.IGoodsCourseService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsCourseVo;
|
|
import com.zhongzheng.modules.goods.vo.GoodsCourseVo;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -30,6 +33,10 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
@Service
|
|
|
public class GoodsCourseServiceImpl extends ServiceImpl<GoodsCourseMapper, GoodsCourse> implements IGoodsCourseService {
|
|
public class GoodsCourseServiceImpl extends ServiceImpl<GoodsCourseMapper, GoodsCourse> implements IGoodsCourseService {
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private GoodsCourseMapper goodsCourseMapper;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public GoodsCourseVo queryById(Long id){
|
|
public GoodsCourseVo queryById(Long id){
|
|
|
GoodsCourse db = this.baseMapper.selectById(id);
|
|
GoodsCourse db = this.baseMapper.selectById(id);
|
|
@@ -44,6 +51,11 @@ public class GoodsCourseServiceImpl extends ServiceImpl<GoodsCourseMapper, Goods
|
|
|
return entity2Vo(this.list(lqw));
|
|
return entity2Vo(this.list(lqw));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<CourseVo> selectList(Long goodsId) {
|
|
|
|
|
+ return goodsCourseMapper.selectList(goodsId);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 实体类转化成视图对象
|
|
* 实体类转化成视图对象
|
|
|
*
|
|
*
|