Commit 8ab4a5cb by Huang Linyu

排行数据 ,电话多个弹框测试

parent 56b1dcea
package com.ctrip.fun.admin.controller.system; package com.ctrip.fun.admin.controller.system;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -13,11 +9,9 @@ import org.springframework.stereotype.Controller; ...@@ -13,11 +9,9 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ctrip.fun.admin.service.system.UserDetailsService; import com.ctrip.fun.admin.service.system.UserDetailsService;
import com.ctrip.fun.common.core.util.EncryptUtil; import com.ctrip.fun.common.core.util.EncryptUtil;
import com.ctrip.fun.common.vo.Response;
import com.ctrip.fun.common.vo.adminUser.AdminUserBean; import com.ctrip.fun.common.vo.adminUser.AdminUserBean;
@Controller @Controller
......
...@@ -120,7 +120,7 @@ public class CallCenterController { ...@@ -120,7 +120,7 @@ public class CallCenterController {
@ResponseBody @ResponseBody
public String callbackEvent(HttpServletRequest request, HttpServletResponse response, @RequestBody String eventJsonString, ModelMap model) { public String callbackEvent(HttpServletRequest request, HttpServletResponse response, @RequestBody String eventJsonString, ModelMap model) {
String result = ""; String result = "";
// System.out.println("rsmw iwan info:" +eventJsonString); System.out.println("rsmw iwan info:" +eventJsonString);
try { try {
logger.debug("从" + request.getRemoteAddr() + "收到event:" + eventJsonString); logger.debug("从" + request.getRemoteAddr() + "收到event:" + eventJsonString);
...@@ -152,9 +152,8 @@ public class CallCenterController { ...@@ -152,9 +152,8 @@ public class CallCenterController {
uid = user.getUid(); uid = user.getUid();
} }
NewStateEventHandler newStatehandler = new NewStateEventHandler(); NewStateEventHandler newStatehandler = new NewStateEventHandler();
System.out.print("before handlering: "+callerIdNumber+" "+uid+" "+mobileNo); System.out.println("before handlering: "+callerIdNumber+" "+uid+" "+mobileNo+" RINGING");
newStatehandler.handle(callerIdNumber,uid, mobileNo); newStatehandler.handle(callerIdNumber,uid, mobileNo);
System.out.println("after handlering iwan:" +eventJsonString);
} }
}else{ }else{
......
package com.ctrip.fun.admin.filter; package com.ctrip.fun.admin.filter;
import com.ctrip.fun.admin.utility.SpringSecurityUtil; import com.ctrip.fun.admin.utility.SpringSecurityUtil;
import freemarker.ext.beans.BeansWrapper; import freemarker.ext.beans.BeansWrapper;
import freemarker.ext.beans.BeansWrapperBuilder;
import freemarker.template.Configuration;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
...@@ -20,7 +24,8 @@ public class GlobalHandlerInterceptor extends HandlerInterceptorAdapter { ...@@ -20,7 +24,8 @@ public class GlobalHandlerInterceptor extends HandlerInterceptorAdapter {
public boolean preHandle(HttpServletRequest request, public boolean preHandle(HttpServletRequest request,
HttpServletResponse response, HttpServletResponse response,
Object handler) throws Exception { Object handler) throws Exception {
request.setAttribute("enums", BeansWrapper.getDefaultInstance().getEnumModels()); // request.setAttribute("enums", BeansWrapper.getDefaultInstance().getEnumModels());
request.setAttribute("enums", new BeansWrapperBuilder(Configuration.DEFAULT_INCOMPATIBLE_IMPROVEMENTS).build().getEnumModels());
request.setAttribute("userName", SpringSecurityUtil.getCurrentUserName()); request.setAttribute("userName", SpringSecurityUtil.getCurrentUserName());
return true; return true;
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
} }
.rank { .rank {
width: 7%; width: 20%;
float: left; float: left;
text-align: center; text-align: center;
height: 40px; height: 40px;
...@@ -64,14 +64,14 @@ ...@@ -64,14 +64,14 @@
} }
.name { .name {
width: 15%; width: 25%;
float: left; float: left;
text-align: center; text-align: center;
height: 40px; height: 40px;
} }
.num { .num {
width: 13%; width: 55%;
float: left; float: left;
text-align: center; text-align: center;
height: 40px; height: 40px;
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<section> <section>
<div class="top"> <div class="top">
<div class="title"> <div class="title">
获客 博尔地售券排行
</div> </div>
<div class="time">时间: <span id="time"></span></div> <div class="time">时间: <span id="time"></span></div>
</div> </div>
...@@ -114,19 +114,15 @@ ...@@ -114,19 +114,15 @@
<div class="rank">名次</div> <div class="rank">名次</div>
<div class="name">姓名</div> <div class="name">姓名</div>
<div class="num">总数</div> <div class="num">总数</div>
<div class="num">新客</div>
<div class="num">社员</div>
<div class="num">非社员</div>
<div class="num">980</div>
<div class="num">360</div>
</div> </div>
<ul class="list" id="list"> <ul class="list" id="list">
</ul> </ul>
</section> </section>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script> <script>
//var baseUrl = 'https://api.iwanoutdoor.com'; var baseUrl = 'https://api.iwanoutdoor.com';
var baseUrl = 'http://localhost:8080'; //var baseUrl = 'http://localhost:8080';
var numType = { var numType = {
0: 'first', 0: 'first',
1: 'second', 1: 'second',
...@@ -178,39 +174,19 @@ ...@@ -178,39 +174,19 @@
console.log(Object.prototype.toString.call(list)); console.log(Object.prototype.toString.call(list));
if (status === 'success' && Object.prototype.toString.call(list) === '[object Array]') { if (status === 'success' && Object.prototype.toString.call(list) === '[object Array]') {
var total_myNum1 = 0; var total_myNum1 = 0;
var total_myNum2 = 0;
var total_myNum3 = 0;
var total_myNum4 = 0;
var total_myNum5 = 0;
var total_myNum6 = 0;
var dataLis = ''; var dataLis = '';
for (var i = 0; i < list.length; i++) { for (var i = 0; i < list.length; i++) {
total_myNum1+=list[i].myNum1; total_myNum1+=list[i].myNum1;
total_myNum2+=list[i].myNum2;
total_myNum3+=list[i].myNum3;
total_myNum4+=list[i].myNum4;
total_myNum5+=list[i].myNum5;
total_myNum6+=list[i].myNum6;
dataLis += '<li>\n' + dataLis += '<li>\n' +
' <div class="rank">' + (i + 1) + '</div>\n' + ' <div class="rank">' + (i + 1) + '</div>\n' +
' <div class="name">' + list[i].inviterUserName + '</div>\n' + ' <div class="name">' + list[i].inviterUserName + '</div>\n' +
' <div class="num ' + (list[i].myNum1 >= 0 ? numType[i] : '') + '">' + list[i].myNum1 + '</div>\n' + ' <div class="num ' + (list[i].myNum1 >= 0 ? numType[i] : '') + '">' + list[i].myNum1 + '</div>\n' +
' <div class="num ' + (list[i].myNum2 >= 0 ? numType[i] : '') + '">' + list[i].myNum2 + '</div>\n' +
' <div class="num ' + (list[i].myNum3 >= 0 ? numType[i] : '') + '">' + list[i].myNum3 + '</div>\n' +
' <div class="num ' + (list[i].myNum4 >= 0 ? numType[i] : '') + '">' + list[i].myNum4 + '</div>\n' +
' <div class="num ' + (list[i].myNum5 >= 0 ? numType[i] : '') + '">' + list[i].myNum5 + '</div>\n' +
' <div class="num ' + (list[i].myNum6 >= 0 ? numType[i] : '') + '">' + list[i].myNum6 + '</div>\n' +
' </li>' ' </li>'
} }
var totalLi = ""; var totalLi = "";
totalLi+='<li style="background:#3de899"><div class="rank"></div>\n'; totalLi+='<li style="background:#3de899"><div class="rank"></div>\n';
totalLi+='<div class="name">合计</div>\n'; totalLi+='<div class="name">合计</div>\n';
totalLi+='<div class="num">' + total_myNum1 + '</div>\n'; totalLi+='<div class="num">' + total_myNum1 + '</div>\n';
totalLi+='<div class="num">' + total_myNum2 + '</div>\n';
totalLi+='<div class="num">' + total_myNum3 + '</div>\n';
totalLi+='<div class="num">' + total_myNum4 + '</div>\n';
totalLi+='<div class="num">' + total_myNum5 + '</div>\n';
totalLi+='<div class="num">' + total_myNum6 + '</div>\n';
totalLi+=''; totalLi+='';
tpl+=totalLi+dataLis; tpl+=totalLi+dataLis;
......
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 sign in to comment