he2802 vor 2 Jahren
Ursprung
Commit
aa3a9507cb

+ 17 - 6
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/impl/ScheduleServiceImpl.java

@@ -37,6 +37,7 @@ import com.zhongzheng.modules.distribution.domain.DistributionSeller;
 import com.zhongzheng.modules.distribution.service.IDistributionCashLogService;
 import com.zhongzheng.modules.distribution.service.IDistributionRebateService;
 import com.zhongzheng.modules.distribution.service.IDistributionSellerService;
+import com.zhongzheng.modules.distribution.service.impl.DistributionLinkServiceImpl;
 import com.zhongzheng.modules.distribution.vo.DistributionRebateVo;
 import com.zhongzheng.modules.exam.bo.*;
 import com.zhongzheng.modules.exam.domain.*;
@@ -121,6 +122,8 @@ import net.polyv.common.v1.util.StringUtils;
 import net.polyv.live.v1.entity.channel.playback.LiveChannelVideoListResponse;
 import net.polyv.live.v1.entity.channel.playback.LiveListChannelVideoLibraryResponse;
 import org.apache.commons.lang3.time.DateFormatUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -145,6 +148,8 @@ import java.util.stream.Collectors;
 @Service
 public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVideo> implements IScheduleService {
 
+    private static Logger log = LoggerFactory.getLogger(ScheduleServiceImpl.class);
+
     @Autowired
     private IInformService informService;
 
@@ -468,10 +473,13 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     UserVo userVo = iUserService.queryById(goodsVo.getUserId());
                     Map<String, Object> param = new HashMap<>();
                     param.put("goods", goodsVo1.getGoodsName());
+                    log.info("购买发送短信:"+JSON.toJSONString(informUserAddBo));
+                    iInformUserService.insertByAddBo(informUserAddBo);
                     ResultBean rb = IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), OpenTheGoodsCode);
-                    if (Validator.isNotEmpty(rb)) {
-                        iInformUserService.insertByAddBo(informUserAddBo);
-                    }
+                    log.info("购买发送短信结果:"+JSON.toJSONString(rb));
+                    /*if (Validator.isNotEmpty(rb)) {
+
+                    }*/
                     if (voList.stream().allMatch(x -> !x.getGoodsId().equals(goodsVo.getGoodsId()))) {
                         goodsVo.setContext("尊敬的用户:您购买的" + goodsVo1.getGoodsName() + "已经开通,请尽快去学习吧。");
                         goodsVo.setGoodsName(goodsVo1.getGoodsName());
@@ -497,10 +505,13 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                     Map<String, Object> param = new HashMap<>();
                     param.put("goods", goodsVo1.getGoodsName());
                     param.put("name", "");
+                    log.info("购买资料发送短信:"+JSON.toJSONString(informUserAddBo));
+                    iInformUserService.insertByAddBo(informUserAddBo);
                     ResultBean rb = IAliSmsService.sendInformSms(userVo.getTelphone(), JSON.toJSONString(param), informationNotificationCode);
-                    if (Validator.isNotEmpty(rb)) {
-                        iInformUserService.insertByAddBo(informUserAddBo);
-                    }
+                    log.info("购买资料发送短信结果:"+JSON.toJSONString(rb));
+                    /*if (Validator.isNotEmpty(rb)) {
+
+                    }*/
                     if (voList.stream().allMatch(x -> !x.getGoodsId().equals(goodsVo.getGoodsId()))) {
                         goodsVo.setContext("尊敬的用户:已为您开通了" + goodsVo1.getGoodsName() + "课程,本课程需完善信息方可学习,请尽快去完善资料吧。");
                         goodsVo.setGoodsName(goodsVo1.getGoodsName());