|
@@ -1,10 +1,12 @@
|
|
|
package com.fdkankan.ucenter.controller.fire;
|
|
|
|
|
|
+import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.common.util.JwtUtil;
|
|
|
import com.fdkankan.ucenter.common.BaseController;
|
|
|
import com.fdkankan.ucenter.common.Result;
|
|
|
import com.fdkankan.ucenter.common.ResultData;
|
|
|
+import com.fdkankan.ucenter.common.constants.ResultCode;
|
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
|
import com.fdkankan.ucenter.entity.ScenePlus;
|
|
|
import com.fdkankan.ucenter.entity.ScenePro;
|
|
@@ -62,7 +64,7 @@ public class FdUserSceneController extends BaseController {
|
|
|
@GetMapping("/getTokenByNum")
|
|
|
public ResultData getTokenByNum(@RequestParam(required = false) String num ){
|
|
|
if(StringUtils.isEmpty(num)){
|
|
|
- throw new BusinessException(-1,"参数为空");
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_3001);
|
|
|
}
|
|
|
Long userId = null;
|
|
|
ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
@@ -75,7 +77,7 @@ public class FdUserSceneController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
if(userId == null){
|
|
|
- throw new BusinessException(-1,"场景为空");
|
|
|
+ throw new BusinessException(ResultCode.FAILURE_CODE_400010,ResultCode.FAILURE_MSG_400010);
|
|
|
}
|
|
|
User user = userService.getById(userId);
|
|
|
if(user == null){
|