Bläddra i källkod

商品更新下架

change 3 år sedan
förälder
incheckning
8e7e50e28e

+ 10 - 9
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseEducationTypeServiceImpl.java

@@ -26,10 +26,7 @@ import com.zhongzheng.modules.course.vo.CourseEducationTypeVo;
 import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
 import org.springframework.util.StringUtils;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -90,9 +87,13 @@ public class CourseEducationTypeServiceImpl extends ServiceImpl<CourseEducationT
 
     @Override
     public Boolean insertByAddBo(CourseEducationTypeAddBo bo) {
-
+        //判断新增名字是否重复
         LambdaQueryWrapper<CourseEducationType> lqw = Wrappers.lambdaQuery();
-        lqw.like(StrUtil.isNotBlank(bo.getEducationName()), CourseEducationType::getEducationName, bo.getEducationName());
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.eq(StrUtil.isNotBlank(bo.getEducationName()), CourseEducationType::getEducationName, bo.getEducationName());
+        lqw.in( CourseEducationType::getStatus, status);
         List<CourseEducationType> list = this.list(lqw);
         if (CollectionUtils.isNotEmpty(list)){
             throw new IllegalArgumentException("教育类型名称重复");
@@ -113,10 +114,10 @@ public class CourseEducationTypeServiceImpl extends ServiceImpl<CourseEducationT
 
     @Override
     public Boolean updateByEditBo(CourseEducationTypeEditBo bo) {
-
+        //修改判断名字是否重复
         LambdaQueryWrapper<CourseEducationType> lqw = Wrappers.lambdaQuery();
-        lqw.like(StrUtil.isNotBlank(bo.getEducationName()), CourseEducationType::getEducationName, bo.getEducationName());
-        lqw.like(bo.getId()!= null, CourseEducationType::getId, bo.getId());
+        lqw.eq(StrUtil.isNotBlank(bo.getEducationName()), CourseEducationType::getEducationName, bo.getEducationName());
+        lqw.eq(bo.getId()!= null, CourseEducationType::getId, bo.getId());
         List<CourseEducationType> list = this.list(lqw);
         if (CollectionUtils.isEmpty(list)){
             lqw.clear();

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseHandoutsServiceImpl.java

@@ -94,6 +94,7 @@ public class CourseHandoutsServiceImpl extends ServiceImpl<CourseHandoutsMapper,
         add.setUpdateTime(DateUtils.getNowTime());
         add.setEncoder(ServletUtils.getEncoded("JYLB"));
         boolean save = this.save(add);
+        //添加讲义绑定的业务层次
         for (CourseHandoutsBusinessAddBo courseHandoutsBusinessAddBo : bo.getCourseHandoutsBusinessAddBos()) {
             CourseHandoutsBusiness addBusiness = BeanUtil.toBean(courseHandoutsBusinessAddBo, CourseHandoutsBusiness.class);
             addBusiness.setHandoutsId(add.getHandoutsId());
@@ -112,6 +113,7 @@ public class CourseHandoutsServiceImpl extends ServiceImpl<CourseHandoutsMapper,
         LambdaQueryWrapper<CourseHandoutsBusiness> lqw = Wrappers.lambdaQuery();
         lqw.eq(CourseHandoutsBusiness::getHandoutsId,bo.getHandoutsId());
         courseHandoutsBusinessService.remove(lqw);
+        //添加讲义绑定的业务层次
         if (!CollectionUtils.isEmpty(bo.getCourseHandoutsBusinessAddBos())) {
             for (CourseHandoutsBusinessAddBo courseHandoutsBusinessAddBo : bo.getCourseHandoutsBusinessAddBos()) {
                 CourseHandoutsBusiness addBusiness = BeanUtil.toBean(courseHandoutsBusinessAddBo, CourseHandoutsBusiness.class);

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/impl/ScheduleServiceImpl.java

@@ -182,6 +182,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
     @Override
     public String updateGoodsSend(UserQueryBo bo) {
         InformRemindVo informRemindVo = informRemindService.queryById(1L);
+        //查找购买后没发送消息的商品,发送购买消息
         List<OrderGoodsVo> orderGoodsVo = iOrderGoodsService.selectOrderGoods();
 
         InformRemindVo informRemindTwoVo = informRemindService.queryById(2L);

+ 3 - 3
zhongzheng-system/src/main/resources/mapper/modules/grade/UserPeriodStatusMapper.xml

@@ -35,12 +35,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ups.*,
         (select realname from `user` u where up.user_id = u.user_id) as  realname,
         <if test="examId != null ">
-            (SELECT exam_name FROM exam e where e.exam_id= up.exam_id)
+            (SELECT exam_name FROM exam e where e.exam_id= up.exam_id) as type_name
         </if>
         <if test="sectionId != null ">
-            (SELECT name FROM course_section cs where up.section_id= cs.section_id)
+            (SELECT name FROM course_section cs where up.section_id= cs.section_id)  as type_name
         </if>
-         as type_name
+
         FROM
         user_period_status ups
         LEFT JOIN user_period up ON up.id = ups.period_id