修改新用户首次确认收货,签到,点击会员中心,空指针异常
This commit is contained in:
@ -10,6 +10,7 @@ package co.yixiang.modules.user.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import co.yixiang.modules.user.entity.YxSystemUserLevel;
|
||||
import co.yixiang.modules.user.entity.YxUserLevel;
|
||||
import co.yixiang.modules.user.mapper.YxSystemUserLevelMapper;
|
||||
import co.yixiang.modules.user.mapping.SystemUserLevelMap;
|
||||
import co.yixiang.modules.user.service.YxSystemUserLevelService;
|
||||
@ -133,7 +134,11 @@ public class YxSystemUserLevelServiceImpl extends BaseServiceImpl<YxSystemUserLe
|
||||
*/
|
||||
@Override
|
||||
public UserLevelDTO getLevelInfo(int uid,boolean isTask) {
|
||||
int id = userLevelService.getUserLevel(uid,0).getId(); //用户当前等级id
|
||||
int id = 0; //用户当前等级id
|
||||
YxUserLevel userLevel = userLevelService.getUserLevel(uid, 0);
|
||||
if(userLevel.getId()!=null){
|
||||
userLevel.getId();
|
||||
}
|
||||
UserLevelInfoDTO userLevelInfoDTO = null;
|
||||
if(id > 0) userLevelInfoDTO = userLevelService.getUserLevelInfo(id);
|
||||
int levelId = 0;
|
||||
|
@ -118,9 +118,11 @@ public class YxUserLevelServiceImpl extends BaseServiceImpl<YxUserLevelMapper, Y
|
||||
public boolean setLevelComplete(int uid) {
|
||||
YxUserQueryVo userQueryVo = userService.getYxUserById(uid);
|
||||
if(ObjectUtil.isNull(userQueryVo)) return false;
|
||||
|
||||
int levelId = getUserLevel(uid,9).getLevelId();
|
||||
|
||||
int levelId = 0;
|
||||
YxUserLevel yxUserLevel = getUserLevel(uid,9);
|
||||
if(yxUserLevel.getId()!=null ){
|
||||
levelId = yxUserLevel.getLevelId();
|
||||
}
|
||||
int nextLevelId = systemUserLevelService.getNextLevelId(levelId);
|
||||
if(nextLevelId == 0) return false;
|
||||
|
||||
|
Reference in New Issue
Block a user