|
@@ -10,6 +10,7 @@ import com.fdkankan.manage.service.ICommonService;
|
|
|
import com.fdkankan.manage.service.IRtkInfoService;
|
|
|
import com.fdkankan.manage.service.ISceneProService;
|
|
|
import com.fdkankan.manage.service.IServiceUpTipService;
|
|
|
+import com.fdkankan.manage.util.RsaUtils;
|
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -72,6 +73,20 @@ public class InnerController extends BaseController {
|
|
|
if(StringUtils.isBlank(rtkSnCode)){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
+ String token = getSign();
|
|
|
+ if(StringUtils.isBlank(token)){
|
|
|
+ throw new BusinessException(ResultCode.RTK_TOKEN_NOT_EXIT);
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ String deTxt = RsaUtils.decipher(token, RsaUtils.privateKey);
|
|
|
+ if(!deTxt.equals(rtkSnCode)){
|
|
|
+ throw new BusinessException(ResultCode.RTK_TOKEN_ERROR);
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ throw new BusinessException(ResultCode.RTK_TOKEN_ERROR);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
RtkInfo rtkInfo = rtkInfoService.getByRtkSnCode(rtkSnCode);
|
|
|
if(rtkInfo == null){
|
|
|
throw new BusinessException(ResultCode.RTK_SN_CODE_NOT_EXIT);
|