|
|
|
@ -17,10 +17,12 @@ import com.huoran.nakadai.service.PlatformTeamClassificationService; |
|
|
|
|
import com.huoran.nakadai.service.PlatformTeamService; |
|
|
|
|
import com.huoran.nakadai.service.SupplierClassificationConfigService; |
|
|
|
|
import com.huoran.nakadai.utils.GenerateCodeUtil; |
|
|
|
|
import com.huoran.nakadai.utils.ali.HttpUtils; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import io.swagger.annotations.ApiParam; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.apache.http.HttpResponse; |
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
|
@ -29,6 +31,7 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import javax.validation.Valid; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Objects; |
|
|
|
@ -241,5 +244,38 @@ public class PlatformTeamAccountController { |
|
|
|
|
public R inviteJoinOrganization(@RequestBody @Valid InviteJoinInfo inviteJoinInfo) { |
|
|
|
|
return platformTeamAccountService.inviteJoinOrganization(inviteJoinInfo); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
String host = "https://gpsyl.market.alicloudapi.com"; |
|
|
|
|
String path = "/ai_market/kg/gu_piao_shi_ying_lv/v1"; |
|
|
|
|
String method = "GET"; |
|
|
|
|
String appcode = "4c22c2b34b2d4b5aaa57186a49aa3a4c"; |
|
|
|
|
Map<String, String> headers = new HashMap<String, String>(); |
|
|
|
|
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
|
|
|
|
|
headers.put("Authorization", "APPCODE " + appcode); |
|
|
|
|
Map<String, String> querys = new HashMap<String, String>(); |
|
|
|
|
querys.put("PRICE", "6.5899"); |
|
|
|
|
querys.put("PROFIT", "1"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
/** |
|
|
|
|
* 重要提示如下: |
|
|
|
|
* HttpUtils请从 |
|
|
|
|
* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java
|
|
|
|
|
* 下载 |
|
|
|
|
* |
|
|
|
|
* 相应的依赖请参照 |
|
|
|
|
* https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml
|
|
|
|
|
*/ |
|
|
|
|
HttpResponse response = HttpUtils.doGet(host, path, method, headers, querys); |
|
|
|
|
System.out.println(response.toString()); |
|
|
|
|
//获取response的body
|
|
|
|
|
//System.out.println(EntityUtils.toString(response.getEntity()));
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|