generated from root/miduo_server
更新物品 更新订单修复
parent
511336fdc0
commit
6e241a563b
|
|
@ -73,6 +73,7 @@
|
|||
1003 乾坤令
|
||||
1004 定卦神锄
|
||||
1005 碧海卷
|
||||
1006 福星高照
|
||||
1201 上古钱币
|
||||
1508 绿色装备
|
||||
1509 蓝色装备
|
||||
|
|
@ -123,14 +124,14 @@
|
|||
1561 商人的货物
|
||||
1562 深渊之骨
|
||||
10001 伏羲
|
||||
10002 洛神
|
||||
10002 白素贞
|
||||
10003 猪八戒
|
||||
10004 慈航道人
|
||||
10005 妲己
|
||||
10006 共工
|
||||
10006 牛魔王
|
||||
10007 唐僧
|
||||
10008 精卫
|
||||
10009 龙吉公主
|
||||
10009 女儿国王
|
||||
10010 孔雀明王
|
||||
10011 雷震子
|
||||
10012 降龙罗汉
|
||||
|
|
@ -140,7 +141,7 @@
|
|||
10016 蚩尤
|
||||
10017 嫦娥
|
||||
10018 九命猫
|
||||
10019 巨灵神
|
||||
10019 钟馗
|
||||
10020 姑获鸟
|
||||
10021 东陵圣母
|
||||
10022 达摩
|
||||
|
|
@ -152,9 +153,9 @@
|
|||
10028 石矶娘娘
|
||||
10029 月光菩萨
|
||||
10030 梵天
|
||||
10031 红孩儿
|
||||
10031 彼岸花
|
||||
10032 吴刚
|
||||
10033 净光天女
|
||||
10033 菩提树神
|
||||
10034 帝释天
|
||||
10035 妈祖
|
||||
10036 赵公明
|
||||
|
|
@ -163,11 +164,11 @@
|
|||
10039 普贤菩萨
|
||||
10040 杨戬
|
||||
10041 通天教主
|
||||
10042 九天玄女
|
||||
10042 将臣
|
||||
10043 太阴星君
|
||||
10044 混世魔王
|
||||
10045 百花仙子
|
||||
10046 女英
|
||||
10046 花木兰
|
||||
10047 赤尾妖
|
||||
10048 雪女
|
||||
10049 娜迦
|
||||
|
|
@ -201,7 +202,7 @@
|
|||
10081 小雏妖
|
||||
10082 小道灵
|
||||
10085 敖丙
|
||||
10086 金翅大鹏
|
||||
10086 不动明王
|
||||
10087 娥皇
|
||||
10088 申公豹
|
||||
10089 燃灯
|
||||
|
|
@ -235,7 +236,7 @@
|
|||
11071 九河神女碎片
|
||||
11072 灵扇仙碎片
|
||||
11001 伏羲碎片
|
||||
11009 龙吉公主碎片
|
||||
11009 女儿国王碎片
|
||||
11014 哪吒碎片
|
||||
11040 杨戬碎片
|
||||
11004 慈航道人碎片
|
||||
|
|
@ -246,16 +247,16 @@
|
|||
11032 吴刚碎片
|
||||
11035 妈祖碎片
|
||||
11036 赵公明碎片
|
||||
11046 女英碎片
|
||||
11046 花木兰碎片
|
||||
11022 达摩碎片
|
||||
11023 孙悟空碎片
|
||||
11074 金翅大鹏碎片
|
||||
11074 不动明王碎片
|
||||
11077 燃灯碎片
|
||||
11007 唐僧碎片
|
||||
11010 孔雀明王碎片
|
||||
11012 降龙罗汉碎片
|
||||
11015 伏虎罗汉碎片
|
||||
11033 净光天女碎片
|
||||
11033 菩提树神碎片
|
||||
11039 普贤菩萨碎片
|
||||
11029 月光菩萨碎片
|
||||
11030 梵天碎片
|
||||
|
|
@ -263,16 +264,16 @@
|
|||
11091 白骨精碎片
|
||||
11092 观音菩萨碎片
|
||||
11073 敖丙碎片
|
||||
11006 共工碎片
|
||||
11006 牛魔王碎片
|
||||
11008 精卫碎片
|
||||
11011 雷震子碎片
|
||||
11018 九命猫碎片
|
||||
11002 洛神碎片
|
||||
11002 白素贞碎片
|
||||
11003 猪八戒碎片
|
||||
11005 妲己碎片
|
||||
11020 姑获鸟碎片
|
||||
11028 石矶娘娘碎片
|
||||
11031 红孩儿碎片
|
||||
11031 彼岸花碎片
|
||||
11044 混世魔王碎片
|
||||
11045 百花仙子碎片
|
||||
11076 申公豹碎片
|
||||
|
|
@ -280,8 +281,8 @@
|
|||
11041 通天教主碎片
|
||||
11026 东华帝君碎片
|
||||
11024 姜子牙碎片
|
||||
11019 巨灵神碎片
|
||||
11042 九天玄女碎片
|
||||
11019 钟馗碎片
|
||||
11042 将臣碎片
|
||||
11043 太阴星君碎片
|
||||
11013 吕洞宾碎片
|
||||
11025 道德天尊碎片
|
||||
|
|
@ -400,14 +401,14 @@
|
|||
70999 默认头像
|
||||
71000 默认头像
|
||||
71001 伏羲
|
||||
71002 洛神
|
||||
71002 白素贞
|
||||
71003 猪八戒
|
||||
71004 慈航道人
|
||||
71005 妲己
|
||||
71006 共工
|
||||
71006 牛魔王
|
||||
71007 唐僧
|
||||
71008 精卫
|
||||
71009 龙吉公主
|
||||
71009 女儿国王
|
||||
71010 孔雀明王
|
||||
71011 雷震子
|
||||
71012 降龙罗汉
|
||||
|
|
@ -417,7 +418,7 @@
|
|||
71016 蚩尤
|
||||
71017 嫦娥
|
||||
71018 九命猫
|
||||
71019 巨灵神
|
||||
71019 钟馗
|
||||
71020 姑获鸟
|
||||
71021 东陵圣母
|
||||
71022 达摩
|
||||
|
|
@ -429,9 +430,9 @@
|
|||
71028 石矶娘娘
|
||||
71029 月光菩萨
|
||||
71030 梵天
|
||||
71031 红孩儿
|
||||
71031 彼岸花
|
||||
71032 吴刚
|
||||
71033 净光天女
|
||||
71033 菩提树神
|
||||
71034 帝释天
|
||||
71035 妈祖
|
||||
71036 赵公明
|
||||
|
|
@ -440,11 +441,11 @@
|
|||
71039 普贤菩萨
|
||||
71040 杨戬
|
||||
71041 通天教主
|
||||
71042 九天玄女
|
||||
71042 将臣
|
||||
71043 太阴星君
|
||||
71044 混世魔王
|
||||
71045 百花仙子
|
||||
71046 女英
|
||||
71046 花木兰
|
||||
71047 赤尾妖
|
||||
71048 雪女
|
||||
71049 娜迦
|
||||
|
|
@ -484,7 +485,7 @@
|
|||
71083 小光
|
||||
71084 小暗
|
||||
71085 敖丙
|
||||
71086 金翅大鹏
|
||||
71086 不动明王
|
||||
71087 娥皇
|
||||
71088 申公豹
|
||||
71089 燃灯
|
||||
|
|
@ -498,14 +499,14 @@
|
|||
73033 瑞气春来
|
||||
90001 风雷翅
|
||||
90002 镇海石
|
||||
90003 洛神赋
|
||||
90004 断玉钩
|
||||
90003 雄黄宝剑
|
||||
90004 混铁棍
|
||||
90005 貔貅铃
|
||||
90006 九齿钉耙
|
||||
90007 倾世元禳
|
||||
90008 彩羽衣
|
||||
90009 混世魔刀
|
||||
90010 火尖枪
|
||||
90010 唤灵蝶
|
||||
90011 八卦云光帕
|
||||
90012 百花篮
|
||||
90013 万龙甲
|
||||
|
|
@ -514,23 +515,23 @@
|
|||
90016 锦襕袈裟
|
||||
90017 孔雀翎
|
||||
90018 灵柩灯
|
||||
90019 清泉瓶
|
||||
90019 菩提叶
|
||||
90020 伏虎钵
|
||||
90021 降龙杖
|
||||
90022 三钴杵
|
||||
90023 六牙白象
|
||||
90024 半月莲华
|
||||
90025 吠陀经
|
||||
90026 失心钵
|
||||
90026 降魔杵
|
||||
90027 八卦炉
|
||||
90028 风火轮
|
||||
90029 道德真经
|
||||
90030 九黎壶
|
||||
90031 雾露乾坤网
|
||||
90031 西凉皇威
|
||||
90032 青鸟使
|
||||
90033 月兔
|
||||
90034 定火符
|
||||
90035 湘竹笛
|
||||
90035 玄钢槊
|
||||
90036 伐桂斧
|
||||
90037 妈祖铜符
|
||||
90038 定海珠
|
||||
|
|
@ -538,8 +539,8 @@
|
|||
90040 雷公鞭
|
||||
90041 琉璃戒
|
||||
90042 打神鞭
|
||||
90043 巨灵盾
|
||||
90044 五行阵
|
||||
90043 斩鬼令
|
||||
90044 夺魄石
|
||||
90045 太阴杖
|
||||
90046 纯阳剑
|
||||
90047 诛仙四剑
|
||||
|
|
@ -594,30 +595,30 @@
|
|||
5000002 申公豹魂印
|
||||
5000003 普贤菩萨魂印
|
||||
5000004 达摩魂印
|
||||
5000005 红孩儿魂印
|
||||
5000005 彼岸花魂印
|
||||
5000006 混世魔王魂印
|
||||
5000007 吴刚魂印
|
||||
5000008 金翅大鹏魂印
|
||||
5000008 铜皮铁骨魂印
|
||||
5000009 妲己魂印
|
||||
5000010 猪八戒魂印
|
||||
5000011 伏羲魂印
|
||||
5000012 精卫魂印
|
||||
5000013 百花仙子魂印
|
||||
5000014 唐僧魂印
|
||||
5000015 九天玄女魂印
|
||||
5000015 将臣魂印
|
||||
5000016 孙悟空魂印
|
||||
5000017 降龙罗汉魂印
|
||||
5000018 孔雀明王魂印
|
||||
5000019 燃灯魂印
|
||||
5000020 月光菩萨魂印
|
||||
5000021 龙吉公主魂印
|
||||
5000021 女儿国王魂印
|
||||
5000022 九命猫魂印
|
||||
5000023 蚩尤魂印
|
||||
5000024 妈祖魂印
|
||||
5000025 娥皇魂印
|
||||
5000026 冥毒邪宴魂印
|
||||
5000027 太阴星君魂印
|
||||
5000028 巨灵神魂印
|
||||
5000028 钟馗魂印
|
||||
5000029 通天教主魂印
|
||||
5000030 罗刹魂印
|
||||
5000031 夜叉魂印
|
||||
|
|
@ -650,7 +651,7 @@
|
|||
5000058 阴阳调和魂印
|
||||
5000059 气运在握魂印
|
||||
5000060 惑心乱神魂印
|
||||
5000061 妙法莲华魂印
|
||||
5000061 观音专属魂印
|
||||
81116 5星碎片宝箱
|
||||
81117 绿色宝物随机箱
|
||||
81118 蓝色宝物随机箱
|
||||
|
|
@ -765,6 +766,7 @@
|
|||
1223 钱
|
||||
1224 坤
|
||||
1225 鞭炮
|
||||
1300 牛气值
|
||||
9999 魂宝
|
||||
9998 灵宝
|
||||
81155 斗法冠军抽奖箱
|
||||
|
|
@ -791,4 +793,11 @@
|
|||
81176 斗法冠军抽奖箱
|
||||
81177 斗法亚军抽奖箱
|
||||
81178 斗法季军抽奖箱
|
||||
81179 皮肤自选箱
|
||||
81179 皮肤自选箱
|
||||
81180 精选神将自选箱
|
||||
80008 五色神牛
|
||||
80009 三界降魔冠军称号
|
||||
80010 三界降魔亚军称号
|
||||
80011 三界降魔季军称号
|
||||
80012 默认时装
|
||||
81181 1星红装自选箱
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.jmfy.controller;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.jmfy.dao.ServerInfoDao;
|
||||
import com.jmfy.dao.UserInfoDao;
|
||||
import com.jmfy.model.*;
|
||||
|
|
@ -23,6 +24,9 @@ import javax.annotation.Resource;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
|
|
@ -45,6 +49,10 @@ public class GmController {
|
|||
}
|
||||
|
||||
String content = request.getParameter("content");
|
||||
if(content.equals("fixOrder")){
|
||||
fixOrder();
|
||||
return 0;
|
||||
}
|
||||
String[] serverId = request.getParameterValues("serverId[]");
|
||||
String cmd = content;
|
||||
for (String s:serverId){
|
||||
|
|
@ -153,4 +161,177 @@ public class GmController {
|
|||
return "addHero";
|
||||
}
|
||||
|
||||
|
||||
public void fixOrder() {
|
||||
String filePath = "conf/delivery-server.log";
|
||||
Gson gson = new Gson();
|
||||
String s1 = "{\"orderId\":\"21032914511376426677449527296\",\"delivery_time\":\"2021-03-29 16:17:46\",\"serverId\":91001,\"userId\":\"10048062\"}";
|
||||
String s2 = "{\"orderId\":\"21032914511376426677449527296\",\"delivery_time\":\"2021-04-05 00:26:36\",\"serverId\":10154,\"userId\":\"10048062\",\"goodsId\":\"1\",\"amount\":\"600\"}";
|
||||
try {
|
||||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
BufferedReader in = new BufferedReader(new FileReader(filePath));
|
||||
String str;
|
||||
Map<String,CPayOrder> allOrder = new HashMap<>();
|
||||
while ((str = in.readLine()) != null) {
|
||||
if(str.contains("consumerid")&&str.contains("consumername")){
|
||||
System.out.println(str);
|
||||
String[] split1 = str.split("&");
|
||||
// String[] split = str.split("consumerid=")[1].split("&consumername");
|
||||
// if(!split[0].contains("_")){
|
||||
// continue;
|
||||
// }
|
||||
// System.out.println(split[0]+"---"+split[1]);
|
||||
// String[] s = split[0].split("_");
|
||||
|
||||
CPayOrder cPayOrder = new CPayOrder();
|
||||
String orderNo = "";
|
||||
for(String split:split1){
|
||||
if(split.contains("consumerid")){
|
||||
if(!split.contains("_")){
|
||||
break;
|
||||
}
|
||||
String[] s = split.split("=")[1].split("_");
|
||||
cPayOrder.setUserId(s[0]);
|
||||
cPayOrder.setGoodsId(s[1]);
|
||||
}
|
||||
if(split.contains("mhtOrderAmt")){
|
||||
cPayOrder.setAmount(split.split("=")[1]);
|
||||
}
|
||||
if(split.contains("orderNo")){
|
||||
orderNo = split.split("=")[1];
|
||||
cPayOrder.setOrderId(orderNo);
|
||||
}
|
||||
}
|
||||
Object o1 = redisUtil.get("C_PAYORDER:" + orderNo);
|
||||
if(o1==null){
|
||||
System.out.println(orderNo+"找不到");
|
||||
continue;
|
||||
}else{
|
||||
System.out.println(orderNo+"find");
|
||||
}
|
||||
String o = (String)o1;
|
||||
CPayOrder errorOrder = gson.fromJson(o, CPayOrder.class);
|
||||
cPayOrder.setServerId(errorOrder.getServerId());
|
||||
cPayOrder.setDelivery_time(errorOrder.getDelivery_time());
|
||||
if(cPayOrder.getUserId()!=null){
|
||||
allOrder.put(orderNo,cPayOrder);
|
||||
}
|
||||
String date = cPayOrder.getDelivery_time().substring(0, 10);
|
||||
redisUtil.putMapEntry("C_PAYORDER_MAP",date,orderNo,cPayOrder,-1);
|
||||
redisUtil.set("C_PAYORDER:" + orderNo,gson.toJson(cPayOrder));
|
||||
}
|
||||
}
|
||||
// System.out.println(str);/
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
static class CPayOrder {
|
||||
|
||||
private String orderId;//充值回调中的pOrderId
|
||||
|
||||
private String delivery_time;//发货时间
|
||||
|
||||
private int serverId;//
|
||||
|
||||
private String userId;//充值回调中的userId
|
||||
|
||||
private String roleId;
|
||||
|
||||
private String goodsId;
|
||||
|
||||
private String cpOrderId;//原厂订单号,通常为google或者ios充值才有,充值回调中的remark
|
||||
|
||||
private String recharge_type ; //
|
||||
|
||||
private String amount;// 充值回调中的amount,单位为分
|
||||
|
||||
|
||||
public String getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public String getDelivery_time() {
|
||||
return delivery_time;
|
||||
}
|
||||
|
||||
public int getServerId() {
|
||||
return serverId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public String getCpOrderId() {
|
||||
return cpOrderId;
|
||||
}
|
||||
|
||||
|
||||
public void setOrderId(String orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public void setDelivery_time(String delivery_time) {
|
||||
this.delivery_time = delivery_time;
|
||||
}
|
||||
|
||||
public void setServerId(int serverId) {
|
||||
this.serverId = serverId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public void setCpOrderId(String cpOrderId) {
|
||||
this.cpOrderId = cpOrderId;
|
||||
}
|
||||
|
||||
public String getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public String getRoleId() {
|
||||
return roleId;
|
||||
}
|
||||
|
||||
public void setRoleId(String roleId) {
|
||||
this.roleId = roleId;
|
||||
}
|
||||
|
||||
public String getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(String goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public String getRecharge_type() {
|
||||
return recharge_type;
|
||||
}
|
||||
|
||||
public void setRecharge_type(String recharge_type) {
|
||||
this.recharge_type = recharge_type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CPayOrder{" +
|
||||
"orderId='" + orderId + '\'' +
|
||||
", delivery_time='" + delivery_time + '\'' +
|
||||
", userId='" + userId + '\'' +
|
||||
", cpOrderId='" + cpOrderId + '\'' +
|
||||
", amount='" + amount + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,30 @@ public class RedisUtil {
|
|||
redisObjectTemplate = stringRedisTemplate;
|
||||
}
|
||||
|
||||
|
||||
public Object get(String key) {
|
||||
return key == null ? null : redisObjectTemplate.opsForValue().get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通缓存放入
|
||||
*
|
||||
* @param key
|
||||
* 键
|
||||
* @param value
|
||||
* 值
|
||||
* @return true成功 false失败
|
||||
*/
|
||||
public boolean set(String key, String value) {
|
||||
try {
|
||||
redisObjectTemplate.opsForValue().set(key, value);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 获取Object
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue