|
|
@@ -3,26 +3,23 @@ package com.zhongzheng.modules.base.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.github.pagehelper.Page;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
-import com.zhongzheng.modules.base.bo.*;
|
|
|
+import com.zhongzheng.modules.base.bo.ProfileTpAddBo;
|
|
|
+import com.zhongzheng.modules.base.bo.ProfileTpEditBo;
|
|
|
+import com.zhongzheng.modules.base.bo.ProfileTpQueryBo;
|
|
|
import com.zhongzheng.modules.base.domain.ProfileTp;
|
|
|
import com.zhongzheng.modules.base.domain.ProfileTpBusiness;
|
|
|
import com.zhongzheng.modules.base.mapper.ProfileTpMapper;
|
|
|
import com.zhongzheng.modules.base.service.IProfileTpBusinessService;
|
|
|
import com.zhongzheng.modules.base.service.IProfileTpService;
|
|
|
import com.zhongzheng.modules.base.vo.ProfileTpVo;
|
|
|
-import com.zhongzheng.modules.course.bo.CourseChapterBusinessAddBo;
|
|
|
-import com.zhongzheng.modules.course.domain.CourseChapter;
|
|
|
-import com.zhongzheng.modules.course.domain.CourseChapterBusiness;
|
|
|
-import com.zhongzheng.modules.course.domain.CourseChapterSection;
|
|
|
-import com.zhongzheng.modules.course.service.ICourseChapterSectionService;
|
|
|
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;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
-import com.github.pagehelper.Page;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
@@ -41,9 +38,6 @@ public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp
|
|
|
@Autowired
|
|
|
private IProfileTpBusinessService iProfileTpBusinessService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private ProfileTpMapper profileTpMapper;
|
|
|
-
|
|
|
|
|
|
@Override
|
|
|
public ProfileTpVo queryById(Long profileTpId){
|
|
|
@@ -62,12 +56,12 @@ public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp
|
|
|
|
|
|
@Override
|
|
|
public List<ProfileTpVo> selectListByBo(ProfileTpQueryBo bo) {
|
|
|
- return profileTpMapper.selectListByBo(bo);
|
|
|
+ return baseMapper.selectListByBo(bo);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<String> selectAllUseGoods(ProfileTpQueryBo bo) {
|
|
|
- List<ProfileTpVo> list = profileTpMapper.selectListByBo(bo);
|
|
|
+ List<ProfileTpVo> list = baseMapper.selectListByBo(bo);
|
|
|
List<String> strList = new ArrayList<>();
|
|
|
for(int i=0;i<list.size();i++){
|
|
|
if(Validator.isNotEmpty(list.get(i).getGoodsIds())){
|
|
|
@@ -163,7 +157,7 @@ public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp
|
|
|
ProfileTpQueryBo profileTpQueryBo = new ProfileTpQueryBo();
|
|
|
profileTpQueryBo.setGoodsId(goodsId);
|
|
|
profileTpQueryBo.setStatus(new ArrayList<Integer>(Arrays.asList(1)));
|
|
|
- List<ProfileTpVo> profileTpVos = profileTpMapper.selectListByBo(profileTpQueryBo);
|
|
|
+ List<ProfileTpVo> profileTpVos = baseMapper.selectListByBo(profileTpQueryBo);
|
|
|
if (!CollectionUtils.isEmpty(profileTpVos)){
|
|
|
return profileTpVos.get(0);
|
|
|
}else {
|