订单优化

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);
String source = parameterMap.get("source");
LOGGER.info("source:"+source);
// LOGGER.info("source:"+source);
if(source!=null && source.equals("skyeye")){
return true;
}

View File

@ -16,6 +16,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@ -53,14 +54,42 @@ public class OrderInfoController {
@RequestMapping(value = "/getOrder", method = {RequestMethod.POST, RequestMethod.GET})
public String getOrder(HttpServletRequest request, ModelMap map ) throws Exception {
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
long startTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("startTime"))), 0);
long endTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("endTime"))), 0);
int serverId1 = Integer.valueOf(parameterMap.get("serverId"));
String startTime = parameterMap.get("startTime");
String endTime = parameterMap.get("endTime");
String serverId = parameterMap.get("serverId");
String userId = parameterMap.get("userId");
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,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);
for (Map.Entry<String,CGPayOrder> entry: map1.entrySet()){
CGPayOrder cgPayOrder = entry.getValue();
int serverId = cgPayOrder.getServerId();
if(serverId1 != 0 && serverId1 != serverId) {
int server = cgPayOrder.getServerId();
if(Integer.parseInt(serverId) != 0 && server != Integer.parseInt(serverId)) {
continue;
}
String ccId = Optional.ofNullable(cgPayOrder.getCc_id()).orElse("");
@ -136,7 +165,7 @@ public class OrderInfoController {
}
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){
corder.setRegisterTime("");
corder.setOpenId("");
@ -151,107 +180,21 @@ public class OrderInfoController {
cgPayOrders.add(corder);
}
}
map.put("cgPayOrders",cgPayOrders);
return "userOrderInfo";
return cgPayOrders;
}
@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);
long startTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("startTime"))), 0);
long endTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("endTime"))), 0);
String userId = parameterMap.get("userId");
String startData = JsonUtil.timeStamp2Date(String.valueOf(startTime));
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.");
}
/**
*
* @param request
* @param response
* @param cgPayOrders
*/
private void createOrderExcel(HttpServletRequest request,HttpServletResponse response,List<Corder> cgPayOrders){
LOGGER.info("订单信息导出中===============================================");
HttpSession session = request.getSession();
session.setAttribute("state", null);
// 生成提示信息,
response.setContentType("application/csv;charset=gbk");
response.setContentType("application/x-download");
String codedFileName = null;
OutputStream fOut = null;
try
@ -342,19 +285,26 @@ public class OrderInfoController {
fOut = response.getOutputStream();
workbook.write(fOut);
}
catch (UnsupportedEncodingException e1) {}
catch (Exception e) {}
catch (Exception e) {
e.printStackTrace();
}
finally
{
try
{
fOut.flush();
fOut.close();
if (fOut != null){
fOut.flush();
}
if (fOut != null){
fOut.close();
}
}
catch (IOException e) {
e.printStackTrace();
}
catch (IOException e) {}
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})
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);
// int serverId = Integer.parseInt(parameterMap.get("serverId"));
int roleId = Integer.parseInt(parameterMap.get("roleId"));
CUserInfo userInfoById = userInfoDao.findUserInfoById(parameterMap.get("roleId"));
GSUser gsUser = gsUserDao.findUserInfo(userInfoById.getServerid(), roleId);
CUserVo cUserVo = getcUserVo(gsUser);
GSUser gsUser = gsUserDao.findUserInfoQuick(userInfoById.getServerid(), roleId);
CUserVo cUserVo = getcUserVo(gsUser);
if(cUserVo.isData==1){
cUserVo.setServerId(String.valueOf(userInfoById.getServerid()));

View File

@ -10,6 +10,8 @@ public interface GSUserDao {
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;
String getThriftIpPort(MarkedVo marked, int userId);

View File

@ -26,22 +26,43 @@ public class GSUserDaoImpl implements GSUserDao {
private Connect connect;
public static final String colon = ":";
@Override
public GSUser findUserInfo(int serverId, int userId) throws Exception {
// GSUser cUser = RedisUtil.getInstence().getObject(marked.getPartition() + colon + RedisUserKey.CUser_Key,
// String.valueOf(userId), GSUser.class, GlobalsDef.REDIS_OVER_TIME);
// if (cUser != null) {
// return cUser;
// }
GSUser cUser = RedisUtil.getInstence().getObject(RedisUserKey.CUser_Key + colon + serverId,
String.valueOf(userId), GSUser.class, GlobalsDef.REDIS_OVER_FOREVER);
if (cUser != null) {
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);
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
Query query = new Query(Criteria.where("_id").is(userId));
return mongoTemplate.findOne(query, GSUser.class);
}
@Override
public void updateUserInfo(MarkedVo marked, Update update, int id) throws Exception {
// String dbName = MongoName.getMongoDBName(marked);

View File

@ -4,6 +4,7 @@ package com.jmfy.redisProperties;
* Created by admin on 2014/11/26.
*/
public interface GlobalsDef {
int REDIS_OVER_TIME = 3600 * 24 * 7;
int REDIS_OVER_FOREVER = -1;
@ -12,8 +13,8 @@ public interface GlobalsDef {
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>
</nav>
<div class="page-container">
<form class="form form-horizontal" id="form-article-add" action="/exportExcelRequest" method="post"
onsubmit="return exportExcel()">
<form class="form form-horizontal" id="form-article-add" action="*" method="post">
<div id="tab-system" class="HuiTab">
<div class="tabBar cl">
<span>生成玩家订单</span>
@ -90,8 +89,8 @@
</div>
<div class="row cl">
<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 class="btn btn-primary radius" type="button" onclick="exportExcel()" >
<i class="Hui-iconfont">&#xe632;</i> 开始导出
</button>
<span class="startExport"></span>
</div>
@ -126,25 +125,39 @@
var intervalFlag = true; //是否执行轮询的标志
function exportExcel() {
var erroCode = $('.SERVERID');
var startExport = $('.startExport');
var serverId = $("#serverId").val();
var userId = $("input[name='userId']").val();
var startTime = $("input[name='startTime']").val();
var endTime = $("input[name='endTime']").val();
if (startTime === '' || startTime == null) {
erroCode = $('.STARTTIME');
erroCode.html('<span style="color: red; ">开始时间不能为空!</span>');
alert("开始时间不能为空!");
return false;
}
if (endTime === '' || endTime == null) {
erroCode = $('.ENDTIME');
erroCode.html('<span style="color: red; ">结束时间不能为空!</span>');
alert("结束时间不能为空!");
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">
<head>
<meta charset="utf-8"/>
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
<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 http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="../favicon.ico" />
<link rel="Shortcut Icon" href="../favicon.ico" />
<!--[if lt IE 9]>
<meta charset="utf-8"/>
<meta name="renderer" content="webkit|ie-comp|ie-stand"/>
<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 http-equiv="Cache-Control" content="no-siteapp"/>
<link rel="Bookmark" href="../favicon.ico"/>
<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/respond.min.js"></script>
<![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.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/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<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/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/css/style.css"/>
<!--[if IE 6]>
<script type="text/javascript" src="../static/lib/DD_belatedPNG_0.0.8a-min.js"></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->
<!--/meta 作为公共模版分离出去-->
<title>玩家订单查询</title>
<title>玩家订单查询</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
<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>
<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>
</nav>
<div class="page-container">
<form class="form form-horizontal" id="form-article-add" action="/getOrder" method="get" onsubmit="return findFlow()">
<div id="tab-system" class="HuiTab">
<div class="tabBar cl">
<span>玩家订单查询</span>
</div>
<div class="tabCon">
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
开始时间:</label>
<div class="formControls col-xs-8 col-sm-9">
<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">
<span class="STARTTIME"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
结束时间:</label>
<div class="formControls col-xs-8 col-sm-9">
<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="ENDTIME"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
区服id</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.server_id}+'-'+${server.name}"></option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
游戏名称:</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="packId" class="input-text" id="packId"><!--下拉列表-->
<option th:value="ALLORDER" th:text="全部" selected="selected"></option>
<option th:each="pack:${channelPackInfo}" th:value="${pack.id}" th:text="${pack.name}"></option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red"></span>
用户ID</label>
<div class="formControls col-xs-8 col-sm-9">
<input autocomplete="off" type="text" name="userId" placeholder="游戏中的玩家id" value="" class="input-text"/>
<span class="USERID"></span>
</div>
</div>
<!-- <div class="row cl">-->
<!-- <label class="form-label col-xs-4 col-sm-2">-->
<!-- <span class="c-red">*</span>-->
<!-- 游戏名称:</label>-->
<!-- <div class="formControls col-xs-8 col-sm-9">-->
<!-- <select name="gameId" class="input-text" id="gameId">&lt;!&ndash;下拉列表&ndash;&gt;-->
<!-- <option th:each="game:${allGameName}" th:value="${game.id}" th:text="${game.name}"></option>-->
<!-- </select>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
<div class="row cl">
<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>
</div>
</div>
</form>
<form class="form form-horizontal" id="form-article-add" action="/getOrder" method="get"
onsubmit="return findFlow()">
<div id="tab-system" class="HuiTab">
<div class="tabBar cl">
<span>玩家订单查询</span>
</div>
<div class="tabCon">
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
开始时间:</label>
<div class="formControls col-xs-8 col-sm-9">
<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">
<span class="STARTTIME"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
结束时间:</label>
<div class="formControls col-xs-8 col-sm-9">
<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="ENDTIME"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
区服id</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
<option th:value="0" th:text="全部" selected="selected"></option>
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
th:text="${server.server_id}+'-'+${server.name}"></option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
游戏名称:</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="packId" class="input-text" id="packId"><!--下拉列表-->
<option th:value="ALLORDER" th:text="全部" selected="selected"></option>
<option th:each="pack:${channelPackInfo}" th:value="${pack.id}"
th:text="${pack.name}"></option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red"></span>
用户ID</label>
<div class="formControls col-xs-8 col-sm-9">
<input autocomplete="off" type="text" name="userId" placeholder="游戏中的玩家id" value=""
class="input-text"/>
<span class="USERID"></span>
</div>
</div>
</div>
</div>
<div class="row cl">
<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>
</div>
</div>
</form>
</div>
@ -132,33 +132,34 @@
index: 0
});
});
function findFlow() {
var erroCode = $('.SERVERID');
var serverId = $("#serverId").val();
if (serverId === '' || serverId == null) {
alert("区服id不能为空!!");
return false;
function findFlow() {
var erroCode = $('.SERVERID');
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>
<!--/请在上方写此页面业务相关的脚本-->
</body>

View File

@ -26,9 +26,11 @@
<h1><p class="f-20 text-success">太初行管理后台</p></h1>
</div>
<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>2、一些优化bug修改</p>
<p>3、权限层级修改</p>
<p>4、订单导出修改</p>
</div>
<footer class="footer mt-20">
</footer>