删除37上报
parent
eb425bc259
commit
d9a224add4
|
@ -173,7 +173,7 @@ public class ChatLogic {
|
|||
if(strs.length==3){
|
||||
s = strs[2];
|
||||
}
|
||||
result = ShieldedWordUtils.checkName(user,s,false,ChatContentType.WORLD_CHAT);
|
||||
result = ShieldedWordUtils.checkName(user,s,false, ChatContentType.WORLD_CHAT);
|
||||
break;
|
||||
case 2:
|
||||
result = ShieldedWordUtils.checkName(user,message,false,ChatContentType.FAMILY);
|
||||
|
|
|
@ -4,9 +4,6 @@ import com.google.gson.Gson;
|
|||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.GameLogicService;
|
||||
import com.ljsd.common.mogodb.util.BlockingUniqueQueue;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.Report37Param;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.Report37RoleLeveBean;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.Report37TaskBean;
|
||||
import com.ljsd.jieling.ktbeans.KTParam;
|
||||
import com.ljsd.jieling.ktbeans.KTSendBody;
|
||||
import com.ljsd.jieling.util.http.HttpPool;
|
||||
|
@ -26,94 +23,12 @@ import java.util.regex.Pattern;
|
|||
|
||||
public class DataMessageUtils {
|
||||
|
||||
static final BlockingQueue<Object> logQueue = new BlockingUniqueQueue<>();
|
||||
|
||||
static final BlockingQueue<Object> logQueue_37 = new BlockingUniqueQueue<>(); //37任务、等级数据上报
|
||||
|
||||
private static Gson gson = new Gson();
|
||||
private static final String sendUrl = "https://gskuld.receiver.extranet.kt007.com:8081/skuld/game/common/";
|
||||
private static final Map<Long,String> sendTaskUrl37Map = new HashMap<>();
|
||||
private static final String sendTaskUrl37 = "http://pvt.api.m.37.com/hd/postTaskInfo/" ;
|
||||
private static final Map<Long,String> sendRoleUrl37Map = new HashMap<>();
|
||||
private static final String sendRoleUrl37 = "http://pvt.api.m.37.com/report/roleChangeReport/";
|
||||
|
||||
private static final String sendChatContent37 = "http://cm3.api.37.com.cn/Content/_checkContent/";
|
||||
|
||||
private static final String sendToTapDBURL = "https://e.tapdb.net/event";
|
||||
|
||||
private static final String sendOnlineURL = "https://se.tapdb.net/tapdb/online";
|
||||
//入队列
|
||||
public static void addLogQueue(Object info) {
|
||||
if(!GameLogicService.isServiceShutdown()){
|
||||
if (info instanceof KTParam) {
|
||||
logQueue.offer(info);
|
||||
} else if (info instanceof Report37Param && GameApplication.serverProperties.isSendlog37()) {
|
||||
logQueue_37.offer(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void manageData() {
|
||||
try {
|
||||
List<Object> sendDataList = new ArrayList<>(10);
|
||||
logQueue.drainTo(sendDataList, 10);
|
||||
|
||||
List<Object> sendData37List = new ArrayList<>(10);
|
||||
logQueue_37.drainTo(sendData37List, 10);
|
||||
|
||||
if (!sendDataList.isEmpty()) {
|
||||
KTSendBody sendBody = new KTSendBody(sendDataList);
|
||||
HttpPool.sendPost(sendUrl, gson.toJson(sendBody),"application/json");
|
||||
}
|
||||
|
||||
if (!sendData37List.isEmpty() && GameApplication.serverProperties.isSendlog37()) {
|
||||
for (Object object : sendData37List) {
|
||||
String sendToUrl;
|
||||
List<BasicNameValuePair> sendForm = new ArrayList<>();
|
||||
if (object instanceof Report37TaskBean) {
|
||||
long key =(long)((Report37TaskBean) object).getGid()*10000+((Report37TaskBean) object).getPid();
|
||||
sendToUrl = sendTaskUrl37Map.get((long)((Report37TaskBean) object).getGid()*10000+((Report37TaskBean) object).getPid());
|
||||
if(sendToUrl==null){
|
||||
sendToUrl = sendTaskUrl37 + ((Report37TaskBean) object).getPid() + "/" + ((Report37TaskBean) object).getGid();
|
||||
sendTaskUrl37Map.put(key,sendToUrl);
|
||||
}
|
||||
sendForm = ((Report37TaskBean) object).getPairList();
|
||||
} else if (object instanceof Report37RoleLeveBean) {
|
||||
long key =(long)((Report37RoleLeveBean) object).getGid()*10000+((Report37RoleLeveBean) object).getPid();
|
||||
sendToUrl = sendRoleUrl37Map.get((long)((Report37RoleLeveBean) object).getGid()*10000+((Report37RoleLeveBean) object).getPid());
|
||||
if(sendToUrl==null){
|
||||
sendToUrl = sendRoleUrl37 + ((Report37RoleLeveBean) object).getPid() + "/" + ((Report37RoleLeveBean) object).getGid();
|
||||
sendRoleUrl37Map.put(key,sendToUrl);
|
||||
}
|
||||
sendToUrl = sendRoleUrl37;
|
||||
sendForm = ((Report37RoleLeveBean) object).getPairList();
|
||||
} else {
|
||||
sendToUrl = "";
|
||||
}
|
||||
try {
|
||||
if(!StringUtil.isEmpty(sendToUrl)){
|
||||
HttpPool.sendPostForm(sendToUrl, new UrlEncodedFormEntity(sendForm, "utf-8"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sendDataList.isEmpty() && sendData37List.isEmpty()) {
|
||||
try {
|
||||
Thread.sleep(10);
|
||||
return;
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
public static String sendRechargePost(Object info){
|
||||
String str = gson.toJson(info);
|
||||
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
package com.ljsd.jieling.dataReport.reportBeans_37;
|
||||
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.config.json.SDK37Constans;
|
||||
|
||||
public abstract class Report37Bean implements Report37Param{
|
||||
|
||||
private int pid;
|
||||
private int gid;
|
||||
private int event_time;
|
||||
private String zone_id;
|
||||
private String zone_name;
|
||||
|
||||
public Report37Bean() {
|
||||
this.pid = 0;
|
||||
this.gid = 0;
|
||||
this.event_time = (int)(System.currentTimeMillis()/1000);
|
||||
this.zone_id = String.valueOf(GameApplication.serverId);
|
||||
this.zone_name = String.valueOf(GameApplication.serverId);
|
||||
}
|
||||
|
||||
public int getEvent_time() {
|
||||
return event_time;
|
||||
}
|
||||
|
||||
public String getZone_id() {
|
||||
return zone_id;
|
||||
}
|
||||
|
||||
public String getZone_name() {
|
||||
return zone_name;
|
||||
}
|
||||
|
||||
public void setEvent_time(int event_time) {
|
||||
this.event_time = event_time;
|
||||
}
|
||||
|
||||
public int getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(int pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public int getGid() {
|
||||
return gid;
|
||||
}
|
||||
|
||||
public void setGid(int gid) {
|
||||
this.gid = gid;
|
||||
}
|
||||
}
|
|
@ -1,290 +0,0 @@
|
|||
package com.ljsd.jieling.dataReport.reportBeans_37;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.Gson;
|
||||
import com.ljsd.jieling.config.json.SDK37Constans;
|
||||
import com.ljsd.jieling.config.reportData.DataMessageUtils;
|
||||
import com.ljsd.jieling.util.MD5Util;
|
||||
import util.TimeUtils;
|
||||
import com.ljsd.jieling.util.http.HttpPool;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Report37CheckChat implements Report37Param{
|
||||
private int time;
|
||||
private String uid="100001";
|
||||
private String gid="10111";
|
||||
private String pid="1";
|
||||
private String dsid="10153";
|
||||
private String type = "1";
|
||||
private String idfa="";
|
||||
private String idfv="";
|
||||
private String oudid="";
|
||||
private String imei="";
|
||||
private String mac="";
|
||||
private String sign="";
|
||||
private String actor_name="";
|
||||
private String actor_id="";
|
||||
private String user_ip="";
|
||||
private String chat_time="";
|
||||
private String content="你好";
|
||||
private String actor_level="1";
|
||||
private String actor_recharge_gold="1";
|
||||
private String to_uid="";
|
||||
private String to_actor_name="";
|
||||
private String to_actor_id="";
|
||||
private String to_actor_level="";
|
||||
private String to_actor_recharge_gold="";
|
||||
private String type_id="";
|
||||
|
||||
public void setTime(int time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public int getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getGid() {
|
||||
return gid;
|
||||
}
|
||||
|
||||
public void setGid(String gid) {
|
||||
this.gid = gid;
|
||||
}
|
||||
|
||||
public String getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(String pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getDsid() {
|
||||
return dsid;
|
||||
}
|
||||
|
||||
public void setDsid(String dsid) {
|
||||
this.dsid = dsid;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getIdfa() {
|
||||
return idfa;
|
||||
}
|
||||
|
||||
public void setIdfa(String idfa) {
|
||||
this.idfa = idfa;
|
||||
}
|
||||
|
||||
public String getIdfv() {
|
||||
return idfv;
|
||||
}
|
||||
|
||||
public void setIdfv(String idfv) {
|
||||
this.idfv = idfv;
|
||||
}
|
||||
|
||||
public String getOudid() {
|
||||
return oudid;
|
||||
}
|
||||
|
||||
public void setOudid(String oudid) {
|
||||
this.oudid = oudid;
|
||||
}
|
||||
|
||||
public String getImei() {
|
||||
return imei;
|
||||
}
|
||||
|
||||
public void setImei(String imei) {
|
||||
this.imei = imei;
|
||||
}
|
||||
|
||||
public String getMac() {
|
||||
return mac;
|
||||
}
|
||||
|
||||
public void setMac(String mac) {
|
||||
this.mac = mac;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public String getActor_name() {
|
||||
return actor_name;
|
||||
}
|
||||
|
||||
public void setActor_name(String actor_name) {
|
||||
this.actor_name = actor_name;
|
||||
}
|
||||
|
||||
public String getActor_id() {
|
||||
return actor_id;
|
||||
}
|
||||
|
||||
public void setActor_id(String actor_id) {
|
||||
this.actor_id = actor_id;
|
||||
}
|
||||
|
||||
public String getUser_ip() {
|
||||
return user_ip;
|
||||
}
|
||||
|
||||
public void setUser_ip(String user_ip) {
|
||||
this.user_ip = user_ip;
|
||||
}
|
||||
|
||||
public String getChat_time() {
|
||||
return chat_time;
|
||||
}
|
||||
|
||||
public void setChat_time(String chat_time) {
|
||||
this.chat_time = chat_time;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getActor_level() {
|
||||
return actor_level;
|
||||
}
|
||||
|
||||
public void setActor_level(String actor_level) {
|
||||
this.actor_level = actor_level;
|
||||
}
|
||||
|
||||
public String getActor_recharge_gold() {
|
||||
return actor_recharge_gold;
|
||||
}
|
||||
|
||||
public void setActor_recharge_gold(String actor_recharge_gold) {
|
||||
this.actor_recharge_gold = actor_recharge_gold;
|
||||
}
|
||||
|
||||
public String getTo_uid() {
|
||||
return to_uid;
|
||||
}
|
||||
|
||||
public void setTo_uid(String to_uid) {
|
||||
this.to_uid = to_uid;
|
||||
}
|
||||
|
||||
public String getTo_actor_name() {
|
||||
return to_actor_name;
|
||||
}
|
||||
|
||||
public void setTo_actor_name(String to_actor_name) {
|
||||
this.to_actor_name = to_actor_name;
|
||||
}
|
||||
|
||||
public String getTo_actor_id() {
|
||||
return to_actor_id;
|
||||
}
|
||||
|
||||
public void setTo_actor_id(String to_actor_id) {
|
||||
this.to_actor_id = to_actor_id;
|
||||
}
|
||||
|
||||
public String getTo_actor_level() {
|
||||
return to_actor_level;
|
||||
}
|
||||
|
||||
public void setTo_actor_level(String to_actor_level) {
|
||||
this.to_actor_level = to_actor_level;
|
||||
}
|
||||
|
||||
public String getTo_actor_recharge_gold() {
|
||||
return to_actor_recharge_gold;
|
||||
}
|
||||
|
||||
public void setTo_actor_recharge_gold(String to_actor_recharge_gold) {
|
||||
this.to_actor_recharge_gold = to_actor_recharge_gold;
|
||||
}
|
||||
|
||||
public String getType_id() {
|
||||
return type_id;
|
||||
}
|
||||
|
||||
public void setType_id(String type_id) {
|
||||
this.type_id = type_id;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Gson gson = new Gson();
|
||||
Report37CheckChat report37CheckChat = new Report37CheckChat();
|
||||
report37CheckChat.setTime((int)(TimeUtils.now()/1000));
|
||||
report37CheckChat.setGid(SDK37Constans.gid);
|
||||
report37CheckChat.setPid(SDK37Constans.pid);
|
||||
HttpPool.init();
|
||||
report37CheckChat.setChat_time(String.valueOf(TimeUtils.now()/1000));
|
||||
String signSt =SDK37Constans.chatKey+report37CheckChat.getUid()+report37CheckChat.getGid()+report37CheckChat.getDsid()+report37CheckChat.getTime()+report37CheckChat.getType();
|
||||
report37CheckChat.setSign(MD5Util.encrypByMd5(signSt));
|
||||
String s = gson.toJson(report37CheckChat);
|
||||
System.out.println(s);
|
||||
// JSONObject jsonObject = DataMessageUtils.immediateSendPost(report37CheckChat);
|
||||
// Report37Response report37Response = jsonObject.toJavaObject(Report37Response.class);
|
||||
//
|
||||
// System.out.println(report37Response);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasicNameValuePair> getPairList() {
|
||||
List<BasicNameValuePair> pairList = new ArrayList<>();
|
||||
pairList.add(new BasicNameValuePair("time", String.valueOf(getTime())));
|
||||
pairList.add(new BasicNameValuePair("uid", getUid()));
|
||||
pairList.add(new BasicNameValuePair("gid", getGid()));
|
||||
pairList.add(new BasicNameValuePair("pid", getPid()));
|
||||
pairList.add(new BasicNameValuePair("dsid", getDsid()));
|
||||
pairList.add(new BasicNameValuePair("type", getType()));
|
||||
pairList.add(new BasicNameValuePair("idfa", getIdfa()));
|
||||
pairList.add(new BasicNameValuePair("idfv", getIdfv()));
|
||||
pairList.add(new BasicNameValuePair("oudid", getOudid()));
|
||||
pairList.add(new BasicNameValuePair("imei", getImei()));
|
||||
pairList.add(new BasicNameValuePair("mac", getMac()));
|
||||
pairList.add(new BasicNameValuePair("sign", getSign()));
|
||||
pairList.add(new BasicNameValuePair("actor_name", getActor_name()));
|
||||
pairList.add(new BasicNameValuePair("actor_id", getActor_id()));
|
||||
pairList.add(new BasicNameValuePair("user_ip", getUser_ip()));
|
||||
pairList.add(new BasicNameValuePair("chat_time", getChat_time()));
|
||||
pairList.add(new BasicNameValuePair("content", getContent()));
|
||||
pairList.add(new BasicNameValuePair("actor_level", getActor_level()));
|
||||
pairList.add(new BasicNameValuePair("actor_recharge_gold", getActor_recharge_gold()));
|
||||
pairList.add(new BasicNameValuePair("to_uid", getTo_uid()));
|
||||
pairList.add(new BasicNameValuePair("to_actor_name", getTo_actor_name()));
|
||||
pairList.add(new BasicNameValuePair("to_actor_id", getTo_actor_id()));
|
||||
pairList.add(new BasicNameValuePair("to_actor_level", getTo_actor_level()));
|
||||
pairList.add(new BasicNameValuePair("to_actor_recharge_gold", getTo_actor_recharge_gold()));
|
||||
pairList.add(new BasicNameValuePair("type_id", getType_id()));
|
||||
return pairList;
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
package com.ljsd.jieling.dataReport.reportBeans_37;
|
||||
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface Report37Param {
|
||||
List<BasicNameValuePair> getPairList();
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package com.ljsd.jieling.dataReport.reportBeans_37;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class Report37Response {
|
||||
private int state;
|
||||
private String msg;
|
||||
private String[] data;
|
||||
|
||||
public int getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String[] getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(String[] data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Report37Response{" +
|
||||
"state=" + state +
|
||||
", msg='" + msg + '\'' +
|
||||
", data=" + Arrays.toString(data) +
|
||||
'}';
|
||||
}
|
||||
|
||||
public Report37Response() {
|
||||
}
|
||||
|
||||
public Report37Response(int state, String msg, String[] data) {
|
||||
this.state = state;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
}
|
|
@ -1,165 +0,0 @@
|
|||
package com.ljsd.jieling.dataReport.reportBeans_37;
|
||||
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Report37RoleLeveBean extends Report37Bean{
|
||||
|
||||
private String uid;
|
||||
private String roleid;
|
||||
private String sign;
|
||||
private String role_type;
|
||||
private String role_name;
|
||||
private String role_c_time;
|
||||
private int role_grade;
|
||||
private String role_grade_desc;
|
||||
private String role_grade_u_time;
|
||||
private String balance;
|
||||
private String total_pay_amount;
|
||||
private long total_online_time;
|
||||
private String guild_id;
|
||||
private String guild_name;
|
||||
|
||||
@Override
|
||||
public List<BasicNameValuePair> getPairList() {
|
||||
List<BasicNameValuePair> pairList = new ArrayList<>();
|
||||
pairList.add(new BasicNameValuePair("uid", getUid()));
|
||||
pairList.add(new BasicNameValuePair("roleid", getRoleid()));
|
||||
pairList.add(new BasicNameValuePair("role_type", getRole_type()));
|
||||
pairList.add(new BasicNameValuePair("role_name", getRole_name()));
|
||||
pairList.add(new BasicNameValuePair("role_c_time", getRole_c_time()));
|
||||
pairList.add(new BasicNameValuePair("role_grade", String.valueOf(getRole_grade())));
|
||||
pairList.add(new BasicNameValuePair("role_grade_desc", getRole_grade_desc()));
|
||||
pairList.add(new BasicNameValuePair("role_grade_u_time", getRole_grade_u_time()));
|
||||
pairList.add(new BasicNameValuePair("balance", getBalance()));
|
||||
pairList.add(new BasicNameValuePair("total_pay_amount", getTotal_pay_amoun()));
|
||||
pairList.add(new BasicNameValuePair("total_online_time", String.valueOf(getTotal_online_time())));
|
||||
pairList.add(new BasicNameValuePair("guild_id", getGuild_id()));
|
||||
pairList.add(new BasicNameValuePair("guild_name", getGuild_name()));
|
||||
pairList.add(new BasicNameValuePair("sign", getSign()));
|
||||
pairList.add(new BasicNameValuePair("event_time", String.valueOf(getEvent_time())));
|
||||
pairList.add(new BasicNameValuePair("zone_id", getZone_id()));
|
||||
pairList.add(new BasicNameValuePair("zone_name", getZone_id()));
|
||||
pairList.add(new BasicNameValuePair("pid", String.valueOf(getPid())));
|
||||
pairList.add(new BasicNameValuePair("gid", String.valueOf(getGid())));
|
||||
return pairList;
|
||||
}
|
||||
|
||||
public Report37RoleLeveBean() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getRoleid() {
|
||||
return roleid;
|
||||
}
|
||||
|
||||
public void setRoleid(String roleid) {
|
||||
this.roleid = roleid;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
|
||||
public String getRole_type() {
|
||||
return role_type;
|
||||
}
|
||||
|
||||
public void setRole_type(String role_type) {
|
||||
this.role_type = role_type;
|
||||
}
|
||||
|
||||
public String getRole_name() {
|
||||
return role_name;
|
||||
}
|
||||
|
||||
public void setRole_name(String role_name) {
|
||||
this.role_name = role_name;
|
||||
}
|
||||
|
||||
public String getRole_c_time() {
|
||||
return role_c_time;
|
||||
}
|
||||
|
||||
public void setRole_c_time(String role_c_time) {
|
||||
this.role_c_time = role_c_time;
|
||||
}
|
||||
|
||||
public int getRole_grade() {
|
||||
return role_grade;
|
||||
}
|
||||
|
||||
public void setRole_grade(int role_grade) {
|
||||
this.role_grade = role_grade;
|
||||
}
|
||||
|
||||
public String getRole_grade_desc() {
|
||||
return role_grade_desc;
|
||||
}
|
||||
|
||||
public void setRole_grade_desc(String role_grade_desc) {
|
||||
this.role_grade_desc = role_grade_desc;
|
||||
}
|
||||
|
||||
public String getRole_grade_u_time() {
|
||||
return role_grade_u_time;
|
||||
}
|
||||
|
||||
public void setRole_grade_u_time(String role_grade_u_time) {
|
||||
this.role_grade_u_time = role_grade_u_time;
|
||||
}
|
||||
|
||||
public String getBalance() {
|
||||
return balance;
|
||||
}
|
||||
|
||||
public void setBalance(String balance) {
|
||||
this.balance = balance;
|
||||
}
|
||||
|
||||
public String getTotal_pay_amoun() {
|
||||
return total_pay_amount;
|
||||
}
|
||||
|
||||
public void setTotal_pay_amoun(String total_pay_amoun) {
|
||||
this.total_pay_amount = total_pay_amoun;
|
||||
}
|
||||
|
||||
public long getTotal_online_time() {
|
||||
return total_online_time;
|
||||
}
|
||||
|
||||
public void setTotal_online_time(long total_online_time) {
|
||||
this.total_online_time = total_online_time;
|
||||
}
|
||||
|
||||
public String getGuild_id() {
|
||||
return guild_id;
|
||||
}
|
||||
|
||||
public void setGuild_id(String guild_id) {
|
||||
this.guild_id = guild_id;
|
||||
}
|
||||
|
||||
public String getGuild_name() {
|
||||
return guild_name;
|
||||
}
|
||||
|
||||
public void setGuild_name(String guild_name) {
|
||||
this.guild_name = guild_name;
|
||||
}
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
package com.ljsd.jieling.dataReport.reportBeans_37;
|
||||
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Report37TaskBean extends Report37Bean {
|
||||
|
||||
private String uid;
|
||||
private String roleid;
|
||||
private String task_id;
|
||||
private String task_name;
|
||||
private int status;
|
||||
private String sign;
|
||||
|
||||
|
||||
public Report37TaskBean() {
|
||||
super();
|
||||
this.status = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasicNameValuePair> getPairList() {
|
||||
List<BasicNameValuePair> pairList = new ArrayList<>();
|
||||
pairList.add(new BasicNameValuePair("uid", getUid()));
|
||||
pairList.add(new BasicNameValuePair("roleid", getRoleid()));
|
||||
pairList.add(new BasicNameValuePair("task_id", getTask_id()));
|
||||
pairList.add(new BasicNameValuePair("task_name", getTask_name()));
|
||||
pairList.add(new BasicNameValuePair("status", String.valueOf(getStatus())));
|
||||
pairList.add(new BasicNameValuePair("sign", getSign()));
|
||||
pairList.add(new BasicNameValuePair("event_time", String.valueOf(getEvent_time())));
|
||||
pairList.add(new BasicNameValuePair("zone_id", getZone_id()));
|
||||
pairList.add(new BasicNameValuePair("zone_name", getZone_id()));
|
||||
pairList.add(new BasicNameValuePair("pid", String.valueOf(getPid())));
|
||||
pairList.add(new BasicNameValuePair("gid", String.valueOf(getGid())));
|
||||
return pairList;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
|
||||
public String getRoleid() {
|
||||
return roleid;
|
||||
}
|
||||
|
||||
public void setRoleid(String roleid) {
|
||||
this.roleid = roleid;
|
||||
}
|
||||
|
||||
public String getTask_id() {
|
||||
return task_id;
|
||||
}
|
||||
|
||||
public void setTask_id(String task_id) {
|
||||
this.task_id = task_id;
|
||||
}
|
||||
|
||||
public String getTask_name() {
|
||||
return task_name;
|
||||
}
|
||||
|
||||
public void setTask_name(String task_name) {
|
||||
this.task_name = task_name;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getSign() {
|
||||
return sign;
|
||||
}
|
||||
|
||||
public void setSign(String sign) {
|
||||
this.sign = sign;
|
||||
}
|
||||
}
|
|
@ -1,125 +0,0 @@
|
|||
package com.ljsd.jieling.dataReport.reportBeans_37;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.ljsd.jieling.config.json.SDK37Constans;
|
||||
import com.ljsd.jieling.config.reportData.DataMessageUtils;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
|
||||
import com.ljsd.jieling.util.MD5Util;
|
||||
import util.TimeUtils;
|
||||
|
||||
public class Repot37EventUtil {
|
||||
private static Gson gson = new Gson();
|
||||
|
||||
public static void onKtEvent(User user, Report37EventType eventType, Object... parm) {
|
||||
|
||||
// switch (eventType) {
|
||||
// case TASK_FINISH_EVEMT:
|
||||
// Report37TaskBean report37TaskBean = new Report37TaskBean();
|
||||
// report37TaskBean.setUid(String.valueOf(user.getPlayerInfoManager().getOpenId()));
|
||||
// report37TaskBean.setRoleid(String.valueOf(user.getId()));
|
||||
// int taskId = (int) parm[0];
|
||||
// String taskName = String.valueOf(parm[1]);
|
||||
// report37TaskBean.setTask_id(String.valueOf(taskId));//todo
|
||||
// report37TaskBean.setTask_name(taskName);
|
||||
// report37TaskBean.setGid(user.getPlayerInfoManager().getGid());
|
||||
// report37TaskBean.setPid(user.getPlayerInfoManager().getPid());
|
||||
// String signStr = report37TaskBean.getEvent_time() + report37TaskBean.getUid() + report37TaskBean.getZone_id() + report37TaskBean.getRoleid() + report37TaskBean.getTask_id()+SDK37Constans.appkey;
|
||||
// report37TaskBean.setSign(MD5Util.encrypByMd5(signStr));
|
||||
// DataMessageUtils.addLogQueue(report37TaskBean);
|
||||
// break;
|
||||
// case ROLE_LEVEUP_EVENT:
|
||||
// Report37RoleLeveBean report37RoleLeveBean = new Report37RoleLeveBean();
|
||||
// report37RoleLeveBean.setUid(String.valueOf(user.getPlayerInfoManager().getOpenId()));
|
||||
// report37RoleLeveBean.setRoleid(String.valueOf(user.getId()));
|
||||
// report37RoleLeveBean.setRole_type("1");
|
||||
// report37RoleLeveBean.setRole_name(user.getPlayerInfoManager().getNickName());
|
||||
// report37RoleLeveBean.setRole_c_time(TimeUtils.getTimeStamp(user.getPlayerInfoManager().getCreateTime()));
|
||||
// report37RoleLeveBean.setRole_grade(user.getPlayerInfoManager().getLevel());
|
||||
// report37RoleLeveBean.setRole_grade_u_time(TimeUtils.getTimeStamp(System.currentTimeMillis()));
|
||||
// report37RoleLeveBean.setRole_grade_desc("null");
|
||||
// report37RoleLeveBean.setBalance("null");//todo
|
||||
// report37RoleLeveBean.setTotal_pay_amoun(String.valueOf(BuyGoodsNewLogic.getAllAmount(user) *100));
|
||||
// report37RoleLeveBean.setTotal_online_time(user.getPlayerInfoManager().getOnlineTime());
|
||||
// report37RoleLeveBean.setGuild_id("");//todo
|
||||
// report37RoleLeveBean.setGuild_name("0");//todo
|
||||
// report37RoleLeveBean.setGid(user.getPlayerInfoManager().getGid());
|
||||
// report37RoleLeveBean.setPid(user.getPlayerInfoManager().getPid());
|
||||
// String signSt = report37RoleLeveBean.getEvent_time() + report37RoleLeveBean.getUid() + report37RoleLeveBean.getZone_id() + report37RoleLeveBean.getRoleid() + SDK37Constans.appkey;
|
||||
// report37RoleLeveBean.setSign(MD5Util.encrypByMd5(signSt));
|
||||
// DataMessageUtils.addLogQueue(report37RoleLeveBean);
|
||||
// break;
|
||||
// default:{
|
||||
//
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// public static <T> T hadResReport(Class<T> clazz,User user, Report37EventType eventType, Object... parm){
|
||||
// switch (eventType) {
|
||||
// case CHECK_CHAT_CONTENT:
|
||||
// Report37CheckChat report37CheckChat = new Report37CheckChat();
|
||||
// report37CheckChat.setTime((int)(TimeUtils.now()/1000));
|
||||
// report37CheckChat.setChat_time(String.valueOf(TimeUtils.now()/1000));
|
||||
// report37CheckChat.setUid(String.valueOf(user.getPlayerInfoManager().getOpenId()));//uid
|
||||
// report37CheckChat.setActor_name(user.getPlayerInfoManager().getNickName());
|
||||
// report37CheckChat.setActor_id(String.valueOf(user.getId()));
|
||||
// report37CheckChat.setGid(SDK37Constans.gid);
|
||||
// report37CheckChat.setPid(SDK37Constans.pid);
|
||||
// report37CheckChat.setDsid(String.valueOf(GameApplication.serverId));
|
||||
// report37CheckChat.setType(parm[0].toString());//类型
|
||||
// report37CheckChat.setContent(parm[1].toString());//内容
|
||||
// report37CheckChat.setActor_level(String.valueOf(user.getPlayerInfoManager().getLevel()));
|
||||
// report37CheckChat.setActor_recharge_gold(String.valueOf(0));//充值数
|
||||
// if(parm.length>2){
|
||||
// report37CheckChat.setTo_uid(String.valueOf(parm[2]));
|
||||
// }
|
||||
// if(parm.length>3){
|
||||
// report37CheckChat.setTo_actor_name(String.valueOf(parm[3]));
|
||||
// }
|
||||
// String signChat =SDK37Constans.chatKey+report37CheckChat.getUid()+report37CheckChat.getGid()+report37CheckChat.getDsid()+report37CheckChat.getTime()+report37CheckChat.getType();
|
||||
// report37CheckChat.setSign(MD5Util.encrypByMd5(signChat));
|
||||
//// System.out.println(gson.toJson(report37CheckChat));
|
||||
// JSONObject jsonObject = DataMessageUtils.immediateSendPost(report37CheckChat);
|
||||
// T t = jsonObject.toJavaObject(clazz);
|
||||
// return t;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
public static boolean Report37Chat(User user,Object... parm){
|
||||
// ServerProperties serverProperties = GameApplication.serverProperties;
|
||||
// if(!serverProperties.isSendlog37()){
|
||||
// return true;
|
||||
// }
|
||||
// final ExecutorService exec = Executors.newFixedThreadPool(1);
|
||||
// Callable<Report37Response> call = new Callable<Report37Response>() {
|
||||
// @Override
|
||||
// public Report37Response call(){
|
||||
// Report37Response report37Response = hadResReport(Report37Response.class, user, Report37EventType.CHECK_CHAT_CONTENT, parm);
|
||||
// return report37Response;
|
||||
// }
|
||||
// };
|
||||
// try {
|
||||
// Future<Report37Response> future = exec.submit(call);
|
||||
// Report37Response response = future.get(1000*2,TimeUnit.MILLISECONDS);
|
||||
// if(response.getState()==1){
|
||||
// return true;
|
||||
// }
|
||||
// }catch (TimeoutException ex){
|
||||
// return true;
|
||||
// }catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// }finally {
|
||||
// exec.shutdown();
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
public enum Report37EventType {
|
||||
ROLE_LEVEUP_EVENT,//角色升级
|
||||
TASK_FINISH_EVEMT,//任务完成
|
||||
CHECK_CHAT_CONTENT//聊天敏感字
|
||||
}
|
||||
|
||||
}
|
|
@ -1269,8 +1269,8 @@ public class MapLogic {
|
|||
/**
|
||||
* 快速战斗
|
||||
*
|
||||
* @param session
|
||||
* @param messageType
|
||||
// * @param session
|
||||
// * @param messageType
|
||||
*/
|
||||
// public void fastFight(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
// int uid = session.getUid();
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.ljsd.jieling.kefu;
|
|||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.core.FunctionIdEnum;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.ChatContentType;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.Repot37EventUtil;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
|
@ -112,9 +111,6 @@ public class Cmd_changename extends GmRoleAbstract {
|
|||
return false;
|
||||
}
|
||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||
if (!Repot37EventUtil.Report37Chat(getUser(), ChatContentType.ROLE_NAME, name)) {
|
||||
return false;
|
||||
}
|
||||
int length = getStrLength(name);
|
||||
if (length == -1) {
|
||||
return false;
|
||||
|
|
|
@ -2,11 +2,8 @@ package com.ljsd.jieling.logic.family;
|
|||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.protobuf.GeneratedMessage;
|
||||
import com.google.protobuf.Message;
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.ChatContentType;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.Repot37EventUtil;
|
||||
import com.ljsd.jieling.db.mongo.MongoUtil;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
|
@ -203,9 +200,6 @@ public class GuildLogic {
|
|||
}
|
||||
|
||||
public static void checkForCreateGuild( User user,String familyName,String announce) throws Exception {
|
||||
if(!Repot37EventUtil.Report37Chat(user, ChatContentType.FAMILY_NAME.getType(),announce)){
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_IN_SENSITIVE);
|
||||
}
|
||||
if(StringUtil.isEmpty(familyName)){
|
||||
throw new ErrorCodeException(ErrorCode.NULL_NAME);
|
||||
}
|
||||
|
@ -809,10 +803,6 @@ public class GuildLogic {
|
|||
if(uidType>2){
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_NO_ACCESS);
|
||||
}
|
||||
|
||||
if(!Repot37EventUtil.Report37Chat(user, ChatContentType.ANNOUNCE.getType(),content)){
|
||||
throw new ErrorCodeException(ErrorCode.FAMILY_IN_SENSITIVE);
|
||||
}
|
||||
boolean result = ShieldedWordUtils.checkName(user,content,false,ChatContentType.ANNOUNCE);
|
||||
int resultCode = 1;
|
||||
String err = "修改成功";
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.ljsd.jieling.logic.mission;
|
|||
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.TaskStaticConfig;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.Repot37EventUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
|
@ -26,7 +25,6 @@ import com.ljsd.jieling.logic.mission.data.BaseDataManager;
|
|||
import com.ljsd.jieling.logic.mission.data.DataManagerDistributor;
|
||||
import com.ljsd.jieling.logic.mission.main.*;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import org.luaj.vm2.ast.Str;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import rpc.protocols.PlayerInfoProto;
|
||||
|
@ -640,7 +638,6 @@ public class MissionLoigc {
|
|||
PlayerInfoProto.TakeMissionRewardResponse build = PlayerInfoProto.TakeMissionRewardResponse.newBuilder().setDrop(drop).build();
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
||||
Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.TASK_FINISH_EVEMT,missionId,"");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -651,7 +648,6 @@ public class MissionLoigc {
|
|||
if(missionStateChangeInfos!=null && !missionStateChangeInfos.isEmpty()){
|
||||
|
||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
||||
Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.TASK_FINISH_EVEMT,missionId,"");
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, missionStateChangeInfos.get(0).getRewwardGroups(), BIReason.TAKE_MISSION_REWARD);
|
||||
ItemUtil.treasureLevelUp(user);
|
||||
PlayerInfoProto.TakeMissionRewardResponse build = PlayerInfoProto.TakeMissionRewardResponse.newBuilder().setDrop(drop).setTreasureScore(user.getPlayerInfoManager().getTreasureLevel()).build();
|
||||
|
@ -666,7 +662,6 @@ public class MissionLoigc {
|
|||
missionStateChangeInfos = gameMisionTypeListMap.get(GameMisionType.JADE_DYNASTY_MISSION);
|
||||
if(missionStateChangeInfos!=null && !missionStateChangeInfos.isEmpty()){
|
||||
KtEventUtils.onKtEvent(user, ParamEventBean.UserTaskEvent,type,missionId);
|
||||
Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.TASK_FINISH_EVEMT,missionId,"");
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, missionStateChangeInfos.get(0).getRewwardGroups(), BIReason.TAKE_MISSION_REWARD);
|
||||
PlayerInfoProto.TakeMissionRewardResponse build = PlayerInfoProto.TakeMissionRewardResponse.newBuilder().setDrop(drop).build();
|
||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TAKE_MISSION_REWARD_RESPONSE_VALUE,build,true);
|
||||
|
|
|
@ -4,13 +4,11 @@ import com.ljsd.jieling.chat.logic.ChatLogic;
|
|||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.Repot37EventUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.globals.GlobalItemType;
|
||||
import com.ljsd.jieling.handler.map.MapLogic;
|
||||
import com.ljsd.jieling.handler.map.MapManager;
|
||||
import com.ljsd.jieling.handler.map.TemporaryItems;
|
||||
import com.ljsd.jieling.jbean.ActivityMission;
|
||||
|
@ -929,8 +927,6 @@ public class ItemUtil {
|
|||
break;
|
||||
}
|
||||
levelUpExp = sPlayerLevelConfig.getExp();
|
||||
// 玩家升级报送
|
||||
Repot37EventUtil.onKtEvent(user, Repot37EventUtil.Report37EventType.ROLE_LEVEUP_EVENT);
|
||||
// 升级赠送道具
|
||||
int[][] levelUpReward = sPlayerLevelConfig.getLevelUpReward();
|
||||
if (levelUpReward != null && levelUpReward.length > 0) {
|
||||
|
|
|
@ -1,28 +1,18 @@
|
|||
package com.ljsd.jieling.util;
|
||||
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.ChatContentType;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.Repot37EventUtil;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
|
||||
public class ShieldedWordUtils {
|
||||
|
||||
public static boolean checkName(User user , String name,boolean validateSpecStr,ChatContentType chatContentType,User friend) {
|
||||
if(friend!=null){
|
||||
if(!Repot37EventUtil.Report37Chat(user, chatContentType.getType(),name,friend.getPlayerInfoManager().getOpenId(),friend.getPlayerInfoManager().getNickName())){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return checkName(user,name,validateSpecStr,chatContentType);
|
||||
|
||||
}
|
||||
public static boolean checkName(User user , String name,boolean validateSpecStr,ChatContentType chatContentType){
|
||||
if(!Repot37EventUtil.Report37Chat(user, chatContentType.getType(),name)){
|
||||
return false;
|
||||
}
|
||||
boolean result = true;
|
||||
if(validateSpecStr){
|
||||
result = validateUserName(name);
|
||||
|
|
Loading…
Reference in New Issue