From 888bae36e31e354efa418ec985c4966ce25e35ed Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期三, 29 五月 2024 14:31:50 +0800 Subject: [PATCH] 花城 修改随手拍管理模块4 --- springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java | 170 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 85 insertions(+), 85 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java index b3b00c0..522ec6e 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java @@ -1093,91 +1093,91 @@ } R<SysTemplateConfigVO> sysTemplateConfigVO=userService.selectTemplate(this.getAreaCode(),4); R r = communityService.putEasypHotoStatus(comActEasyPhotoVO); -// if (R.isOk(r)) { -// R r1 = communityService.detailEasyPhoto(id, userId); -// if (R.isOk(r1)) { -// ComActEasyPhotoVO comActEasyPhotoVO1 = -// JSONObject.parseObject(JSONObject.toJSONString(r1.getData()), ComActEasyPhotoVO.class); -// SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); -// sysUserNoticeVO.setUserId(comActEasyPhotoVO1.getSponsorId()); -// sysUserNoticeVO.setType(2); -// sysUserNoticeVO.setBusinessType(4); -// sysUserNoticeVO.setBusinessTime(comActEasyPhotoVO1.getExamineAt()); -// sysUserNoticeVO.setBusinessId(id); -// sysUserNoticeVO.setStatus(0); -// // 查询用户openid -// R userResult = userService.getUserOpenId(comActEasyPhotoVO1.getSponsorId()); -// if (type.intValue() == 2) { -// sysUserNoticeVO.setBusinessTitle(comActEasyPhotoVO1.getDetail()); -// sysUserNoticeVO.setTitle("随手拍未通过审核"); -// sysUserNoticeVO.setBusinessContent(String.format("驳回原因:%s", comActEasyPhotoVO.getRejectReason())); -// sysUserNoticeVO.setBusinessStatus(1); -// R r2 = userService.addNotice(sysUserNoticeVO); -// if (R.isOk(r2)) { -// log.info("新增随手拍未通过审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); -// } -// -// if (R.isOk(userResult)) { -// String openid = userResult.getData().toString(); -// WxXCXTempSend util = new WxXCXTempSend(); -// try { -// String result = comActEasyPhotoVO1.getRejectReason(); -// if (StringUtils.isNotEmpty(result)) { -// result = result.substring(0, 4); -// result += "…"; -// } -// WxUtil.sendSubscribeSHZT(openid, util.getAccessToken(), "随手拍", -// DateUtils.format(comActEasyPhotoVO1.getExamineAt(), DateUtils.ymdhms_format), result,sysTemplateConfigVO.getData().getTemplateId()); -// } catch (Exception e) { -// log.error("消息推送失败,失败原因:" + e.getMessage()); -// } -// } -// } else if (type.intValue() == 3) { -// sysUserNoticeVO.setTitle("随手拍有反馈"); -// sysUserNoticeVO.setBusinessTitle(comActEasyPhotoVO.getHandleResult()); -// sysUserNoticeVO.setBusinessContent("社区已经处理好了具体的事宜,将变成现在更好看的样子找到更好的自己……"); -// sysUserNoticeVO.setBusinessStatus(2); -// R r2 = userService.addNotice(sysUserNoticeVO); -// if (R.isOk(r2)) { -// log.info("新增随手拍有反馈通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); -// } -// } -// -// if (type.equals(1)) {// 审核通过给用户增加积分 -//// communityService.addIntegralTradeAdmin( -//// new AddComActIntegralUserDTO(id, AddComActIntegralUserDTO.integralType.fbssp, -//// this.getCommunityId(), comActEasyPhotoVO1.getSponsorId())); -// -// // 2023/11/20 新逻辑 -// NewFightIntegral integral=new NewFightIntegral(); -// integral.setRemark("微心愿上传通过审核"); -// if(comActEasyPhotoVO.getCommunityId()<=0) -// { -// integral.setCommunityId(getCommunityId()+""); -// } -// else -// { -// integral.setCommunityId(comActEasyPhotoVO.getCommunityId()+""); -// } -// integral.setType("18"); -// integral.setUserId(comActEasyPhotoVO.getSponsorId()+""); -// newStriveForFeign.upIntegral(integral); -// -// -// // 审核通过发送订阅消息给用户 -// if (R.isOk(userResult)) { -// String openid = userResult.getData().toString(); -// WxXCXTempSend util = new WxXCXTempSend(); -// try { -// WxUtil.sendSubscribeSHZT(openid, util.getAccessToken(), "随手拍", -// DateUtils.format(comActEasyPhotoVO1.getExamineAt(), DateUtils.ymdhms_format), "审核通过",sysTemplateConfigVO.getData().getTemplateId()); -// } catch (Exception e) { -// log.error("消息推送失败,失败原因:" + e.getMessage()); -// } -// } -// } -// } -// } + if (R.isOk(r)) { + R r1 = communityService.detailEasyPhoto(id, userId); + if (R.isOk(r1)) { + ComActEasyPhotoVO comActEasyPhotoVO1 = + JSONObject.parseObject(JSONObject.toJSONString(r1.getData()), ComActEasyPhotoVO.class); + SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO(); + sysUserNoticeVO.setUserId(comActEasyPhotoVO1.getSponsorId()); + sysUserNoticeVO.setType(2); + sysUserNoticeVO.setBusinessType(4); + sysUserNoticeVO.setBusinessTime(comActEasyPhotoVO1.getExamineAt()); + sysUserNoticeVO.setBusinessId(id); + sysUserNoticeVO.setStatus(0); + // 查询用户openid + R userResult = userService.getUserOpenId(comActEasyPhotoVO1.getSponsorId()); + if (type.intValue() == 2) { + sysUserNoticeVO.setBusinessTitle(comActEasyPhotoVO1.getDetail()); + sysUserNoticeVO.setTitle("随手拍未通过审核"); + sysUserNoticeVO.setBusinessContent(String.format("驳回原因:%s", comActEasyPhotoVO.getRejectReason())); + sysUserNoticeVO.setBusinessStatus(1); + R r2 = userService.addNotice(sysUserNoticeVO); + if (R.isOk(r2)) { + log.info("新增随手拍未通过审核通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); + } + + if (R.isOk(userResult)) { + String openid = userResult.getData().toString(); + WxXCXTempSend util = new WxXCXTempSend(); + try { + String result = comActEasyPhotoVO1.getRejectReason(); + if (StringUtils.isNotEmpty(result)) { + result = result.substring(0, 4); + result += "…"; + } + WxUtil.sendSubscribeSHZT(openid, util.getAccessToken(), "随手拍", + DateUtils.format(comActEasyPhotoVO1.getExamineAt(), DateUtils.ymdhms_format), result,sysTemplateConfigVO.getData().getTemplateId()); + } catch (Exception e) { + log.error("消息推送失败,失败原因:" + e.getMessage()); + } + } + } else if (type.intValue() == 3) { + sysUserNoticeVO.setTitle("随手拍有反馈"); + sysUserNoticeVO.setBusinessTitle(comActEasyPhotoVO.getHandleResult()); + sysUserNoticeVO.setBusinessContent("社区已经处理好了具体的事宜,将变成现在更好看的样子找到更好的自己……"); + sysUserNoticeVO.setBusinessStatus(2); + R r2 = userService.addNotice(sysUserNoticeVO); + if (R.isOk(r2)) { + log.info("新增随手拍有反馈通知成功【{}】", JSONObject.toJSONString(sysUserNoticeVO)); + } + } + + if (type.equals(1)) {// 审核通过给用户增加积分 +// communityService.addIntegralTradeAdmin( +// new AddComActIntegralUserDTO(id, AddComActIntegralUserDTO.integralType.fbssp, +// this.getCommunityId(), comActEasyPhotoVO1.getSponsorId())); + + // 2023/11/20 新逻辑 + NewFightIntegral integral=new NewFightIntegral(); + integral.setRemark("微心愿上传通过审核"); + if(comActEasyPhotoVO.getCommunityId()<=0) + { + integral.setCommunityId(getCommunityId()+""); + } + else + { + integral.setCommunityId(comActEasyPhotoVO.getCommunityId()+""); + } + integral.setType("18"); + integral.setUserId(comActEasyPhotoVO.getSponsorId()+""); + newStriveForFeign.upIntegral(integral); + + + // 审核通过发送订阅消息给用户 + if (R.isOk(userResult)) { + String openid = userResult.getData().toString(); + WxXCXTempSend util = new WxXCXTempSend(); + try { + WxUtil.sendSubscribeSHZT(openid, util.getAccessToken(), "随手拍", + DateUtils.format(comActEasyPhotoVO1.getExamineAt(), DateUtils.ymdhms_format), "审核通过",sysTemplateConfigVO.getData().getTemplateId()); + } catch (Exception e) { + log.error("消息推送失败,失败原因:" + e.getMessage()); + } + } + } + } + } return r; } -- Gitblit v1.7.1