generated from root/miduo_server
天眼公会
parent
26afff8ba5
commit
f094ab62f0
|
@ -11,7 +11,9 @@ import com.jmfy.model.CUserInfo;
|
||||||
import com.jmfy.model.ServerInfo;
|
import com.jmfy.model.ServerInfo;
|
||||||
import com.jmfy.model.UserBanned;
|
import com.jmfy.model.UserBanned;
|
||||||
import com.jmfy.redisProperties.RedisUserKey;
|
import com.jmfy.redisProperties.RedisUserKey;
|
||||||
import com.jmfy.utils.*;
|
import com.jmfy.utils.JsonUtil;
|
||||||
|
import com.jmfy.utils.RPCClient;
|
||||||
|
import com.jmfy.utils.RedisUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
@ -179,16 +181,15 @@ public class GameTitleController {
|
||||||
/**
|
/**
|
||||||
* 天眼封禁
|
* 天眼封禁
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("Duplicates")
|
||||||
@RequestMapping(value = "/skyEye",method = {RequestMethod.GET,RequestMethod.POST})
|
@RequestMapping(value = "/skyEye",method = {RequestMethod.GET,RequestMethod.POST})
|
||||||
public @ResponseBody
|
public @ResponseBody
|
||||||
String skyEye(HttpServletRequest request,HttpSession session){
|
String skyEye(HttpServletRequest request,HttpSession session) throws Exception {
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String,String> map = new HashMap<>();
|
||||||
map.put("code","1");
|
map.put("code","1");
|
||||||
if(!verify(request,map,privateKey)){
|
if(!verify(request,map,privateKey)){
|
||||||
map.put("message","verify");
|
map.put("message","verify");
|
||||||
return JSON.toJSONString(map);
|
}else {
|
||||||
}
|
|
||||||
try {
|
|
||||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
String jsonString = JSON.toJSONString(parameterMap);
|
String jsonString = JSON.toJSONString(parameterMap);
|
||||||
LOGGER.info("天眼封禁json=>{}",jsonString);
|
LOGGER.info("天眼封禁json=>{}",jsonString);
|
||||||
|
@ -198,13 +199,18 @@ public class GameTitleController {
|
||||||
map.put("code","0");
|
map.put("code","0");
|
||||||
map.put("message","success");
|
map.put("message","success");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}finally {
|
|
||||||
return JSON.toJSONString(map);
|
|
||||||
}
|
}
|
||||||
|
LOGGER.info("回传天眼参数:{}",map.toString());
|
||||||
|
return JSON.toJSONString(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天眼验证sign
|
||||||
|
* @param request
|
||||||
|
* @param map
|
||||||
|
* @param secretKey
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private boolean verify(HttpServletRequest request,Map<String,String> map,String secretKey)
|
private boolean verify(HttpServletRequest request,Map<String,String> map,String secretKey)
|
||||||
{
|
{
|
||||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||||
|
@ -216,7 +222,8 @@ public class GameTitleController {
|
||||||
String time = parameterMap.get("time");
|
String time = parameterMap.get("time");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
byte[] bytes = (secretKey + playerId + userId + zoneId + serverId + time).getBytes("UTF-8"); // 输出其utf-8的bytes
|
// 输出其utf-8的bytes
|
||||||
|
byte[] bytes = (secretKey + playerId + userId + zoneId + serverId + time).getBytes("UTF-8");
|
||||||
|
|
||||||
java.security.MessageDigest digest = java.security.MessageDigest.getInstance("MD5");
|
java.security.MessageDigest digest = java.security.MessageDigest.getInstance("MD5");
|
||||||
digest.update(bytes);
|
digest.update(bytes);
|
||||||
|
@ -226,10 +233,10 @@ public class GameTitleController {
|
||||||
String newsign = String.format("%032X", bigInt).toLowerCase();
|
String newsign = String.format("%032X", bigInt).toLowerCase();
|
||||||
map.put("message","sign:"+sign+" newSign:"+newsign);
|
map.put("message","sign:"+sign+" newSign:"+newsign);
|
||||||
LOGGER.info("天眼message,sign=>{},new sign=>{}",sign,newsign);
|
LOGGER.info("天眼message,sign=>{},new sign=>{}",sign,newsign);
|
||||||
return newsign.equalsIgnoreCase(sign); // MD5前面会补零
|
// MD5前面会补零
|
||||||
|
return newsign.equalsIgnoreCase(sign);
|
||||||
|
|
||||||
} catch (NoSuchAlgorithmException | UnsupportedEncodingException e)
|
} catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {
|
||||||
{
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,9 +21,9 @@ import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class GMHandler extends BaseHandler {
|
public class GMHandler extends BaseHandler {
|
||||||
|
@ -73,122 +73,136 @@ public class GMHandler extends BaseHandler {
|
||||||
*/
|
*/
|
||||||
public static final int CANCEL_SKYEYE_BAN = 8;
|
public static final int CANCEL_SKYEYE_BAN = 8;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置公会名称
|
||||||
|
*/
|
||||||
|
public static final int RESET_GUILD_NAME = 9;
|
||||||
|
/**
|
||||||
|
* 重置公会公告
|
||||||
|
*/
|
||||||
|
public static final int RESET_GUILD_ANNOUNCEMENT = 10;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int execute(JSONObject jsonObject,HttpSession session) throws Exception {
|
public int execute(JSONObject jsonObject,HttpSession session) throws Exception {
|
||||||
|
LOGGER.info("gm封禁,传参:{}",jsonObject.toJSONString());
|
||||||
String openIds = jsonObject.getString("uid");
|
String openIds = jsonObject.getString("uid");
|
||||||
int dsid = jsonObject.getIntValue("dsid");
|
// 根据openId查询玩家注册的全部账号
|
||||||
int treat_type = jsonObject.getIntValue("treat_type");
|
|
||||||
|
|
||||||
boolean allServer = dsid == 0;
|
|
||||||
|
|
||||||
List<CUserInfo> coreUserInfoList = userInfoDao.findUserInfo(openIds);
|
List<CUserInfo> coreUserInfoList = userInfoDao.findUserInfo(openIds);
|
||||||
if (coreUserInfoList == null) {
|
if (coreUserInfoList == null || coreUserInfoList.isEmpty()) {
|
||||||
throw new Exception("帐号不存在");
|
throw new Exception("帐号不存在");
|
||||||
} else {
|
}
|
||||||
if (coreUserInfoList.size() == 0)
|
// 遍历全部账号,执行封禁操作
|
||||||
throw new Exception("帐号不存在");
|
for (CUserInfo coreUserInfo : coreUserInfoList) {
|
||||||
for (CUserInfo coreUserInfo : coreUserInfoList) {
|
oneUserBanner(coreUserInfo, jsonObject.getIntValue("dsid"), jsonObject, jsonObject.getIntValue("treat_type"), session);
|
||||||
ServerInfo coreServerList = serverListDao.getServerinfo(String.valueOf(coreUserInfo.getServerid()));
|
|
||||||
|
|
||||||
if (null == coreServerList) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!allServer && !coreServerList.getServer_id().equals(String.valueOf(dsid))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取拼接参数
|
|
||||||
String cmd = getCmd(jsonObject, coreUserInfo, treat_type);
|
|
||||||
|
|
||||||
String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(coreServerList.getServer_id()), String.class, -1);
|
|
||||||
if (null == rpcString) {
|
|
||||||
LOGGER.error("Exception send err rpcString dsid=>{},uid=>{},cmd=>{}", coreUserInfo.getServerid(), openIds, cmd);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
String thriftIp = rpcString.split(":")[0];
|
|
||||||
String thriftPort = rpcString.split(":")[1];
|
|
||||||
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort);
|
|
||||||
// 异常或者错误
|
|
||||||
if (result.getResultCode() != 0) {
|
|
||||||
LOGGER.error("Exception send err dsid=>{},uid=>{},cmd=>{}", coreUserInfo.getServerid(), openIds, cmd);
|
|
||||||
}else {
|
|
||||||
// 封禁入库
|
|
||||||
updateUserBanner(coreUserInfo,session,jsonObject);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean skyEyeExecute(JSONObject json, HttpSession session, Map<String,String> map) throws Exception {
|
public boolean skyEyeExecute(JSONObject json, HttpSession session, Map<String,String> map) throws Exception {
|
||||||
String nickname = json.getString("nickname");
|
// 暂时不用
|
||||||
String playerId = json.getString("playerId");
|
// String nickname = json.getString("nickname");
|
||||||
String userId = json.getString("userId");
|
// String playerId = json.getString("playerId");
|
||||||
String zoneId = json.getString("zoneId");
|
// String serverId = json.getString("serverId");
|
||||||
String serverId = json.getString("serverId");
|
// String sign = json.getString("sign");
|
||||||
String content = json.getString("content");
|
// json参数获取
|
||||||
String time = json.getString("time");
|
|
||||||
String sign = json.getString("sign");
|
|
||||||
JSONObject jsonBan = new JSONObject();
|
JSONObject jsonBan = new JSONObject();
|
||||||
jsonBan.put("uid",userId);
|
jsonBan.put("uid",json.getString("userId"));
|
||||||
jsonBan.put("banTime",time);
|
jsonBan.put("banTime",json.getString("time"));
|
||||||
jsonBan.put("dsid",zoneId);
|
jsonBan.put("dsid",json.getString("zoneId"));
|
||||||
jsonBan.put("treat_type","7");
|
int skyEyeType = getSkyEyeType(Integer.parseInt(json.getString("channel")));
|
||||||
jsonBan.put("banReason",content);
|
jsonBan.put("treat_type",skyEyeType);
|
||||||
LOGGER.info("message","ty,userId:{},zoneId:{},content:{},time:{}",userId,zoneId,content,time);
|
jsonBan.put("banReason",json.getString("time"));
|
||||||
CUserInfo coreUserInfo = userInfoDao.findUserInfoByUserId(Integer.valueOf(userId));
|
jsonBan.put("channel",json.getString("channel"));
|
||||||
|
jsonBan.put("extra",json.getString("extra"));
|
||||||
|
// 日志
|
||||||
|
LOGGER.info("天眼封禁,传参:{}",jsonBan.toJSONString());
|
||||||
|
|
||||||
|
CUserInfo coreUserInfo = userInfoDao.findUserInfoByUserId(jsonBan.getIntValue("uid"));
|
||||||
if (coreUserInfo == null) {
|
if (coreUserInfo == null) {
|
||||||
map.put("message","帐号不存在"+userId);
|
map.put("message","帐号不存在"+jsonBan.getIntValue("uid"));
|
||||||
LOGGER.error("message","天眼帐号不存在userId:{}",userId);
|
return false;
|
||||||
throw new Exception("帐号不存在");
|
|
||||||
} else {
|
|
||||||
ServerInfo coreServerList = serverListDao.getServerinfo(String.valueOf(coreUserInfo.getServerid()));
|
|
||||||
|
|
||||||
if (null == coreServerList) {
|
|
||||||
map.put("message","服务器不存在");
|
|
||||||
LOGGER.error("天眼服务器不存在");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!coreServerList.getServer_id().equals(String.valueOf(zoneId))) {
|
|
||||||
map.put("message","服务器不存在"+zoneId);
|
|
||||||
LOGGER.error("天眼服务器不存在{}",zoneId);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取拼接参数
|
|
||||||
String cmd = getCmd(jsonBan, coreUserInfo, 7);
|
|
||||||
|
|
||||||
String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(coreServerList.getServer_id()), String.class, -1);
|
|
||||||
if (null == rpcString) {
|
|
||||||
map.put("message","Exception send err rpcString dsid="+coreUserInfo.getServerid()+",uid="+userId);
|
|
||||||
LOGGER.error("天眼Exception send err rpcString dsid=>{},uid=>{},cmd=>{}", coreUserInfo.getServerid(), userId, cmd);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
String thriftIp = rpcString.split(":")[0];
|
|
||||||
String thriftPort = rpcString.split(":")[1];
|
|
||||||
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
|
|
||||||
map.put("message","thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()");
|
|
||||||
LOGGER.error("天眼thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort);
|
|
||||||
// 异常或者错误
|
|
||||||
if (result.getResultCode() != 0) {
|
|
||||||
LOGGER.error("天眼Exception send err dsid=>{},uid=>{},cmd=>{}", coreUserInfo.getServerid(), userId, cmd);
|
|
||||||
}else {
|
|
||||||
// 封禁入库
|
|
||||||
LOGGER.info("天眼封禁入库,serverid=>{},uid=>{}", zoneId, userId);
|
|
||||||
updateUserBanner(coreUserInfo,session,jsonBan);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
boolean userBanner = oneUserBanner(coreUserInfo, jsonBan.getIntValue("dsid"), jsonBan, skyEyeType, session);
|
||||||
|
if (!userBanner){
|
||||||
|
map.put("message","操作异常,请查看日志"+jsonBan.getIntValue("uid"));
|
||||||
|
}
|
||||||
|
return userBanner;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单个用户封禁
|
||||||
|
* @param coreUserInfo
|
||||||
|
* @param serverId
|
||||||
|
* @param json
|
||||||
|
* @param type
|
||||||
|
* @param session
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
private boolean oneUserBanner(CUserInfo coreUserInfo, int serverId, JSONObject json, int type, HttpSession session) throws Exception {
|
||||||
|
ServerInfo coreServerList = serverListDao.getServerinfo(String.valueOf(coreUserInfo.getServerid()));
|
||||||
|
if (null == coreServerList) {
|
||||||
|
LOGGER.error("服务器列表为空,serverId:{}", coreUserInfo.getServerid());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!coreServerList.getServer_id().equals(String.valueOf(serverId))) {
|
||||||
|
LOGGER.error("db库里面的服务器id与传参不一致, dbServerId:{},valueServerId:{}", coreServerList.getServer_id(),serverId);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 获取拼接参数
|
||||||
|
String cmd = getCmd(json, coreUserInfo, type);
|
||||||
|
if ("".equals(cmd) || cmd == null){
|
||||||
|
LOGGER.error("参数拼接失败,json:{},uid:{},type:{}", json.toJSONString(),coreUserInfo.getUserId(),type);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String rpcString = RedisUtil.getInstence().getObject(RedisUserKey.LOGIC_SERVER_INFO, String.valueOf(coreServerList.getServer_id()), String.class, -1);
|
||||||
|
if (null == rpcString) {
|
||||||
|
LOGGER.error("获取rpc参数报错:serverId:{}", coreUserInfo.getServerid());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
String thriftIp = rpcString.split(":")[0];
|
||||||
|
String thriftPort = rpcString.split(":")[1];
|
||||||
|
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
|
||||||
|
LOGGER.error("rpc参数存在空值:thriftIp:{},thriftPort:{}", thriftIp,thriftPort);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Result result = RPCClient.gmSend(cmd, thriftIp, thriftPort);
|
||||||
|
// 异常或者错误
|
||||||
|
if (result.getResultCode() != 0) {
|
||||||
|
LOGGER.error("rpc返回值错误:code:{},msg:{}", result.getResultCode(),result.getResultMsg());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 封禁入库
|
||||||
|
updateUserBanner(coreUserInfo,session,json);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取天眼封禁类型
|
||||||
|
* @param channel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private int getSkyEyeType(int channel){
|
||||||
|
int result = 0;
|
||||||
|
switch (channel){
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
result = 7;
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
case 10:
|
||||||
|
result = channel;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取cmd参数
|
* 获取cmd参数
|
||||||
* @param jsonObject
|
* @param jsonObject
|
||||||
|
@ -197,47 +211,69 @@ public class GMHandler extends BaseHandler {
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
private String getCmd(JSONObject jsonObject,CUserInfo coreUserInfo,int type) throws Exception{
|
private String getCmd(JSONObject jsonObject,CUserInfo coreUserInfo,int type){
|
||||||
String cmd = "";
|
String cmd = "";
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BANNED_TO_POST:
|
case BANNED_TO_POST:
|
||||||
cmd = "silence " + coreUserInfo.getUserId() + " 1";
|
cmd = getCmdContent("silence",coreUserInfo.getUserId(),1);
|
||||||
break;
|
break;
|
||||||
case CANCEL_BANNED_TO_POST:
|
case CANCEL_BANNED_TO_POST:
|
||||||
cmd = "silence " + coreUserInfo.getUserId() + " 0";
|
cmd = getCmdContent("silence",coreUserInfo.getUserId(),0);
|
||||||
break;
|
break;
|
||||||
case KILL_USER:
|
case KILL_USER:
|
||||||
cmd = "kickuser " + coreUserInfo.getUserId();
|
cmd = getCmdContent("kickuser",coreUserInfo.getUserId());
|
||||||
break;
|
break;
|
||||||
case BANNED_LOGIN:
|
case BANNED_LOGIN:
|
||||||
cmd = "addblack " + coreUserInfo.getUserId();
|
cmd = getCmdContent("addblack",coreUserInfo.getUserId());
|
||||||
break;
|
break;
|
||||||
case CANCEL_BANNED_LOGIN:
|
case CANCEL_BANNED_LOGIN:
|
||||||
cmd = "reblack " + coreUserInfo.getUserId();
|
cmd = getCmdContent("reblack",coreUserInfo.getUserId());
|
||||||
break;
|
|
||||||
case SKYEYE_BAN:
|
|
||||||
cmd = "skyeye " + coreUserInfo.getUserId() + " " +jsonObject.getString("banTime");
|
|
||||||
break;
|
|
||||||
case CANCEL_SKYEYE_BAN:
|
|
||||||
cmd = "skyeyec " + coreUserInfo.getUserId();
|
|
||||||
break;
|
break;
|
||||||
case UPDATE_USERNAME:
|
case UPDATE_USERNAME:
|
||||||
if (!jsonObject.containsKey("actor_id")) {
|
if (jsonObject.containsKey("actor_id")) {
|
||||||
throw new Exception("缺少参数");
|
if (jsonObject.containsKey("actor_name")) {
|
||||||
}
|
cmd = getCmdContent("changename",coreUserInfo.getUserId(),jsonObject.getString("actor_name"));
|
||||||
if (!jsonObject.containsKey("actor_name")) {
|
} else {
|
||||||
cmd = "changename " + coreUserInfo.getUserId();
|
cmd = getCmdContent("changename",coreUserInfo.getUserId());
|
||||||
} else {
|
}
|
||||||
String actor_name = jsonObject.getString("actor_name");
|
|
||||||
cmd = "changename " + coreUserInfo.getUserId() + " " + actor_name;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case SKYEYE_BAN:
|
||||||
|
String banTime = Optional.ofNullable(jsonObject).map(v->v.getString("banTime")).orElse("0");
|
||||||
|
cmd = getCmdContent("skyeye",coreUserInfo.getUserId(),SKYEYE_BAN,banTime);
|
||||||
|
break;
|
||||||
|
case CANCEL_SKYEYE_BAN:
|
||||||
|
cmd = getCmdContent("skyeye",coreUserInfo.getUserId(),CANCEL_SKYEYE_BAN,0);
|
||||||
|
break;
|
||||||
|
case RESET_GUILD_NAME:
|
||||||
|
String banTime1 = jsonObject.getString("banTime");
|
||||||
|
Object guildId = JSONObject.parseObject(jsonObject.getString("extra")).getOrDefault("guildId","0");
|
||||||
|
cmd = getCmdContent("skyeye",coreUserInfo.getUserId(),RESET_GUILD_NAME,banTime1,guildId);
|
||||||
|
break;
|
||||||
|
case RESET_GUILD_ANNOUNCEMENT:
|
||||||
|
String banTime2 = jsonObject.getString("banTime");
|
||||||
|
Object guildId2 = JSONObject.parseObject(jsonObject.getString("extra")).getOrDefault("guildId","0");
|
||||||
|
cmd = getCmdContent("skyeye",coreUserInfo.getUserId(),RESET_GUILD_ANNOUNCEMENT,banTime2,guildId2);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取cmd内容,免去拼写麻烦,用空格衔接
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getCmdContent(Object... value){
|
||||||
|
StringBuilder builder = new StringBuilder();
|
||||||
|
for (Object s : value) {
|
||||||
|
builder.append(s).append(" ");
|
||||||
|
}
|
||||||
|
return builder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改添加封禁用户
|
* 修改添加封禁用户
|
||||||
* @param cUser
|
* @param cUser
|
||||||
|
|
Loading…
Reference in New Issue