|
|
@@ -57,6 +57,7 @@ import org.apache.commons.beanutils.ConvertUtils;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.log4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.dao.DataAccessException;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.PageImpl;
|
|
|
@@ -187,6 +188,9 @@ public class ProductServiceImpl implements ProductService {
|
|
|
@Autowired
|
|
|
private UASBatchPutOnPropertyService uasBatchPutOnPropertyService;
|
|
|
|
|
|
+ @Value("#{sys.productServiceIp}")
|
|
|
+ private String productServiceIp;
|
|
|
+
|
|
|
private ConcurrentHashMap<String, Field> sortFields = new ConcurrentHashMap<String, Field>();
|
|
|
|
|
|
@Override
|
|
|
@@ -367,7 +371,7 @@ public class ProductServiceImpl implements ProductService {
|
|
|
Map<String,Object> requestMap = new HashMap<>();
|
|
|
requestMap.put("userUU",productPersonList.get(0).getUserUU());
|
|
|
requestMap.put("productId",productPersonList.get(0).getProductId());
|
|
|
- String res = restTemplate.postForEntity("http://192.168.253.12:24000/product/assign/delete", null, String.class, requestMap).getBody();
|
|
|
+ String res = restTemplate.postForEntity( productServiceIp+"/product/assign/delete", null, String.class, requestMap).getBody();
|
|
|
// Long ppid = productPersonList.get(0).getId();
|
|
|
// productPersonDao.delete(ppid);
|
|
|
}
|
|
|
@@ -754,7 +758,7 @@ public class ProductServiceImpl implements ProductService {
|
|
|
int fail = 0;
|
|
|
Map<String, Long> queryMap = new HashMap<>();
|
|
|
queryMap.put("enUU", enUU);
|
|
|
- String successUrl = "http://192.168.253.129:8099/product/match/nonProduct";
|
|
|
+ String successUrl = productServiceIp + "/product/match/nonProduct";
|
|
|
String result = restTemplate.postForEntity(successUrl, queryMap, String.class).getBody();
|
|
|
ModelMap map = FastjsonUtils.fromJson(result, ModelMap.class);
|
|
|
fail = total - (int) map.get("success");
|
|
|
@@ -861,7 +865,7 @@ public class ProductServiceImpl implements ProductService {
|
|
|
productPrivate.setBatchCount(0);
|
|
|
productPrivateDao.save(productPrivate);
|
|
|
}
|
|
|
- restTemplate.postForEntity("http://192.168.253.129:8099/product/update", afterProduct, String.class);
|
|
|
+ restTemplate.postForEntity(productServiceIp + "/product/update", afterProduct, String.class);
|
|
|
updateInfoAfterTurnStandard(matchId, standardProduct);
|
|
|
return ResultMap.success(null);
|
|
|
}
|
|
|
@@ -892,7 +896,7 @@ public class ProductServiceImpl implements ProductService {
|
|
|
return new ResultMap(CodeType.NO_INFO, "匹配结果信息丢失");
|
|
|
}
|
|
|
Product standardProduct = updateProductAfterMatch(beforeProduct, result);
|
|
|
- restTemplate.postForEntity("http://192.168.253.129:8099/product/update", standardProduct, String.class);
|
|
|
+ restTemplate.postForEntity(productServiceIp + "/product/update", standardProduct, String.class);
|
|
|
|
|
|
Product afterProduct = productDao.findOne(afterId);
|
|
|
updateInfoAfterTurnStandard(beforeId, afterProduct);
|