update 对接内蒙古平台

This commit is contained in:
2024-04-19 14:06:01 +08:00
parent 646e88b057
commit 7e41f69f5a
9 changed files with 105 additions and 52 deletions

View File

@@ -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);