Ver código fonte

Merge branch 'fix/1223' into test

刘俊驰 3 dias atrás
pai
commit
cb6adee066

+ 1 - 1
audio-analysis/src/main/java/com/yonge/netty/server/service/AudioCompareHandler.java

@@ -150,7 +150,7 @@ public class AudioCompareHandler implements MessageHandler {
 				sysMusicCompareRecord.setBehaviorId(musicXmlBasicInfo.getBehaviorId());
 				sysMusicCompareRecord.setClientId(musicXmlBasicInfo.getClientId());
 				sysMusicCompareRecord.setDeviceType(DeviceTypeEnum.valueOf(musicXmlBasicInfo.getPlatform()));
-				sysMusicCompareRecord.setSpeed(musicXmlBasicInfo.getSpeed());
+				sysMusicCompareRecord.setSpeed(String .valueOf(musicXmlBasicInfo.getSpeed()));
 				sysMusicCompareRecord.setPartIndex(musicXmlBasicInfo.getPartIndex());
 				sysMusicCompareRecord.setCustomConfiguration(musicXmlBasicInfo.getCustomConfiguration());
 				

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/SysMusicCompareRecord.java

@@ -76,7 +76,7 @@ public class SysMusicCompareRecord extends BaseEntity {
 
 	private float playTime = 0;
 
-	private int speed = 90;
+	private String speed = "90";
 
 	private String clientId;
 	

+ 2 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/UserOrderService.java

@@ -250,4 +250,6 @@ public interface UserOrderService extends IService<UserOrder> {
      *  计算畅学卡优惠
      */
     void discountCard(UserPaymentOrderWrapper.OrderGoodsInfo orderGoodsInfo);
+
+    void updateOrderBizId(String subOrderNo, Long groupId);
 }

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -2826,6 +2826,9 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
                 baseMapper.addCourseGroup(scheduleDto);
                 Long groupId = scheduleDto.getGroupId();
 
+                // 更新订单bizId
+                userOrderService.updateOrderBizId(orderGoodsInfo.getSubOrderNo(), groupId);
+
                 BigDecimal subjectPrice = teacherSubjectPrice.getSubjectPrice();
 
                 //每课实际价格

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

@@ -989,6 +989,9 @@ public class PaymentDivMemberRecordServiceImpl extends ServiceImpl<PaymentDivMem
         }
 
         BigDecimal amount = tenantdivMap.values().stream().reduce(BigDecimal.ZERO, BigDecimal::add);
+        if (amount.compareTo(BigDecimal.ZERO) <= 0) {
+            return;
+        }
         boolean tenantEnterFlag = false;
         //  执行分账
         TenantMember tenantMember = null;
@@ -1044,6 +1047,10 @@ public class PaymentDivMemberRecordServiceImpl extends ServiceImpl<PaymentDivMem
     }
 
     private void teacherShare(UserOrderDetailVo userPaymentOrder, BigDecimal shareFee) {
+
+        if (shareFee.compareTo(BigDecimal.ZERO) <= 0) {
+            return;
+        }
         //获取账期时间
         Date accountPeriodTime = userOrderService.getAccountPeriodTime(userPaymentOrder);
         AccountBizTypeEnum bizTypeEnum;

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

@@ -1669,4 +1669,13 @@ public class UserOrderServiceImpl extends ServiceImpl<UserOrderDao, UserOrder> i
         }
     }
 
+    @Override
+    @Transactional
+    public void updateOrderBizId(String subOrderNo, Long groupId) {
+        userOrderDetailService.lambdaUpdate()
+                .eq(UserOrderDetail::getSubOrderNo, subOrderNo)
+                .set(UserOrderDetail::getBizId, groupId)
+                .update();
+    }
+
 }

+ 18 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/UserPaymentCoreServiceImpl.java

@@ -530,6 +530,7 @@ public class UserPaymentCoreServiceImpl implements UserPaymentCoreService {
     @Transactional
     @Override
     public UserPaymentOrderWrapper.PaymentConfig executeOrder(UserPaymentOrderWrapper.UserPaymentOrder orderReq) {
+        log.info("executeOrder orderReq={}", orderReq.jsonString());
 
         // 填充订单基本信息
         String defaultService = paymentServiceContext.defaultService();
@@ -1077,6 +1078,7 @@ DISCOUNT("畅学卡")
     @Transactional
     @Override
     public UserPaymentOrderWrapper.PaymentReq executePayment(UserPaymentOrderWrapper.PaymentOrderReqConfig reqConfig) {
+        log.info("executePayment reqConfig={}", reqConfig.jsonString());
 
         // 查询订单状态
         UserPaymentOrderWrapper.UserPaymentOrder userPaymentOrder = userPaymentOrderService.getUserPaymentOrderByUserId(Long.parseLong(reqConfig.getUserId()),
@@ -1084,7 +1086,22 @@ DISCOUNT("畅学卡")
 
         // 默认支付三方
         if (StringUtils.isNotEmpty(reqConfig.getPaymentVendor())
-                && !reqConfig.getPaymentVendor().equals(userPaymentOrder.getPaymentVendor())) {
+                && (!reqConfig.getPaymentVendor().equals(userPaymentOrder.getPaymentVendor())
+                || !reqConfig.getPaymentChannel().equals(userPaymentOrder.getPaymentChannel()))) {
+            if (EPaymentStatus.PAYING == userPaymentOrder.getStatus()) {
+                String errorMsg = "";
+                if (StringUtils.isNotBlank(userPaymentOrder.getPaymentChannel())) {
+                    if (userPaymentOrder.getPaymentChannel().startsWith("ali")) {
+                        errorMsg = "支付宝";
+                    } else if (userPaymentOrder.getPaymentChannel().startsWith("wx")) {
+                        errorMsg = "微信";
+                    } else {
+                        throw new BizException("该订单已选择支付渠道,若需修改请重新下单");
+                    }
+                }
+
+                throw new BizException("该订单已选择"+errorMsg+"支付,若需修改请重新下单");
+            }
             // 原生支付拉起支付时,可以切换支付渠道
             UserPaymentOrderWrapper.UserPaymentOrder update = UserPaymentOrderWrapper.UserPaymentOrder
                 .builder()

+ 6 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/MusicPracticeRecordWrapper.java

@@ -483,6 +483,8 @@ public class MusicPracticeRecordWrapper {
         private Boolean delFlag;
 
 
+        @ApiModelProperty("是否隐藏评测记录 0:不隐藏 1:隐藏")
+        private Boolean hiddenFlag;
         @ApiModelProperty("曲目评测来源 TENANT 机构 PLATFORM 平台")
         private String providerType;
 
@@ -507,7 +509,7 @@ public class MusicPracticeRecordWrapper {
                 .sourceTime(record.getSourceTime())
                 .playTime(record.getPlayTime())
                 .playRate(record.getPlayRate())
-                .speed(String.valueOf(OptionalInt.of(record.getSpeed()).orElse(0)))
+                .speed(record.getSpeed())
                 .monday(record.getMonday())
                 .feature(record.getFeature()!=null?record.getFeature().toCbs():null)
                 .heardLevel(record.getHeardLevel() !=null?record.getHeardLevel().getCode():null)
@@ -521,6 +523,7 @@ public class MusicPracticeRecordWrapper {
                 .updateTime(record.getCreateTime())
                 .createTime(record.getCreateTime())
                 .delFlag(record.getDelFlag())
+                .hiddenFlag(record.getHiddenFlag())
                 .providerType(record.getProviderType())
                 .build();
         }
@@ -543,7 +546,7 @@ public class MusicPracticeRecordWrapper {
             sysMusicCompareRecord.setDeviceType(DeviceTypeEnum.valueOf(this.deviceType));
             sysMusicCompareRecord.setSourceTime(this.sourceTime);
             sysMusicCompareRecord.setPlayTime(this.playTime);
-            sysMusicCompareRecord.setSpeed(this.speed!=null?Integer.parseInt(this.speed):90);
+            sysMusicCompareRecord.setSpeed(this.speed);
             sysMusicCompareRecord.setMonday(this.monday);
             sysMusicCompareRecord.setFeature(this.feature!=null? FeatureType.format(this.feature):null);
             sysMusicCompareRecord.setHeardLevel(this.heardLevel!=null? HeardLevelEnum.valueOf(this.heardLevel):null);
@@ -558,6 +561,7 @@ public class MusicPracticeRecordWrapper {
             sysMusicCompareRecord.setDelFlag(this.delFlag);
             sysMusicCompareRecord.setPlayRate(this.playRate);
             sysMusicCompareRecord.setProviderType(this.providerType ==null?"PLATFORM":this.providerType);
+            sysMusicCompareRecord.setHiddenFlag(this.hiddenFlag);
 
             return sysMusicCompareRecord;
 

+ 1 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/SysMusicCompareRecordMapper.xml

@@ -63,7 +63,7 @@
 		       #{score},#{intonation},#{cadence},#{integrity},
 		       #{recordFilePath},#{videoFilePath},#{deviceType,typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler},#{clientId},#{playTime},#{speed},#{monday},
 		       #{sourceTime},#{feature,typeHandler=com.yonge.toolset.mybatis.dal.CustomEnumTypeHandler}, NOW(), NOW(),#{partIndex},#{customConfiguration},#{tenantId},
-        #{practiceTime},#{practiceSource},#{resultAnalyze},#{headphoneFlag},#{instrumentId},#{hiddenFlag},#{delFlag},#{playRate},#{providerType})
+        #{practiceTime},#{practiceSource},#{resultAnalyze},#{headphoneFlag},#{instrumentId},ifnull(#{hiddenFlag},0),ifnull(#{delFlag},0),#{playRate},#{providerType})
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->

+ 1 - 1
pom.xml

@@ -23,7 +23,7 @@
 		<google.zxing.version>3.4.0</google.zxing.version>
 		<redisson.version>3.11.5</redisson.version>
 		<maven.test.skip>true</maven.test.skip>
-		<cbs.version>1.0.26</cbs.version>
+		<cbs.version>1.0.27</cbs.version>
 		<microsvc.version>1.1.4</microsvc.version>
 	</properties>