|
@@ -9,9 +9,11 @@ import com.fdkankan.redis.constant.RedisKey;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.ucenter.common.Result;
|
|
import com.fdkankan.ucenter.common.Result;
|
|
import com.fdkankan.ucenter.entity.ScenePlus;
|
|
import com.fdkankan.ucenter.entity.ScenePlus;
|
|
|
|
+import com.fdkankan.ucenter.entity.ScenePlusExt;
|
|
import com.fdkankan.ucenter.entity.ScenePro;
|
|
import com.fdkankan.ucenter.entity.ScenePro;
|
|
import com.fdkankan.ucenter.entity.User;
|
|
import com.fdkankan.ucenter.entity.User;
|
|
import com.fdkankan.ucenter.service.IInnerService;
|
|
import com.fdkankan.ucenter.service.IInnerService;
|
|
|
|
+import com.fdkankan.ucenter.service.IScenePlusExtService;
|
|
import com.fdkankan.ucenter.service.IScenePlusService;
|
|
import com.fdkankan.ucenter.service.IScenePlusService;
|
|
import com.fdkankan.ucenter.service.ISceneProService;
|
|
import com.fdkankan.ucenter.service.ISceneProService;
|
|
import com.fdkankan.ucenter.service.IUserService;
|
|
import com.fdkankan.ucenter.service.IUserService;
|
|
@@ -41,19 +43,14 @@ public class InnerServiceImpl implements IInnerService {
|
|
@Autowired
|
|
@Autowired
|
|
private IScenePlusService scenePlusService;
|
|
private IScenePlusService scenePlusService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private IScenePlusExtService scenePlusExtService;
|
|
|
|
+ @Autowired
|
|
private IUserService userService;
|
|
private IUserService userService;
|
|
@Autowired
|
|
@Autowired
|
|
private RedisUtil redisUtil;
|
|
private RedisUtil redisUtil;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public Result createTokenByNum(String num, String customToken) {
|
|
|
|
-
|
|
|
|
- log.info(this.customToken);
|
|
|
|
- log.info(customToken);
|
|
|
|
-
|
|
|
|
- if(!this.customToken.equals(customToken)){
|
|
|
|
- return Result.failure("无权访问");
|
|
|
|
- }
|
|
|
|
|
|
+ public Result createTokenByNum(String num) {
|
|
|
|
|
|
Long userId = null;
|
|
Long userId = null;
|
|
ScenePro scenePro = sceneProService.getByNum(num);
|
|
ScenePro scenePro = sceneProService.getByNum(num);
|
|
@@ -76,4 +73,22 @@ public class InnerServiceImpl implements IInnerService {
|
|
|
|
|
|
return Result.success(object);
|
|
return Result.success(object);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Result querySceneDataSource(String num) {
|
|
|
|
+
|
|
|
|
+ String dataSource = null;
|
|
|
|
+ ScenePro scenePro = sceneProService.getByNum(num);
|
|
|
|
+ if(Objects.isNull(scenePro)){
|
|
|
|
+ ScenePlus scenePlus = scenePlusService.getByNum(num);
|
|
|
|
+ if(Objects.isNull(scenePlus)){
|
|
|
|
+ return Result.failure(ErrorCode.FAILURE_CODE_5005.code(), ErrorCode.FAILURE_CODE_5005.message());
|
|
|
|
+ }
|
|
|
|
+ ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
|
|
+ dataSource = scenePlusExt.getDataSource();
|
|
|
|
+ }else{
|
|
|
|
+ dataSource = scenePro.getDataSource();
|
|
|
|
+ }
|
|
|
|
+ return Result.success("成功", dataSource);
|
|
|
|
+ }
|
|
}
|
|
}
|