mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-04 22:18:02 +08:00
Merge branch 'dev-new-rabbitmq' into dev-new
This commit is contained in:
@@ -14,7 +14,6 @@ import com.jsowell.common.response.RestApiResponse;
|
|||||||
import com.jsowell.common.util.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.common.util.poi.ExcelUtil;
|
import com.jsowell.common.util.poi.ExcelUtil;
|
||||||
import com.jsowell.pile.domain.PileStationInfo;
|
import com.jsowell.pile.domain.PileStationInfo;
|
||||||
import com.jsowell.pile.domain.ThirdPartySettingInfo;
|
|
||||||
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
||||||
import com.jsowell.pile.dto.FastCreateStationDTO;
|
import com.jsowell.pile.dto.FastCreateStationDTO;
|
||||||
import com.jsowell.pile.dto.PushStationInfoDTO;
|
import com.jsowell.pile.dto.PushStationInfoDTO;
|
||||||
@@ -147,6 +146,7 @@ public class PileStationInfoController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 后管站点基本资料页面
|
* 后管站点基本资料页面
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
||||||
@@ -189,6 +189,7 @@ public class PileStationInfoController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 高德地图商家推送静态信息状态
|
* 高德地图商家推送静态信息状态
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -229,6 +230,7 @@ public class PileStationInfoController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改站点二维码前缀
|
* 修改站点二维码前缀
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -244,6 +246,7 @@ public class PileStationInfoController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询站点互联互通配置
|
* 查询站点互联互通配置
|
||||||
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -262,13 +265,13 @@ public class PileStationInfoController extends BaseController {
|
|||||||
* @param info
|
* @param info
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
// @PreAuthorize("@ss.hasPermi('pile:station:query')")
|
||||||
@PostMapping("/getSettingInfo")
|
// @PostMapping("/getSettingInfo")
|
||||||
public TableDataInfo getSettingInfo(@RequestBody ThirdPartySettingInfo info) {
|
// public TableDataInfo getSettingInfo(@RequestBody ThirdPartySettingInfo info) {
|
||||||
List<ThirdPartySettingInfo> infos = thirdPartySettingInfoService.selectThirdPartySettingInfoList(info);
|
// List<ThirdPartySettingInfo> infos = thirdPartySettingInfoService.selectThirdPartySettingInfoList(info);
|
||||||
return getDataTable(infos);
|
// return getDataTable(infos);
|
||||||
// return AjaxResult.success(thirdPartySettingInfoService.selectSettingInfo(info));
|
// // return AjaxResult.success(thirdPartySettingInfoService.selectSettingInfo(info));
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改站点互联互通配置信息
|
* 修改站点互联互通配置信息
|
||||||
@@ -293,10 +296,10 @@ public class PileStationInfoController extends BaseController {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送充电站信息 notification_stationInfo
|
* 推送充电站信息 notification_stationInfo
|
||||||
* http://localhost:8080/LianLian/pushStationInfo
|
* http://localhost:8080/LianLian/pushStationInfo
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -335,6 +338,7 @@ public class PileStationInfoController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定停车平台(停车充电下发优惠券)
|
* 绑定停车平台(停车充电下发优惠券)
|
||||||
|
*
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -358,6 +362,7 @@ public class PileStationInfoController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取停车平台列表
|
* 获取停车平台列表
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getParkingInfoList")
|
@GetMapping("/getParkingInfoList")
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.jsowell.common.core.domain.parking;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停车场公告参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ParkingCommonParam {
|
||||||
|
/**
|
||||||
|
* 服务名称
|
||||||
|
*/
|
||||||
|
private String service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 版本
|
||||||
|
*/
|
||||||
|
private String version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消息ID(唯一)
|
||||||
|
*/
|
||||||
|
private String msgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构ID(分配)
|
||||||
|
*/
|
||||||
|
private String orgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 具体业务接口json对象
|
||||||
|
*/
|
||||||
|
private Map<String, String> data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求签名
|
||||||
|
*/
|
||||||
|
private String sign;
|
||||||
|
|
||||||
|
public Map<String, String> getPublicParams() {
|
||||||
|
Map<String, String> publicParams = new HashMap<>();
|
||||||
|
publicParams.put("service", service);
|
||||||
|
publicParams.put("version", version);
|
||||||
|
publicParams.put("msgId", msgId);
|
||||||
|
publicParams.put("orgId", orgId);
|
||||||
|
return publicParams;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package com.jsowell.common.util;
|
||||||
|
|
||||||
|
import com.jsowell.common.core.domain.parking.ParkingCommonParam;
|
||||||
|
import com.jsowell.common.util.sign.MD5Util;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停车平台工具类
|
||||||
|
*/
|
||||||
|
public class ParkingUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算sign
|
||||||
|
*/
|
||||||
|
public static String generateSign(Map<String, String> publicParams, Map<String, String> businessParams, String secretKey) {
|
||||||
|
// Step 1: 过滤空值并按照ASCII码排序公共参数
|
||||||
|
StringBuilder stringA = new StringBuilder();
|
||||||
|
publicParams.entrySet().stream()
|
||||||
|
.filter(entry -> entry.getValue() != null && !entry.getValue().isEmpty())
|
||||||
|
.sorted(Map.Entry.comparingByKey())
|
||||||
|
.forEach(entry -> stringA.append(entry.getKey()).append("=").append(entry.getValue()).append("|"));
|
||||||
|
|
||||||
|
// Step 2: 过滤空值并按照ASCII码排序业务参数
|
||||||
|
StringBuilder stringB = new StringBuilder();
|
||||||
|
businessParams.entrySet().stream()
|
||||||
|
.filter(entry -> entry.getValue() != null && !entry.getValue().isEmpty())
|
||||||
|
.sorted(Map.Entry.comparingByKey())
|
||||||
|
.forEach(entry -> stringB.append(entry.getKey()).append("=").append(entry.getValue()).append("|"));
|
||||||
|
|
||||||
|
// Step 3: 拼接字符串A、B和机构密钥
|
||||||
|
String stringC = stringA.toString() + stringB.toString() + secretKey;
|
||||||
|
|
||||||
|
// Step 4: 对字符串C进行MD5加密并返回小写的签名
|
||||||
|
return MD5Util.MD5Encode(stringC).toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置sign
|
||||||
|
*/
|
||||||
|
public static void generateAndSetSign(ParkingCommonParam param, String secretKey) {
|
||||||
|
String sign = generateSign(param.getPublicParams(), param.getData(), secretKey);
|
||||||
|
param.setSign(sign);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
// 模拟公共请求参数
|
||||||
|
Map<String, String> publicParams = new HashMap<>();
|
||||||
|
publicParams.put("service", "getOwner");
|
||||||
|
publicParams.put("version", "01");
|
||||||
|
publicParams.put("msgId", "f719b06d-210b-4989-9c7f-02e85f22fe01");
|
||||||
|
publicParams.put("orgId", "BTTEST01");
|
||||||
|
|
||||||
|
// 模拟业务请求参数
|
||||||
|
Map<String, String> businessParams = new HashMap<>();
|
||||||
|
businessParams.put("parkId", "11609");
|
||||||
|
businessParams.put("phone", "13148762240");
|
||||||
|
businessParams.put("name", "pasika");
|
||||||
|
businessParams.put("address", "测试");
|
||||||
|
|
||||||
|
// 机构密钥
|
||||||
|
String secretKey = "K9OGNA7CIY8N5GXD8HF3WVDMEZNFKL3F";
|
||||||
|
|
||||||
|
// 计算签名
|
||||||
|
String sign = generateSign(publicParams, businessParams, secretKey);
|
||||||
|
System.out.println("Generated Sign: " + sign);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -121,14 +121,6 @@ export function getRelationByStationId(id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询站点互联互通配置
|
|
||||||
export function getSettingInfo(data) {
|
|
||||||
return request({
|
|
||||||
url: "/pile/station/getSettingInfo",
|
|
||||||
method: "post",
|
|
||||||
data: data,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改站点互联互通配置
|
// 修改站点互联互通配置
|
||||||
export function updateSettingByStationId(data) {
|
export function updateSettingByStationId(data) {
|
||||||
|
|||||||
@@ -255,10 +255,8 @@ import stationWhiteList from "@/views/pile/station/stationWhiteList";
|
|||||||
import {
|
import {
|
||||||
getStationInfo,
|
getStationInfo,
|
||||||
updateStationQRCodePrefix,
|
updateStationQRCodePrefix,
|
||||||
getSettingByStationId,
|
|
||||||
updateSettingByStationId,
|
updateSettingByStationId,
|
||||||
pushStationInfo,
|
pushStationInfo,
|
||||||
getSettingInfo,
|
|
||||||
getParkingInfoList,
|
getParkingInfoList,
|
||||||
bindParkingPlatform,
|
bindParkingPlatform,
|
||||||
getRelationByStationId,
|
getRelationByStationId,
|
||||||
|
|||||||
Reference in New Issue
Block a user