tangxiaobao
2021-08-05 07ba29f8b474c102cda0e1e5549b1ca1c90ca16b
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -463,13 +463,23 @@
                //审核通过判断随手拍是否有活动并计算用户收益
                comActUserWalletService.examineAddMoney(easyPhotoDO.getActivityType(),easyPhotoDO.getId(),easyPhotoDO.getSponsorId(),grantRewardDTO.getAmount());
                String activityType = "";
                if(easyPhotoDO.getActivityType().equals(ComActEasyPhotoDO.activityType.yz)){
                    activityType = "优质";
                }else if(easyPhotoDO.getActivityType().equals(ComActEasyPhotoDO.activityType.jl)){
                    activityType = "精良";
                }else if(easyPhotoDO.getActivityType().equals(ComActEasyPhotoDO.activityType.pt)){
                    activityType = "普通";
                }else if(easyPhotoDO.getActivityType().equals(ComActEasyPhotoDO.activityType.yb)){
                    activityType = "一般";
                }
                //发放奖励以后给用户推送消息
                Map<String,String> map = comActActSignDAO.getUserOpenId(easyPhotoDO.getSponsorId());
                if(map != null){
                    String openid = map.get("openid");
                    WxXCXTempSend util = new WxXCXTempSend();
                    try {
                        WxUtil.sendSubscribeJLDZ(openid,util.getAppAccessToken(),easyPhotoDO.getDetail(),grantRewardDTO.getAmount(),"发放随手拍奖励");
                        WxUtil.sendSubscribeJLDZ(openid,util.getAppAccessToken(),"随手拍有奖活动",grantRewardDTO.getAmount(),activityType);
                    }catch (Exception e){
                        log.error("消息推送失败,失败原因:" + e.getMessage());
                    }