|
@@ -3,11 +3,15 @@ package com.fdkankan.ucenter.controller.inner;
|
|
import com.fdkankan.ucenter.common.BaseController;
|
|
import com.fdkankan.ucenter.common.BaseController;
|
|
import com.fdkankan.ucenter.common.Result;
|
|
import com.fdkankan.ucenter.common.Result;
|
|
import com.fdkankan.ucenter.service.IInnerService;
|
|
import com.fdkankan.ucenter.service.IInnerService;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
* 内部接口控制器
|
|
* 内部接口控制器
|
|
@@ -31,5 +35,19 @@ public class InnerController extends BaseController {
|
|
String customToken = request.getHeader("custom-token");
|
|
String customToken = request.getHeader("custom-token");
|
|
return innerService.createTokenByNum(num, customToken);
|
|
return innerService.createTokenByNum(num, customToken);
|
|
}
|
|
}
|
|
|
|
+ /**
|
|
|
|
+ * 根据场景码获取场景码版本
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/_getSceneNumVersion")
|
|
|
|
+ public Result getSceneNumVersion(@RequestParam(required = false) String num) throws Exception{
|
|
|
|
+ String version = innerService.getSceneNumVersion(num);
|
|
|
|
+ if(StringUtils.isNotBlank(version)){
|
|
|
|
+ return Result.failure("场景不存在");
|
|
|
|
+ }
|
|
|
|
+ HashMap<String,String> map = new HashMap<>();
|
|
|
|
+ map.put("num",num);
|
|
|
|
+ map.put("version",version);
|
|
|
|
+ return Result.success(map);
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|