Commit a7039a75 authored by 赵然's avatar 赵然

zr

parent 554530af
package main.com.atguigu.springmvc.handlers;
import cn.com.duiba.credits.sdk.CreditTool;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;
@Controller
public class CreatUrlModule {
final Base64.Decoder decoder = Base64.getDecoder();
final Base64.Encoder encoder = Base64.getEncoder();
/**
* 功能:生成免登链接操作
* @return
*/
@RequestMapping(value = "/urlLink", method= RequestMethod.POST)
@ResponseBody
public Map urlLink(HttpServletRequest request) throws Exception {
String appkey = request.getParameter("appkey");
if(appkey.equals(null) || appkey.equals("") || appkey.isEmpty()){
appkey = "jlg88lyxz7siqtmr";
}
String appsecret = request.getParameter("appsecret");
if(appsecret.equals(null) || appsecret.equals("") || appsecret.isEmpty()){
appsecret = "1x0eap95f4xfi77uaptrnwh9ewzvlm";
}
String userId = request.getParameter("userId");
if(userId.equals(null) || userId.equals("") || userId.isEmpty()){
userId = "not_login";
}
String credits = request.getParameter("credits");
if(credits.equals(null) || credits.equals("") || credits.isEmpty()){
credits = "0";
}
String dcustom = request.getParameter("dcustom");
String transfer = request.getParameter("transfer");
String redirect = request.getParameter("redirect");
String phone = request.getParameter("phone");
String alipay = request.getParameter("alipay");
String realName = request.getParameter("realName");
String qq = request.getParameter("qq");
String vip = request.getParameter("vip");
System.out.println("appkey为:"+appkey);
System.out.println("appsecret为:"+appsecret);
System.out.println("userId为:"+userId);
System.out.println("credits为:"+credits);
System.out.println("dcustom为:"+dcustom);
CreditTool tool=new CreditTool(appkey, appsecret);
Map<String, String> params=new HashMap<String, String>();
params.put("uid",userId);
params.put("credits",credits);
if(dcustom!=null&&dcustom!=""&&dcustom != "null") {
params.put("dcustom", dcustom);
}
if(transfer!=null&&transfer!=""&&transfer != "null"){
params.put("transfer",transfer);
}
if(redirect!=null&&redirect!=""&&redirect != "null"){
params.put("redirect",redirect);
}
if(phone!=null&&phone!=""&&phone != "null") {
params.put("phone", phone);
}
if(alipay!=null&&alipay!=""&&alipay != "null") {
params.put("alipay", alipay);
}
if(realName!=null&&realName!=""&&realName != "null") {
params.put("realname", realName);
}
if(qq!=null&&qq!=""&&qq != "null") {
params.put("QQ", qq);
}
if(vip!=null&&vip!=""&&vip != "null") {
params.put("vip", vip);
}
String url=tool.buildUrlWithSign("https://activity.m.duibatest.com.cn/autoLogin/autologin?",params);
System.out.println(url);
Map<String, String> map = new HashMap<>();
map.put("message", url);
return map;
}
}
......@@ -357,6 +357,12 @@
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -365,7 +371,7 @@
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
......@@ -178,6 +178,12 @@ $(document).ready(function(){
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -186,7 +192,7 @@ $(document).ready(function(){
</ul>
</li>
<li class="active">
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
......@@ -227,6 +227,12 @@ $(document).ready(function(){
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -235,7 +241,7 @@ $(document).ready(function(){
</ul>
</li>
<li class="active">
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
......@@ -256,6 +256,12 @@
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -264,7 +270,7 @@
</ul>
</li>
<li class="active">
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
......@@ -286,6 +286,12 @@
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li class="active"><a href="#" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -294,7 +300,7 @@
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
This diff is collapsed.
......@@ -286,6 +286,12 @@
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -294,7 +300,7 @@
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
......@@ -303,6 +303,12 @@
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li class="active"><a href="#" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -311,7 +317,7 @@
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
......@@ -286,6 +286,12 @@
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -294,7 +300,7 @@
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
......@@ -219,6 +219,12 @@ $(document).ready(function(){
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -227,7 +233,7 @@ $(document).ready(function(){
</ul>
</li>
<li class="active">
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
......@@ -255,6 +255,12 @@
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li class="active">
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -263,7 +269,7 @@
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
......@@ -253,6 +253,12 @@
<li><a href="http://172.16.80.141:9999" class="mws-i-24 i-chart" target='_BLANK'>代理工具</a></li>
<li><a href="encoder.html" class="mws-i-24 i-cog">转码工具</a></li>
<li><a href="bury.html" class="mws-i-24 i-eyedropper">埋点工具</a></li>
<li>
<a href="#" class="mws-i-24 i-iphone-4">积分商城助手</a>
<ul>
<li><a href="creatUrl.html">生成免登链接</a></li>
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-day-calendar">签到助手</a>
<ul>
......@@ -261,7 +267,7 @@
</ul>
</li>
<li>
<a href="#" class="mws-i-24 i-list">活动助手</a>
<a href="#" class="mws-i-24 i-dribbble-4">活动助手</a>
<ul>
<li><a href="package.html">开发者测试包</a></li>
<li><a href="activity.html">自定义活动</a></li>
......
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