|
@@ -433,6 +433,8 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
|
reqParam.put("agentid", corpInfo.getAgentid());
|
|
|
JSONObject cardJson = new JSONObject();
|
|
|
String title = "";
|
|
|
+ String urlStr = "";
|
|
|
+ String encodedRedirectUri = "";
|
|
|
String jumpUrl ;
|
|
|
if(isPrivateDeploy){
|
|
|
jumpUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+corpInfo.getCorpid()+"&redirect_uri="+ authUrl +"&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
|
|
@@ -452,9 +454,8 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
|
dates+=plan.getEndDate().format(DateTimeFormatter.BASIC_ISO_DATE);
|
|
|
}
|
|
|
//http://mobworkshop.njlew.com.cn:16080
|
|
|
- StringBuilder builder = new StringBuilder(mobUrl);
|
|
|
- builder.append("/#/distribution")
|
|
|
- .append("?id=").append(plan.getId())
|
|
|
+ StringBuilder builder = new StringBuilder("/#/distribution");
|
|
|
+ builder.append("?id=").append(plan.getId())
|
|
|
.append("&departmentId=").append(plan.getStationId())
|
|
|
.append("&titleText=")
|
|
|
.append(URLEncoder.encode("今日计划", "UTF-8"))
|
|
@@ -466,11 +467,11 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
|
if (StringUtils.isNotEmpty(plan.getProductName())){
|
|
|
builder.append("&productName=").append(URLEncoder.encode(plan.getProductName(), "UTF-8"));
|
|
|
}
|
|
|
- String urlStr =builder.toString();
|
|
|
- String encodedRedirectUri = URLEncoder.encode(urlStr, "UTF-8");
|
|
|
+ urlStr =builder.toString();
|
|
|
+ encodedRedirectUri = URLEncoder.encode(urlStr, "UTF-8");
|
|
|
log.info("urlStr==>"+urlStr);
|
|
|
log.info("encodedRedirectUri==>"+encodedRedirectUri);
|
|
|
- jumpUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+corpInfo.getCorpid()+"&redirect_uri="+ encodedRedirectUri +"&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
|
|
|
+ jumpUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+corpInfo.getCorpid()+"&redirect_uri="+ authUrl +"&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
|
|
|
log.info("jumpUrl==>"+jumpUrl);
|
|
|
}
|
|
|
}
|
|
@@ -500,28 +501,16 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
|
if (StringUtils.isNotEmpty(plan.getProductName())){
|
|
|
builder.append("&productName=").append(URLEncoder.encode(plan.getProductName(), "UTF-8"));
|
|
|
}
|
|
|
- String urlStr =builder.toString();
|
|
|
- String encodedRedirectUri = URLEncoder.encode(urlStr, "UTF-8");
|
|
|
+ urlStr =builder.toString();
|
|
|
+ encodedRedirectUri = URLEncoder.encode(urlStr, "UTF-8");
|
|
|
log.info("urlStr==>"+urlStr);
|
|
|
log.info("encodedRedirectUri==>"+encodedRedirectUri);
|
|
|
jumpUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+corpInfo.getCorpid()+"&redirect_uri="+ encodedRedirectUri +"&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
|
|
|
log.info("jumpUrl==>"+jumpUrl);
|
|
|
}
|
|
|
}
|
|
|
- else if ("plan/orderInsert".equals(pageRouter)) {
|
|
|
- //费用报销
|
|
|
- title = "收到新的插单计划";
|
|
|
- }
|
|
|
- else if(("plan/today".equals(pageRouter)||"plan/tomorrow".equals(pageRouter))&&corpUserid.split("|").length>1){
|
|
|
- title="收到新的工作安排";
|
|
|
- }
|
|
|
- else if("plan/orderInsert".equals(pageRouter)){
|
|
|
- title="收到新的插单计划";
|
|
|
- }
|
|
|
- else if("notReport".equals(pageRouter)){
|
|
|
- title="报工未填报提醒";
|
|
|
- }
|
|
|
- jumpUrl = jumpUrl.replace("STATE", pageRouter);
|
|
|
+ jumpUrl = jumpUrl.replace("STATE", urlStr.isEmpty()?pageRouter:urlStr);
|
|
|
+ log.info("jumpUrl2==>"+jumpUrl);
|
|
|
cardJson.put("title", title);
|
|
|
cardJson.put("description", msg);
|
|
|
cardJson.put("url", jumpUrl);
|