订单优化

master
duhui 2021-08-17 15:20:57 +08:00
parent 04d2b55d14
commit 7d6e6bf5fe
9 changed files with 248 additions and 260 deletions

View File

@ -54,7 +54,7 @@ public class WebSecurityConfig extends WebMvcConfigurerAdapter{
} }
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request); HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
String source = parameterMap.get("source"); String source = parameterMap.get("source");
LOGGER.info("source:"+source); // LOGGER.info("source:"+source);
if(source!=null && source.equals("skyeye")){ if(source!=null && source.equals("skyeye")){
return true; return true;
} }

View File

@ -16,6 +16,7 @@ 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 javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -53,14 +54,42 @@ public class OrderInfoController {
@RequestMapping(value = "/getOrder", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/getOrder", method = {RequestMethod.POST, RequestMethod.GET})
public String getOrder(HttpServletRequest request, ModelMap map ) throws Exception { public String getOrder(HttpServletRequest request, ModelMap map ) throws Exception {
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request); HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
long startTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("startTime"))), 0); String startTime = parameterMap.get("startTime");
long endTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("endTime"))), 0); String endTime = parameterMap.get("endTime");
int serverId1 = Integer.valueOf(parameterMap.get("serverId")); String serverId = parameterMap.get("serverId");
String userId = parameterMap.get("userId"); String userId = parameterMap.get("userId");
String packId = parameterMap.get("packId"); String packId = parameterMap.get("packId");
String startData = JsonUtil.timeStamp2Date(String.valueOf(startTime));
List<String> days = JsonUtil.getDays(startData,JsonUtil.timeStamp2Date(String.valueOf(endTime))); List<Corder> cgPayOrders = findOrders(startTime, endTime, userId, packId, serverId);
map.put("cgPayOrders",cgPayOrders);
return "userOrderInfo";
}
@RequestMapping(value = "/exportExcelRequest", method = {RequestMethod.POST, RequestMethod.GET})
public void exportExcelRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
String userId = parameterMap.get("userId");
String startTime = parameterMap.get("startTime");
String endTime = parameterMap.get("endTime");
List<Corder> cgPayOrders = findOrders(startTime, endTime, userId, "ALLORDER", "0");
createOrderExcel(request,response,cgPayOrders);
}
/**
*
* @param startTime
* @param endTime
* @param userId
* @param packId
* @param serverId
* @return
* @throws Exception
*/
private List<Corder> findOrders(String startTime,String endTime,String userId,String packId,String serverId) throws Exception {
List<String> days = JsonUtil.getDays(startTime,endTime);
Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap; Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap;
Map<Integer,String> itemMap = FileCacheUtils.itemNameMap; Map<Integer,String> itemMap = FileCacheUtils.itemNameMap;
@ -75,8 +104,8 @@ public class OrderInfoController {
Map<String, CGPayOrder> map1 = RedisUtil.getInstence().getMap(RedisUserKey.C_PAYORDER_MAP + ":" + date, CGPayOrder.class, -1); Map<String, CGPayOrder> map1 = RedisUtil.getInstence().getMap(RedisUserKey.C_PAYORDER_MAP + ":" + date, CGPayOrder.class, -1);
for (Map.Entry<String,CGPayOrder> entry: map1.entrySet()){ for (Map.Entry<String,CGPayOrder> entry: map1.entrySet()){
CGPayOrder cgPayOrder = entry.getValue(); CGPayOrder cgPayOrder = entry.getValue();
int serverId = cgPayOrder.getServerId(); int server = cgPayOrder.getServerId();
if(serverId1 != 0 && serverId1 != serverId) { if(Integer.parseInt(serverId) != 0 && server != Integer.parseInt(serverId)) {
continue; continue;
} }
String ccId = Optional.ofNullable(cgPayOrder.getCc_id()).orElse(""); String ccId = Optional.ofNullable(cgPayOrder.getCc_id()).orElse("");
@ -136,7 +165,7 @@ public class OrderInfoController {
} }
corder.setRecharge_type(cgPayOrder.getRecharge_type()); corder.setRecharge_type(cgPayOrder.getRecharge_type());
GSUser gsUser = gsUserDao.findUserInfo(serverId,Integer.valueOf(accountid)); GSUser gsUser = gsUserDao.findUserInfo(Integer.parseInt(serverId),Integer.valueOf(accountid));
if (gsUser == null){ if (gsUser == null){
corder.setRegisterTime(""); corder.setRegisterTime("");
corder.setOpenId(""); corder.setOpenId("");
@ -151,107 +180,21 @@ public class OrderInfoController {
cgPayOrders.add(corder); cgPayOrders.add(corder);
} }
} }
map.put("cgPayOrders",cgPayOrders); return cgPayOrders;
return "userOrderInfo";
} }
/**
@RequestMapping(value = "/exportExcelRequest", method = {RequestMethod.POST, RequestMethod.GET}) *
public void exportExcelRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { * @param request
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request); * @param response
long startTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("startTime"))), 0); * @param cgPayOrders
long endTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("endTime"))), 0); */
String userId = parameterMap.get("userId"); private void createOrderExcel(HttpServletRequest request,HttpServletResponse response,List<Corder> cgPayOrders){
String startData = JsonUtil.timeStamp2Date(String.valueOf(startTime)); LOGGER.info("订单信息导出中===============================================");
List<String> days = JsonUtil.getDays(startData,JsonUtil.timeStamp2Date(String.valueOf(endTime)));
Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap;
Map<Integer,String> itemMap = FileCacheUtils.itemNameMap;
List<Corder> cgPayOrders = new ArrayList<>();
CUserInfo userInfo =null;
if(userId!=null&&!userId.isEmpty()){
userInfo = userInfoDao.findUserInfoByUserId(Integer.parseInt(userId));
}
for (String date :days){
Map<String, CGPayOrder> map1 = RedisUtil.getInstence().getMap(RedisUserKey.C_PAYORDER_MAP + ":" + date, CGPayOrder.class, -1);
for (Map.Entry<String,CGPayOrder> entry: map1.entrySet()){
CGPayOrder cgPayOrder = entry.getValue();
String accountid = cgPayOrder.getUserId();
int serverId = cgPayOrder.getServerId();
if (userInfo!=null &&!accountid.equals(userInfo.getId())){
continue;
}
String amount = cgPayOrder.getAmount();
double amountDouble;
if(!amount.contains(".")){
amountDouble = Integer.parseInt(amount)/100D;
} else{
amountDouble = Double.parseDouble(amount);
}
Corder corder = new Corder();
corder.setAccountid(accountid);
corder.setAmount(String.format("%.2f",amountDouble));
corder.setOrderNo(cgPayOrder.getOrderId());
String payTime = cgPayOrder.getDelivery_time();
corder.setPayTime(payTime);
corder.setProductid(cgPayOrder.getGoodsId());
corder.setServerId(String.valueOf(serverId));
corder.setPaySdk(cgPayOrder.getPaySdk());
corder.setPlatform(cgPayOrder.getPlatform());
SRechargeCommodityConfig config;
int goodsId;
if(isNumeric(cgPayOrder.getGoodsId())){
goodsId = Integer.parseInt(cgPayOrder.getGoodsId());
config =rechargeMap.get(goodsId);
}else {
config = SRechargeCommodityConfig.sdkRechargeCommodityConfigMap.get(cgPayOrder.getGoodsId());
}
corder.setProductName(config==null?"":config.getName());
corder.setCurrency_code(cgPayOrder.getCurrency_code()==null?"":cgPayOrder.getCurrency_code());
corder.setCurrency_price(cgPayOrder.getCurrency_price()==null?"":cgPayOrder.getCurrency_price());
StringBuilder builder = new StringBuilder();
if(config!=null&&config.getBaseReward()!=null){
int[][] baseReward = config.getBaseReward();
if(baseReward!=null&&baseReward.length>0){
Arrays.stream(baseReward).forEach(n->{
if(builder.length()!=0){
builder.append("、");
}
builder.append(itemMap.getOrDefault(n[0],"")).append("*").append(n[1]);
});
}
}
corder.setProductContent(builder.length()<1?"":builder.toString());
corder.setRecharge_type(cgPayOrder.getRecharge_type());
GSUser gsUser = gsUserDao.findUserInfo(serverId,Integer.valueOf(accountid));
if (gsUser == null){
corder.setRegisterTime("");
corder.setOpenId("");
}else {
corder.setRegisterTime(DateUtil.stampToTime(gsUser.getPlayerManager().getCreateTime()));
corder.setOpenId(gsUser.getPlayerManager().getOpenId());
}
ChannelInfo infoById = channelInfoDao.getChannelInfoById(cgPayOrder.getCc_id());
corder.setCc_id(Optional.ofNullable(infoById).map(ChannelInfo::getName).orElse(cgPayOrder.getCc_id()));
cgPayOrders.add(corder);
}
}
if (cgPayOrders == null || cgPayOrders.isEmpty()){
throw new Exception("There is no order information in this period.");
}
HttpSession session = request.getSession(); HttpSession session = request.getSession();
session.setAttribute("state", null); session.setAttribute("state", null);
// 生成提示信息, // 生成提示信息,
response.setContentType("application/csv;charset=gbk"); response.setContentType("application/x-download");
String codedFileName = null; String codedFileName = null;
OutputStream fOut = null; OutputStream fOut = null;
try try
@ -342,19 +285,26 @@ public class OrderInfoController {
fOut = response.getOutputStream(); fOut = response.getOutputStream();
workbook.write(fOut); workbook.write(fOut);
} }
catch (UnsupportedEncodingException e1) {} catch (Exception e) {
catch (Exception e) {} e.printStackTrace();
}
finally finally
{ {
try try
{ {
fOut.flush(); if (fOut != null){
fOut.close(); fOut.flush();
}
if (fOut != null){
fOut.close();
}
}
catch (IOException e) {
e.printStackTrace();
} }
catch (IOException e) {}
session.setAttribute("state", "open"); session.setAttribute("state", "open");
} }
System.out.println("文件生成..."); LOGGER.info("订单信息导出完成===============================================");
} }

View File

@ -102,16 +102,14 @@ public class UserInfoController {
@RequestMapping(value = "/getUserRoleInfo", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/getUserRoleInfo", method = {RequestMethod.POST, RequestMethod.GET})
public String getUserInfo(HttpSession session, ModelMap map, HttpServletRequest request) throws Exception { public String getUserInfo(ModelMap map, HttpServletRequest request) throws Exception {
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request); HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
// int serverId = Integer.parseInt(parameterMap.get("serverId"));
int roleId = Integer.parseInt(parameterMap.get("roleId")); int roleId = Integer.parseInt(parameterMap.get("roleId"));
CUserInfo userInfoById = userInfoDao.findUserInfoById(parameterMap.get("roleId")); CUserInfo userInfoById = userInfoDao.findUserInfoById(parameterMap.get("roleId"));
GSUser gsUser = gsUserDao.findUserInfoQuick(userInfoById.getServerid(), roleId);
GSUser gsUser = gsUserDao.findUserInfo(userInfoById.getServerid(), roleId); CUserVo cUserVo = getcUserVo(gsUser);
CUserVo cUserVo = getcUserVo(gsUser);
if(cUserVo.isData==1){ if(cUserVo.isData==1){
cUserVo.setServerId(String.valueOf(userInfoById.getServerid())); cUserVo.setServerId(String.valueOf(userInfoById.getServerid()));

View File

@ -10,6 +10,8 @@ public interface GSUserDao {
GSUser findUserInfo(int serverId, int userId) throws Exception; GSUser findUserInfo(int serverId, int userId) throws Exception;
GSUser findUserInfoQuick(int serverId, int userId) throws Exception;
void updateUserInfo(MarkedVo marked, Update update, int id) throws Exception; void updateUserInfo(MarkedVo marked, Update update, int id) throws Exception;
String getThriftIpPort(MarkedVo marked, int userId); String getThriftIpPort(MarkedVo marked, int userId);

View File

@ -26,22 +26,43 @@ public class GSUserDaoImpl implements GSUserDao {
private Connect connect; private Connect connect;
public static final String colon = ":"; public static final String colon = ":";
@Override @Override
public GSUser findUserInfo(int serverId, int userId) throws Exception { public GSUser findUserInfo(int serverId, int userId) throws Exception {
// GSUser cUser = RedisUtil.getInstence().getObject(marked.getPartition() + colon + RedisUserKey.CUser_Key, GSUser cUser = RedisUtil.getInstence().getObject(RedisUserKey.CUser_Key + colon + serverId,
// String.valueOf(userId), GSUser.class, GlobalsDef.REDIS_OVER_TIME); String.valueOf(userId), GSUser.class, GlobalsDef.REDIS_OVER_FOREVER);
// if (cUser != null) { if (cUser != null) {
// return cUser; return cUser;
// } }
// 读库
String dbName = MongoName.getMongoDBName(serverId);
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
Query query = new Query(Criteria.where("_id").is(userId));
GSUser gsUser = mongoTemplate.findOne(query, GSUser.class);
// 写入缓存
RedisUtil.getInstence().putObject(RedisUserKey.CUser_Key + colon + serverId,
String.valueOf(userId), gsUser, GlobalsDef.HOUT_TIME);
return gsUser;
}
/**
*
* @param serverId
* @param userId
* @return
* @throws Exception
*/
@Override
public GSUser findUserInfoQuick(int serverId, int userId) throws Exception {
// 读库
String dbName = MongoName.getMongoDBName(serverId); String dbName = MongoName.getMongoDBName(serverId);
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName); MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
Query query = new Query(Criteria.where("_id").is(userId)); Query query = new Query(Criteria.where("_id").is(userId));
return mongoTemplate.findOne(query, GSUser.class); return mongoTemplate.findOne(query, GSUser.class);
} }
@Override @Override
public void updateUserInfo(MarkedVo marked, Update update, int id) throws Exception { public void updateUserInfo(MarkedVo marked, Update update, int id) throws Exception {
// String dbName = MongoName.getMongoDBName(marked); // String dbName = MongoName.getMongoDBName(marked);

View File

@ -4,6 +4,7 @@ package com.jmfy.redisProperties;
* Created by admin on 2014/11/26. * Created by admin on 2014/11/26.
*/ */
public interface GlobalsDef { public interface GlobalsDef {
int REDIS_OVER_TIME = 3600 * 24 * 7; int REDIS_OVER_TIME = 3600 * 24 * 7;
int REDIS_OVER_FOREVER = -1; int REDIS_OVER_FOREVER = -1;
@ -12,8 +13,8 @@ public interface GlobalsDef {
int DAY_TIME = 24 * 60 * 60; int DAY_TIME = 24 * 60 * 60;
int HOUT_TIME = 60 * 60;
int MINUTE_TIME = 60;
} }

View File

@ -37,8 +37,7 @@
href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a> href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav> </nav>
<div class="page-container"> <div class="page-container">
<form class="form form-horizontal" id="form-article-add" action="/exportExcelRequest" method="post" <form class="form form-horizontal" id="form-article-add" action="*" method="post">
onsubmit="return exportExcel()">
<div id="tab-system" class="HuiTab"> <div id="tab-system" class="HuiTab">
<div class="tabBar cl"> <div class="tabBar cl">
<span>生成玩家订单</span> <span>生成玩家订单</span>
@ -90,8 +89,8 @@
</div> </div>
<div class="row cl"> <div class="row cl">
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2"> <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
<button class="btn btn-primary radius" type="submit" ><i <button class="btn btn-primary radius" type="button" onclick="exportExcel()" >
class="Hui-iconfont">&#xe632;</i> 开始导出 <i class="Hui-iconfont">&#xe632;</i> 开始导出
</button> </button>
<span class="startExport"></span> <span class="startExport"></span>
</div> </div>
@ -126,25 +125,39 @@
var intervalFlag = true; //是否执行轮询的标志 var intervalFlag = true; //是否执行轮询的标志
function exportExcel() { function exportExcel() {
var erroCode = $('.SERVERID');
var startExport = $('.startExport');
var serverId = $("#serverId").val();
var userId = $("input[name='userId']").val(); var userId = $("input[name='userId']").val();
var startTime = $("input[name='startTime']").val(); var startTime = $("input[name='startTime']").val();
var endTime = $("input[name='endTime']").val(); var endTime = $("input[name='endTime']").val();
if (startTime === '' || startTime == null) { if (startTime === '' || startTime == null) {
erroCode = $('.STARTTIME'); alert("开始时间不能为空!");
erroCode.html('<span style="color: red; ">开始时间不能为空!</span>');
return false; return false;
} }
if (endTime === '' || endTime == null) { if (endTime === '' || endTime == null) {
erroCode = $('.ENDTIME'); alert("结束时间不能为空!");
erroCode.html('<span style="color: red; ">结束时间不能为空!</span>');
return false; return false;
} }
return true; $.ajax({
type: "POST",
data: {
"startTime": startTime,
"endTime": endTime,
"userId": userId
},
url: "/exportExcelRequest",
success: function (data) {
if (data === 1) {
layer.msg('操作成功,正在导出!', {icon: 6, time: 1000});
}
if (data === 0) {
layer.msg('操作失败', {icon: 6, time: 1000});
}
if (data === 2) {
layer.msg('此时间段没有订单信息,导出失败!', {icon: 6, time: 1000});
}
}
}
);
} }

View File

@ -1,112 +1,112 @@
<!--_meta 作为公共模版分离出去--> <!DOCTYPE HTML>
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"> <html xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta name="renderer" content="webkit|ie-comp|ie-stand"/> <meta name="renderer" content="webkit|ie-comp|ie-stand"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> <meta name="viewport"
<meta http-equiv="Cache-Control" content="no-siteapp" /> content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<link rel="Bookmark" href="../favicon.ico" /> <meta http-equiv="Cache-Control" content="no-siteapp"/>
<link rel="Shortcut Icon" href="../favicon.ico" /> <link rel="Bookmark" href="../favicon.ico"/>
<!--[if lt IE 9]> <link rel="Shortcut Icon" href="../favicon.ico"/>
<!--[if lt IE 9]>
<script type="text/javascript" src="../static/lib/html5shiv.js"></script> <script type="text/javascript" src="../static/lib/html5shiv.js"></script>
<script type="text/javascript" src="../static/lib/respond.min.js"></script> <script type="text/javascript" src="../static/lib/respond.min.js"></script>
<![endif]--> <![endif]-->
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" /> <link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css"/>
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" /> <link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css"/>
<link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css" /> <link rel="stylesheet" type="text/css" href="../static/lib/Hui-iconfont/1.0.8/iconfont.css"/>
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" /> <link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin"/>
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" /> <link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css"/>
<!--[if IE 6]> <!--[if IE 6]>
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script> <script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
<script>DD_belatedPNG.fix('*');</script> <script>DD_belatedPNG.fix('*');</script>
<![endif]--> <![endif]-->
<!--/meta 作为公共模版分离出去--> <!--/meta 作为公共模版分离出去-->
<title>玩家订单查询</title> <title>玩家订单查询</title>
</head> </head>
<body> <body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
<span class="c-gray en">&gt;</span> <span class="c-gray en">&gt;</span>
个人信息管理 个人信息管理
<span class="c-gray en">&gt;</span> <span class="c-gray en">&gt;</span>
订单查询 订单查询
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a> <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav> </nav>
<div class="page-container"> <div class="page-container">
<form class="form form-horizontal" id="form-article-add" action="/getOrder" method="get" onsubmit="return findFlow()"> <form class="form form-horizontal" id="form-article-add" action="/getOrder" method="get"
<div id="tab-system" class="HuiTab"> onsubmit="return findFlow()">
<div class="tabBar cl"> <div id="tab-system" class="HuiTab">
<span>玩家订单查询</span> <div class="tabBar cl">
</div> <span>玩家订单查询</span>
<div class="tabCon"> </div>
<div class="row cl"> <div class="tabCon">
<label class="form-label col-xs-4 col-sm-2"> <div class="row cl">
<span class="c-red">*</span> <label class="form-label col-xs-4 col-sm-2">
开始时间:</label> <span class="c-red">*</span>
<div class="formControls col-xs-8 col-sm-9"> 开始时间:</label>
<input autocomplete="off" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}' })" id="datemin" class="input-text Wdate" style="width:180px;" name="startTime"> <div class="formControls col-xs-8 col-sm-9">
<span class="STARTTIME"></span> <input autocomplete="off" type="text"
</div> onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}' })"
</div> id="datemin" class="input-text Wdate" style="width:180px;" name="startTime">
<div class="row cl"> <span class="STARTTIME"></span>
<label class="form-label col-xs-4 col-sm-2"> </div>
<span class="c-red">*</span> </div>
结束时间:</label> <div class="row cl">
<div class="formControls col-xs-8 col-sm-9"> <label class="form-label col-xs-4 col-sm-2">
<input autocomplete="off" type="text" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}' })" id="datemax" class="input-text Wdate" style="width:180px;" name="endTime"> <span class="c-red">*</span>
<span class="ENDTIME"></span> 结束时间:</label>
</div> <div class="formControls col-xs-8 col-sm-9">
</div> <input autocomplete="off" type="text"
<div class="row cl"> onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'#F{$dp.$D(\'datemin\')}' })"
<label class="form-label col-xs-4 col-sm-2"> id="datemax" class="input-text Wdate" style="width:180px;" name="endTime">
<span class="c-red">*</span> <span class="ENDTIME"></span>
区服id</label> </div>
<div class="formControls col-xs-8 col-sm-9"> </div>
<select name="serverId" class="input-text" id="serverId"><!--下拉列表--> <div class="row cl">
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.server_id}+'-'+${server.name}"></option> <label class="form-label col-xs-4 col-sm-2">
</select> <span class="c-red">*</span>
</div> 区服id</label>
</div> <div class="formControls col-xs-8 col-sm-9">
<div class="row cl"> <select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
<label class="form-label col-xs-4 col-sm-2"> <option th:value="0" th:text="全部" selected="selected"></option>
<span class="c-red">*</span> <option th:each="server:${serverInfo}" th:value="${server.server_id}"
游戏名称:</label> th:text="${server.server_id}+'-'+${server.name}"></option>
<div class="formControls col-xs-8 col-sm-9"> </select>
<select name="packId" class="input-text" id="packId"><!--下拉列表--> </div>
<option th:value="ALLORDER" th:text="全部" selected="selected"></option> </div>
<option th:each="pack:${channelPackInfo}" th:value="${pack.id}" th:text="${pack.name}"></option> <div class="row cl">
</select> <label class="form-label col-xs-4 col-sm-2">
</div> <span class="c-red">*</span>
</div> 游戏名称:</label>
<div class="row cl"> <div class="formControls col-xs-8 col-sm-9">
<label class="form-label col-xs-4 col-sm-2"> <select name="packId" class="input-text" id="packId"><!--下拉列表-->
<span class="c-red"></span> <option th:value="ALLORDER" th:text="全部" selected="selected"></option>
用户ID</label> <option th:each="pack:${channelPackInfo}" th:value="${pack.id}"
<div class="formControls col-xs-8 col-sm-9"> th:text="${pack.name}"></option>
<input autocomplete="off" type="text" name="userId" placeholder="游戏中的玩家id" value="" class="input-text"/> </select>
<span class="USERID"></span> </div>
</div> </div>
</div> <div class="row cl">
<!-- <div class="row cl">--> <label class="form-label col-xs-4 col-sm-2">
<!-- <label class="form-label col-xs-4 col-sm-2">--> <span class="c-red"></span>
<!-- <span class="c-red">*</span>--> 用户ID</label>
<!-- 游戏名称:</label>--> <div class="formControls col-xs-8 col-sm-9">
<!-- <div class="formControls col-xs-8 col-sm-9">--> <input autocomplete="off" type="text" name="userId" placeholder="游戏中的玩家id" value=""
<!-- <select name="gameId" class="input-text" id="gameId">&lt;!&ndash;下拉列表&ndash;&gt;--> class="input-text"/>
<!-- <option th:each="game:${allGameName}" th:value="${game.id}" th:text="${game.name}"></option>--> <span class="USERID"></span>
<!-- </select>--> </div>
<!-- </div>--> </div>
<!-- </div>--> </div>
</div> </div>
</div> <div class="row cl">
<div class="row cl"> <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2"> <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 查询</button>
<button class="btn btn-primary radius" type="submit" ><i class="Hui-iconfont">&#xe632;</i> 查询</button> </div>
</div> </div>
</div> </form>
</form>
</div> </div>
@ -132,33 +132,34 @@
index: 0 index: 0
}); });
}); });
function findFlow() {
var erroCode = $('.SERVERID');
var serverId = $("#serverId").val(); function findFlow() {
if (serverId === '' || serverId == null) { var erroCode = $('.SERVERID');
alert("区服id不能为空!!");
return false; var serverId = $("#serverId").val();
if (serverId === '' || serverId == null) {
alert("区服id不能为空!!");
return false;
}
var startTime = $("input[name='startTime']").val();
if (startTime === '' || startTime == null) {
erroCode = $('.STARTTIME');
erroCode.html('<span style="color: red; ">开始时间不能为空!</span>');
return false;
}
var endTime = $("input[name='endTime']").val();
if (endTime === '' || endTime == null) {
erroCode = $('.ENDTIME');
erroCode.html('<span style="color: red; ">结束时间不能为空!</span>');
return false;
}
var packId = $("#packId").val();
if (packId === '' || packId == null) {
alert("游戏名称不能为空!");
return false;
}
return true;
} }
var startTime = $("input[name='startTime']").val();
if (startTime === '' || startTime == null) {
erroCode = $('.STARTTIME');
erroCode.html('<span style="color: red; ">开始时间不能为空!</span>');
return false;
}
var endTime = $("input[name='endTime']").val();
if (endTime === '' || endTime == null) {
erroCode = $('.ENDTIME');
erroCode.html('<span style="color: red; ">结束时间不能为空!</span>');
return false;
}
var packId = $("#packId").val();
if (packId === '' || packId == null) {
alert("游戏名称不能为空!");
return false;
}
return true;
}
</script> </script>
<!--/请在上方写此页面业务相关的脚本--> <!--/请在上方写此页面业务相关的脚本-->
</body> </body>

View File

@ -26,9 +26,11 @@
<h1><p class="f-20 text-success">太初行管理后台</p></h1> <h1><p class="f-20 text-success">太初行管理后台</p></h1>
</div> </div>
<div style="margin-left: 20px;font-size: 18px"> <div style="margin-left: 20px;font-size: 18px">
<p style="color: red">更新日志[2021-8-16]</p> <p style="color: red">更新日志[2021-8-17]</p>
<p>1、自动开服功能添加</p> <p>1、自动开服功能添加</p>
<p>2、一些优化bug修改</p> <p>2、一些优化bug修改</p>
<p>3、权限层级修改</p>
<p>4、订单导出修改</p>
</div> </div>
<footer class="footer mt-20"> <footer class="footer mt-20">
</footer> </footer>