Commit f3c50fdb authored by 谢希宇's avatar 谢希宇

init aidea products by 20200922

parent d62d8733
...@@ -48,8 +48,6 @@ public class GiftboxController { ...@@ -48,8 +48,6 @@ public class GiftboxController {
@Autowired @Autowired
private GiftboxService giftboxService; private GiftboxService giftboxService;
//列表页面 //列表页面
@RequiresPermissions(value = GIFTBOX_VIEW) @RequiresPermissions(value = GIFTBOX_VIEW)
@RequestMapping(value = "/list",method = {RequestMethod.GET,RequestMethod.POST}) @RequestMapping(value = "/list",method = {RequestMethod.GET,RequestMethod.POST})
......
...@@ -129,7 +129,7 @@ public class CoreService { ...@@ -129,7 +129,7 @@ public class CoreService {
private ExhibiService exhibiService; private ExhibiService exhibiService;
/** /**
* AO拦截的请求处理返回消息信息 * 拦截的请求处理返回消息信息
* *
* @param request * @param request
* @return update mubo 2017.04.09(修改消费者服务号部署回调客服) * @return update mubo 2017.04.09(修改消费者服务号部署回调客服)
......
...@@ -74,7 +74,7 @@ public class MobileWechatController { ...@@ -74,7 +74,7 @@ public class MobileWechatController {
//公众号ID //公众号ID
String appid = request.getParameter("appid"); String appid = request.getParameter("appid");
String token = ""; String token = "aidea2020mptoken";
if(appid!=null){ if(appid!=null){
MpAccountsEntity accounts= accountService.getMpAccountsAppid(appid); MpAccountsEntity accounts= accountService.getMpAccountsAppid(appid);
if(accounts!=null){ if(accounts!=null){
...@@ -115,56 +115,6 @@ public class MobileWechatController { ...@@ -115,56 +115,6 @@ public class MobileWechatController {
out.print(respMessage); out.print(respMessage);
out.close(); out.close();
} }
/**
*亚太接口发送模板消息
*/
@RequestMapping(value = "/sendTemplateMessage",method=RequestMethod.POST)
@ResponseBody
public JSONObject sendTemplte(String unionId,String templateId,HttpServletRequest request,String dataJson){
JSONObject rtnJson = new JSONObject();
rtnJson.put("errorNo",0);
rtnJson.put("errorMsg","发送成功");
String restToken =request.getHeader("token");
if(!StringUtils.equals(restToken,"ae810823caf24aaf2f392a25ebac0afb")){
rtnJson.put("errorNo",1);
rtnJson.put("errorMsg","token无效");
return rtnJson;
}
if(StringUtils.isEmpty(unionId) || StringUtils.isEmpty(templateId) || StringUtils.isEmpty(dataJson)){
rtnJson.put("errorNo",1);
rtnJson.put("errorMsg","参数错误");
return rtnJson;
}
String openId = replyService.getOpenId(unionId);
if(StringUtils.isEmpty(openId)){
rtnJson.put("errorNo",1);
rtnJson.put("errorMsg","未找到对应的OPENID");
return rtnJson;
}
MpAccountsEntity accounts= accountService.getMpAccountsAppid(SystemConfig.p.getProperty("WX_MP_SERVER_APPID"));
IndustryTemplateMessageSend mc = new IndustryTemplateMessageSend();
mc.setTemplate_id(templateId);
mc.setTouser(openId);
mc.setAccess_token(tokenUtil.getToken(accounts.getId()));
StringBuffer json = new StringBuffer();
Gson gson = new Gson();
String objJson = gson.toJson(mc);
json.append(objJson);
json.setLength(json.length() - 1);
json.append(",");
json.append("\"data\":");
json.append(dataJson);
json.append("}");
String result =JwTemplateMessageAPI.sendTemplateMsgJson(json.toString(), mc.getAccess_token());
if(result!=null){
JSONObject resultJson = JSON.parseObject(result);
if(resultJson.containsKey("errcode") && !StringUtils.equals(resultJson.getString("errcode"),"0")){
return resultJson;
}
}
return rtnJson;
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment