Browse Source

Merge branch 'dev-mysql' into erp_batchToGoods_20180117

# Conflicts:
#	src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java
yujia 8 years ago
parent
commit
195cbff299

+ 8 - 4
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductServiceImpl.java

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

+ 7 - 3
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ReleaseProductByBatchServiceImpl.java

@@ -39,6 +39,7 @@ import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.poi.hssf.usermodel.HSSFDateUtil;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.ss.usermodel.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.dao.DataAccessException;
 import org.springframework.dao.DataAccessException;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Page;
 import org.springframework.data.jpa.domain.Specification;
 import org.springframework.data.jpa.domain.Specification;
@@ -104,6 +105,9 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 	@Autowired
 	@Autowired
 	private ProductPrivateDao productPrivateDao;
 	private ProductPrivateDao productPrivateDao;
 
 
+	@Value("#{sys.productServiceIp}")
+	private String productServiceIp;
+
 	@Override
 	@Override
 	public ReleaseProductByBatch save(ReleaseProductByBatch releaseProductByBatch) {
 	public ReleaseProductByBatch save(ReleaseProductByBatch releaseProductByBatch) {
 		return releaseProductByBatch;
 		return releaseProductByBatch;
@@ -1041,7 +1045,7 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
 		if (!CollectionUtils.isEmpty(releaseProductByBatchList)) {
 		if (!CollectionUtils.isEmpty(releaseProductByBatchList)) {
 			List<com.uas.ps.entity.Product> products = convertProduct(releaseProductByBatchList,false);
 			List<com.uas.ps.entity.Product> products = convertProduct(releaseProductByBatchList,false);
 			// TODO 什么接口
 			// TODO 什么接口
-			String result = restTemplate.postForEntity("http://192.168.253.12:24000/product/update", products, String.class).getBody();
+			String result = restTemplate.postForEntity(productServiceIp + "/product/update", products, String.class).getBody();
 			List<Long> productIds = JSON.parseArray(result, Long.class);
 			List<Long> productIds = JSON.parseArray(result, Long.class);
 			// 默认为b2c Enable开启
 			// 默认为b2c Enable开启
 			List<ProductPrivate> productPrivates = new ArrayList<>();
 			List<ProductPrivate> productPrivates = new ArrayList<>();
@@ -1154,12 +1158,12 @@ public class ReleaseProductByBatchServiceImpl implements ReleaseProductByBatchSe
         if (!CollectionUtils.isEmpty(releaseProductByBatchList)) {
         if (!CollectionUtils.isEmpty(releaseProductByBatchList)) {
             List<com.uas.ps.entity.Product> products = convertProduct(releaseProductByBatchList,true);
             List<com.uas.ps.entity.Product> products = convertProduct(releaseProductByBatchList,true);
             // TODO 什么接口
             // TODO 什么接口
-			String result = restTemplate.postForEntity("http://192.168.253.12:24000/product/update", products, String.class).getBody();
+			String result = restTemplate.postForEntity(productServiceIp + "/product/update", products, String.class).getBody();
             List<Long> productIds = JSON.parseArray(result, Long.class);
             List<Long> productIds = JSON.parseArray(result, Long.class);
             Map<String,Object> requestMap = new HashMap<>();
             Map<String,Object> requestMap = new HashMap<>();
             requestMap.put("userUU",SystemSession.getUser().getUserUU());
             requestMap.put("userUU",SystemSession.getUser().getUserUU());
             //添加个人关系
             //添加个人关系
-            String res  = restTemplate.postForEntity("http://192.168.253.12:24000/product/assign/batch", productIds, String.class, requestMap).getBody();
+            String res  = restTemplate.postForEntity(productServiceIp + "/product/assign/batch", productIds, String.class, requestMap).getBody();
             // 默认为b2c Enable开启
             // 默认为b2c Enable开启
             List<ProductPrivate> productPrivates = new ArrayList<>();
             List<ProductPrivate> productPrivates = new ArrayList<>();
             for (Long prId : productIds) {
             for (Long prId : productIds) {

+ 2 - 0
src/main/resources/dev/sys.properties

@@ -39,6 +39,8 @@ uploadFileUrl = http://10.10.100.200:9999
 searchUrl = http://10.10.100.191:8092
 searchUrl = http://10.10.100.191:8092
 # message ip
 # message ip
 messageServiceIp=http://message.ubtob.com/
 messageServiceIp=http://message.ubtob.com/
+# product public ip
+productServiceIp=http://192.168.253.12:24000
 
 
 # Kafka
 # Kafka
 kafka-bootstrap-servers=10.10.100.11:9292,10.10.100.12:9292,10.10.100.13:9292,10.10.100.14:9292,10.10.100.15:9292,10.10.100.16:9292
 kafka-bootstrap-servers=10.10.100.11:9292,10.10.100.12:9292,10.10.100.13:9292,10.10.100.14:9292,10.10.100.15:9292,10.10.100.16:9292

+ 2 - 0
src/main/resources/prod/sys.properties

@@ -41,6 +41,8 @@ searchUrl=http://10.10.0.76:8081
 
 
 # message ip
 # message ip
 messageServiceIp=http://message.ubtob.com/
 messageServiceIp=http://message.ubtob.com/
+# product public ip
+productServiceIp=http://192.168.253.12:24000
 
 
 # Kafka
 # Kafka
 kafka-bootstrap-servers=10.10.100.11:9292,10.10.100.12:9292,10.10.100.13:9292,10.10.100.14:9292,10.10.100.15:9292,10.10.100.16:9292
 kafka-bootstrap-servers=10.10.100.11:9292,10.10.100.12:9292,10.10.100.13:9292,10.10.100.14:9292,10.10.100.15:9292,10.10.100.16:9292

+ 2 - 0
src/main/resources/test/sys.properties

@@ -40,6 +40,8 @@ searchUrl = http://10.10.100.191:8092
 
 
 # message ip
 # message ip
 messageServiceIp=http://message.ubtob.com/
 messageServiceIp=http://message.ubtob.com/
+# product public ip
+productServiceIp=http://192.168.253.12:24000
 
 
 # Kafka
 # Kafka
 kafka-bootstrap-servers=10.10.100.11:9292,10.10.100.12:9292,10.10.100.13:9292,10.10.100.14:9292,10.10.100.15:9292,10.10.100.16:9292
 kafka-bootstrap-servers=10.10.100.11:9292,10.10.100.12:9292,10.10.100.13:9292,10.10.100.14:9292,10.10.100.15:9292,10.10.100.16:9292

+ 1 - 0
src/main/webapp/resources/view/common/modal/delete_modal.html

@@ -10,6 +10,7 @@
         width: 310px;
         width: 310px;
         border-radius: 0;
         border-radius: 0;
         outline: 0;
         outline: 0;
+        overflow: hidden;
     }
     }
     .modal-dialog{
     .modal-dialog{
         height: 152px;
         height: 152px;

+ 5 - 0
src/main/webapp/resources/view/usercenter/forstore/home_center.html

@@ -23,6 +23,11 @@
     .user_r_01 dl dd span.enName{
     .user_r_01 dl dd span.enName{
         max-width: 305px;
         max-width: 305px;
     }
     }
+    .user_r_02 .line02 p {
+        margin: 0 !important;
+        padding-left: 22px;
+        word-break: break-all;
+    }
 </style>
 </style>
 <!--右侧主体部分-->
 <!--右侧主体部分-->
 <div class="user_home">
 <div class="user_home">

+ 2 - 2
src/main/webapp/resources/view/usercenter/left_nav.html

@@ -20,7 +20,7 @@
     .disabled {
     .disabled {
         cursor: not-allowed;
         cursor: not-allowed;
     }
     }
-    #toast-container {
+ /*   #toast-container {
         top: 36px;
         top: 36px;
     }
     }
     #toast-container > .toast-info {
     #toast-container > .toast-info {
@@ -28,7 +28,7 @@
         font-size: 14px;
         font-size: 14px;
         font-weight: normal;
         font-weight: normal;
         width: auto;
         width: auto;
-    }
+    }*/
 </style>
 </style>
 <body>
 <body>
     <div id="left-nav-fragment" ng-controller="leftNavCtrl">
     <div id="left-nav-fragment" ng-controller="leftNavCtrl">

+ 2 - 2
src/main/webapp/resources/view/vendor/left_nav.html

@@ -21,7 +21,7 @@
 	.disabled {
 	.disabled {
 		cursor: not-allowed;
 		cursor: not-allowed;
 	}
 	}
-	#toast-container {
+	/*#toast-container {
 		top: 36px;
 		top: 36px;
 	}
 	}
 	#toast-container > .toast-info {
 	#toast-container > .toast-info {
@@ -29,7 +29,7 @@
 		font-size: 14px;
 		font-size: 14px;
 		font-weight: normal;
 		font-weight: normal;
 		width: auto;
 		width: auto;
-	}
+	}*/
 	.user_content .user_left ul li span {
 	.user_content .user_left ul li span {
 		width: 100%;
 		width: 100%;
 		display: inline-block;
 		display: inline-block;