mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 对接内蒙古平台
This commit is contained in:
@@ -5,6 +5,7 @@ import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
||||
import com.jsowell.thirdparty.lianlian.common.CommonResult;
|
||||
@@ -53,7 +54,7 @@ public class ThirdPartyBaseController extends BaseController {
|
||||
// 解析DTO
|
||||
protected <T> T parseDto(CommonParamsDTO dto, Class<T> targetClass) {
|
||||
// 解密
|
||||
String operatorId = dto.getOperatorID();
|
||||
String operatorId = StringUtils.isNotBlank(dto.getOperatorID()) ? dto.getOperatorID() : dto.getPlatformID();
|
||||
// 通过operatorId 查出 operatorSecret
|
||||
// ThirdPartyPlatformConfig platformConfig = thirdPartyPlatformConfigService.getInfoByOperatorId(operatorId);
|
||||
ThirdPartySecretInfoVO secretInfoVO = thirdpartySecretInfoService.queryByOperatorId(operatorId);
|
||||
@@ -61,8 +62,8 @@ public class ThirdPartyBaseController extends BaseController {
|
||||
throw new BusinessException("1", "无此对接平台");
|
||||
}
|
||||
|
||||
String dataSecret = secretInfoVO.getTheirDataSecret();
|
||||
String dataSecretIv = secretInfoVO.getTheirDataSecretIv();
|
||||
String dataSecret = secretInfoVO.getOurDataSecret();
|
||||
String dataSecretIv = secretInfoVO.getOurDataSecretIv();
|
||||
|
||||
// 解密data 获取参数中的OperatorSecret
|
||||
String decrypt = Cryptos.decrypt(dto.getData(), dataSecret, dataSecretIv);
|
||||
|
||||
Reference in New Issue
Block a user