Commit ba6e1584 authored by renjie's avatar renjie

续费购买ip赠送bug

parent dc9fe7b5
...@@ -288,11 +288,13 @@ public class IpResourceServiceImpl implements IpResourceService { ...@@ -288,11 +288,13 @@ public class IpResourceServiceImpl implements IpResourceService {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("iplist", ipResourceRequestDto.getAddr()); map.put("iplist", ipResourceRequestDto.getAddr());
int period = 0;
period = ipResourceRequestDto.getPeriod();
if (ipResourceRequestDto.getUnit().equals("month") && ipResourceRequestDto.getPeriod() == 6) if (ipResourceRequestDto.getUnit().equals("month") && ipResourceRequestDto.getPeriod() == 6)
ipResourceRequestDto.setPeriod(7); period = 7;
else if (ipResourceRequestDto.getUnit().equals("month") && ipResourceRequestDto.getPeriod() == 12) else if (ipResourceRequestDto.getUnit().equals("month") && ipResourceRequestDto.getPeriod() == 12)
ipResourceRequestDto.setPeriod(14); period = 14;
map.put("period", ipResourceRequestDto.getPeriod()); map.put("period", period);
map.put("unit", ipResourceRequestDto.getUnit()); map.put("unit", ipResourceRequestDto.getUnit());
HttpHeaders headers = buildPostHeader(); HttpHeaders headers = buildPostHeader();
HttpEntity<Map<String, Object>> entity = new HttpEntity<>(map, headers); HttpEntity<Map<String, Object>> entity = new HttpEntity<>(map, headers);
......
...@@ -95,11 +95,13 @@ public class BrowserTask { ...@@ -95,11 +95,13 @@ public class BrowserTask {
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("name", ipResource.getUsername()); map.put("name", ipResource.getUsername());
map.put("region", ipResource.getRegion()); map.put("region", ipResource.getRegion());
int period = 0;
period = ipResource.getPeriod();
if (ipResource.getUnit().equals("month") && ipResource.getPeriod() == 6) if (ipResource.getUnit().equals("month") && ipResource.getPeriod() == 6)
ipResource.setPeriod(7); period = 7;
else if (ipResource.getUnit().equals("month") && ipResource.getPeriod() == 12) else if (ipResource.getUnit().equals("month") && ipResource.getPeriod() == 12)
ipResource.setPeriod(14); period = 14;
map.put("period", String.valueOf(ipResource.getPeriod())); map.put("period", String.valueOf(period));
map.put("provider", ipResource.getVendor()); map.put("provider", ipResource.getVendor());
map.put("unit", ipResource.getUnit()); map.put("unit", ipResource.getUnit());
map.put("amount", 1); map.put("amount", 1);
......
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