WANG 5 سال پیش
والد
کامیت
062fd1a1c6

+ 0 - 64
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/CommonCloudServiceProvider.java

@@ -1,64 +0,0 @@
-package cn.com.qmth.examcloud.core.basic.api.provider;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import cn.com.qmth.examcloud.commons.exception.StatusException;
-import cn.com.qmth.examcloud.core.basic.api.CommonCloudService;
-import cn.com.qmth.examcloud.core.basic.api.bean.ThirdPartyAccessBean;
-import cn.com.qmth.examcloud.core.basic.api.request.GetThirdPartyAccessInfoReq;
-import cn.com.qmth.examcloud.core.basic.api.response.GetThirdPartyAccessInfoResp;
-import cn.com.qmth.examcloud.core.basic.dao.ThirdPartyAccessRepo;
-import cn.com.qmth.examcloud.core.basic.dao.entity.ThirdPartyAccessEntity;
-import cn.com.qmth.examcloud.core.basic.dao.entity.ThirdPartyAccessPK;
-import cn.com.qmth.examcloud.web.helpers.GlobalHelper;
-import io.swagger.annotations.ApiOperation;
-
-/**
- * 类注释
- *
- * @author WANGWEI
- * @date 2018年7月6日
- * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
- */
-@RestController
-@RequestMapping("${$rmp.cloud.basic}" + "common")
-public class CommonCloudServiceProvider implements CommonCloudService {
-
-	private static final long serialVersionUID = 8860099250569635574L;
-
-	@Autowired
-	ThirdPartyAccessRepo thirdPartyAccessRepo;
-
-	@ApiOperation(value = "获取第三方接入信息")
-	@PostMapping("getThirdPartyAccessInfo")
-	@Override
-	public GetThirdPartyAccessInfoResp getThirdPartyAccessInfo(
-			@RequestBody GetThirdPartyAccessInfoReq req) {
-
-		String appId = req.getAppId();
-		Long rootOrgId = req.getRootOrgId();
-
-		ThirdPartyAccessEntity entity = GlobalHelper.getEntity(thirdPartyAccessRepo,
-				new ThirdPartyAccessPK(rootOrgId, appId), ThirdPartyAccessEntity.class);
-
-		if (null == entity) {
-			throw new StatusException("001001", "第三方接入信息不存在");
-		}
-
-		ThirdPartyAccessBean bean = new ThirdPartyAccessBean();
-		bean.setAppId(entity.getAppId());
-		bean.setRootOrgId(entity.getRootOrgId());
-		bean.setSecretKey(entity.getSecretKey());
-		bean.setTimeRange(entity.getTimeRange());
-
-		GetThirdPartyAccessInfoResp resp = new GetThirdPartyAccessInfoResp();
-		resp.setThirdPartyAccessBean(bean);
-
-		return resp;
-	}
-
-}