bug修复

This commit is contained in:
13405411873 2025-06-09 17:12:25 +08:00
parent ef9da7936a
commit 6273d05022
2 changed files with 20 additions and 11 deletions

View File

@ -66,7 +66,7 @@ public class WxApi {
@PostMapping("/getUrlLink")
@Anonymous
public AjaxResult getUrlLink(String path,String query) {
public AjaxResult getUrlLink(String path,String query,String type) {
BusiNotice busiNotice = busiNoticeService.getById(query);
String platformName = baseCategoryService.selectByCode(busiNotice.getPlatformCode()).get(0).getTitle();
String token = weChatUtils.getToken();
@ -85,13 +85,24 @@ public class WxApi {
String post = HttpUtil.post("https://api.weixin.qq.com/wxa/generate_urllink?access_token=" + token, com.alibaba.fastjson2.JSONObject.toJSONString(map));
com.alibaba.fastjson2.JSONObject jsonObject = com.alibaba.fastjson2.JSONObject.parseObject(post);
if (jsonObject.get("errcode").equals(0)) {
String res="通告快接\n" +
""+platformName+"】【"+busiNotice.getTitle()+"\n" +
"招募人数:"+(busiNotice.getNeedNum()==null?"无上限":busiNotice.getNeedNum()+"\n") +
"通告明细:"+busiNotice.getDetail()+"\n" +
"报名链接:"+jsonObject.get("url_link")+"\n" +
"大量小红书、B站、抖音、快手、微博高质量通告";
return AjaxResult.success("ok",res);
if(type.equals("2")){
String res="通告快接\n" +
""+platformName+"】【"+busiNotice.getTitle()+"\n" +
"招募人数:"+(busiNotice.getNeedNum()==null?"无上限":busiNotice.getNeedNum()+"\n") +
"通告明细:"+busiNotice.getDetail()+"\n" +
"报名链接:"+jsonObject.get("url_link")+"\n" +
"大量小红书、B站、抖音、快手、微博高质量通告";
return AjaxResult.success("ok",res);
}else{
String res="通告快接\n" +
""+platformName+"】【"+busiNotice.getTitle()+"\n" +
"招募人数:"+(busiNotice.getNeedNum()==null?"无上限":busiNotice.getNeedNum()+"\n") +
"通告明细:"+busiNotice.getDetail()+"\n" +
"三方报名链接:"+busiNotice.getThirdUrl()+"\n" +
"大量小红书、B站、抖音、快手、微博高质量通告";
return AjaxResult.success("ok",res);
}
}else {
return AjaxResult.error(jsonObject.get("errmsg").toString());
}

View File

@ -244,9 +244,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unionId!=null and unionId!=''">
and u.union_id = #{unionId}
</if>
<if test="inviteId!=null and inviteId!=''">
and u.invite_id = #{inviteId}
</if>
<if test="phone!=null and phone!=''">
and u.user_name = #{phone}
</if>