瀏覽代碼

删除testlaser配置

lyhzzz 2 年之前
父節點
當前提交
e288d15403

+ 0 - 22
src/main/java/com/fdkankan/ucenter/httpClient/address/FdkkAddressSource.java

@@ -1,22 +0,0 @@
-package com.fdkankan.ucenter.httpClient.address;
-
-import com.dtflys.forest.callback.AddressSource;
-import com.dtflys.forest.http.ForestAddress;
-import com.dtflys.forest.http.ForestRequest;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-@Component
-public class FdkkAddressSource implements AddressSource {
-
-    @Value("${4dkk.fdService.basePath}")
-    private String basePath;
-
-    @Value("${4dkk.fdService.port}")
-    private String port;
-
-    @Override
-    public ForestAddress getAddress(ForestRequest forestRequest) {
-        return new ForestAddress("","",Integer.valueOf(port),basePath);
-    }
-}

+ 0 - 26
src/main/java/com/fdkankan/ucenter/httpClient/client/FdkkClient.java

@@ -1,26 +0,0 @@
-package com.fdkankan.ucenter.httpClient.client;
-
-import com.alibaba.fastjson.JSONObject;
-import com.dtflys.forest.annotation.*;
-import com.fdkankan.ucenter.httpClient.address.FdkkAddressSource;
-import com.fdkankan.ucenter.vo.request.LoginParam;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 获取四维看看相关数据
- */
-public interface FdkkClient {
-
-    /**
-     * 登录
-     */
-    @Post("/api/sso/user/login")
-    @Address(source = FdkkAddressSource.class)
-    JSONObject fdkkLogin(@JSONBody LoginParam fdkkLoginRequest);
-
-
-}

+ 0 - 14
src/main/java/com/fdkankan/ucenter/service/impl/LoginService.java

@@ -20,7 +20,6 @@ import com.fdkankan.ucenter.constant.QrCodeFilePath;
 import com.fdkankan.ucenter.entity.Camera;
 import com.fdkankan.ucenter.entity.CameraDetail;
 import com.fdkankan.ucenter.entity.User;
-import com.fdkankan.ucenter.httpClient.client.FdkkClient;
 import com.fdkankan.ucenter.service.ICameraDetailService;
 import com.fdkankan.ucenter.service.ICameraService;
 import com.fdkankan.ucenter.service.IUserService;
@@ -35,7 +34,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import javax.annotation.Resource;
 
 @Service
 public class LoginService {
@@ -55,19 +53,7 @@ public class LoginService {
     @Value("${main.url}")
     private String mainUrl;
 
-    @Value("${spring.profiles.active}")
-    private String environment;
-    @Resource
-    private FdkkClient fdkkClient;
-
     public Object login(LoginParam param) {
-        if(environment.equals("test")){ //测试环境登录
-            JSONObject jsonObject = fdkkClient.fdkkLogin(param);
-            if(jsonObject.getInteger("code") != 0){
-                throw new BusinessException(jsonObject.getInteger("code"),jsonObject.getString("msg"));
-            }
-            return fdkkClient.fdkkLogin(param).getJSONObject("data");
-        }
         if (StringUtils.isEmpty(param.getPassword()) || StringUtils.isEmpty(param.getPhoneNum())){
             throw new BusinessException(LoginConstant.FAILURE_CODE_3001, LoginConstant.FAILURE_MSG_3001);
         }