|
|
@ -1,6 +1,8 @@ |
|
|
package com.example.demo.serviceImpl.bean; |
|
|
package com.example.demo.serviceImpl.bean; |
|
|
|
|
|
|
|
|
|
|
|
import com.example.demo.Util.BaseDES; |
|
|
import com.example.demo.Util.BaseDES2; |
|
|
import com.example.demo.Util.BaseDES2; |
|
|
|
|
|
import com.example.demo.Util.BaseDES3; |
|
|
import com.example.demo.domain.vo.bean.*; |
|
|
import com.example.demo.domain.vo.bean.*; |
|
|
import com.example.demo.domain.vo.coin.Gold; |
|
|
import com.example.demo.domain.vo.coin.Gold; |
|
|
import com.example.demo.domain.vo.coin.GoldUser; |
|
|
import com.example.demo.domain.vo.coin.GoldUser; |
|
|
@ -162,6 +164,7 @@ public class BeanRechargeServiceImpl implements BeanRechargeService { |
|
|
return Result.error("备注不能为空"); |
|
|
return Result.error("备注不能为空"); |
|
|
} |
|
|
} |
|
|
String jwcode = recharge.getJwcode().toString(); |
|
|
String jwcode = recharge.getJwcode().toString(); |
|
|
|
|
|
String jwcodeDC = recharge.getJwcode().toString(); |
|
|
// String jwcode = "2e35cadd48a15cc4cd834d35e38faa71"; |
|
|
// String jwcode = "2e35cadd48a15cc4cd834d35e38faa71"; |
|
|
try { |
|
|
try { |
|
|
BaseDES2 d = new BaseDES2(); |
|
|
BaseDES2 d = new BaseDES2(); |
|
|
@ -169,6 +172,12 @@ public class BeanRechargeServiceImpl implements BeanRechargeService { |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
return Result.error("加密失败"); |
|
|
return Result.error("加密失败"); |
|
|
} |
|
|
} |
|
|
|
|
|
try { |
|
|
|
|
|
BaseDES3 d = new BaseDES3(); |
|
|
|
|
|
jwcodeDC = d.encrypt(jwcodeDC); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
return Result.error("加密失败"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
// 构建完整的请求URL |
|
|
// 构建完整的请求URL |
|
|
@ -180,7 +189,7 @@ public class BeanRechargeServiceImpl implements BeanRechargeService { |
|
|
|
|
|
|
|
|
// 创建请求体,使用MultiValueMap存储参数 |
|
|
// 创建请求体,使用MultiValueMap存储参数 |
|
|
MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); |
|
|
MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); |
|
|
params.add("jwcode", jwcode); |
|
|
|
|
|
|
|
|
params.add("jwcode", jwcodeDC); |
|
|
|
|
|
|
|
|
// 构建请求实体 |
|
|
// 构建请求实体 |
|
|
HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(params, headers); |
|
|
HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(params, headers); |
|
|
|