|
@@ -6,11 +6,9 @@ import com.fdkankan.manage.common.ResultData;
|
|
import com.fdkankan.manage.controller.BaseController;
|
|
import com.fdkankan.manage.controller.BaseController;
|
|
import com.fdkankan.manage.entity.JySceneUserAuth;
|
|
import com.fdkankan.manage.entity.JySceneUserAuth;
|
|
import com.fdkankan.manage.entity.JyUser;
|
|
import com.fdkankan.manage.entity.JyUser;
|
|
|
|
+import com.fdkankan.manage.entity.UserShareParam;
|
|
import com.fdkankan.manage.exception.BusinessException;
|
|
import com.fdkankan.manage.exception.BusinessException;
|
|
-import com.fdkankan.manage.service.IJySceneUserAuthService;
|
|
|
|
-import com.fdkankan.manage.service.IJyUserService;
|
|
|
|
-import com.fdkankan.manage.service.IScenePlusService;
|
|
|
|
-import com.fdkankan.manage.service.IUserService;
|
|
|
|
|
|
+import com.fdkankan.manage.service.*;
|
|
import com.fdkankan.manage.util.RsaUtils;
|
|
import com.fdkankan.manage.util.RsaUtils;
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
import com.fdkankan.manage.vo.request.UserParam;
|
|
import com.fdkankan.manage.vo.request.UserParam;
|
|
@@ -30,6 +28,8 @@ public class InnerAPIController extends BaseController {
|
|
IJySceneUserAuthService jySceneUserAuthService;
|
|
IJySceneUserAuthService jySceneUserAuthService;
|
|
@Autowired
|
|
@Autowired
|
|
IScenePlusService scenePlusService;
|
|
IScenePlusService scenePlusService;
|
|
|
|
+ @Autowired
|
|
|
|
+ IJyUserShareService jyUserShareService;
|
|
|
|
|
|
@PostMapping("/getByRyId")
|
|
@PostMapping("/getByRyId")
|
|
public ResultData getByRyId(@RequestBody UserParam param){
|
|
public ResultData getByRyId(@RequestBody UserParam param){
|
|
@@ -139,6 +139,25 @@ public class InnerAPIController extends BaseController {
|
|
if(StringUtils.isBlank(param.getRyId()) && StringUtils.isBlank(param.getRyNo())){
|
|
if(StringUtils.isBlank(param.getRyId()) && StringUtils.isBlank(param.getRyNo())){
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
}
|
|
}
|
|
- return ResultData.ok(jySceneUserAuthService.getSceneList(param));
|
|
|
|
|
|
+ JyUser jyUser = null;
|
|
|
|
+ if(StringUtils.isNotBlank(param.getRyId()) ){
|
|
|
|
+ jyUser = jyUserService.getByRyId(param.getRyId());
|
|
|
|
+ if(jyUser == null){
|
|
|
|
+ throw new BusinessException(ResultCode.JY_ID_NO_EXIST);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(param.getRyNo()) ){
|
|
|
|
+ jyUser = jyUserService.getByRyNo(param.getRyNo());
|
|
|
|
+ if(jyUser == null){
|
|
|
|
+ throw new BusinessException(ResultCode.JY_ID_NO_EXIST);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(jyUser == null){
|
|
|
|
+ throw new BusinessException(ResultCode.JY_ID_NO_EXIST);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ UserShareParam shareParam = new UserShareParam();
|
|
|
|
+ shareParam.setJyUserId(jyUser.getId());
|
|
|
|
+ return ResultData.ok(jyUserShareService.sceneList(shareParam));
|
|
}
|
|
}
|
|
}
|
|
}
|