|
@@ -13,7 +13,8 @@ import com.fdkankan.fyun.face.FYunFileServiceInterface;
|
|
|
import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.redis.constant.RedisLockKey;
|
|
|
import com.fdkankan.redis.util.RedisLockUtil;
|
|
|
-import com.fdkankan.ucenter.annotation.CheckInnerApiPermit;
|
|
|
+import com.fdkankan.sign.AesUtil;
|
|
|
+import com.fdkankan.ucenter.annotation.VerifySign;
|
|
|
import com.fdkankan.ucenter.common.BaseController;
|
|
|
import com.fdkankan.ucenter.common.Result;
|
|
|
import com.fdkankan.ucenter.common.constants.ConstantFilePath;
|
|
@@ -31,7 +32,6 @@ import com.fdkankan.ucenter.vo.response.LoginVo;
|
|
|
import com.fdkankan.ucenter.vo.response.SceneInfoVo;
|
|
|
import com.fdkankan.ucenter.vo.response.UserVo;
|
|
|
import java.io.File;
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLEncoder;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -39,7 +39,6 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.joda.time.DateTime;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -104,6 +103,7 @@ public class SceneApiController extends BaseController {
|
|
|
|
|
|
//app 使用跳转到编辑页面
|
|
|
@RequestMapping("/goEditScenePage")
|
|
|
+ @VerifySign
|
|
|
public void goEditScenePage(HttpServletRequest request, HttpServletResponse response) throws Exception{
|
|
|
String phoneNum = request.getParameter("phoneNum");
|
|
|
String password = request.getParameter("password");
|
|
@@ -175,8 +175,13 @@ public class SceneApiController extends BaseController {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
- if(!SecurityUtil.MD5(password).equals(ssoUser.getPassword())) {
|
|
|
+ String passwordCode = null;
|
|
|
+ try {
|
|
|
+ passwordCode = SecurityUtil.MD5(AesUtil.desEncrypt(password));
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new BusinessException(LoginConstant.FAILURE_CODE_3014, LoginConstant.FAILURE_MSG_3014);
|
|
|
+ }
|
|
|
+ if(!SecurityUtil.MD5(passwordCode).equals(ssoUser.getPassword())) {
|
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3015, LoginConstant.FAILURE_MSG_3015);
|
|
|
}
|
|
|
sendResponse(ssoUser,webSite, request,response,sceneNum,lang,vlog, pad);
|
|
@@ -222,6 +227,7 @@ public class SceneApiController extends BaseController {
|
|
|
|
|
|
//app调用 跳转到官网消费页面
|
|
|
@RequestMapping("/goConsumptionPage")
|
|
|
+ @VerifySign
|
|
|
public void goConsumptionPage(HttpServletRequest request, HttpServletResponse response) throws Exception{
|
|
|
String phoneNum = request.getParameter("phoneNum");
|
|
|
String password = request.getParameter("password");
|
|
@@ -248,6 +254,7 @@ public class SceneApiController extends BaseController {
|
|
|
* 查找123看房未使用过的场景吗
|
|
|
* */
|
|
|
@PostMapping("/finSkSceneNum")
|
|
|
+ @VerifySign
|
|
|
public Result finSkSceneNum(){
|
|
|
String num = scene3dNumService.generateSceneNum(null);
|
|
|
return Result.success(num);
|
|
@@ -257,6 +264,7 @@ public class SceneApiController extends BaseController {
|
|
|
* 查找八目未使用过的场景吗*
|
|
|
* */
|
|
|
@PostMapping("/finSceneNum")
|
|
|
+ @VerifySign
|
|
|
public Result finSceneNum(){
|
|
|
String num = scene3dNumService.generateSceneNum(null);
|
|
|
return Result.success(num);
|
|
@@ -390,6 +398,7 @@ public class SceneApiController extends BaseController {
|
|
|
* 内部使用查询场景名称和场景码
|
|
|
*/
|
|
|
@RequestMapping(value = "/getScenesBySnCode", method = RequestMethod.GET)
|
|
|
+ @VerifySign
|
|
|
public Result getScenesBySnCode(String snCode) throws Exception{
|
|
|
return sceneApiService.getScenesBySnCode(snCode,getToken());
|
|
|
}
|
|
@@ -414,7 +423,7 @@ public class SceneApiController extends BaseController {
|
|
|
/**
|
|
|
* 增加场景下载次数
|
|
|
*/
|
|
|
- @RequestMapping(value = "/addDownloadNum", method = RequestMethod.GET)
|
|
|
+ //@RequestMapping(value = "/addDownloadNum", method = RequestMethod.GET)
|
|
|
public Result addDownloadNum(HttpServletRequest request) throws Exception{
|
|
|
sceneApiService.addDownloadNum(request.getParameter("sceneNum"));
|
|
|
return Result.success();
|
|
@@ -424,6 +433,7 @@ public class SceneApiController extends BaseController {
|
|
|
* 获取编辑页面的资源下载路径
|
|
|
*/
|
|
|
@RequestMapping(value = "/getEditDataUrl")
|
|
|
+ @VerifySign
|
|
|
public Result getEditDataUrl(HttpServletRequest request) throws Exception{
|
|
|
List<String> result = sceneApiService.getEditDataUrl(request.getParameter("num"));
|
|
|
return Result.success(result);
|
|
@@ -433,6 +443,7 @@ public class SceneApiController extends BaseController {
|
|
|
* 查询场景资源路径
|
|
|
*/
|
|
|
@GetMapping("/querySceneDataSource")
|
|
|
+ @VerifySign
|
|
|
public String querySceneDataSource(String num){
|
|
|
return innerService.querySceneDataSource(num);
|
|
|
}
|