订单列表,优化

master
duhui 2021-10-15 17:11:29 +08:00
parent a59d2cf5a0
commit a93bc47c72
4 changed files with 24 additions and 46 deletions

View File

@ -166,7 +166,7 @@ public class OrderInfoController {
}
corder.setRecharge_type(cgPayOrder.getRecharge_type());
GSUser gsUser = gsUserDao.findUserInfo(Integer.parseInt(serverId),Integer.valueOf(accountid));
GSUser gsUser = gsUserDao.findUserInfo(server,Integer.valueOf(accountid));
if (gsUser == null){
corder.setRegisterTime("");
corder.setOpenId("");
@ -196,13 +196,13 @@ public class OrderInfoController {
HttpSession session = request.getSession();
session.setAttribute("state", null);
// 生成提示信息,
response.setContentType("application/x-download");
response.setContentType("application/csv;charset=gbk");
String codedFileName = null;
OutputStream fOut = null;
try
{
// 进行转码,使其支持中文文件名
codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
codedFileName = java.net.URLEncoder.encode("订单信息", "UTF-8");
response.addHeader("Content-Disposition", "attachment; filename=" + codedFileName + ".xls");
// 产生工作簿对象
HSSFWorkbook workbook = new HSSFWorkbook();

View File

@ -42,7 +42,7 @@ public class GSUserDaoImpl implements GSUserDao {
GSUser gsUser = mongoTemplate.findOne(query, GSUser.class);
// 写入缓存
RedisUtil.getInstence().putObject(RedisUserKey.CUser_Key + colon + serverId,
String.valueOf(userId), gsUser, GlobalsDef.HOUT_TIME);
String.valueOf(userId), gsUser, GlobalsDef.DAY_TIME);
return gsUser;
}

View File

@ -37,7 +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="*" method="post">
<form class="form form-horizontal" id="form-article-add" action="/exportExcelRequest" method="post" onsubmit="exportExcel()">
<div id="tab-system" class="HuiTab">
<div class="tabBar cl">
<span>生成玩家订单</span>
@ -89,7 +89,7 @@
</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="button" onclick="exportExcel()" >
<button class="btn btn-primary radius" type="submit">
<i class="Hui-iconfont">&#xe632;</i> 开始导出
</button>
<span class="startExport"></span>
@ -123,9 +123,7 @@
});
});
var intervalFlag = true; //是否执行轮询的标志
function exportExcel() {
var userId = $("input[name='userId']").val();
var startTime = $("input[name='startTime']").val();
var endTime = $("input[name='endTime']").val();
@ -137,30 +135,9 @@
alert("结束时间不能为空!");
return false;
}
$.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});
}
}
}
);
}
var intervalFlag = true; //是否执行轮询的标志
// 进度查询
function getProgress(interVal) {
$._post2('/exportExcelRequestResult', {}, function (res) {

View File

@ -42,43 +42,43 @@
<thead>
<tr class="text-c">
<!--<th width="25"><input type="checkbox" name="" value=""/></th>-->
<th width="200">订单id</th>
<th width="200">充值时间</th>
<th width="200">服务器id</th>
<th width="200">用户id</th>
<th width="200">平台订单号</th>
<th width="200">玩家id</th>
<th width="200">支付时间</th>
<th width="200">礼包id</th>
<th width="200">支付方式</th>
<th width="200">充值金额</th>
<th width="200">区服id</th>
<th width="200">角色注册时间</th>
<th width="200">礼包名称</th>
<th width="200">礼包内容</th>
<th width="200">礼包金额</th>
<th width="200">货币类型</th>
<th width="200">货币数量</th>
<th width="200">支付方式</th>
<th width="200">CC值</th>
<th width="200">注册时间</th>
<th width="200">渠道名称</th>
<th width="200">账号id</th>
<th width="200">支付sdk</th>
<th width="200">平台</th>
<th width="200">支付方式</th>
<!--<th width="240">操作</th>-->
</tr>
</thead>
<tbody>
<tr th:each="obj:${cgPayOrders}">
<td th:text="${obj.orderNo}" style="text-align: center;"></td>
<td th:text="${obj.payTime}" style="text-align: center;"></td>
<td th:text="${obj.serverId}" style="text-align: center;"></td>
<td th:text="${obj.accountid}" style="text-align: center;"></td>
<td th:text="${obj.payTime}" style="text-align: center;"></td>
<td th:text="${obj.productid}" style="text-align: center;"></td>
<td th:text="${obj.recharge_type}" style="text-align: center;"></td>
<td th:text="${obj.amount}" style="text-align: center;"></td>
<td th:text="${obj.serverId}" style="text-align: center;"></td>
<td th:text="${obj.registerTime}" style="text-align: center;"></td>
<td th:text="${obj.productName}" style="text-align: center;"></td>
<td th:text="${obj.productContent}" style="text-align: center;"></td>
<td th:text="${obj.amount}" style="text-align: center;"></td>
<td th:text="${obj.currency_code}" style="text-align: center;"></td>
<td th:text="${obj.currency_price}" style="text-align: center;"></td>
<td th:text="${obj.recharge_type}" style="text-align: center;"></td>
<td th:text="${obj.cc_id}" style="text-align: center;"></td>
<td th:text="${obj.registerTime}" style="text-align: center;"></td>
<td th:text="${obj.openId}" style="text-align: center;"></td>
<td th:text="${obj.platform}" style="text-align: center;"></td>
<td th:text="${obj.paySdk}" style="text-align: center;"></td>
<td th:text="${obj.platform}" style="text-align: center;"></td>
</tr>
</tbody>
</table>
@ -137,7 +137,8 @@
// var bb =JSON.stringify(jsonData); //将JSON对象转化为JSON字符
// alert(bb);
// alert(json);
let str = "订单id,充值时间,服务器id,用户id,礼包id,礼包名称,礼包内容,礼包金额,货币类型,货币数量,支付方式,渠道名称,注册时间,账号id\n";
let str = "平台订单号,玩家id,支付时间,礼包id,支付方式,充值金额,区服id,角色注册时间," +
"礼包名称,礼包内容,货币类型,货币数量,渠道名称,账号id,支付sdk,平台\n";
for (let i = 0; i < jsonData.length; i++) {
var parse = jsonData[i];
// var bb =JSON.stringify(jsonData[i])