Browse Source

Merge branch 'online' into zx_online_update_1218

刘俊驰 1 week ago
parent
commit
4f1c06e954

+ 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;
 	

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

@@ -534,6 +534,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();
@@ -1086,6 +1087,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()),
@@ -1093,7 +1095,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>
 
 	<!-- 根据主键查询一条记录 -->