Browse Source

Merge branch 'zx_online_update_1218' into develop-new

刘俊驰 23 hours ago
parent
commit
553fc2c123

+ 0 - 1
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/CourseRepliedController.java

@@ -51,7 +51,6 @@ public class CourseRepliedController extends BaseController {
     @PostMapping(value = "/myReplied")
     public HttpResponseResult<PageInfo<MyRepliedVo>> myReplied(@RequestBody MyCourseSearch search) {
         search.setTeacherId(sysUserService.getUserId());
-        search.setCourseType(null);
         IPage<MyRepliedVo> pages = repliedService.myReplied(PageUtil.getPage(search), search);
         return succeed(PageUtil.pageInfo(pages));
     }

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/MyCourseSearch.java

@@ -48,7 +48,7 @@ public class MyCourseSearch extends QueryInfo {
     private String endDate;
 
     @ApiModelProperty(value = "课程类型")
-    private String courseType = "PRACTICE";
+    private String courseType;
 
     @ApiModelProperty(value = "考勤状态 , false:未考勤 true:已考勤")
     private Boolean attendanceStatus;

+ 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,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)));
+                    JSONObject decimalMap = JSON.parseObject(o.getDiscountJson(), JSONObject.class);
+                    Object bigDecimal = decimalMap.get(EDiscountType.DISCOUNT.name());
+                    if (bigDecimal !=null) {
+                        userOrderVo.setCardDiscountPrice(userOrderVo.getCardDiscountPrice().add(new BigDecimal(bigDecimal.toString())));
                     }
-                    String couponDecimal = decimalMap.get(EDiscountType.COUPON.name());
-                    if (StringUtils.isBlank(couponDecimal)) {
-                        userOrderVo.setDiscountPrice(userOrderVo.getDiscountPrice().add(new BigDecimal(couponDecimal)));
+                    Object couponDecimal = decimalMap.get(EDiscountType.COUPON.name());
+                    if (couponDecimal!=null) {
+                        userOrderVo.setDiscountPrice(userOrderVo.getDiscountPrice().add(new BigDecimal(couponDecimal.toString())));
                     }
                 }
             });