Commit 3c2b85fd authored by renjie's avatar renjie

ip续费bug

parent bfa09f37
......@@ -312,7 +312,7 @@ public class IpResourceServiceImpl implements IpResourceService {
} });
double newprice = ipResourceRequestDto.getUnit().equals("week") ? (int) (totalprice.get() /3) : totalprice.get().intValue();
double newprice = ipResourceRequestDto.getUnit().equals("week") ? (int) (totalprice.get()/3) : totalprice.get().intValue();
IpChargeResultDto ipChargeResultDto = accountService.preChargeByMoney(username, newprice);
if (!ipChargeResultDto.isSuccess()) {
throw new ClientRequestException(AccountErrorCode.NOTENOUGHBALANCE);
......@@ -326,6 +326,7 @@ public class IpResourceServiceImpl implements IpResourceService {
else if (ipResourceRequestDto.getUnit().equals("month") && ipResourceRequestDto.getPeriod() == 12)
ipResourceRequestDto.setPeriod(14);
map.put("period", ipResourceRequestDto.getPeriod());
map.put("unit", ipResourceRequestDto.getUnit());
HttpHeaders headers = buildPostHeader();
HttpEntity<Map<String, Object>> entity = new HttpEntity<>(map, headers);
ResponseEntity<String> result = restTemplate.exchange(URL + "/intelligroup/renewip?accountId=browser", HttpMethod.PUT, entity, String.class);
......
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