|
|
@ -28,6 +28,7 @@ import org.jeecg.modules.api.bean.HttpClientUtil; |
|
|
import org.jeecg.modules.api.bean.PageBean; |
|
|
import org.jeecg.modules.api.bean.PageBean; |
|
|
import org.jeecg.modules.api.bean.WxQrCodeVo; |
|
|
import org.jeecg.modules.api.bean.WxQrCodeVo; |
|
|
import org.jeecg.modules.api.service.YaoDuApiService; |
|
|
import org.jeecg.modules.api.service.YaoDuApiService; |
|
|
|
|
|
import org.jeecg.modules.api.utils.WxTemplateUtil; |
|
|
import org.jeecg.modules.citiyClass.entity.CitiyClass; |
|
|
import org.jeecg.modules.citiyClass.entity.CitiyClass; |
|
|
import org.jeecg.modules.citiyClass.service.ICitiyClassService; |
|
|
import org.jeecg.modules.citiyClass.service.ICitiyClassService; |
|
|
import org.jeecg.modules.citiyShopAuthentication.entity.CitiyShopAuthentication; |
|
|
import org.jeecg.modules.citiyShopAuthentication.entity.CitiyShopAuthentication; |
|
|
@ -182,6 +183,9 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
private ICitySignLogService citySignLogService; |
|
|
private ICitySignLogService citySignLogService; |
|
|
@Resource |
|
|
@Resource |
|
|
private ICityMoneyLogService cityMoneyLogService; |
|
|
private ICityMoneyLogService cityMoneyLogService; |
|
|
|
|
|
@Resource |
|
|
|
|
|
private WxTemplateUtil wxTemplateUtil; |
|
|
|
|
|
|
|
|
@Resource |
|
|
@Resource |
|
|
private ICityGiftService cityGiftService; |
|
|
private ICityGiftService cityGiftService; |
|
|
|
|
|
|
|
|
@ -1099,6 +1103,28 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
return Result.error("内容含有敏感词"); |
|
|
return Result.error("内容含有敏感词"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(cityComment.getPid())){ |
|
|
|
|
|
// 子评论通知给用户 |
|
|
|
|
|
CityComment comment = cityCommentService.getById(cityComment.getPid()); |
|
|
|
|
|
HanHaiMember member = hanHaiMemberService.getById(comment.getUserId()); |
|
|
|
|
|
if (member != null){ |
|
|
|
|
|
String content = cityComment.getUserValue(); |
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(cityComment.getUserImage())){ |
|
|
|
|
|
for (String s : cityComment.getUserImage().split(",")) { |
|
|
|
|
|
content += "[图片]"; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
wxTemplateUtil.sendCommentMessage( |
|
|
|
|
|
member.getAppletOpenid(), |
|
|
|
|
|
hanHaiMember.getNickName(), |
|
|
|
|
|
content, |
|
|
|
|
|
"" |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cityComment.setUserId(hanHaiMember.getId()); |
|
|
cityComment.setUserId(hanHaiMember.getId()); |
|
|
cityComment.setUserName(hanHaiMember.getNickName()); |
|
|
cityComment.setUserName(hanHaiMember.getNickName()); |
|
|
@ -1326,7 +1352,7 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
String accessToken = getAccessToken2(); |
|
|
String accessToken = getAccessToken2(); |
|
|
if (accessToken != null && !accessToken.isEmpty()) { |
|
|
if (accessToken != null && !accessToken.isEmpty()) { |
|
|
Map<String, Object> templateData = createTemplateData(); |
|
|
Map<String, Object> templateData = createTemplateData(); |
|
|
this.sendTemplateMessage2(accessToken, openid, templateId,templateData ); |
|
|
|
|
|
|
|
|
this.sendTemplateMessage2(accessToken, openid, templateId, templateData); |
|
|
return Result.OK("发送成功", templateData); |
|
|
return Result.OK("发送成功", templateData); |
|
|
} else { |
|
|
} else { |
|
|
return Result.error("无法获取Access Token"); |
|
|
return Result.error("无法获取Access Token"); |
|
|
@ -1337,7 +1363,6 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Map<String, Object> createTemplateData() { |
|
|
private Map<String, Object> createTemplateData() { |
|
|
Map<String, Object> data = new HashMap<>(); |
|
|
Map<String, Object> data = new HashMap<>(); |
|
|
data.put("thing1", new HashMap<String, String>() {{ |
|
|
data.put("thing1", new HashMap<String, String>() {{ |
|
|
|