소스 검색

益寿缘app-完善App奖品重复新增的问题

cgp 6 일 전
부모
커밋
937302e5f3

+ 1 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsStorePaymentServiceImpl.java

@@ -594,6 +594,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
         config = JSONUtil.toBean(json, RedPacketConfig.class);
         //这里暂时写成益寿缘App的appId常量
         config.setAppId(param.getAppId());
+        config.setMchId("1701206124");//TODO 商户号,后续改成动态配置读取
         logger.info("app奖品红包最终传参 {}", config);
         // 根据 isNew 判断使用哪种发红包方式
         R result;

+ 4 - 4
fs-service/src/main/java/com/fs/his/strategy/impl/FirstLoginRedPacketStrategy.java

@@ -84,15 +84,15 @@ public class FirstLoginRedPacketStrategy implements RewardStrategy {
                     }
                     // 添加红包记录
                     //redPacketLog.setCourseId(param.getCourseId());
-                    redPacketLog.setCompanyId(param.getCompanyId());
+                    //redPacketLog.setCompanyId(param.getCompanyId());
                     redPacketLog.setUserId(reward.getFsUserId());
-                    //redPacketLog.setVideoId(param.getVideoId());
+                    //redPacketLog.setVideoId(reward.getVideoId()); 注册登录奖励无视频小节id
                     redPacketLog.setStatus(0);
                     redPacketLog.setCreateTime(new Date());
                     redPacketLog.setAmount(reward.getRewardAmount());
                     //redPacketLog.setWatchLogId(log.getLogId() != null ? log.getLogId() : null);
-                    //redPacketLog.setPeriodI d(param.getPeriodId());
-                    redPacketLog.setAppId(param.getAppId());
+                    //redPacketLog.setPeriodId(param.getPeriodId());
+                    //redPacketLog.setAppId(param.getAppId());
 
                     redPacketLogMapper.insertFsCourseRedPacketLog(redPacketLog);
                 } else {

+ 4 - 4
fs-service/src/main/java/com/fs/his/strategy/impl/WatchCourseRedPacketStrategy.java

@@ -60,15 +60,15 @@ public class WatchCourseRedPacketStrategy implements RewardStrategy {
                     }
                     // 添加红包记录
                     //redPacketLog.setCourseId(param.getCourseId());
-                    redPacketLog.setCompanyId(param.getCompanyId());
+                    //redPacketLog.setCompanyId(param.getCompanyId());
                     redPacketLog.setUserId(reward.getFsUserId());
-                    //redPacketLog.setVideoId(param.getVideoId());
+                    redPacketLog.setVideoId(reward.getVideoId());
                     redPacketLog.setStatus(0);
                     redPacketLog.setCreateTime(new Date());
                     redPacketLog.setAmount(reward.getRewardAmount());
                     //redPacketLog.setWatchLogId(log.getLogId() != null ? log.getLogId() : null);
-                    //redPacketLog.setPeriodI d(param.getPeriodId());
-                    redPacketLog.setAppId(param.getAppId());
+                    //redPacketLog.setPeriodId(param.getPeriodId());
+                    //redPacketLog.setAppId(param.getAppId());
 
                     redPacketLogMapper.insertFsCourseRedPacketLog(redPacketLog);
                 } else {