Commit ad3bbea8 authored by 周健威's avatar 周健威

修改代码

parent 12e8e9c2
......@@ -20,9 +20,11 @@ import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.github.wxiaoqi.security.common.vo.PageParam;
import com.upyuns.platform.rs.datacenter.biz.RscpAreaImageTotalBiz;
import com.upyuns.platform.rs.datacenter.biz.RscpImageDataTotalBiz;
import com.upyuns.platform.rs.datacenter.biz.RscpImageInputLogBiz;
import com.upyuns.platform.rs.datacenter.biz.RscpImagePriceBiz;
import com.upyuns.platform.rs.datacenter.entity.RscpAreaImageTotal;
import com.upyuns.platform.rs.datacenter.entity.RscpImageDataTotal;
import com.upyuns.platform.rs.datacenter.entity.RscpImageInputLog;
import com.upyuns.platform.rs.datacenter.entity.RscpImagePrice;
import com.upyuns.platform.rs.datacenter.fegin.RscloudboxClientRest;
import com.upyuns.platform.rs.datacenter.mapper.RscpAreaInfoMapper;
......@@ -74,6 +76,9 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
@Autowired
RscloudboxClientRest rscloudboxClientRest;
@Autowired
RscpImageInputLogBiz rscpImageInputLogBiz;
@RequestMapping(value = "/app/unauth/query", method = RequestMethod.GET)
@IgnoreUserToken
public ObjectRestResponse unauthQuery(PageParam pageParam) {
......@@ -82,6 +87,7 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
@RequestMapping(value = "/app/unauth/aaa", method = RequestMethod.GET)
@IgnoreUserToken
@IgnoreClientToken
public ObjectRestResponse unauthAaaa(PageParam pageParam) {
// ImageInputVO vo = JSONUtil.toBean("{\"rightTopLon\":87.33106598951404,\"leftBottomLon\":87.26891697286784,\"imageCloudage\":0.18,\"imageSensorType\":\"micro\",\"imageWidthInPixels\":5001,\"imageSpectrumTypeDisplay\":\"{全色,多光谱}\",\"imageSatelliteTypeDisplay\":\"newsat8\",\"supplier\":\"Satellogic\",\"imageSensorId\":\"micro\",\"imageProductTime\":\"2020-09-14 04:42:05\",\"leftTopLat\":44.022589860423246,\"imageResolution\":[1,1],\"rightBottomLon\":87.33106598951404,\"imageStartTime\":\"2020-09-14 04:42:05\",\"imageCenterTime\":\"2020-09-14 04:42:05\",\"imageProjection\":\"WGS-84\",\"imageFilePath\":\"/rscloudmart/data/sateLLogic/20201220/20200914_044205_SN8_L1_Changji-China/20200914_044205_SN8_L1_Changji-China.zip\",\"imageSpectrumType\":\"{QS,DGP}\",\"imageSatelliteType\":\"newsat8\",\"imageSceneId\":\"newsat8_micro_L1_radiance_dca17df4-754d-4f02-ac65-3de4bfc66254_0_11_0\",\"imageCenterPointLon\":87.29999148119094,\"imageTakeTime\":\"2020-09-14 04:42:05\",\"leftTopLon\":87.26891697286784,\"imageEndTime\":\"2020-09-14 04:42:05\",\"rightTopLat\":44.022589860423246,\"leftBottomLat\":43.9774001602467,\"name\":\"20200914_044205_SN8_L1_Changji-China\",\"thumbnailPath\":\"/users/rscloudmart/thumbnail/data/sateLLogic/20201220/20200914_044205_SN8_L1_Changji-China\",\"imageCenterPointLat\":43.99999501033497,\"files\":[\"/20200914_044205_SN8_L1_Metadata.xml\",\"/20200914_044205_SN8_L1_RGB_Changji-China_showcase_Quicklook_800_800.png\",\"/20200914_044205_SN8_L1_RGB_Changji-China_showcase_Quicklook_800_800.jpeg\",\"/20200914_044205_SN8_L1_RGB_Changji-China_showcase_Quicklook_205_205.jpeg\",\"/20200914_044205_SN8_L1_RGB_Changji-China_showcase_Quicklook_98_98.jpeg\"],\"imageProductFormat\":\"TIFF\",\"imageHeightInPixels\":\"5001\",\"rightBottomLat\":43.9774001602467}", ImageInputVO.class);
ImageInputVO vo = JSONUtil.toBean("{\"rightTopLon\":113.16291993521179,\"leftBottomLon\":113.2061962551077,\"imageCloudage\":0,\"imageSensorType\":\"micro\",\"imageWidthInPixels\":4400,\"imageSpectrumTypeDisplay\":\"全色,多光谱\",\"imageSatelliteTypeDisplay\":\"newsat8\",\"supplier\":\"Satellogic\",\"imageSensorId\":\"micro\",\"imageProductTime\":\"2020-07-13 02:40:30\",\"leftTopLat\":26.54466924531823,\"imageResolution\":[1,1],\"rightBottomLon\":113.2061962551077,\"imageStartTime\":\"2020-07-13 02:40:30\",\"imageCenterTime\":\"2020-07-13 02:40:30\",\"imageProjection\":\"WGS-84\",\"imageFilePath\":\"/rscloudmart/data/sateLLogic/20200713/20200713_024030_SN8_L1_MS_Huawang-China_showcase//20200713_024030_SN8_L1_MS_Huawang-China_showcase.zip\",\"imageSpectrumType\":\"QS,DGP\",\"imageSatelliteType\":\"newsat8\",\"imageSceneId\":\"newsat8_micro_L1_radiance_a67ee813-f7b3-4c07-be5e-6e8a55d7e13a_0_8_1\",\"imageCenterPointLon\":26.521774593346027,\"imageTakeTime\":\"2020-07-13 02:40:30\",\"leftTopLon\":113.16291993521179,\"imageEndTime\":\"2020-07-13 02:40:30\",\"rightTopLat\":26.498879941373822,\"leftBottomLat\":26.54466924531823,\"name\":\"20200713_024030_SN8_L1_MS_Huawang-China_showcase\",\"thumbnailPath\":\"/rscloudmart/thumbnail/data/sateLLogic/20200713/20200713_024030_SN8_L1_MS_Huawang-China_showcase\",\"imageCenterPointLat\":113.18455809515974,\"files\":[\"/20200713_024030_SN8_L1_Metadata.xml\",\"/20200713_024030_SN8_L1_RGB_Huawang-China_showcase_Quicklook_800_800.png\",\"/20200713_024030_SN8_L1_RGB_Huawang-China_showcase_Quicklook_800_800.jpeg\",\"/20200713_024030_SN8_L1_RGB_Huawang-China_showcase_Quicklook_205_205.jpeg\",\"/20200713_024030_SN8_L1_RGB_Huawang-China_showcase_Quicklook_98_98.jpeg\"],\"imageProductFormat\":\"TIFF\",\"imageHeightInPixels\":\"5000\",\"rightBottomLat\":26.498879941373822}", ImageInputVO.class);
......@@ -90,6 +96,17 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
return ObjectRestResponse.succ();
}
@RequestMapping(value = "/app/unauth/inStorageByLog", method = RequestMethod.GET)
@IgnoreUserToken
@IgnoreClientToken
public ObjectRestResponse inStorageByLog(Integer logId) {
RscpImageInputLog log = rscpImageInputLogBiz.selectById(logId);
ImageInputVO vo = JSONUtil.toBean(log.getContextJson(), ImageInputVO.class);
vo.clearBracket();
baseBiz.inStorage(vo);
return ObjectRestResponse.succ();
}
// resolution
// 分辨率
// spectrum
......
......@@ -44,11 +44,11 @@
<version>2.0-rscp-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>4.0.11</version><!-- 注:这里只是示例版本号,请获取并替换为 最新的版本号 -->
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.tencentcloudapi</groupId>-->
<!-- <artifactId>tencentcloud-sdk-java</artifactId>-->
<!-- <version>4.0.11</version>&lt;!&ndash; 注:这里只是示例版本号,请获取并替换为 最新的版本号 &ndash;&gt;-->
<!-- </dependency>-->
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
......
......@@ -29,8 +29,8 @@ import java.util.regex.Pattern;
@Slf4j
public class SmsService {
@Autowired
TencentSmsService tencentSmsService;
// @Autowired
// TencentSmsService tencentSmsService;
//产品名称:云通信短信API产品,开发者无需替换
static final String product = "Dysmsapi";
......@@ -51,7 +51,7 @@ public class SmsService {
public JSONObject smsCode(String mobile){
String code = RandomUtil.getRandomStr(6);// 6位短信验证码
try {
tencentSmsService.sendSms(mobile, code);
// tencentSmsService.sendSms(mobile, code);
return JsonResultUtil.createSuccessResultWithObj(code);
} catch (Exception e) {
log.error(e.getMessage(), e);
......
package com.upyuns.platform.rs.universal.service;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.profile.ClientProfile;
import com.tencentcloudapi.common.profile.HttpProfile;
import com.tencentcloudapi.sms.v20190711.SmsClient;
import com.tencentcloudapi.sms.v20190711.models.SendSmsRequest;
import com.tencentcloudapi.sms.v20190711.models.SendSmsResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* @ClassName : TencentSmsService
* @Description : 腾讯云短信服务
* @Author : jiaoruizhen
* @Date: 2020-12-29 14:39
*/
@Service
@Slf4j
public class TencentSmsService {
public ObjectRestResponse sendSms(String phone, String message) {
try{
Credential cred = new Credential("AKIDkfPxIRmqxlgOuDv2XVKgqtlII6waAzPe", "FZhqmqjOQGtJl1PehXD8uhJ1ItHSTH7o");
HttpProfile httpProfile = new HttpProfile();
httpProfile.setEndpoint("sms.tencentcloudapi.com");
ClientProfile clientProfile = new ClientProfile();
clientProfile.setHttpProfile(httpProfile);
SmsClient client = new SmsClient(cred, "", clientProfile);
String params = "{\"PhoneNumberSet\":[\"+86"+ phone +"\"],\"TemplateID\":\"365123\",\"Sign\":\"中科光启\",\"TemplateParamSet\":[\""+message+"\"],\"SmsSdkAppid\":\"1400227859\"}";
SendSmsRequest req = SendSmsRequest.fromJsonString(params, SendSmsRequest.class);
SendSmsResponse resp = client.SendSms(req);
return ObjectRestResponse.succ(resp);
} catch (TencentCloudSDKException e) {
System.out.println(e.toString());
}
return ObjectRestResponse.succ();
}
public static void main(String [] args) {
}
}
//package com.upyuns.platform.rs.universal.service;
//
//import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
//import com.tencentcloudapi.common.Credential;
//import com.tencentcloudapi.common.exception.TencentCloudSDKException;
//import com.tencentcloudapi.common.profile.ClientProfile;
//import com.tencentcloudapi.common.profile.HttpProfile;
//import com.tencentcloudapi.sms.v20190711.SmsClient;
//import com.tencentcloudapi.sms.v20190711.models.SendSmsRequest;
//import com.tencentcloudapi.sms.v20190711.models.SendSmsResponse;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Service;
//
///**
// * @ClassName : TencentSmsService
// * @Description : 腾讯云短信服务
// * @Author : jiaoruizhen
// * @Date: 2020-12-29 14:39
// */
//@Service
//@Slf4j
//public class TencentSmsService {
//
//
// public ObjectRestResponse sendSms(String phone, String message) {
// try{
//
// Credential cred = new Credential("AKIDkfPxIRmqxlgOuDv2XVKgqtlII6waAzPe", "FZhqmqjOQGtJl1PehXD8uhJ1ItHSTH7o");
//
// HttpProfile httpProfile = new HttpProfile();
// httpProfile.setEndpoint("sms.tencentcloudapi.com");
//
// ClientProfile clientProfile = new ClientProfile();
// clientProfile.setHttpProfile(httpProfile);
//
// SmsClient client = new SmsClient(cred, "", clientProfile);
//
// String params = "{\"PhoneNumberSet\":[\"+86"+ phone +"\"],\"TemplateID\":\"365123\",\"Sign\":\"中科光启\",\"TemplateParamSet\":[\""+message+"\"],\"SmsSdkAppid\":\"1400227859\"}";
// SendSmsRequest req = SendSmsRequest.fromJsonString(params, SendSmsRequest.class);
//
// SendSmsResponse resp = client.SendSms(req);
// return ObjectRestResponse.succ(resp);
// } catch (TencentCloudSDKException e) {
// System.out.println(e.toString());
// }
// return ObjectRestResponse.succ();
// }
//
// public static void main(String [] args) {
//
// }
//
//}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment