Ver Fonte

fix 计费单商品

he2802 há 4 anos atrás
pai
commit
8d1b0b6e67

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderGoodsServiceImpl.java

@@ -2,6 +2,7 @@ package com.zhongzheng.modules.order.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.bank.mapper.QuestionMapper;
 import com.zhongzheng.modules.order.bo.OrderGoodsAddBo;
@@ -96,6 +97,7 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
         OrderGoods update = BeanUtil.toBean(bo, OrderGoods.class);
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
+        update.setGoodsInputData(JSON.toJSONString(bo.getGoodsInputData()));
         return this.updateById(update);
     }
 

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/CourseMapper.xml

@@ -122,6 +122,9 @@
         <if test="majorId != null and majorId != ''">
             AND c.major_id = #{majorId}
         </if>
+        GROUP BY
+        c.course_id
+        ORDER BY c.course_id DESC
     </select>
 
     <select id="selectCourseList_COUNT" resultType="Long">

+ 3 - 2
zhongzheng-system/src/main/resources/mapper/modules/course/CourseStreamingMapper.xml

@@ -74,7 +74,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectList" parameterType="com.zhongzheng.modules.course.bo.CourseStreamingQueryBo" resultMap="CourseStreamingResultVo">
         SELECT
         cs.*,
-
         pv.mp4 AS polyv_url
         FROM
         course_streaming cs
@@ -103,6 +102,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item}
             </foreach>
         </if>
-
+        GROUP BY
+        cs.id
+        ORDER BY cs.id DESC
     </select>
 </mapper>