From 19020916f1bbc2715f6b748acdee39318cb89e9e Mon Sep 17 00:00:00 2001 From: duhui Date: Thu, 10 Jun 2021 11:27:48 +0800 Subject: [PATCH] =?UTF-8?q?gm=E9=9C=80=E6=B1=82,=20=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96,=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B8=A0=E9=81=93=E7=AE=A1=E7=90=86,=20=E5=8C=BA=E6=9C=8Did?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ChannelInfoController.java | 141 ++++++++++++++++ .../jmfy/controller/OrderInfoController.java | 154 ++++++++++++------ .../java/com/jmfy/dao/ChannelInfoDao.java | 42 +++++ .../com/jmfy/dao/impl/ChannelInfoDaoImpl.java | 49 ++++++ .../com/jmfy/dao/impl/PackageInfoDaoImpl.java | 5 +- src/main/java/com/jmfy/model/ChannelInfo.java | 40 +++++ src/main/java/com/jmfy/model/Corder.java | 57 +++++-- .../com/jmfy/model/GSPlayerManagerBean.java | 6 + .../java/com/jmfy/model/vo/PowersEnum.java | 3 + src/main/java/com/jmfy/utils/DateUtil.java | 6 + src/main/java/com/jmfy/utils/Fields.java | 17 ++ .../resources/templates/addGsAccount.html | 2 +- .../resources/templates/applyForSupport.html | 2 +- src/main/resources/templates/channelInfo.html | 140 ++++++++++++++++ src/main/resources/templates/chatInfo.html | 2 +- src/main/resources/templates/exporOrder.html | 20 +-- src/main/resources/templates/findFlow.html | 2 +- src/main/resources/templates/findOrder.html | 24 ++- src/main/resources/templates/gameTitle.html | 2 +- src/main/resources/templates/gameTitle2.html | 2 +- .../resources/templates/guildListManager.html | 2 +- src/main/resources/templates/index.html | 4 +- .../resources/templates/sendPersonalMail.html | 3 +- src/main/resources/templates/sendSysCmd.html | 2 +- src/main/resources/templates/sendSysMSG.html | 2 +- src/main/resources/templates/sendSysMail.html | 2 +- .../resources/templates/toAddCDKGoods.html | 3 +- .../resources/templates/userOrderInfo.html | 14 +- src/main/resources/templates/welcome.html | 6 +- 29 files changed, 641 insertions(+), 113 deletions(-) create mode 100644 src/main/java/com/jmfy/controller/ChannelInfoController.java create mode 100644 src/main/java/com/jmfy/dao/ChannelInfoDao.java create mode 100644 src/main/java/com/jmfy/dao/impl/ChannelInfoDaoImpl.java create mode 100644 src/main/java/com/jmfy/model/ChannelInfo.java create mode 100644 src/main/java/com/jmfy/utils/Fields.java create mode 100644 src/main/resources/templates/channelInfo.html diff --git a/src/main/java/com/jmfy/controller/ChannelInfoController.java b/src/main/java/com/jmfy/controller/ChannelInfoController.java new file mode 100644 index 0000000..79efed7 --- /dev/null +++ b/src/main/java/com/jmfy/controller/ChannelInfoController.java @@ -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 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 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 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; + } + +} diff --git a/src/main/java/com/jmfy/controller/OrderInfoController.java b/src/main/java/com/jmfy/controller/OrderInfoController.java index f2d723a..18e0cd1 100644 --- a/src/main/java/com/jmfy/controller/OrderInfoController.java +++ b/src/main/java/com/jmfy/controller/OrderInfoController.java @@ -2,16 +2,11 @@ package com.jmfy.controller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.jmfy.dao.GSUserDao; -import com.jmfy.dao.MailDao; -import com.jmfy.dao.ServerInfoDao; -import com.jmfy.dao.UserInfoDao; +import com.jmfy.dao.*; import com.jmfy.model.*; import com.jmfy.redisProperties.RedisUserKey; -import com.jmfy.utils.FileCacheUtils; -import com.jmfy.utils.JsonUtil; -import com.jmfy.utils.RedisUtil; +import com.jmfy.utils.*; import config.SRechargeCommodityConfig; import org.apache.poi.hssf.usermodel.*; import org.slf4j.Logger; @@ -38,30 +33,31 @@ import java.util.*; /** * Created by huangds on 2017/10/24. */ +@SuppressWarnings("ALL") @Controller public class OrderInfoController { @Resource private UserInfoDao userInfoDao; - + @Resource + private GSUserDao gsUserDao; + @Resource + private ChannelInfoDao channelInfoDao; @Resource private ServerInfoDao serverInfoDao; private static final Logger LOGGER = LoggerFactory.getLogger(OrderInfoController.class); @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 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 serverId1 = parameterMap.get("serverId"); + int serverId1 = Integer.valueOf(parameterMap.get("serverId")); String userId = parameterMap.get("userId"); - String gameId = parameterMap.get("gameId"); String startData = JsonUtil.timeStamp2Date(String.valueOf(startTime)); List days = JsonUtil.getDays(startData,JsonUtil.timeStamp2Date(String.valueOf(endTime))); - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - Map rechargeMap = FileCacheUtils.rechargeMap; Map itemMap = FileCacheUtils.itemNameMap; List cgPayOrders = new ArrayList<>(); @@ -77,9 +73,7 @@ public class OrderInfoController { CGPayOrder cgPayOrder = entry.getValue(); String accountid = cgPayOrder.getUserId(); int serverId = cgPayOrder.getServerId(); - - if(Integer.valueOf(serverId1)!=0&&!String.valueOf(serverId).equals(serverId1)) - { + if(serverId1 != 0 && serverId1 != serverId) { continue; } if (userInfo!=null &&!accountid.equals(userInfo.getId())){ @@ -100,7 +94,7 @@ public class OrderInfoController { corder.setAccountid(accountid); corder.setOrderNo(cgPayOrder.getOrderId()); String payTime = cgPayOrder.getDelivery_time(); - corder.setPayTime(payTime);//simpleDateFormat.format(Long.parseLong(payTime)) + corder.setPayTime(payTime); corder.setProductid(cgPayOrder.getGoodsId()); corder.setServerId(String.valueOf(serverId)); @@ -131,6 +125,18 @@ public class OrderInfoController { corder.setProductContent(builder.toString()); } 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); } } @@ -147,7 +153,6 @@ public class OrderInfoController { String userId = parameterMap.get("userId"); String startData = JsonUtil.timeStamp2Date(String.valueOf(startTime)); List days = JsonUtil.getDays(startData,JsonUtil.timeStamp2Date(String.valueOf(endTime))); - // SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Map rechargeMap = FileCacheUtils.rechargeMap; Map itemMap = FileCacheUtils.itemNameMap; List cgPayOrders = new ArrayList<>(); @@ -163,8 +168,6 @@ public class OrderInfoController { CGPayOrder cgPayOrder = entry.getValue(); String accountid = cgPayOrder.getUserId(); int serverId = cgPayOrder.getServerId(); - // GSUser gsUser = gsUserDao.findUserInfo(serverId, Integer.parseInt(cgPayOrder.getUserId())); - if (userInfo!=null &&!accountid.equals(userInfo.getId())){ continue; } @@ -183,9 +186,6 @@ public class OrderInfoController { corder.setPayTime(payTime); corder.setProductid(cgPayOrder.getGoodsId()); 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; int goodsId; @@ -213,13 +213,27 @@ public class OrderInfoController { } } 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.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); } } - + if (cgPayOrders == null || cgPayOrders.isEmpty()){ + throw new Exception("There is no order information in this period."); + } HttpSession session = request.getSession(); session.setAttribute("state", null); @@ -231,42 +245,83 @@ public class OrderInfoController { { // 进行转码,使其支持中文文件名 codedFileName = java.net.URLEncoder.encode("中文", "UTF-8"); - // response.setHeader("content-disposition", "attachment;filename=" + codedFileName + ".xls"); response.addHeader("Content-Disposition", "attachment; filename=" + codedFileName + ".xls"); // 产生工作簿对象 HSSFWorkbook workbook = new HSSFWorkbook(); + HSSFCellStyle contextstyle = workbook.createCellStyle(); //产生工作表对象 HSSFSheet sheet = workbook.createSheet(); int rowIndex = 1,cellIndex = 0; - Field[] field = cgPayOrders.get(0).getClass().getDeclaredFields(); //获取实体类的所有属性,返回Field数组 - HSSFRow headerRow = sheet.createRow(0);//创建一行 + //获取实体类的所有属性,返回Field数组 + Field[] field = cgPayOrders.get(0).getClass().getDeclaredFields(); + //创建一行 + HSSFRow headerRow = sheet.createRow(0); while (cellIndex= 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++; } rowIndex++; @@ -274,10 +329,8 @@ public class OrderInfoController { fOut = response.getOutputStream(); workbook.write(fOut); } - catch (UnsupportedEncodingException e1) - {} - catch (Exception e) - {} + catch (UnsupportedEncodingException e1) {} + catch (Exception e) {} finally { try @@ -285,8 +338,7 @@ public class OrderInfoController { fOut.flush(); fOut.close(); } - catch (IOException e) - {} + catch (IOException e) {} session.setAttribute("state", "open"); } System.out.println("文件生成..."); diff --git a/src/main/java/com/jmfy/dao/ChannelInfoDao.java b/src/main/java/com/jmfy/dao/ChannelInfoDao.java new file mode 100644 index 0000000..11dba14 --- /dev/null +++ b/src/main/java/com/jmfy/dao/ChannelInfoDao.java @@ -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 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; + +} diff --git a/src/main/java/com/jmfy/dao/impl/ChannelInfoDaoImpl.java b/src/main/java/com/jmfy/dao/impl/ChannelInfoDaoImpl.java new file mode 100644 index 0000000..793fe11 --- /dev/null +++ b/src/main/java/com/jmfy/dao/impl/ChannelInfoDaoImpl.java @@ -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 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); + } +} diff --git a/src/main/java/com/jmfy/dao/impl/PackageInfoDaoImpl.java b/src/main/java/com/jmfy/dao/impl/PackageInfoDaoImpl.java index 78b5883..ea56696 100644 --- a/src/main/java/com/jmfy/dao/impl/PackageInfoDaoImpl.java +++ b/src/main/java/com/jmfy/dao/impl/PackageInfoDaoImpl.java @@ -1,11 +1,12 @@ -package com.jmfy.dao.impl;/* +package com.jmfy.dao.impl; + +/** * @Author hj * @Description //TODO $ * @Date $ $ * @Param $ * @return $ **/ - import com.jmfy.dao.PackageInfoDao; import com.jmfy.model.Constant; import com.jmfy.model.PackageInfo; diff --git a/src/main/java/com/jmfy/model/ChannelInfo.java b/src/main/java/com/jmfy/model/ChannelInfo.java new file mode 100644 index 0000000..d188479 --- /dev/null +++ b/src/main/java/com/jmfy/model/ChannelInfo.java @@ -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; + } +} diff --git a/src/main/java/com/jmfy/model/Corder.java b/src/main/java/com/jmfy/model/Corder.java index 33cc802..d485522 100644 --- a/src/main/java/com/jmfy/model/Corder.java +++ b/src/main/java/com/jmfy/model/Corder.java @@ -1,30 +1,37 @@ package com.jmfy.model; +import com.jmfy.utils.Fields; + public class Corder { - private String orderNo; //平台订单好 - - private String accountid; //玩家id - - private String payTime; //支付时间 - - private String productid; //礼包id - - private String recharge_type ; // qucik--quick uc-- 九游 sujie--速接 - - private String amount ; //充值金额 - + @Fields("平台订单号") + private String orderNo; + @Fields("玩家id") + private String accountid; + @Fields("支付时间") + private String payTime; + @Fields("礼包id") + private String productid; + @Fields("支付方式") + private String recharge_type; + @Fields("充值金额") + private String amount; + @Fields("区服id") private String serverId; - + @Fields("角色注册时间") private String registerTime; - + @Fields("礼包名称") private String productName; - + @Fields("礼包内容") private String productContent; - + @Fields("货币类型") private String currency_code; - + @Fields("货币数量") private String currency_price; + @Fields("渠道名称") + private String cc_id; + @Fields("账号id") + private String openId; public String getAccountid() { return accountid; @@ -121,4 +128,20 @@ public class Corder { public void setCurrency_price(String 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; + } } diff --git a/src/main/java/com/jmfy/model/GSPlayerManagerBean.java b/src/main/java/com/jmfy/model/GSPlayerManagerBean.java index 186ca87..b762cbf 100644 --- a/src/main/java/com/jmfy/model/GSPlayerManagerBean.java +++ b/src/main/java/com/jmfy/model/GSPlayerManagerBean.java @@ -87,6 +87,8 @@ public class GSPlayerManagerBean { private String channel; + private String cc_id; + private int silence;//是否被禁言0为可发言,1为不可发言 @@ -124,6 +126,10 @@ public class GSPlayerManagerBean { this.nickName = nickName; } + public String getCc_id() { + return cc_id; + } + public int getSex() { return sex; } diff --git a/src/main/java/com/jmfy/model/vo/PowersEnum.java b/src/main/java/com/jmfy/model/vo/PowersEnum.java index b180ecb..edbe884 100644 --- a/src/main/java/com/jmfy/model/vo/PowersEnum.java +++ b/src/main/java/com/jmfy/model/vo/PowersEnum.java @@ -41,6 +41,9 @@ public enum PowersEnum { DELETE_PACKAGE_NAME(412,"权限: 删除频道",400), GUILD_LIST_MANAGER(413,"公会列表管理",400), GUILD_OPERATE_PERMISSIONS(414,"权限: 操作公会",400), + CHANNEL_NAME_MANAGER(415,"渠道管理",400), + ADD_CHANNEL_PERMISSIONS(416,"权限: 添加渠道",400), + DELETE_CHANNEL_PERMISSIONS(417,"权限: 删除渠道",400), // 流水日志管理500-599 BILL_LOG(500,"流水日志管理",500), diff --git a/src/main/java/com/jmfy/utils/DateUtil.java b/src/main/java/com/jmfy/utils/DateUtil.java index 2498752..5bb757e 100644 --- a/src/main/java/com/jmfy/utils/DateUtil.java +++ b/src/main/java/com/jmfy/utils/DateUtil.java @@ -43,6 +43,12 @@ public class DateUtil { 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 diff --git a/src/main/java/com/jmfy/utils/Fields.java b/src/main/java/com/jmfy/utils/Fields.java new file mode 100644 index 0000000..b7def42 --- /dev/null +++ b/src/main/java/com/jmfy/utils/Fields.java @@ -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() ; +} diff --git a/src/main/resources/templates/addGsAccount.html b/src/main/resources/templates/addGsAccount.html index ec5ac86..cd5922b 100644 --- a/src/main/resources/templates/addGsAccount.html +++ b/src/main/resources/templates/addGsAccount.html @@ -47,7 +47,7 @@
diff --git a/src/main/resources/templates/applyForSupport.html b/src/main/resources/templates/applyForSupport.html index 27387cf..1abe404 100644 --- a/src/main/resources/templates/applyForSupport.html +++ b/src/main/resources/templates/applyForSupport.html @@ -51,7 +51,7 @@
diff --git a/src/main/resources/templates/channelInfo.html b/src/main/resources/templates/channelInfo.html new file mode 100644 index 0000000..376454e --- /dev/null +++ b/src/main/resources/templates/channelInfo.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + 渠道管理 + + + +
+

渠道管理

+
+ + +
+
+
+ + + + + + + + + + + + + + + + +
ID名称操作
+ +
+
+
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/chatInfo.html b/src/main/resources/templates/chatInfo.html index e4fa43f..f678bfa 100644 --- a/src/main/resources/templates/chatInfo.html +++ b/src/main/resources/templates/chatInfo.html @@ -31,7 +31,7 @@
服务器id:
diff --git a/src/main/resources/templates/exporOrder.html b/src/main/resources/templates/exporOrder.html index 30c1000..375dc68 100644 --- a/src/main/resources/templates/exporOrder.html +++ b/src/main/resources/templates/exporOrder.html @@ -76,16 +76,16 @@ -
- -
- -
-
+ + + + + + + + + +
diff --git a/src/main/resources/templates/findFlow.html b/src/main/resources/templates/findFlow.html index 52e5410..781eafc 100644 --- a/src/main/resources/templates/findFlow.html +++ b/src/main/resources/templates/findFlow.html @@ -65,7 +65,7 @@ 区服id:
diff --git a/src/main/resources/templates/findOrder.html b/src/main/resources/templates/findOrder.html index ea20bb2..6994532 100644 --- a/src/main/resources/templates/findOrder.html +++ b/src/main/resources/templates/findOrder.html @@ -65,7 +65,7 @@ 区服id:
@@ -78,16 +78,16 @@ -
- -
- -
-
+ + + + + + + + + +
@@ -124,8 +124,6 @@ function findFlow() { var erroCode = $('.SERVERID'); var serverId = $("#serverId").val(); - var gameId = $("#gameId").val(); - var userId = $("input[name='userId']").val(); var startTime = $("input[name='startTime']").val(); var endTime = $("input[name='endTime']").val(); if (serverId === '' || serverId == null) { diff --git a/src/main/resources/templates/gameTitle.html b/src/main/resources/templates/gameTitle.html index 65d50fb..00c4f2a 100644 --- a/src/main/resources/templates/gameTitle.html +++ b/src/main/resources/templates/gameTitle.html @@ -47,7 +47,7 @@ 区服id:
diff --git a/src/main/resources/templates/gameTitle2.html b/src/main/resources/templates/gameTitle2.html index 49edd7f..1f5485c 100644 --- a/src/main/resources/templates/gameTitle2.html +++ b/src/main/resources/templates/gameTitle2.html @@ -48,7 +48,7 @@ 区服id:
diff --git a/src/main/resources/templates/guildListManager.html b/src/main/resources/templates/guildListManager.html index ed92240..ad2a70a 100644 --- a/src/main/resources/templates/guildListManager.html +++ b/src/main/resources/templates/guildListManager.html @@ -45,7 +45,7 @@ data-width="300px" data-actions-box="true"> + th:text="${server.server_id}+'-'+${server.name}"> diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 234469a..8345432 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -133,7 +133,9 @@
  • 频道管理
  • 公会列表管理
  • + href="javascript:;">公会列表管理 +
  • 渠道管理
  • diff --git a/src/main/resources/templates/sendPersonalMail.html b/src/main/resources/templates/sendPersonalMail.html index c2b6487..9d376ed 100644 --- a/src/main/resources/templates/sendPersonalMail.html +++ b/src/main/resources/templates/sendPersonalMail.html @@ -48,7 +48,8 @@ 区服id:
    diff --git a/src/main/resources/templates/sendSysCmd.html b/src/main/resources/templates/sendSysCmd.html index 7a45487..e71688a 100644 --- a/src/main/resources/templates/sendSysCmd.html +++ b/src/main/resources/templates/sendSysCmd.html @@ -50,7 +50,7 @@ data-width="300px" data-actions-box="true"> + th:text="${server.server_id}+'-'+${server.name}"> diff --git a/src/main/resources/templates/sendSysMSG.html b/src/main/resources/templates/sendSysMSG.html index c1bb946..d3a7977 100644 --- a/src/main/resources/templates/sendSysMSG.html +++ b/src/main/resources/templates/sendSysMSG.html @@ -45,7 +45,7 @@
    diff --git a/src/main/resources/templates/sendSysMail.html b/src/main/resources/templates/sendSysMail.html index fa8be82..81217fa 100644 --- a/src/main/resources/templates/sendSysMail.html +++ b/src/main/resources/templates/sendSysMail.html @@ -60,7 +60,7 @@ data-actions-box="true"> + th:text="${server.server_id}+'-'+${server.name}"> diff --git a/src/main/resources/templates/toAddCDKGoods.html b/src/main/resources/templates/toAddCDKGoods.html index 340de2b..2092f78 100644 --- a/src/main/resources/templates/toAddCDKGoods.html +++ b/src/main/resources/templates/toAddCDKGoods.html @@ -68,7 +68,8 @@
    diff --git a/src/main/resources/templates/userOrderInfo.html b/src/main/resources/templates/userOrderInfo.html index cc2113b..8b422c2 100644 --- a/src/main/resources/templates/userOrderInfo.html +++ b/src/main/resources/templates/userOrderInfo.html @@ -53,8 +53,9 @@ 货币类型 货币数量 支付方式 - - + CC值 + 注册时间 + 账号id @@ -71,6 +72,9 @@ + + + @@ -129,7 +133,7 @@ // var bb =JSON.stringify(jsonData); //将JSON对象转化为JSON字符 // alert(bb); // 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++) { var parse = jsonData[i]; // var bb =JSON.stringify(jsonData[i]) @@ -138,13 +142,13 @@ // alert(parse); for (let item in parse) { str += parse[item]; - str+= "\t" + str+= "\t"; str += ','; } str += '\n'; } 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.download = "order.csv"; document.body.appendChild(link); diff --git a/src/main/resources/templates/welcome.html b/src/main/resources/templates/welcome.html index f6af07a..0657b45 100644 --- a/src/main/resources/templates/welcome.html +++ b/src/main/resources/templates/welcome.html @@ -26,8 +26,10 @@

    戒灵后台管理台

    -

    更新日志[2021-6-3]

    -

    1、首页添加注册按钮,用于首次部署gm初始化root账号

    +

    更新日志[2021-6-9]

    +

    1、区服展示改为: 区服id-区服名称

    +

    2、gm管理添加渠道管理页签,可以添加删除渠道信息

    +

    2、订单页面管理,添加字段,解决导出报错问题