generated from root/miduo_server
gm需求, 订单功能优化, 添加渠道管理, 区服id展示修改
parent
498eb58884
commit
19020916f1
|
|
@ -0,0 +1,141 @@
|
||||||
|
package com.jmfy.controller;
|
||||||
|
|
||||||
|
import com.jmfy.dao.CUserDao;
|
||||||
|
import com.jmfy.dao.ChannelInfoDao;
|
||||||
|
import com.jmfy.model.CAdmin;
|
||||||
|
import com.jmfy.model.ChannelInfo;
|
||||||
|
import com.jmfy.model.vo.PowersEnum;
|
||||||
|
import com.jmfy.utils.JsonUtil;
|
||||||
|
import com.jmfy.utils.SeqUtils;
|
||||||
|
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;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author hj
|
||||||
|
* @Param 渠道信息
|
||||||
|
**/
|
||||||
|
@SuppressWarnings("ALL")
|
||||||
|
@Controller
|
||||||
|
public class ChannelInfoController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ChannelInfoDao channelInfoDao;
|
||||||
|
@Resource
|
||||||
|
private CUserDao cUserDao;
|
||||||
|
@Resource
|
||||||
|
private SeqUtils seqUtils;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部列表
|
||||||
|
* @param map
|
||||||
|
* @returnc
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/channelInfoList", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public String getChannelInfoList(ModelMap map){
|
||||||
|
try {
|
||||||
|
List<ChannelInfo> infoList = channelInfoDao.getChannelInfoList();
|
||||||
|
map.addAttribute("infoList",infoList);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return "channelInfo";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/insertChannelInfo", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public @ResponseBody
|
||||||
|
int insertChannelInfo(HttpServletRequest request) throws Exception {
|
||||||
|
HashMap<String, String> map = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
// 验证权限
|
||||||
|
boolean verifyPower = verifyPower(request, PowersEnum.ADD_CHANNEL_PERMISSIONS);
|
||||||
|
if (!verifyPower){
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
// 参数处理
|
||||||
|
String name = map.get("name");
|
||||||
|
if (name == null || "".equals(name)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// 包名多个用#号分割
|
||||||
|
String[] split = name.split("\\|");
|
||||||
|
// 验证是否存在该包名
|
||||||
|
for (String str1 : split) {
|
||||||
|
String[] split1 = str1.split("\\#");
|
||||||
|
ChannelInfo byName = channelInfoDao.getChannelInfoById(split1[0]);
|
||||||
|
if (byName != null){
|
||||||
|
System.err.printf("==================添加渠道,渠道id重复:{%d}\n",split1[0]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// 封装入库
|
||||||
|
ChannelInfo info = new ChannelInfo(split1[0],split1[1]);
|
||||||
|
channelInfoDao.insertChannelInfo(info);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/deleteChannelInfo", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
|
public @ResponseBody
|
||||||
|
int deleteChannelInfo(HttpServletRequest request) throws Exception {
|
||||||
|
HashMap<String, String> map = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
// 验证权限
|
||||||
|
boolean verifyPower = verifyPower(request, PowersEnum.DELETE_CHANNEL_PERMISSIONS);
|
||||||
|
if (!verifyPower){
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
String id = map.get("id");
|
||||||
|
if (id == null){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ChannelInfo byId = channelInfoDao.getChannelInfoById(id);
|
||||||
|
if (byId == null){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
channelInfoDao.deleteChannelInfo(byId);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证权限
|
||||||
|
* @param request
|
||||||
|
* @param powersEnum
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private boolean verifyPower(HttpServletRequest request, PowersEnum... powersEnum) throws Exception {
|
||||||
|
String username = (String) request.getSession().getAttribute("username");
|
||||||
|
if (username == null){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
CAdmin admin = cUserDao.findAdmin(username);
|
||||||
|
if (admin == null){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (PowersEnum anEnum : powersEnum) {
|
||||||
|
if (!admin.getPowers().contains(anEnum.getId())){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -2,16 +2,11 @@ package com.jmfy.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.jmfy.dao.GSUserDao;
|
import com.jmfy.dao.*;
|
||||||
import com.jmfy.dao.MailDao;
|
|
||||||
import com.jmfy.dao.ServerInfoDao;
|
|
||||||
import com.jmfy.dao.UserInfoDao;
|
|
||||||
import com.jmfy.model.*;
|
import com.jmfy.model.*;
|
||||||
import com.jmfy.redisProperties.RedisUserKey;
|
import com.jmfy.redisProperties.RedisUserKey;
|
||||||
|
|
||||||
import com.jmfy.utils.FileCacheUtils;
|
import com.jmfy.utils.*;
|
||||||
import com.jmfy.utils.JsonUtil;
|
|
||||||
import com.jmfy.utils.RedisUtil;
|
|
||||||
import config.SRechargeCommodityConfig;
|
import config.SRechargeCommodityConfig;
|
||||||
import org.apache.poi.hssf.usermodel.*;
|
import org.apache.poi.hssf.usermodel.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
@ -38,30 +33,31 @@ import java.util.*;
|
||||||
/**
|
/**
|
||||||
* Created by huangds on 2017/10/24.
|
* Created by huangds on 2017/10/24.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("ALL")
|
||||||
@Controller
|
@Controller
|
||||||
public class OrderInfoController {
|
public class OrderInfoController {
|
||||||
@Resource
|
@Resource
|
||||||
private UserInfoDao userInfoDao;
|
private UserInfoDao userInfoDao;
|
||||||
|
@Resource
|
||||||
|
private GSUserDao gsUserDao;
|
||||||
|
@Resource
|
||||||
|
private ChannelInfoDao channelInfoDao;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ServerInfoDao serverInfoDao;
|
private ServerInfoDao serverInfoDao;
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(OrderInfoController.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(OrderInfoController.class);
|
||||||
|
|
||||||
@RequestMapping(value = "/getOrder", method = {RequestMethod.POST, RequestMethod.GET})
|
@RequestMapping(value = "/getOrder", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
public String getOrder(HttpSession session, 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);
|
long startTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("startTime"))), 0);
|
||||||
long endTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("endTime"))), 0);
|
long endTime = JsonUtil.getAppointTimeInXDay(Long.parseLong(JsonUtil.date3TimeStamp(request.getParameter("endTime"))), 0);
|
||||||
String serverId1 = parameterMap.get("serverId");
|
int serverId1 = Integer.valueOf(parameterMap.get("serverId"));
|
||||||
String userId = parameterMap.get("userId");
|
String userId = parameterMap.get("userId");
|
||||||
String gameId = parameterMap.get("gameId");
|
|
||||||
String startData = JsonUtil.timeStamp2Date(String.valueOf(startTime));
|
String startData = JsonUtil.timeStamp2Date(String.valueOf(startTime));
|
||||||
|
|
||||||
List<String> days = JsonUtil.getDays(startData,JsonUtil.timeStamp2Date(String.valueOf(endTime)));
|
List<String> days = JsonUtil.getDays(startData,JsonUtil.timeStamp2Date(String.valueOf(endTime)));
|
||||||
|
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
||||||
|
|
||||||
Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap;
|
Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap;
|
||||||
Map<Integer,String> itemMap = FileCacheUtils.itemNameMap;
|
Map<Integer,String> itemMap = FileCacheUtils.itemNameMap;
|
||||||
List<Corder> cgPayOrders = new ArrayList<>();
|
List<Corder> cgPayOrders = new ArrayList<>();
|
||||||
|
|
@ -77,9 +73,7 @@ public class OrderInfoController {
|
||||||
CGPayOrder cgPayOrder = entry.getValue();
|
CGPayOrder cgPayOrder = entry.getValue();
|
||||||
String accountid = cgPayOrder.getUserId();
|
String accountid = cgPayOrder.getUserId();
|
||||||
int serverId = cgPayOrder.getServerId();
|
int serverId = cgPayOrder.getServerId();
|
||||||
|
if(serverId1 != 0 && serverId1 != serverId) {
|
||||||
if(Integer.valueOf(serverId1)!=0&&!String.valueOf(serverId).equals(serverId1))
|
|
||||||
{
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (userInfo!=null &&!accountid.equals(userInfo.getId())){
|
if (userInfo!=null &&!accountid.equals(userInfo.getId())){
|
||||||
|
|
@ -100,7 +94,7 @@ public class OrderInfoController {
|
||||||
corder.setAccountid(accountid);
|
corder.setAccountid(accountid);
|
||||||
corder.setOrderNo(cgPayOrder.getOrderId());
|
corder.setOrderNo(cgPayOrder.getOrderId());
|
||||||
String payTime = cgPayOrder.getDelivery_time();
|
String payTime = cgPayOrder.getDelivery_time();
|
||||||
corder.setPayTime(payTime);//simpleDateFormat.format(Long.parseLong(payTime))
|
corder.setPayTime(payTime);
|
||||||
corder.setProductid(cgPayOrder.getGoodsId());
|
corder.setProductid(cgPayOrder.getGoodsId());
|
||||||
corder.setServerId(String.valueOf(serverId));
|
corder.setServerId(String.valueOf(serverId));
|
||||||
|
|
||||||
|
|
@ -131,6 +125,18 @@ public class OrderInfoController {
|
||||||
corder.setProductContent(builder.toString());
|
corder.setProductContent(builder.toString());
|
||||||
}
|
}
|
||||||
corder.setRecharge_type(cgPayOrder.getRecharge_type());
|
corder.setRecharge_type(cgPayOrder.getRecharge_type());
|
||||||
|
|
||||||
|
GSUser gsUser = gsUserDao.findUserInfo(serverId,Integer.valueOf(accountid));
|
||||||
|
if (gsUser == null){
|
||||||
|
corder.setCc_id("");
|
||||||
|
corder.setRegisterTime("");
|
||||||
|
corder.setOpenId("");
|
||||||
|
}else {
|
||||||
|
ChannelInfo infoById = channelInfoDao.getChannelInfoById(gsUser.getPlayerManager().getCc_id());
|
||||||
|
corder.setCc_id(Optional.ofNullable(infoById).map(ChannelInfo::getName).orElse(gsUser.getPlayerManager().getCc_id()));
|
||||||
|
corder.setRegisterTime(DateUtil.stampToTime(gsUser.getPlayerManager().getCreateTime()));
|
||||||
|
corder.setOpenId(gsUser.getPlayerManager().getOpenId());
|
||||||
|
}
|
||||||
cgPayOrders.add(corder);
|
cgPayOrders.add(corder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -147,7 +153,6 @@ public class OrderInfoController {
|
||||||
String userId = parameterMap.get("userId");
|
String userId = parameterMap.get("userId");
|
||||||
String startData = JsonUtil.timeStamp2Date(String.valueOf(startTime));
|
String startData = JsonUtil.timeStamp2Date(String.valueOf(startTime));
|
||||||
List<String> days = JsonUtil.getDays(startData,JsonUtil.timeStamp2Date(String.valueOf(endTime)));
|
List<String> days = JsonUtil.getDays(startData,JsonUtil.timeStamp2Date(String.valueOf(endTime)));
|
||||||
// SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
||||||
Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap;
|
Map<Integer, SRechargeCommodityConfig> rechargeMap = FileCacheUtils.rechargeMap;
|
||||||
Map<Integer,String> itemMap = FileCacheUtils.itemNameMap;
|
Map<Integer,String> itemMap = FileCacheUtils.itemNameMap;
|
||||||
List<Corder> cgPayOrders = new ArrayList<>();
|
List<Corder> cgPayOrders = new ArrayList<>();
|
||||||
|
|
@ -163,8 +168,6 @@ public class OrderInfoController {
|
||||||
CGPayOrder cgPayOrder = entry.getValue();
|
CGPayOrder cgPayOrder = entry.getValue();
|
||||||
String accountid = cgPayOrder.getUserId();
|
String accountid = cgPayOrder.getUserId();
|
||||||
int serverId = cgPayOrder.getServerId();
|
int serverId = cgPayOrder.getServerId();
|
||||||
// GSUser gsUser = gsUserDao.findUserInfo(serverId, Integer.parseInt(cgPayOrder.getUserId()));
|
|
||||||
|
|
||||||
if (userInfo!=null &&!accountid.equals(userInfo.getId())){
|
if (userInfo!=null &&!accountid.equals(userInfo.getId())){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -183,9 +186,6 @@ public class OrderInfoController {
|
||||||
corder.setPayTime(payTime);
|
corder.setPayTime(payTime);
|
||||||
corder.setProductid(cgPayOrder.getGoodsId());
|
corder.setProductid(cgPayOrder.getGoodsId());
|
||||||
corder.setServerId(String.valueOf(serverId));
|
corder.setServerId(String.valueOf(serverId));
|
||||||
// Date registerDate = new Date(gsUser.getPlayerManager().getCreateTime());
|
|
||||||
// corder.setRegisterTime(simpleDateFormat.format(registerDate));
|
|
||||||
// SRechargeCommodityConfig config = rechargeMap.get(Integer.parseInt(cgPayOrder.getGoodsId()));
|
|
||||||
|
|
||||||
SRechargeCommodityConfig config;
|
SRechargeCommodityConfig config;
|
||||||
int goodsId;
|
int goodsId;
|
||||||
|
|
@ -213,13 +213,27 @@ public class OrderInfoController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
corder.setProductContent(builder.length()<1?"":builder.toString());
|
corder.setProductContent(builder.length()<1?"":builder.toString());
|
||||||
|
|
||||||
corder.setRecharge_type(cgPayOrder.getRecharge_type());
|
corder.setRecharge_type(cgPayOrder.getRecharge_type());
|
||||||
|
|
||||||
|
GSUser gsUser = gsUserDao.findUserInfo(serverId,Integer.valueOf(accountid));
|
||||||
|
if (gsUser == null){
|
||||||
|
corder.setCc_id("");
|
||||||
|
corder.setRegisterTime("");
|
||||||
|
corder.setOpenId("");
|
||||||
|
}else {
|
||||||
|
ChannelInfo infoById = channelInfoDao.getChannelInfoById(gsUser.getPlayerManager().getCc_id());
|
||||||
|
corder.setCc_id(Optional.ofNullable(infoById).map(ChannelInfo::getName).orElse(gsUser.getPlayerManager().getCc_id()));
|
||||||
|
corder.setRegisterTime(DateUtil.stampToTime(gsUser.getPlayerManager().getCreateTime()));
|
||||||
|
corder.setOpenId(gsUser.getPlayerManager().getOpenId());
|
||||||
|
}
|
||||||
|
|
||||||
cgPayOrders.add(corder);
|
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);
|
||||||
|
|
@ -231,42 +245,83 @@ public class OrderInfoController {
|
||||||
{
|
{
|
||||||
// 进行转码,使其支持中文文件名
|
// 进行转码,使其支持中文文件名
|
||||||
codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
codedFileName = java.net.URLEncoder.encode("中文", "UTF-8");
|
||||||
// response.setHeader("content-disposition", "attachment;filename=" + codedFileName + ".xls");
|
|
||||||
response.addHeader("Content-Disposition", "attachment; filename=" + codedFileName + ".xls");
|
response.addHeader("Content-Disposition", "attachment; filename=" + codedFileName + ".xls");
|
||||||
// 产生工作簿对象
|
// 产生工作簿对象
|
||||||
HSSFWorkbook workbook = new HSSFWorkbook();
|
HSSFWorkbook workbook = new HSSFWorkbook();
|
||||||
|
HSSFCellStyle contextstyle = workbook.createCellStyle();
|
||||||
//产生工作表对象
|
//产生工作表对象
|
||||||
HSSFSheet sheet = workbook.createSheet();
|
HSSFSheet sheet = workbook.createSheet();
|
||||||
int rowIndex = 1,cellIndex = 0;
|
int rowIndex = 1,cellIndex = 0;
|
||||||
Field[] field = cgPayOrders.get(0).getClass().getDeclaredFields(); //获取实体类的所有属性,返回Field数组
|
//获取实体类的所有属性,返回Field数组
|
||||||
HSSFRow headerRow = sheet.createRow(0);//创建一行
|
Field[] field = cgPayOrders.get(0).getClass().getDeclaredFields();
|
||||||
|
//创建一行
|
||||||
|
HSSFRow headerRow = sheet.createRow(0);
|
||||||
while (cellIndex<field.length){
|
while (cellIndex<field.length){
|
||||||
HSSFCell cell = headerRow.createCell(cellIndex);//创建一列
|
//创建一列
|
||||||
|
HSSFCell cell = headerRow.createCell(cellIndex);
|
||||||
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
|
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
|
||||||
cell.setCellValue(field[cellIndex].getName());
|
cell.setCellValue(field[cellIndex].getAnnotation(Fields.class).value());
|
||||||
cellIndex++;
|
cellIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=0;i<cgPayOrders.size();i++){
|
for(int i=0;i<cgPayOrders.size();i++){
|
||||||
cellIndex=0;
|
cellIndex=0;
|
||||||
HSSFRow currentRow = sheet.createRow(rowIndex);//创建一行
|
//创建一行
|
||||||
|
HSSFRow currentRow = sheet.createRow(rowIndex);
|
||||||
while (cellIndex<field.length){
|
while (cellIndex<field.length){
|
||||||
HSSFCell cell = currentRow.createCell(cellIndex);//创建一列
|
//创建一列
|
||||||
|
HSSFCell cell = currentRow.createCell(cellIndex);
|
||||||
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
|
cell.setCellType(HSSFCell.CELL_TYPE_STRING);
|
||||||
Object value=getFieldValueByName(field[cellIndex].getName(),cgPayOrders.get(i));//通过反射获取属性的value
|
//通过反射获取属性的value
|
||||||
String returnValue;
|
Object value = getFieldValueByName(field[cellIndex].getName(),cgPayOrders.get(i));
|
||||||
if(value!=null){
|
//data是否为数值型
|
||||||
if(value.getClass()== Date.class){
|
Boolean isNum = false;
|
||||||
DateFormat to_type = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
//data是否为整数
|
||||||
returnValue=to_type.format(value);
|
Boolean isInteger=false;
|
||||||
}
|
//data是否为百分数
|
||||||
else{
|
Boolean isPercent=false;
|
||||||
returnValue=String.valueOf(value);
|
//是否是时间
|
||||||
}
|
Boolean isDate=false;
|
||||||
}else{
|
// 是否是大数
|
||||||
returnValue="";
|
Boolean isBigNum=false;
|
||||||
|
if(value != null){
|
||||||
|
//判断data是否为数值型
|
||||||
|
isNum = value.toString().matches("^(-?\\d+)(\\.\\d+)?$");
|
||||||
|
//判断data是否为整数(小数部分是否为0)
|
||||||
|
isInteger = value.toString().matches("^[-\\+]?[\\d]*$");
|
||||||
|
//判断data是否为百分数(是否包含“%”)
|
||||||
|
isPercent = value.toString().contains("%");
|
||||||
|
// 是否是时间
|
||||||
|
isDate = value.getClass() == Date.class;
|
||||||
|
// 大数字
|
||||||
|
isBigNum = value.toString().length() >= 11;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 时间
|
||||||
|
if (isDate){
|
||||||
|
cell.setCellValue(DateUtil.stampToString(value.toString()));
|
||||||
|
}
|
||||||
|
// 大数字
|
||||||
|
else if (isBigNum){
|
||||||
|
cell.setCellValue(value.toString());
|
||||||
|
}
|
||||||
|
// 数字
|
||||||
|
else if (isNum && !isPercent){
|
||||||
|
if (isInteger) {
|
||||||
|
//数据格式只显示整数
|
||||||
|
contextstyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,#0"));
|
||||||
|
}else{
|
||||||
|
//保留两位小数点
|
||||||
|
contextstyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.00"));
|
||||||
|
}
|
||||||
|
cell.setCellStyle(contextstyle);
|
||||||
|
cell.setCellValue(Double.parseDouble(value.toString()));
|
||||||
|
}
|
||||||
|
// 字符串
|
||||||
|
else{
|
||||||
|
cell.setCellStyle(contextstyle);
|
||||||
|
cell.setCellValue(Optional.ofNullable(value).map(String::valueOf).orElse(""));
|
||||||
}
|
}
|
||||||
cell.setCellValue(returnValue);
|
|
||||||
cellIndex++;
|
cellIndex++;
|
||||||
}
|
}
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
|
|
@ -274,10 +329,8 @@ public class OrderInfoController {
|
||||||
fOut = response.getOutputStream();
|
fOut = response.getOutputStream();
|
||||||
workbook.write(fOut);
|
workbook.write(fOut);
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException e1)
|
catch (UnsupportedEncodingException e1) {}
|
||||||
{}
|
catch (Exception e) {}
|
||||||
catch (Exception e)
|
|
||||||
{}
|
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
@ -285,8 +338,7 @@ public class OrderInfoController {
|
||||||
fOut.flush();
|
fOut.flush();
|
||||||
fOut.close();
|
fOut.close();
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e) {}
|
||||||
{}
|
|
||||||
session.setAttribute("state", "open");
|
session.setAttribute("state", "open");
|
||||||
}
|
}
|
||||||
System.out.println("文件生成...");
|
System.out.println("文件生成...");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
package com.jmfy.dao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author hj
|
||||||
|
* @Description
|
||||||
|
**/
|
||||||
|
import com.jmfy.model.ChannelInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ChannelInfoDao {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取全部
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
List<ChannelInfo> getChannelInfoList() throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单个查询,id
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
ChannelInfo getChannelInfoById(String id) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
* @param channelInfo
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
void insertChannelInfo(ChannelInfo channelInfo) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param channelInfo
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
void deleteChannelInfo(ChannelInfo channelInfo) throws Exception;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.jmfy.dao.impl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author hj
|
||||||
|
**/
|
||||||
|
import com.jmfy.dao.ChannelInfoDao;
|
||||||
|
import com.jmfy.model.Constant;
|
||||||
|
import com.jmfy.model.ChannelInfo;
|
||||||
|
import com.jmfy.utils.Connect;
|
||||||
|
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||||
|
import org.springframework.data.mongodb.core.query.Criteria;
|
||||||
|
import org.springframework.data.mongodb.core.query.Query;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class ChannelInfoDaoImpl implements ChannelInfoDao {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private Connect connect;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ChannelInfo> getChannelInfoList() throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query();
|
||||||
|
return mongoTemplate.find(query, ChannelInfo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChannelInfo getChannelInfoById(String id) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
Query query = new Query(Criteria.where("_id").is(id));
|
||||||
|
return mongoTemplate.findOne(query, ChannelInfo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertChannelInfo(ChannelInfo channelInfo) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
mongoTemplate.insert(channelInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteChannelInfo(ChannelInfo channelInfo) throws Exception {
|
||||||
|
MongoTemplate mongoTemplate = connect.getMongoTemplete(Constant.dbName);
|
||||||
|
mongoTemplate.remove(channelInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
package com.jmfy.dao.impl;/*
|
package com.jmfy.dao.impl;
|
||||||
|
|
||||||
|
/**
|
||||||
* @Author hj
|
* @Author hj
|
||||||
* @Description //TODO $
|
* @Description //TODO $
|
||||||
* @Date $ $
|
* @Date $ $
|
||||||
* @Param $
|
* @Param $
|
||||||
* @return $
|
* @return $
|
||||||
**/
|
**/
|
||||||
|
|
||||||
import com.jmfy.dao.PackageInfoDao;
|
import com.jmfy.dao.PackageInfoDao;
|
||||||
import com.jmfy.model.Constant;
|
import com.jmfy.model.Constant;
|
||||||
import com.jmfy.model.PackageInfo;
|
import com.jmfy.model.PackageInfo;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.jmfy.model;
|
||||||
|
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Document;
|
||||||
|
import org.springframework.data.mongodb.core.mapping.Field;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author hj
|
||||||
|
* @Description
|
||||||
|
**/
|
||||||
|
@Document(collection = "channel_info")
|
||||||
|
public class ChannelInfo {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
@Field(value = "name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public ChannelInfo(String id, String name) {
|
||||||
|
this.id = id;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,30 +1,37 @@
|
||||||
package com.jmfy.model;
|
package com.jmfy.model;
|
||||||
|
|
||||||
|
import com.jmfy.utils.Fields;
|
||||||
|
|
||||||
public class Corder {
|
public class Corder {
|
||||||
|
|
||||||
private String orderNo; //平台订单好
|
@Fields("平台订单号")
|
||||||
|
private String orderNo;
|
||||||
private String accountid; //玩家id
|
@Fields("玩家id")
|
||||||
|
private String accountid;
|
||||||
private String payTime; //支付时间
|
@Fields("支付时间")
|
||||||
|
private String payTime;
|
||||||
private String productid; //礼包id
|
@Fields("礼包id")
|
||||||
|
private String productid;
|
||||||
private String recharge_type ; // qucik--quick uc-- 九游 sujie--速接
|
@Fields("支付方式")
|
||||||
|
private String recharge_type;
|
||||||
private String amount ; //充值金额
|
@Fields("充值金额")
|
||||||
|
private String amount;
|
||||||
|
@Fields("区服id")
|
||||||
private String serverId;
|
private String serverId;
|
||||||
|
@Fields("角色注册时间")
|
||||||
private String registerTime;
|
private String registerTime;
|
||||||
|
@Fields("礼包名称")
|
||||||
private String productName;
|
private String productName;
|
||||||
|
@Fields("礼包内容")
|
||||||
private String productContent;
|
private String productContent;
|
||||||
|
@Fields("货币类型")
|
||||||
private String currency_code;
|
private String currency_code;
|
||||||
|
@Fields("货币数量")
|
||||||
private String currency_price;
|
private String currency_price;
|
||||||
|
@Fields("渠道名称")
|
||||||
|
private String cc_id;
|
||||||
|
@Fields("账号id")
|
||||||
|
private String openId;
|
||||||
|
|
||||||
public String getAccountid() {
|
public String getAccountid() {
|
||||||
return accountid;
|
return accountid;
|
||||||
|
|
@ -121,4 +128,20 @@ public class Corder {
|
||||||
public void setCurrency_price(String currency_price) {
|
public void setCurrency_price(String currency_price) {
|
||||||
this.currency_price = currency_price;
|
this.currency_price = currency_price;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCc_id() {
|
||||||
|
return cc_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCc_id(String cc_id) {
|
||||||
|
this.cc_id = cc_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOpenId() {
|
||||||
|
return openId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenId(String openId) {
|
||||||
|
this.openId = openId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,8 @@ public class GSPlayerManagerBean {
|
||||||
|
|
||||||
private String channel;
|
private String channel;
|
||||||
|
|
||||||
|
private String cc_id;
|
||||||
|
|
||||||
private int silence;//是否被禁言0为可发言,1为不可发言
|
private int silence;//是否被禁言0为可发言,1为不可发言
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -124,6 +126,10 @@ public class GSPlayerManagerBean {
|
||||||
this.nickName = nickName;
|
this.nickName = nickName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCc_id() {
|
||||||
|
return cc_id;
|
||||||
|
}
|
||||||
|
|
||||||
public int getSex() {
|
public int getSex() {
|
||||||
return sex;
|
return sex;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,9 @@ public enum PowersEnum {
|
||||||
DELETE_PACKAGE_NAME(412,"权限: 删除频道",400),
|
DELETE_PACKAGE_NAME(412,"权限: 删除频道",400),
|
||||||
GUILD_LIST_MANAGER(413,"公会列表管理",400),
|
GUILD_LIST_MANAGER(413,"公会列表管理",400),
|
||||||
GUILD_OPERATE_PERMISSIONS(414,"权限: 操作公会",400),
|
GUILD_OPERATE_PERMISSIONS(414,"权限: 操作公会",400),
|
||||||
|
CHANNEL_NAME_MANAGER(415,"渠道管理",400),
|
||||||
|
ADD_CHANNEL_PERMISSIONS(416,"权限: 添加渠道",400),
|
||||||
|
DELETE_CHANNEL_PERMISSIONS(417,"权限: 删除渠道",400),
|
||||||
|
|
||||||
// 流水日志管理500-599
|
// 流水日志管理500-599
|
||||||
BILL_LOG(500,"流水日志管理",500),
|
BILL_LOG(500,"流水日志管理",500),
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,12 @@ public class DateUtil {
|
||||||
return sdf.format(new Date(stamp));
|
return sdf.format(new Date(stamp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String stampToString(String date) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
// 时间戳转换日期
|
||||||
|
return sdf.format(date);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日期转换为时间戳
|
* 日期转换为时间戳
|
||||||
* @param timers
|
* @param timers
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.jmfy.utils;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author hj
|
||||||
|
* @Date 2021/6/9 17:01
|
||||||
|
* @Description:
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Documented
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(value= ElementType.FIELD)
|
||||||
|
public @interface Fields {
|
||||||
|
int sort() default 0 ;
|
||||||
|
String value() ;
|
||||||
|
}
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
<span class="SERVERID"></span>
|
<span class="SERVERID"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
||||||
th:text="${server.name}"></option>
|
th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
<span class="SERVERID"></span>
|
<span class="SERVERID"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,140 @@
|
||||||
|
<!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"/>
|
||||||
|
<script type="text/javascript" src="lib/html5shiv.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui/css/H-ui.min.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/H-ui.admin.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/skin/default/skin.css" id="skin"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="h-ui.admin/css/style.css"/>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js"></script>
|
||||||
|
<script>DD_belatedPNG.fix('*');</script>
|
||||||
|
<title>渠道管理</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="breadcrumb">
|
||||||
|
<i class="Hui-iconfont"></i> 首页
|
||||||
|
<span class="c-gray en">></span> gm功能
|
||||||
|
<span class="c-gray en">></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"></i></a>
|
||||||
|
</nav>
|
||||||
|
<div class="page-container" style="text-align: center">
|
||||||
|
<h2><span style="color:red;">渠道管理</span></h2>
|
||||||
|
<div style="text-align: left">
|
||||||
|
<input type="text" name="channel" id="channel" placeholder="例子: 1001#华为|1002#小米" value="" class="input-text"
|
||||||
|
style="width: 300px;"/>
|
||||||
|
<button class="btn btn-primary" type="button" id="batch" onclick="addChannel()">添加渠道</button>
|
||||||
|
</div>
|
||||||
|
<div class="text-c">
|
||||||
|
<div class="mt-20">
|
||||||
|
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
|
||||||
|
<thead>
|
||||||
|
<tr class="text-c" style="width: 300px;">
|
||||||
|
<th width="200">ID</th>
|
||||||
|
<th width="200">名称</th>
|
||||||
|
<th width="200">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr th:each="obj:${infoList}">
|
||||||
|
<!--<td><input type="checkbox" value="" name=""/></td>-->
|
||||||
|
<td th:text="${obj.id}" style="text-align: center;"></td>
|
||||||
|
<td th:text="${obj.name}" style="text-align: center;"></td>
|
||||||
|
<td style="text-align: center; width: 300px">
|
||||||
|
<button type="button" th:id="${obj.id}" class="btn btn-primary"
|
||||||
|
onclick="return deleteChannel(this)"><i class="Hui-iconfont"></i> 删除
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--_footer 作为公共模版分离出去-->
|
||||||
|
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui/js/H-ui.min.js"></script>
|
||||||
|
<script type="text/javascript" src="h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
|
||||||
|
|
||||||
|
<!--请在下方写此页面业务相关的脚本-->
|
||||||
|
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
|
||||||
|
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$('.table-sort').dataTable({
|
||||||
|
"aaSorting": [[1, "desc"]],//默认第几个排序
|
||||||
|
"bStateSave": true,//状态保存
|
||||||
|
"pading": false,
|
||||||
|
"aoColumnDefs": [
|
||||||
|
//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
|
||||||
|
{"orderable": false, "aTargets": [2]}// 不参与排序的列
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// 添加
|
||||||
|
function addChannel() {
|
||||||
|
var name = $("#channel").val();
|
||||||
|
if (name === null || name === "") {
|
||||||
|
alert("添加数据不能为空");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
"name": name
|
||||||
|
},
|
||||||
|
url: "/insertChannelInfo",
|
||||||
|
success: function (data) {
|
||||||
|
if (data === 1) {
|
||||||
|
layer.msg('操作成功!', {icon: 6, time: 1000});
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
if (data === 0) {
|
||||||
|
layer.msg('操作失败,渠道已存在', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data === 2) {
|
||||||
|
layer.msg('没有权限', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 单个审核
|
||||||
|
function deleteChannel(obj) {
|
||||||
|
var id = $(obj).attr("id");
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
data: {
|
||||||
|
"id": id
|
||||||
|
},
|
||||||
|
url: "/deleteChannelInfo",
|
||||||
|
success: function (data) {
|
||||||
|
if (data === 1) {
|
||||||
|
layer.msg('操作成功!', {icon: 6, time: 1000});
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
if (data === 0) {
|
||||||
|
layer.msg('操作失败,数据不存在!', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
if (data === 2) {
|
||||||
|
layer.msg('没有权限', {icon: 6, time: 1000});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<div style="width: 200px; float: left">
|
<div style="width: 200px; float: left">
|
||||||
<span style="line-height: 200%">服务器id:</span>
|
<span style="line-height: 200%">服务器id:</span>
|
||||||
<select id="serverId" style="background-color:#fff;border:solid 1px #d0d0d0;height:34px;line-height:34px;">
|
<select id="serverId" style="background-color:#fff;border:solid 1px #d0d0d0;height:34px;line-height:34px;">
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,16 +76,16 @@
|
||||||
<span class="USERID"></span>
|
<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>-->
|
||||||
游戏名称:</label>
|
<!-- 游戏名称:</label>-->
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<!-- <div class="formControls col-xs-8 col-sm-9">-->
|
||||||
<select name="gameId" class="input-text" id="gameId"><!--下拉列表-->
|
<!-- <select name="gameId" class="input-text" id="gameId"><!–下拉列表–>-->
|
||||||
<option th:each="game:${allGameName}" th:value="${game.id}" th:text="${game.name}"></option>
|
<!-- <option th:each="game:${allGameName}" th:value="${game.id}" th:text="${game.name}"></option>-->
|
||||||
</select>
|
<!-- </select>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row cl">
|
<div class="row cl">
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
区服id:</label>
|
区服id:</label>
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
区服id:</label>
|
区服id:</label>
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -78,16 +78,16 @@
|
||||||
<span class="USERID"></span>
|
<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>-->
|
||||||
游戏名称:</label>
|
<!-- 游戏名称:</label>-->
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<!-- <div class="formControls col-xs-8 col-sm-9">-->
|
||||||
<select name="gameId" class="input-text" id="gameId"><!--下拉列表-->
|
<!-- <select name="gameId" class="input-text" id="gameId"><!–下拉列表–>-->
|
||||||
<option th:each="game:${allGameName}" th:value="${game.id}" th:text="${game.name}"></option>
|
<!-- <option th:each="game:${allGameName}" th:value="${game.id}" th:text="${game.name}"></option>-->
|
||||||
</select>
|
<!-- </select>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row cl">
|
<div class="row cl">
|
||||||
|
|
@ -124,8 +124,6 @@
|
||||||
function findFlow() {
|
function findFlow() {
|
||||||
var erroCode = $('.SERVERID');
|
var erroCode = $('.SERVERID');
|
||||||
var serverId = $("#serverId").val();
|
var serverId = $("#serverId").val();
|
||||||
var gameId = $("#gameId").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 (serverId === '' || serverId == null) {
|
if (serverId === '' || serverId == null) {
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
区服id:</label>
|
区服id:</label>
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
区服id:</label>
|
区服id:</label>
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
data-width="300px"
|
data-width="300px"
|
||||||
data-actions-box="true">
|
data-actions-box="true">
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
||||||
th:text="${server.name}"></option>
|
th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
<button class="btn btn-primary" type="button" onclick="selectGuilds()">搜索</button>
|
<button class="btn btn-primary" type="button" onclick="selectGuilds()">搜索</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,9 @@
|
||||||
<li th:if="${#lists.contains(pos.powers,410)} "><a data-href="packageInfoList" data-title="频道管理"
|
<li th:if="${#lists.contains(pos.powers,410)} "><a data-href="packageInfoList" data-title="频道管理"
|
||||||
href="javascript:;">频道管理</a></li>
|
href="javascript:;">频道管理</a></li>
|
||||||
<li th:if="${#lists.contains(pos.powers,413)} "><a data-href="initGuildList" data-title="公会列表管理"
|
<li th:if="${#lists.contains(pos.powers,413)} "><a data-href="initGuildList" data-title="公会列表管理"
|
||||||
href="javascript:;">公会列表管理</a></li>
|
href="javascript:;">公会列表管理</a></li>
|
||||||
|
<li th:if="${#lists.contains(pos.powers,414)} "><a data-href="channelInfoList" data-title="渠道管理"
|
||||||
|
href="javascript:;">渠道管理</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@
|
||||||
区服id:</label>
|
区服id:</label>
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
||||||
|
th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
<span class="SERVERID"></span>
|
<span class="SERVERID"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
data-width="300px"
|
data-width="300px"
|
||||||
data-actions-box="true">
|
data-actions-box="true">
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
||||||
th:text="${server.name}"></option>
|
th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||||
<option value="0" selected = "selected">所有区服</option>
|
<option value="0" selected = "selected">所有区服</option>
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
data-actions-box="true">
|
data-actions-box="true">
|
||||||
<!-- <select name="serverId" id="serverId" class="input-text"><!–下拉列表–>-->
|
<!-- <select name="serverId" id="serverId" class="input-text"><!–下拉列表–>-->
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
||||||
th:text="${server.name}"></option>
|
th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,8 @@
|
||||||
<div class="formControls col-xs-8 col-sm-9">
|
<div class="formControls col-xs-8 col-sm-9">
|
||||||
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
<select name="serverId" class="input-text" id="serverId"><!--下拉列表-->
|
||||||
<option value="0" selected = "selected">所有区服</option>
|
<option value="0" selected = "selected">所有区服</option>
|
||||||
<option th:each="server:${serverInfo}" th:value="${server.server_id}" th:text="${server.name}"></option>
|
<option th:each="server:${serverInfo}" th:value="${server.server_id}"
|
||||||
|
th:text="${server.server_id}+'-'+${server.name}"></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,9 @@
|
||||||
<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">账号id</th>
|
||||||
<!--<th width="240">操作</th>-->
|
<!--<th width="240">操作</th>-->
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -71,6 +72,9 @@
|
||||||
<td th:text="${obj.currency_code}" 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.currency_price}" style="text-align: center;"></td>
|
||||||
<td th:text="${obj.recharge_type}" 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>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -129,7 +133,7 @@
|
||||||
// var bb =JSON.stringify(jsonData); //将JSON对象转化为JSON字符
|
// var bb =JSON.stringify(jsonData); //将JSON对象转化为JSON字符
|
||||||
// alert(bb);
|
// alert(bb);
|
||||||
// alert(json);
|
// alert(json);
|
||||||
let str = "订单id,充值时间,服务器id,用户id,礼包id,礼包名称,礼包内容,礼包金额,货币类型,货币数量,支付方式,注册时间\n";
|
let str = "订单id,充值时间,服务器id,用户id,礼包id,礼包名称,礼包内容,礼包金额,货币类型,货币数量,支付方式,渠道名称,注册时间,账号id\n";
|
||||||
for (let i = 0; i < jsonData.length; i++) {
|
for (let i = 0; i < jsonData.length; i++) {
|
||||||
var parse = jsonData[i];
|
var parse = jsonData[i];
|
||||||
// var bb =JSON.stringify(jsonData[i])
|
// var bb =JSON.stringify(jsonData[i])
|
||||||
|
|
@ -138,13 +142,13 @@
|
||||||
// alert(parse);
|
// alert(parse);
|
||||||
for (let item in parse) {
|
for (let item in parse) {
|
||||||
str += parse[item];
|
str += parse[item];
|
||||||
str+= "\t"
|
str+= "\t";
|
||||||
str += ',';
|
str += ',';
|
||||||
}
|
}
|
||||||
str += '\n';
|
str += '\n';
|
||||||
}
|
}
|
||||||
let uri = 'data:text/csv;charset=utf-8,\ufeff' + encodeURIComponent(str);
|
let uri = 'data:text/csv;charset=utf-8,\ufeff' + encodeURIComponent(str);
|
||||||
let link = document.createElement("a")
|
let link = document.createElement("a");
|
||||||
link.href = uri;
|
link.href = uri;
|
||||||
link.download = "order.csv";
|
link.download = "order.csv";
|
||||||
document.body.appendChild(link);
|
document.body.appendChild(link);
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,10 @@
|
||||||
<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-6-3]</p>
|
<p style="color: red">更新日志[2021-6-9]</p>
|
||||||
<p>1、首页添加注册按钮,用于首次部署gm初始化root账号</p>
|
<p>1、区服展示改为: 区服id-区服名称</p>
|
||||||
|
<p>2、gm管理添加渠道管理页签,可以添加删除渠道信息</p>
|
||||||
|
<p>2、订单页面管理,添加字段,解决导出报错问题</p>
|
||||||
</div>
|
</div>
|
||||||
<footer class="footer mt-20">
|
<footer class="footer mt-20">
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue