浏览代码

Merge branch 'zx_online_update_1218' into develop-new

刘俊驰 2 周之前
父节点
当前提交
683f5c6c0a

+ 7 - 7
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/UserOrderServiceImpl.java

@@ -327,14 +327,14 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
             }
             userOrderDetailVos.forEach(o -> {
                 if (StringUtils.isNotBlank(o.getDiscountJson())) {
-                    Map<String,BigDecimal> decimalMap = JSON.parseObject(o.getDiscountJson(), Map.class);
-                    BigDecimal bigDecimal = decimalMap.get(EDiscountType.DISCOUNT.name());
-                    if (bigDecimal != null) {
-                        userOrderVo.setCardDiscountPrice(userOrderVo.getCardDiscountPrice().add(bigDecimal));
+                    Map<String,String> decimalMap = JSON.parseObject(o.getDiscountJson(), Map.class);
+                    String bigDecimal = decimalMap.get(EDiscountType.DISCOUNT.name());
+                    if (StringUtils.isBlank(bigDecimal)) {
+                        userOrderVo.setCardDiscountPrice(userOrderVo.getCardDiscountPrice().add(new BigDecimal(bigDecimal)));
                     }
-                    BigDecimal couponDecimal = decimalMap.get(EDiscountType.COUPON.name());
-                    if (couponDecimal != null) {
-                        userOrderVo.setDiscountPrice(userOrderVo.getDiscountPrice().add(couponDecimal));
+                    String couponDecimal = decimalMap.get(EDiscountType.COUPON.name());
+                    if (StringUtils.isBlank(couponDecimal)) {
+                        userOrderVo.setDiscountPrice(userOrderVo.getDiscountPrice().add(new BigDecimal(couponDecimal)));
                     }
                 }
             });

+ 3 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml

@@ -589,6 +589,9 @@
         <if test="param.startTime != null">
             AND cs.start_time_ &lt;= #{param.startTime}
         </if>
+        <if test="param.search != null and param.search != ''">
+            AND cs.id_ = #{param.search}
+        </if>
         <if test="param.endTime != null">
             AND cs.end_time_ &gt;= #{param.endTime}
         </if>