generated from root/miduo_server
账号id查询改为用户id 查询
parent
f535a1ab85
commit
652a9c4286
|
@ -4,6 +4,7 @@ import com.jmfy.dao.FamilyDao;
|
|||
import com.jmfy.dao.UserInfoDao;
|
||||
import com.jmfy.model.CArena;
|
||||
import com.jmfy.model.CUser;
|
||||
import com.jmfy.model.CUserInfo;
|
||||
import com.jmfy.model.CUserPrivilegeInfo;
|
||||
import com.jmfy.model.vo.ArenaInfoVo;
|
||||
import com.jmfy.model.vo.FamilyInfoVo;
|
||||
|
@ -34,26 +35,32 @@ public class ArenaInfoController {
|
|||
@RequestMapping(value = "/getArenaInfo", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public String getFamilyInfo(HttpSession session, ModelMap map , HttpServletRequest request) throws Exception {
|
||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
|
||||
int serverId = Integer.parseInt(parameterMap.get("serverId"));
|
||||
// int serverId = Integer.parseInt(parameterMap.get("serverId"));
|
||||
int userId = Integer.parseInt(parameterMap.get("userId"));
|
||||
ArenaInfoVo arenaInfoVo = new ArenaInfoVo();
|
||||
CUser cUser = userInfoDao.findCuserInfo(serverId, userId);
|
||||
if (cUser != null){
|
||||
arenaInfoVo.setIsData(1);
|
||||
arenaInfoVo.setId(cUser.getId());
|
||||
arenaInfoVo.setName(cUser.getUserName());
|
||||
CUserPrivilegeInfo cUserPrivilegeInfo = userInfoDao.getCUserPrivilegeInfo(serverId, userId);
|
||||
if (cUserPrivilegeInfo != null){
|
||||
arenaInfoVo.setSave_amt(cUserPrivilegeInfo.getSave_amt());
|
||||
}else{
|
||||
arenaInfoVo.setSave_amt(0);
|
||||
}
|
||||
arenaInfoVo.setLevel(cUser.getLevel());
|
||||
CArena cArena = familyDao.getCArena(serverId,userId);
|
||||
arenaInfoVo.setAttackForces(cArena.getAttackForces());
|
||||
arenaInfoVo.setDefenceForces(cArena.getDefenceForces());
|
||||
}else{
|
||||
CUserInfo cUserInfo = userInfoDao.findUserInfoByUserId(userId);
|
||||
if (cUserInfo ==null){
|
||||
arenaInfoVo.setIsData(0);
|
||||
}else{
|
||||
int serverId = cUserInfo.getServerid();
|
||||
CUser cUser = userInfoDao.findCuserInfo(serverId, userId);
|
||||
if (cUser != null){
|
||||
arenaInfoVo.setIsData(1);
|
||||
arenaInfoVo.setId(cUser.getId());
|
||||
arenaInfoVo.setName(cUser.getUserName());
|
||||
CUserPrivilegeInfo cUserPrivilegeInfo = userInfoDao.getCUserPrivilegeInfo(serverId, userId);
|
||||
if (cUserPrivilegeInfo != null){
|
||||
arenaInfoVo.setSave_amt(cUserPrivilegeInfo.getSave_amt());
|
||||
}else{
|
||||
arenaInfoVo.setSave_amt(0);
|
||||
}
|
||||
arenaInfoVo.setLevel(cUser.getLevel());
|
||||
CArena cArena = familyDao.getCArena(serverId,userId);
|
||||
arenaInfoVo.setAttackForces(cArena.getAttackForces());
|
||||
arenaInfoVo.setDefenceForces(cArena.getDefenceForces());
|
||||
}else{
|
||||
arenaInfoVo.setIsData(0);
|
||||
}
|
||||
}
|
||||
map.put("arenaInfoVo",arenaInfoVo);
|
||||
return "arenaInfo";
|
||||
|
|
|
@ -54,22 +54,24 @@ public class GameTitleController {
|
|||
}
|
||||
boolean isSuccess = false;
|
||||
for (String userId : userIds) {
|
||||
if(serverId ==0){
|
||||
List<CUserInfo> roleList = userInfoDao.findRoleList(userId);
|
||||
for (CUserInfo cUserInfo :roleList){
|
||||
isSuccess = isSuccess(serverId, type, banTime, banReason, sendTime, isSuccess, banEndTime, cUserInfo);
|
||||
if (isSuccess){
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else {
|
||||
CUserInfo userInfo = userInfoDao.findUserInfo(serverId, userId, "");
|
||||
if (userInfo == null) {
|
||||
isSuccess = true;
|
||||
break;
|
||||
}
|
||||
isSuccess = isSuccess(serverId, type, banTime, banReason, sendTime, isSuccess, banEndTime, userInfo);
|
||||
}
|
||||
CUserInfo cUserInfo = userInfoDao.findUserInfoByUserId(Integer.parseInt(userId));
|
||||
isSuccess = isSuccess(serverId, type, banTime, banReason, sendTime, isSuccess, banEndTime, cUserInfo);
|
||||
// if(serverId ==0){
|
||||
// List<CUserInfo> roleList = userInfoDao.findRoleList(userId);
|
||||
// for (CUserInfo cUserInfo :roleList){
|
||||
// isSuccess = isSuccess(serverId, type, banTime, banReason, sendTime, isSuccess, banEndTime, cUserInfo);
|
||||
// if (isSuccess){
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// CUserInfo userInfo = userInfoDao.findUserInfo(serverId, userId, "");
|
||||
// if (userInfo == null) {
|
||||
// isSuccess = true;
|
||||
// break;
|
||||
// }
|
||||
// isSuccess = isSuccess(serverId, type, banTime, banReason, sendTime, isSuccess, banEndTime, userInfo);
|
||||
// }
|
||||
}
|
||||
if (isSuccess){
|
||||
return 1;
|
||||
|
|
|
@ -33,17 +33,18 @@ public class UserInfoController {
|
|||
int serverId = Integer.parseInt(parameterMap.get("serverId"));
|
||||
String openId = parameterMap.get("userId");
|
||||
String plat = parameterMap.get("plat");
|
||||
CUserInfo cUserInfo = userInfoDao.findUserInfo(serverId,openId,plat);
|
||||
CUserVo cUserVo = getcUserVo(serverId, cUserInfo);
|
||||
CUserInfo cUserInfo = userInfoDao.findUserInfoByUserId(Integer.parseInt(openId));
|
||||
CUserVo cUserVo = getcUserVo(cUserInfo);
|
||||
map.put("cUserVo",cUserVo);
|
||||
return "userInfo";
|
||||
}
|
||||
|
||||
private CUserVo getcUserVo(int serverId, CUserInfo cUserInfo) throws Exception {
|
||||
private CUserVo getcUserVo(CUserInfo cUserInfo) throws Exception {
|
||||
CUserVo cUserVo = new CUserVo();
|
||||
if (cUserInfo == null){
|
||||
cUserVo.setIsData(0);
|
||||
}else{
|
||||
int serverId = cUserInfo.getServerid();
|
||||
int userId = cUserInfo.getUserId();
|
||||
CUser cUser = userInfoDao.findCuserInfo(serverId,userId);
|
||||
if (cUser == null){
|
||||
|
@ -79,7 +80,7 @@ public class UserInfoController {
|
|||
cUserVo.setSave_amt(cUserPrivilegeInfo.getSave_amt());
|
||||
cUserVo.setCreateTime(JsonUtil.timeStamp2Date(String.valueOf(cUser.getCreateTime())));
|
||||
cUserVo.setOutLineTime(JsonUtil.timeStamp2Date(String.valueOf(cUser.getOutLineTime())));
|
||||
cUserVo.setCumulativeOnlineTime(cUser.getCumulativeOnlineTime() +"(毫秒)");
|
||||
cUserVo.setCumulativeOnlineTime(cUser.getCumulativeOnlineTime()/1000/60 +"(分)");
|
||||
cUserVo.setFinishDiffFightCount(cUser.getMission().getCumulationData().getFinishDiffFightCount());
|
||||
cUserVo.setFinishGeneralFightCount(cUser.getMission().getCumulationData().getFinishGeneralFightCount());
|
||||
cUserVo.setExpeditionFinght(userInfoDao.getCExpedition(serverId,userId));
|
||||
|
|
|
@ -48,7 +48,7 @@ public class CUserVo implements java.io.Serializable {
|
|||
|
||||
public String cumulativeOnlineTime; //总累计时间
|
||||
|
||||
public int finishGeneralFightCount ; //通关困难关卡
|
||||
public int finishGeneralFightCount ; //通关普通关卡
|
||||
|
||||
public int finishDiffFightCount ; //通关困难关卡
|
||||
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
账号id:</label>
|
||||
用户id:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<textarea class="textarea" name="userIds" placeholder="单人:账号id,多人:账号id#账号id..."></textarea>
|
||||
<textarea class="textarea" name="userIds" placeholder="单人:用户id,多人:用户id#用户id..."></textarea>
|
||||
<span class="USERIDS"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<div class="row cl">
|
||||
<label class="form-label col-xs-4 col-sm-2">
|
||||
<span class="c-red">*</span>
|
||||
账 号 ID:</label>
|
||||
用 户 ID:</label>
|
||||
<div class="formControls col-xs-8 col-sm-9">
|
||||
<input type="text" name="userId" placeholder="" value="" class="input-text"/>
|
||||
<span class="USERID"></span>
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<th width="1000">創角時間</th>
|
||||
<th width="800">最近登出時間</th>
|
||||
<th width="800">遊戲時長</th>
|
||||
<th width="500">副本停留關卡</th>
|
||||
<th width="500">普通副本停留關卡</th>
|
||||
<th width="500">困難副本停留關卡</th>
|
||||
<th width="500">遠征進度</th>
|
||||
<th width="500">前塵幻境進度</th>
|
||||
|
|
Loading…
Reference in New Issue